subject

24. Design a class called Date. The class should store a date in three private integers: month, day, year. There should be a member function to print out the date in the month/day/year format, e. g. 12/25/2015, 4/1/1970 There should be a constructor which takes three parameters to initialize the date. It should not accept values for day greater than 31 or less than 1, or values for month greater than 12 or less than 1. If the constructor is called with these values an error message should be printed out and the field set to 0. Any value for year is acceptable. There do not need to be any other member functions. Provide the class declaration and also the implementation of the member function and constructor.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 12:10, breezer20042
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
image
Computers and Technology, 25.06.2019 00:00, bestdiva2
What function key is used to enable the spelling and grammar function
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, aneisha0117
Which of the following statements is false? a. package access is rarely used. b. use the access modifier package to give a method or variable package access. c. classes in the same source file are part of the same package. d. if a program uses multiple classes from the same package, these classes can access each other's package access members directly through references to objects of the appropriate classes, or in the case of static members, through the class name.
Answers: 1
image
Computers and Technology, 25.06.2019 16:00, zanaplen27
Nasa’s long term goal is for travel in space to be as as travel across the atlantic. however, we are away from that.
Answers: 1
You know the right answer?
24. Design a class called Date. The class should store a date in three private integers: month, day,...

Questions in other subjects:

Konu
Mathematics, 27.01.2021 02:20
Konu
Computers and Technology, 27.01.2021 02:20
Konu
Mathematics, 27.01.2021 02:20
Konu
Mathematics, 27.01.2021 02:20