
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. 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.
Any clue where to even start?
Title: Clocks Flowchart
Top of chart begins: “Clear Screen”
-
“Display time in two formats”.
-
Decision: “Button Pressed?”
-
If “No” to button pressed, then to “Add 1 Second”. Then “Wait 1 second”. Then back to “Clear Screen”.
-
If “Yes” to button pressed, then to “Display Menu”. Then “Read user input”. Then to Decision: “User input = exit?”.
-
If “Yes” to exit, then endpoint: “End program”.
-
If “No” to exit, then Decision: “Add Hour?”
-
If “Yes” to hour, then “Add 1 hour.” Then back to “Clear screen”.
-
If “No” to hour, then Decision: “Add Minute?”.
-
If “Yes” to minute, then “Add 1 minute.” Then back to “Clear screen”.
-
If “No” to minute, then Decision: “Add Second?”.
-
If “Yes” to second, then “Add 1 Second.” Then back to
“Clear screen”.
-
If “No” to second, then back to “Clear screen”.
-
-
-
-
-

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 3 images

- For this lab, you will be doing the following in C#: 1) Create a Home form with buttons that when clicked, will open the Account, Email, and eventually the Contact forms. The Account form should be opened in "View" mode. 2) Add code to the Login form so the Account form opens when the user clicks "Create New Account". The Account form should be opened in "Modify" mode. 3) Add code to the Login form that validates the user input before allowing the user the access the Home form. For now, just verify the user enters "user1" and "12345" for the username and password respectively.arrow_forward1.In your game console class, add a start function which should prompt the user for an email address. -Use a regular expression to validate that it is a valid email address and prompt them again until they enter a valid one. -Next, prompt the user to enter a credit card number and use a regular expression to validate the credit card. -Prompt them again until they enter a valid one and once done, display the game menu. Existing Code below: class Game {constructor(name){this.name = name;}} class GameConsole{constructor(){this.games = [];} load(){var gameNames = ["Zelda", "Halo", "Mario", "The God Among Us\n"];for (var i = 0; i < gameNames.length; i++) {let game = new Game(gameNames[i]);this.games.push(game);}} log(){console.log("Games Loaded:");for (var i = 0; i < this.games.length; i++) {var name = this.games[i].name;console.log(name);}}} let gamecon = new GameConsole();gamecon.load();gamecon.log(); const prompt = require('prompt-sync')(); var adventurersName = ["Captain…arrow_forwardCreate a simple Java application to manage student information. The application should have a text-based interface. The application should prompt the user for the following information: Full Name, Degree, and Points. The user should be able to continuously enter student data until an exit key is pressed (se the algorithm below). After the student has entered the student data the application should display all student data entered. Algorithm 1 Ask if the user if wants to stop entering data 2 Do the following until the student wants to stop entering data 2.1 Prompt the user to enter data for a new student 2.2 Save the new student data 2.3 Ask if the user wants to stop entering data 2 Show all student data entered 3 Exit program Example input: Text in bold is entered by the user Do you want to continue (y/n) ? y Enter the student's name: John Smith Enter the student's degree: Computer Science Enter the student's points: 125 Do you want to continue (y/n) ? y Enter the student's name:…arrow_forward
- Additional Exercises: 5) Write a python function that swaps two integers. An example of calling the function is shown below: int x=10, y=20; print ("Before: x =" ,x ," and y= ", y ); mySwap(x, y); //After calling the swap() function: x=20 and y=10 Print(“After : x =",x ," and y=",y)arrow_forwardCan you implement a module named inventory that will be responsible for managing the players inventory? The module should hold the inventory and implement the following functions: - displayInventory: Displays the current inventory - addToInventory: Adds an item to the inventory. *Use existing code below and don't use HTML* const prompt = require("prompt-sync")(); var adventurersName = ["Captain Thomas King","George","Tim","Sarah","Mike","Edward",];var len = 0;var Inventory = new Array(5).fill(" ");Inventory[len++] = "Food";Inventory[len++] = "Wine";Inventory[len++] = "Horses";Inventory[len++] = "Medicine"; var adventurersKilled = 3;var survivors;var numberOfAdventurers = adventurersName.length; survivors = numberOfAdventurers - adventurersKilled; displayIntroduction();getLeader(); var user_life = 3;var correct_answer = ["1","2","3"];var userIsCorrect;var options = ["\nOption 1 Enter the village hut?","Option 2 Eat the turkey leg?","Option 3 Sit on the stool?","Option 4 Talk with the…arrow_forwardin phython language Create a package folder named shapes. Inside this package, place two more package folders: 2d and 3d. Inside 2d package, place a module file: circle.py circle.py module has two function definitions: areaCircle(), circCircle(). areaCircle() function takes a parameter: radius, calculates and returns the area of the circle. You may assume PI is 3.14. circCircle() function also takes a parameter: radius, calculates and returns the circumference of the circle. Inside 3d package, place two module files: sphere.py and cylindir.py sphere.py module has two function definitions: areaSphere() and volumeSphere() which both take a parameter for radius, calculates and returns area and volume of a sphere respectively. cylindir.py module has two function definitions: areaCylindir() and volumeCylindir() which both take two parameters: height and radius. They calculate area and volume of a cylindir and return the values respectively. You may find the formulas for those shapes…arrow_forward
- For the following program in phyton : Pay CheckWindow CostWrite an interactive program to calculate the cost of glasswork and metalstripping for rectangular windows. All windows, no matter what size, use thesame quality of glass and aluminum strips. Prompt the user for his/her name,age, length, and width of a window, then calculate the costs shown based on theinformation read in from the windowinfo.txt file which contains the materialstypes and costs (you cannot change this file at all). There is a discount on thetotal cost of 10% if the total area is over 1000 square inches, and 15% if it isover 1500 square inches.*Be sure to include a try/except and any and all string methods you might need*No conditional loops can be used at all**This is the info you will see in the text file, remember you mustread this in and store it:Glass: 80 cents per square inch (unit area)Aluminum: $1.25 per inch (unit length) This is the sample output. Write it to both the screen and a text file…arrow_forwardCompatible with visual studios - c# Word SeparatorCreate an application that accepts as input a sentence in which all the words are runtogether but the first character of each word is uppercase. Convert the sentence to astring in which the words are separated by spaces and only the first word starts withan uppercase letter. For example, the string "StopAndSmellTheRoses." would beconverted to "Stop and smell the roses."arrow_forwardmy assignment wants me to Convert the MileConversions program to an interactive application. Instead of assigning a value to the miles variable, accept it from the user as input. Something is wrong with my code My code is : { public static void main(String[] args) { Scanner inputDevice = new Scanner(System.in); final double INCHES_IN_MILE = 63360; final double FEET_IN_MILE = 5280; final double YARDS_IN_MILE = 1760; double miles = 4; double in, ft, yds; in = miles * INCHES_IN_MILE; ft = miles * FEET_IN_MILE; yds = miles * YARDS_IN_MILE; System.out.println(miles + " miles is " + in + " inches, or " + ft + " feet, or " + yds + " yards"); } }arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





