Computers and Technology
Computers and Technology, 04.09.2019 00:10, martina28

In chapter 6, the class clock was designed to implement the time of day in a program. certain applications—in addition to storing hours, minutes, and seconds—might require you to store the time zone. derive the class extclock from the class clock by adding a data member to store the time zone. add the necessary methods and constructors to make the class func- tional. also, write the definitions of the methods and the constructors. finally, write a test program to test your class.(in java )

answer
Answers: 1

Similar questions

Предмет
Computers and Technology, 26.09.2019 22:30, alexgold3
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/f72ac90bf69c67bd0c7bebc678930073use chapter 11 in this book if you want for reference purposes
Answers: 1
Do you know the correct answer?
In chapter 6, the class clock was designed to implement the time of day in a program. certain applic...

Questions in other subjects:

Konu
Mathematics, 27.04.2021 18:10