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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 17:30, Artemis3821
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
image
Computers and Technology, 24.06.2019 05:30, kaylaamberd
Why is hard disk space important to an audio engineer? why are usb ports and firewire ports useful for an audio engineer? explain in 2-3 sentences. (3.0 points) here's a list of different audio software: ableton live apple inc.'s garageband apple inc.'s logic studio digidesign's pro tools propellerhead sofware's reason sony creative software's acid pro steinberg cubase steinberg nuendo choose one of the software programs listed above, and then go to that software program's web site. read about what the software program is used for, and then write 4-5 sentences about what you learned. (10.0 points) which type of software license is the most limiting? why? explain in 2-3 sentences. (3.0 points) when sending a midi channel voice message, how can you control the volume of the sound? explain in 2-3 sentences. (4.0 points)
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, andybiersack154
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
Answers: 1
image
Computers and Technology, 24.06.2019 18:00, Pfaith8617
Explain the circumstances for which the interquartile range is the preferred measure of dispersion. what is an advantage that the standard deviation has over the interquartile range? choose the correct answer below. a. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it increases as the dispersion of the data increases. b. the interquartile range is preferred when the data are not skewed or no have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. c. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it is resistant to extreme values. d. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it is resistant to extreme values. e. the interquartile range is preferred when the data are skewed or have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. f. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it increases as the dispersion of the data increases.
Answers: 2
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 in other subjects:

Konu
Mathematics, 20.09.2020 04:01
Konu
Mathematics, 20.09.2020 04:01
Konu
Mathematics, 20.09.2020 04:01