Question: Part 1 : A Date class. Design a class called Date. The class should store a date in three integers: month, day, and year. There

Part 1: A Date class.
Design a class called Date. The class should store a date in three integers: month, day, and year. There should be member functions to print the date in the following forms:
12/25/2028
December 25,2028
25 December 2028
Demonstrate the class by writing a main driver program implementing it.
Perform the following input validation: Do not accept values for the day greater than 31 or less than 1. Do not accept values for the month greater than 12 or less than 1.
Part 2: A Payroll class.
Design a Payroll class that has data members for an employees hourly pay rate, number of hours worked and total pay for the week. Write a program with an array of seven Payroll objects. The program should ask the user for the number of hours each employee has worked and will then display the amount of gross pay each has earned.
Demonstrate the class by writing a main driver program implementing it. You may use the same or a different main program as you did in part 1.
Perform the following input validation: Do not accept values greater than 60 for the number of hours worked.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!