Create a class date, each object is a value represented the day in the year in form year, month, day. Provide a constructor that enables an object of this class to be initialized when it is instantiated. The constructor should contain default values in case no initializes are provided. Provide Public member functions for each of the following operations: set the day, set the month, set the year, set the date, print the date in the form yyyy, mm, dd , increment the date by one day, increment the date by one month, compare two dates for equality, and final determine if one date is “less than” (comes before) another date. Include any additional operations that you think would be useful for your class. Design, implement, and test your class. Hint: write the program as 3 files (header file and 2 cpp files)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a class date, each object is a value represented the day in the
year in form year, month, day. Provide a constructor that enables an
object of this class to be initialized when it is instantiated. The
constructor should contain default values in case no initializes are
provided.
Provide Public member functions for each of the following
operations: set the day, set the month, set the year, set the date, print
the date in the form yyyy, mm, dd , increment the date by one day,
increment the date by one month, compare two dates for equality,
and final determine if one date is “less than” (comes before) another
date.
Include any additional operations that you think would be useful for your
class.
Design, implement, and test your class.

Hint: write the program as 3 files (header file and 2 cpp files)

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,