Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 10 Sep 2017 My Price 10.00

three integer arguments

a. Write the class definition for a Date class that contains three private integer data members: month, day, and year. Create a static member to hold a slash. Create two public member functions, setDate()and showDate(). You will use the static slash in the showDate() function. The setDate()function accepts three integer arguments and passes them on to three private functions, setMonth(), setDay(), and setYear(). If a month is greater than 12, then set it to 12. If a day is greater than 31, then set it to 31. Write a main()function that instantiates several objects of the Date class and tests the member functions. Save the file as Date.cpp.

b. Improve the setDay()function by ensuring the day is not higher than allowed for a month—31 for January, March, May, July, August, October, or December; 30 for April, June, September, or November; and 28 or 29 for February. February usually contains 28 days. If a year is evenly divisible by 4, but not by 100, February contains 29 days. (For example, February has only 28 days in 1900 and 2100.) However, if a year is evenly divisible by 400, then February has 29 days (as in the year 2000). Write a main()function that instantiates several objects of the Date class and tests the member functions. Save the file as Date2.cpp.

c. Add a public function named increaseDay()to the Date class. Its purpose is to add 1 to the day field of a Date object. When the day is increased to more than the highest day number allowed for a month, the month increases by 1 and the day is set to 1. Write a main()function that declares several Date objects that will thoroughly test all the functions; in other words, make sure some are close to the end of a month. Loop to call the increaseDay()function five times for each Date, displaying each version of the Date as soon as it is increased. Write a main()function that instantiates several objects of the Date class and tests the member functions. Save the file as Date3.cpp.

d. Add instructions to the increaseDay()function so that when the month becomes more than 12, the year increases by 1, and the month and day are set to 1. Write a main()function that declares a Date object. Set the Date to 12/29/2007 and call the increaseDay() function 400 times, displaying each version of the Date as soon as it is increased. Examine the output to make sure each month and year changes correctly. Save the file as Date4.cpp.

Answers

(5)
Status NEW Posted 10 Sep 2017 09:09 PM My Price 10.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)
Relevent Questions