Question: (C++) Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, such

(C++)

Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, such as Sun for Sunday. The program should be able to perform the following operation on objects of the type dayType:

a) A default constructor

b) A copy constructor

c) Set the day

d) Print the day

e) Return the day

f) Return the next day

g) Return the previous day

h) Update the day, stored in a dayType object , by adding certain days to it. For example, if the day is Monday and you add 4 days, the updated day is Friday. Similarly, if the day is Tuesday, and you add 13 days, the updated day is Monday.

i) Write the main program to test the dayType class, you have to test all the functions in the class design.

( Please show comments each step and output!!)

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 Databases Questions!