Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Please!! Develop an object-oriented programming (OOP) application to create two clocks that display simultaneously and allow for user input using secure and efficient C++

C++ Please!! Develop an object-oriented programming (OOP) application to create two clocks that display simultaneously and allow for user input using secure and efficient C++ code.

  1. Review the Chada Tech Clocks Functional Requirements, located in the Supporting Materials section.
  2. Review the following flowchart, as it is a graphical representation of the logic you will use in relation to your applications sequence of functions. A text version of this flowchart is available: Project One Flowchart Text Version.

Top of chart begins: Clear Screen

1. Display time in two formats.

2. Decision: Button Pressed?

a. If No to button pressed, then to Add 1 Second. Then Wait 1 second. Then back to Clear Screen.

b. If Yes to button pressed, then to Display Menu. Then Read user input. Then to Decision: User input = exit?.

i. If Yes to exit, then endpoint: End program.

ii. If No to exit, then Decision: Add Hour?

1. If Yes to hour, then Add 1 hour. Then back to Clear screen.

2. If No to hour, then Decision: Add Minute?.

a. If Yes to minute, then Add 1 minute. Then back to Clear screen.

b. If No to minute, then Decision: Add Second?.

i. If Yes to second, then Add 1 Second. Then back to Clear screen.

ii. If No to second, then back to Clear screen.

Functional Requirements

1. Clock12: Time should be displayed in 12-hour format where the clock does not exceed 12:59:59.

2. Clock24: Time should be displayed in 24-hour format where the clock does not exceed 23:59:59.

3. Both clocks should display on the screen with the current time in the proper format. For example:

****************************** ******************************

* 12-Hour Clock * * 24-Hour Clock *

* 03:22:01 P M * * 15:22:01 *

****************************** ******************************

4. Your solution should allow the user to exit the program as well as add one hour, minute, or second to both clocks from a user menu as follows:

******************************

* 1- Add One Hour *

* 2- Add One Minute *

* 3- Add One Second *

* 4- Exit Program *

******************************

5. Once a selection is made from the user menu, the program should take action based on that choice. Both clocks must display on the screen simultaneously in the proper format next to each other. Below is a sample of the expected output if the user selects option 3 from the menu:

******************************

* 12-Hour Clock *

* 03:22:02 P M *

******************************

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions