subject

This is a c++ assignment.2. in this chapter, the class datetype was designed to implement the date in a program, but the member function setdate and the constructor do not check whether the date is valid before storing the date in the member variables. rewrite the definitions of the function setdate and the constructor so that the values for the month, day, and year are checked before storing the date into the member variables. add a member function, isleapyear, to check whether a year is a leap year. moreover, write a test program to test your class. take screenshots of the program running: make sure to check for a valid date and a leap year. use valid and invalid data and test a leap year and a year that is not a leap year.6. in programming exercise 2, the class datetype was designed and implemented to keep track of a date, but it has very limited operations. redefine the class datetype so that it can perform the following operations on a date, in addition to the operations already defined: a. set the month. b. set the day. c. set the year. d. return the month. e. return the day. f. return the year g. test whether the year is a leap year. h. return the number of days in the month. for example, if the date is 3-12-2017, the number of days to be returned is 31 because there are 31 days in march. i. return the number of days passed in the year. for example, if the date is 3-18-2017, the number of days passed in the year is 77. note that the number of days returned also includes the current day. j. return the number of days remaining in the year. for example, if the date is 3-18-2017, the number of days remaining in the year is 288. k. calculate the new date by adding a fixed number of days to the date. for example, if the date is 3-18-2017 and the days to be added are 25, the new date is 4-12-2017. you will modify the datetype header and class file.8. the class datetype defined in programming exercise 6 prints the date in numerical form. some applications might require the date to be printed in another form, such as march 24, 2017. derive the class extdatetype so that the date can be printed in either form. add a member variable to the class extdatetype so that the month can also be stored in string form. add a member function to output the month in the string format, followed by the year—for example, in the form march 2017. write the definitions of the functions to implement the operations for the class extdatetype. you will create a class called extdatetype. make sure to test your class and include screenshots of the class test. complete the following program in codeblocks(17.12) and include main. cpp, datetype. cpp, datetype. h, extdatetype. cpp, and extdatetype. h. i will make sure to give a thumbs up if done correctly and no errors. : //93.174.95.29/_ads/f72ac90bf69c67b d0c7bebc678930073use chapter 11 in this book if you want for reference purposes

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:50
What does operator overloading allow you to do?
Answers: 2
question
Computers and Technology, 22.06.2019 11:20
The kurt vonnegut commencement speech, the neiman-marcus chocolate chip cookie recipe, and the get-well emails to the dying boy are examples of select one: a. social engineering b. hoax emails c. email viruses d. worms
Answers: 1
question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
You know the right answer?
This is a c++ assignment.2. in this chapter, the class datetype was designed to implement the date i...
Questions
Questions on the website: 13722360