subject
Computers and Technology, 21.07.2020 05:01 emocow

Write a program that contains a class that implements the day of the week. Create a class called DayOfTheWeek. The class should have a single data member that can store the day of the week such as Mon for Monday, Tues for Tuesday etc...
The program should be able to perform the following on an object of the class.
1. Set the day
2. Print the day
3. Return the day
4. Return the next day
5. Return the previous day
6. Calculate and return the day by adding a certain amount of days to the current day. For example if you add 5 days to Saturday, the day to be returned is Thursday. Likewise, if we add 12 days to Wednesday, the day to be returned is Monday.
Call these functions setDay, printDay, getDay, plusOneDay, minusOneDay, and addDays. Create the necessary member functions that will perform the required operations outlined above.
Write a main program that will instantiate two objects of the class dayOfTheWeek. Create one object using default constructor and the other using overloaded constructor. Use these objects to test the various operations on this class. Use your own test data.
Use multiple files to accomplish this lab such as week. h, week. cpp, & weekMain. cpp.
Create a zip file containing the above files along with the output file.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 07:30
Aproject involves many computing systems working together on disjointed task towards a single goal what form of computing would the project be using
Answers: 3
question
Computers and Technology, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Match the following. 1. formatting that is applied when cell data meets certain criteria 2. borders with formats not found on the border tool 3. a shortcut bar that contains tools for commonly used formats 4. formats that can be applied to numbers conditional formatting custom borders format bar number formats
Answers: 3
You know the right answer?
Write a program that contains a class that implements the day of the week. Create a class called Da...
Questions
question
Mathematics, 30.06.2019 14:50
question
Biology, 30.06.2019 14:50
question
Mathematics, 30.06.2019 14:50
question
Mathematics, 30.06.2019 14:50
Questions on the website: 13722363