Question: Program an application that opens a Console window, asks for some information and displays the time, day of the week, and the date. The application
Program an application that opens a Console window, asks for some information and displays the time, day of the week, and the date. The application updates the time every second and also displays it in various colors.
.h files (header) typically contain declarations. In this programming exercise they will contain the class declarations. The .cpp (implementation) files contain definitions.
The code:
CConsoleClass is a class that encapsulates some of the functionality of the console window. You do not have to change anything in this class. Just create an instance of it and call its methods/functions. See the header and implementation files for comments.
CTimeClass is a class that encapsulates the functionality dates and time. TimeClass.h is complete. You only need to implement the following functions in the file TimeClass.cpp:
short GetYear();
string GetMonth();
short GetDay();
string GetDayOfWeek();
short GetHour();
short GetMinute();
short GetSecond();
ConsoleWindowClock.cpp is where main lives. This is where you will be doing most of your programming. Use the function Sleep(1000); to put the console window to sleep for 1 second. Use system(cls); to clear the console window when you need to display fresh information. Example input should look like the following:
http://i.imgur.com/7RQqiBg.png
The output should then appear and resemble the following:
http://i.imgur.com/Rae7VzR.png
When complete there are 2 files to submit, ConsoleWindowClock.cpp which will contain the function main that implements your program and the file TimeClass.cpp which is the implementation of the functions declared in TimeClass.h.
I don't expect anyone to finish this, but any help would be fine.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
