Question: solve please Q2 part1) Composition a Write a class Date that contains the following members: A data member day of type integer. A data member
Q2 part1) Composition a Write a class Date that contains the following members: A data member day of type integer. A data member month of type int ger. A data member year of type integer. A dayMonths listis a class attribute that represents the number of days in each month. Contructor to initialize day, month and year to any correct value, the month value should be between 1 and 12, the day should be between 1 and the number of days for that month. Str to return the data in the form month/day/year Write a class Employee that contains the following members: - Name that represents the name of the employee Salary that represents the salary of the employee. dateOfBirth a member of type Date that represents the date of birth of the employee. Constructor to initialize data members to any given values. Str to return a string represents the information of the employee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
