Question: C + + LANGUAGE Each class variable needs its own set function instea XN 1 4 d of one common one. And the set

"C++ LANGUAGE
Each class variable needs its own set function instea XN14 d of one common one.
And the set functions must check whether the user has entered valid values.
PLEASE HELP I RECEIRVED A FAILED FOMEWORK MARK :(
Define a class Date that contains integer variables for the day, month, and year.
1.1. Create the necessary methods for the class: set, get, default constructor, constructor with arguments.
1.2. Create a method that calculates the number of days between two dates (objects) submitted to it.
1.3. Create a dateUpdate method that calculates the next day (assuming 30 days in each month)
Define a class Class that contains integer variables hours and minutes. Class Time inheritance class Date members.
2.1. Create the necessary methods for the class: set, get, default constructor, constructor with arguments.
2.2. Create a timeUpdate method that calculates time after one minute.
2.3. Create a method dateAndTime, which calculates the time after one minute taking into account the date (if it is 23:59, then after one minute the time will be 00:00 the next day; if the same time is on December 31, then after one minute the new year will be ).
Write a program implementation that demonstrates all the methods in both classes."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!