Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NOTE: plss DO IT IN 45MINs plsss i will give UPVOTE definetly!!! its JAVA theory question... plss do it in 45mins whatever you completed in
NOTE:
plss DO IT IN 45MINs plsss i will give UPVOTE definetly!!!
its JAVA theory question...
plss do it in 45mins whatever you completed in 45mins you can send it. ITS VERY IMPORTANT!!
you can decrease steps or whatever to send it on time!!!!
Write the definition for a class called Difference that accepts the date of birth of two friends and finds the elder and younger among the two. The data members are date, month, and year.
The class has the following member functions:
void set(name, int, int, int) - to assign a date of birth of a person
void disp() - to display the elder and younger among the two
Difference validate (Difference) - to check if the given dates are valid or not in terms of date, month, and year (not greater than the current date)
1. Write the definitions for each of the above member functions.
2. Write the main function to create two objects. Set the value in two objects and call validate () to check the dates
3. Also display the elder and younger among the two.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started