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, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
What is one reason why indoor air pollution has become an increasing problem.
Answers: 1
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
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
question
Health, 04.02.2020 18:02
question
Social Studies, 04.02.2020 18:02
question
Mathematics, 04.02.2020 18:02
question
Spanish, 04.02.2020 18:02
question
Mathematics, 04.02.2020 18:02
Questions on the website: 13722362