subject

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. Input should be format month day year with each seperated by a space. Output should:Date #: month-day-yearIf the year is a leap year, print the date and a message indicating it is a leap year, otherwise print a message indicating that it is not a leap year. The header file for the class dateType has been provided for you. Where is the problem located?

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, HarryPotter10
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
image
Computers and Technology, 23.06.2019 17:30, cxttiemsp021
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
image
Computers and Technology, 24.06.2019 19:30, sipstick971
Dtp allows you to manipulate text boxes in the following ways. more than 1 answer. a. move them b. rotate them c. resize them d. all of the above e. none of the above
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, justintintran
Assume you need to test a function named inorder. the function inorder receives three int arguments and returns true if and only if the arguments are in non-decreasing order: that is, the second argument is not < the first and the third is not < the second. write the definition of driver function testinorder whose job it is to determine whether inorder is correct. so testinorder returns true if inorder is correct and returns false otherwise. for the purposes of this exercise, assume inorder is an expensive function call, so call it as few times as possible!
Answers: 1
You know the right answer?
In this chapter, the class dateType was designed to implement the date in a program, but the member...

Questions in other subjects:

Konu
Mathematics, 13.05.2021 19:20
Konu
Mathematics, 13.05.2021 19:20
Konu
Mathematics, 13.05.2021 19:20
Konu
Mathematics, 13.05.2021 19:20