C# Answers

Questions answered by Experts: 1 362

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Create a new project, and copy your code from Task 1 to the new project (copy the contents of the Main() method and the displayDetails() method) Adapt your Main() method to capture and display the details for 4 different people. The displayDetails() method should remain unchanged.


Create a user defined method named calcCost() that accepts two double values as input (length and width), and then computes the estimated cost of painting a room (walls only, not ceiling), assuming the room is rectangular and has four full walls and the walls are 2.6 meter high. The rate for the painting job is R20 per square meter. Your method should return the estimated cost to the calling method. Create a program whose Main() method prompts a user for the length and the width of a room in meter, then calls calcCost to calculate the estimated cost. Once calculated, you should display the estimated cost. 


Write a program that prompts the user for the following values: nickname and favourite movie/series. Write a user defined method named displayDetails() that accepts two string values as input, and then displays these values. Add the required instructions to your Main() program to allow it to display the text Hello World and then calls the displayDetails() method to display your information. 


Create a c# program that determine the IP address configuration of a computer

  1. Write algorithms/pseudocode on:
  • Linear Search
  • Binary Search
  • Bubble Sort
  • Quick Sort

2.After the algorithm/pseudocode ends, provide the time complexity for each of them



Develop Employee Management System for the company. Create the class library which will have class Employee with the following details :





Employee ID, Employee Name, Salary, HRA, TA, DA, PF, TDS, Net Salary, Gross Salary






• Write method for accepting values of Employee ID, Employee Name, Salary, HRA, TA, DA, PF from user (From these HRA, TA, DA, PF are in percentage).





o If user do not provide any value for HRA, TA, DA and PF. Then use the optional values for these as follows:





HRA – 20%, TA – 10%, DA – 50%, PF – 12%





o Calculate TDS, Gross Salary and Net Salary as follow:





Gross Salary = Salary + HRA + TA + DA





TDS = 10% of Salary





Net Salary = Gross Salary – (PF + TDS)





• Create a menu based console application to register the employees in company, display employee.





• Store the employee details in collection.






Machine Problem 6.7

Write a program using string functions that will accept the name of the capital as input value and will display the corresponding country.


CAPITALS COUNTRIES

Ottawa Canada

Washington D.C. United States

Moscow Russia

Rome Italy

Manila Philippines


Let’s build a sample banking program to perform the common tasks like Withdraw and Deposit. 


Create a C# console application that prints the Area of a square.


The application must use OOP concepts:


 Create an abstract class named ShapesClass.


 ShapesClass must contain an abstract method named Area.


 Create a class named Square that inherits from ShapesClass.


 Square class must contain a Square method.


 Create a method named Area that will override abstract method Area, and then return the sides of the square.


 In the main method create an object of the square class, with the value of the side. Print the Area of the square.



Adapt the following code to run in a windows form and also add a button to reset the input length and width boxes.


namespace PaintingEstimate

{

  class Program

  {

    static void Main(string[] args)

    {

      Console.WriteLine("Program computes the cost of painting the room");

      //inputs room length and width

      Console.Write("Enter room length: ");

      int length = Convert.ToInt32(Console.ReadLine());

      Console.Write("Enter room width: ");

      int width = Convert.ToInt32(Console.ReadLine());


      //calls method

      int totalPrice = ComputePrice(length, width);


      Console.WriteLine("Total price: ${0}", totalPrice);

      Console.ReadKey();

    }


    //method computes work price

    static int ComputePrice(int length, int width)

    {

      //price per square foot

      int price = 6;

      //ceiling

      int ceil = 9;

      int totalSquare = width * ceil * 2 + length * ceil * 2;

      return price * totalSquare;

    }

  }



}




LATEST TUTORIALS
APPROVED BY CLIENTS