Answered step by step
Verified Expert Solution
Link Copied!

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!!!!
question:
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

What is book value?

Answered: 1 week ago

Question

What is the role of the Joint Commission in health care?

Answered: 1 week ago