Design a c# console Application that will output the salary sum of two employees
. Your program must do the following :
· Create an abstract data type, Emp. with two private data members Sal. (Type Double) and name (Type String).
· Include a constructor in the Emp class to initialize all private data members with caller-supplied values (in addition to the default constructor!)
· Overload the + operator to return the sum of two Emp objects.
· Your OutPut Should be like:
· Sum of Employees Salary : Shaban, khurrum = 450000.
Create a program that will generate twenty (20) random numbers from the range 1 to 9. The twenty random numbers shall be stored in a generic list. Print a horizontal histogram, representing the occurrence of each digit. Display also the generated combinations. 2. Refer to the sample output given below.
(Sample Ouput)
Welcome to my GENERIC LIST PROGRAM
The 20 random numbers are: 3 4 1 7 8 5 6 3 4 9 3 5 1 3 4 2 8 9 5 9
Histogram:
1 **
2 *
3 ****
4 ***
5 ***
6 *
7 *
8 **
9 ***
You have been tasked to create a new thread that will print the multiplication table of 10 and the Main
Thread will print the table of 15, they should be communication between these two threads, in such a
way that table of 10, is printed before multiplication table of 15, to maintain an ascending order.
Write a program, which removes all HTML tags and retains only the text inside them. The output should be written into the file Covid-21.txt.
Create a class called Date that has separate int member data for day, month and year. One constructor should initialize this data to 0. and another should initialize it to fixed values. A member function should display it, in day/month/year format. Write a program to add Date of two objects by overloading '+' operator.
Create a console application for the department to record information for students who receive bursaries in the department. For each recipient you need to store the recipient’s name and the number of hours outstanding. Most new recipients start with 90 hours, but there are some exceptions. As recipients works in the department, the number of hours left needs to be updated (decreased) from time to time, based on hours already worked. Implement class Recipient which has private attributes for Name and Hours. Create two constructors, one with a default allocation of 90 hours for a recipient, and the other should accept the number of hours for a recipient. In addition to the constructors, the class should have the following methods:
public string getName()
//Returns the name of the recipient
public int getHours()
//Returns the hours outstanding
public void setHours(int H)
//Set the hours outstanding
public void displayRecipient()
//Display the name and number of hours left for a recipient
In the application class (main method in the program.cs file), do the following:
Create three instances of Recipient, for Xola, David and Sandy. Xola and Sandy will start
with 90 hours, while David starts with 60 hours.
Change the number of hours outstanding, after each have worked the following number of
hours
o Xola – 20 hours
o David – 10 hours
o Sandy – 16 hours
Use the displayRecipient() method to display the names and hours left for each
Recipient
Create a console application for the department to record information for students who receive bursaries in the department. For each recipient you need to store the recipient’s name and the number of hours outstanding. Most new recipients start with 90 hours, but there are some exceptions. As recipients works in the department, the number of hours left needs to be updated (decreased) from time to time, based on hours already worked. Implement class Recipient which has private attributes for Name and Hours. Create two constructors, one with a default allocation of 90 hours for a recipient, and the other should accept the number of hours for a recipient. In addition to the constructors, the class should have the following methods:
Create a class named 'Rectangle' with two data members- length and breadth and a function to calculate the area which is 'length*breadth'. The class has three constructors which are : 1 - having no parameter - values of both length and breadth are assigned zero. 2 - having two numbers as parameters - the two numbers are assigned as length and breadth respectively. 3 - having one number as parameter - both length and breadth are assigned that number. Now, create objects of the 'Rectangle' class having none, one and two parameters and display their areas.