Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am new to c++ and need help organizing the code so that less code is included in the main() function. Please include screenshots of

I am new to c++ and need help organizing the code so that less code is included in the main() function. Please include screenshots of what the code looks like in the IDE. Thanks!

Directions

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.

Review the Chada Tech Clocks Functional Requirements, located in the Supporting Materials section.

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.

Title: Clocks Flowchart

Top of chart begins: Start Program (Terminator)

Read User Input. (Process)

Display Menu (Process)

Add Hour? (Decision)

Add Hour (Process)

Add Minute? (Decision)

Add Minute (Process)

Add Second? (Decision)

Add Second (Process)

Display Time HH:MM:SS (Process)

Exit Program? (Decision)If No

Read User Input (Process)

Display Menu (Process)

If Yes

Read User Input (Process)

End Program (Terminator)

Note: This assignment represents a simulation of clock functionality. It does not need to display your local time zone, and it does not need to run in real time or tick.

Your code should be properly modularized and written in functions so that your main() has the least amount of code.

Before you begin coding, remember that you must demonstrate industry standard best practices in all your code to ensure clarity, consistency, and efficiency. This includes:

Inserting in-line comments to denote your changes and to briefly describe the functionality of the code

Using appropriate variable, parameter, and other naming conventions throughout your code

When your solution is finished, zip your project including all components (CPP, H, and any other files used).

Functions that need to be included:

function to format numbers as two digits

function that repeats the * to use in formatting your programs output

function that outputs time using 24-hour time format.

function that outputs time using 12-hour time format

function that prints out the menu illustrated in the project and functional requirements documentation.

function that processes user input from the menu choices in the user interface.

function that displays BOTH 12- and 24-hour time formats on the interface at the same time.

main function (main.cpp) to control your program.

function to add a second to the clocks time

function to add a minute to the clocks time.

function to add an hour to the clocks time

image text in transcribed

[CI-1AA TE Chada Tech Clocks Functional Requirements Problem Statement Chada Tech has domestic and international clients. To meet international standard ISO 8601, Chada Tech wants their clients to be able to view a 12- and a 24-hour clock on their website rather than just the standard 12-hour clock. 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: 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

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

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

=+Will the fear enhance the message?

Answered: 1 week ago