Develop an OOP program to maintain a list of homework
assignments. When an assignment is assigned, add it to the list, and when it is
completed, remove it. You should keep track of the due date. Your program should
provide the following services:
• Add a new assignment.
• Remove an assignment.
• Provide a list of the assignments in the order they were assigned.
• Find the assignment(s) with the earliest due date.
create a class called assignments to complete the task and use STL to implement the
linked list. compile and run your project and test all the methods.
Write a C++ program that compute the given formula below
The coordinates of a point are a pair of numbers that define its exact location on a two dimensional plane. Create a class named Coordinate that will represent a two dimensional point. Include two data fields for the x and y axis, a constructor that will require arguments to initialize the data values. Overload the + operator and - operator such that we can add, subtract, coordinates and return doubles, respectively. Write a main() that demonstrates that your class and function work correctly.
At the peak of COVID-19, most worker started working from home. Salaries of workers were reduced by 30%. Assuming income tax was also reduced by 50% from the previous rate of 15% and workers were paid on the number of hours worked in a month and each worker is supposed to work a total of 170 hours in a month. All overtime has been cancelled. If a worker does not meet the 170 hours’ threshold for a month, 5% is deducted from the salary. Assuming the hourly rate is GHC 10, Write a c++ program for the scenario narrated above. Your program should:
a) request for an employee’s name, the number of hours worked in a
month
b) define a function called payRole, your function should compute a
worker’s salary and income tax and any deductions if any
c) your program should display the results in “b” above.
d) explain the logic behind the code especially the function
Execute this code with THREE pushes and ONE pop stack s; s.push(1); s.push(2); s.push(3); cout << s.pop( ); Suppose that s is represented by a linked list. Draw the state of the private member variables of s after the above code:
_______
head_ptr | |
|_______|
Write a program to find the greatest of two given m two different classes using friend function.
WAP in C++ to find the biggest of three numbers using friend function.