Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class in C++, put the class in the same .cpp file do not make a header file for the class, i posted this

Create a class in C++, put the class in the same .cpp file do not make a header file for the class, i posted this question twice, and someone answer it and they only post the code from their h. file and leave me guessing for the .cpp code so do not do that mess please the class called Date that includes three pieces of information as data membersa month (type int), a day (type int) and a year (type int). Your class should have a constructor with three parameters that uses the parameters to initialize the three data members. For the purpose of this exercise, assume that the values provided for the year and day are correct, but ensure that the month value is in the range 112; if it isnt, set the month to 1. Provide a set and a get function for each data member. Provide a member function displayDate that displays the month, day and year separated by forward slashes (/). Write a test program that demonstrates class Dates capabilities. post a picture of the output after you run it as well as post the code with in line comments to explain

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_2

Step: 3

blur-text-image_3

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

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

Understand the advantages and disadvantages of teams.

Answered: 1 week ago