Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions