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, 22.06.2019 04:00
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
question
Computers and Technology, 25.06.2019 06:50
The federal sentencing guidelines for organizations set the tone for organizational ethics compliance programs by question 1 options: a) codifying into law incentives for organizations to take action such as developing ethical compliance programs to prevent misconduct. b) forcing all organizations to develop mandatory reporting systems and ethics programs. c) eliminating most of the federal legislation that created inefficient and time-consuming activities for businesses. d) providing detailed guidelines for how to set up organizational ethics programs to guard against unethical conduct. e) providing a thorough examination of company codes of ethics to determine whether they are sufficient.
Answers: 1
question
Computers and Technology, 25.06.2019 08:30
Acollection of computers and other devices that are connected together to enable users to share hardware, software, and data, as well as to communicate electronically with each other is called
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