Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a C++ class called Date The class should store a date as four integer values Day of the Week Month Day Year Create a

Develop a C++ class called Date

The class should store a date as four integer values

Day of the Week

Month

Day

Year

Create a constructor for the Date class which initializes all data correctly

Three member functions must also be created which print the date in one of these example formats:

M/04/23/2018

Monday, April 23, 2018

23 April 2018 is on a Monday

Demonstrate this Date class by developing a complete C++ program implementing it

Perform input validation for the day of the month

This one time you may presume all months have 31 days

Input is allowed for each month only from 1-31 inclusive

Yes. Even February has 31 days

Perform input validation for the month of the year

The allowed values are from 1-12 inclusive

What lousy Smarch weather we are having this year

Perform input validation on the year

Only years after 1900 are allowed

Perform input validation on the day of the week

As long as asking the user "makes sense" you may implement however you would like

Notice the quotes

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions