Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ language Not C or Java I need this in C++ pleaseee. 1) Design a class Date : Provide 3 instance variables ( int

In C++ language Not C or Java I need this in C++ pleaseee.

1) Design a class Date:

Provide 3 instance variables (int) to store the month, the day number, and the year

Provide the following functions:

Default constructor sets date to 1, 1, 1500

Constructor with parameters if parameters are not valid, set like default constructor

setDate if parameters are not valid, set like default constructor

Accessors for each instance variable

Mutators for each instance variable if parameter is not valid set like default constructor

Return the next day

Return the previous day

Calculate and return the day by adding a number of days to the current day. Examples: if the

current day is Monday and we add 4 days, the day to return is Friday; if the current day is Tuesday

and we add 13 days, the day to return is Monday.

Print a date in the form mm-dd-yyyy

Print a date with the month as a string (ex: March 20, 2010)

isLeap test whether the year is a leap year

Return the number of days in the month

Return the number of days passed in the year from the current date

Return the number of days remaining in the year from the current date

Calculate a new date by adding a fixed number of days to the date

Print the calendar for the particular month

(can print a calendar for any month starting January 1, 1500.

Note that the day for January 1 of the year 1500 was a Monday. To calculate the first day of the

month, you can add the appropriate number of days to Monday, January 1, 1500.)

For example, the calendar for September 2014 should be printed as:

September 2014

Sun Mon Tue Wed Thu Fri Sat

1 2 3 4 5 6

7 8 9 10 11 12 13

14 15 16 17 18 19 20

21 22 23 24 25 26 27

28 29 30

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions