Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++: First, Create a date class. Which has integer month, day and year Each with getters and setters. Be sure that you validate the getter

C++:

First, Create a date class. Which has integer month, day and year Each with getters and setters. Be sure that you validate the getter function inputs: 2 digit months - validate 1-12 for month 2 digit day - 1-3? max for day - be sure the min-max number of days is validate for specific month Use 4 digits for the year... - validate greater or equal to 0001 Have a default constructor which set values to 01 01 1900 Have a parameterized constructor which lets you set date * Next, Create a person class Which has string firstname, lastname ( private members ) Date of birth (using new date class YOU declared - place declaration as private member in person ) Write getter and setters for firstname and last name ( public members ) Write getter and setters for month, day and year for private data declaration ( public members ) Write a person default constructor function that defaults "None" "None" for firstname and lastname ( public members ) Write a person parmaterized constructor function that can pass data to firstname and lastname, and the composed birthdate. ( public members ) * Code and test a person class Declare a person Person1 using the default constructor, to test it. Using getters and setters of the person class to test fully. Declare a person Person2 using the parmaterized constructor, to test it. Using getters and setters of the person class to test fully.

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

More Books

Students also viewed these Databases questions

Question

Explain in detail how the Mughal Empire was established in India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago