Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a class called DateTime , as shown in Figure 1 , and within this class, you need to define the following: A . Five
Create a class called DateTime as shown in Figure and within this class, you need to define the following:
A Five private data members that represent the time stamp, including the date
ie year, month, day, hour, and minute
B Two constructors: the default constructor and the other, will be used to set the
five data members.
C A SetDate method to set the date members only.
D A SetTime method to set the time members only.
E A Show method prints the date and time information on the screen.
F Test your class by creating an object of it in the main function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started