Computers and Technology
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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 19:00, jaymc1932
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
image
Computers and Technology, 24.06.2019 02:10, ttangelique
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
image
Computers and Technology, 24.06.2019 18:00, valdezavery9018
Hacer un algoritmo que me permita ingresar el nombre de una parcela de terreno y muestre junto al mensaje “tipo de suelos: suelos fumíferos, ¡excelente!
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, imamador6396
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
Answers: 1
Do you know the correct answer?
Write a program that contains a class that implements the day of the week. Create a class called Da...

Questions in other subjects: