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 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
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
Mathematics, 10.12.2020 02:00
question
Mathematics, 10.12.2020 02:00
question
Mathematics, 10.12.2020 02:00
question
History, 10.12.2020 02:00
question
Mathematics, 10.12.2020 02:00
question
Mathematics, 10.12.2020 02:00
Questions on the website: 13722367