Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help is needed on this c++ program, if you help thank you so much! I would prefer method 2. Unified Modeling Language (UML) - for

Help is needed on this c++ program, if you help thank you so much! I would prefer method 2.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Unified Modeling Language (UML) - for clockType clockType -hr: int -min: int -sec: int +setTime (int, int, int) : void +getTime(ints, int\&, int\&) const: void +printTime () const: void +incrementSeconds (): void +incrementMinutes (): void +incrementhours () : void +equalTime (const clockTye\&) const: bool 106: 107: clockType:: clockType() { //default constructor 108: hr =0; 109: min =0; 110: sec =0; 111: 112: 113: //clockTypeTest.cpp, The user program (DRIVER) that uses the class clockType 115: \#include "clockType.h" using namespace std; int main() \{ clockType myClock; clockType yourClock; int hours; int minutes; int seconds; // write another DRIVer program that uses the clockType class as the following: /* 1. Create an array of 20 clocks (of clockType data type) - give "clocks" as the array name 2. This main() function will call the functions listed below: A. A function that will take 2 parameters (the array "clocks" and its size). Use random number generator to generate all data for all 20 clocks. B. A function that will print out ONE clock with clear labels and nice format. C. A function that will print out all 20 clocks by a for-loop and call the function defined in the previous step. D. A function that will print all clocks that has the morning time (i.e., the time that has the values before 12:00:00 ). E. A function that will print the number of all clocks that has even numbers on minutes. We need the count only. Be sure you label your output nicely. 3. All functions in this DRIVER program will need have function prototypes and function Implementations from steps A-E. / Hint for the assignment: Method 1: - Create a project A. A function that will take 2 parameters (the array "clocks" and its size). Use random number generator to generate all data for all 20 clocks. B. A function that will print out ONE clock with clear labels and nice format. C. A function that will print out all 20 clocks by a for-loop and call the function defined in the previous step. D. A function that will print all clocks that has the morning time (i.e., the time that has the values before 12:00:00 ). E. A function that will print the number of all clocks that has even numbers on minutes. We need the count only. Be sure you label your output nicely. 3. All functions in this DRIVER program will need have function prototypes and function Implementations from steps AE. / Hint for the assignment: Method 1: - Create a project - Add 3 files into the project - clockType.h - clockTypelmp.cpp - clockTypeDriverFirstnameLastname.cpp Method 2: - Combine all three files into ONE large source file in the following order: Header file, the driver(or main() function) and class implementation file. Save the final combined file as clockTypeCombinedFirstnameLastname.cpp. You will need only ONE set of include statements Deliverable of this assignment: Please follow the instruction carefully. Do only one of the following: 1. Upload all 3 separate source files (DO NOT UPLOAD the project file), or 2. Upload the single combined file. Note: The driver file should be the driver file that you have created. Unified Modeling Language (UML) - for clockType clockType -hr: int -min: int -sec: int +setTime (int, int, int) : void +getTime(ints, int\&, int\&) const: void +printTime () const: void +incrementSeconds (): void +incrementMinutes (): void +incrementhours () : void +equalTime (const clockTye\&) const: bool 106: 107: clockType:: clockType() { //default constructor 108: hr =0; 109: min =0; 110: sec =0; 111: 112: 113: //clockTypeTest.cpp, The user program (DRIVER) that uses the class clockType 115: \#include "clockType.h" using namespace std; int main() \{ clockType myClock; clockType yourClock; int hours; int minutes; int seconds; // write another DRIVer program that uses the clockType class as the following: /* 1. Create an array of 20 clocks (of clockType data type) - give "clocks" as the array name 2. This main() function will call the functions listed below: A. A function that will take 2 parameters (the array "clocks" and its size). Use random number generator to generate all data for all 20 clocks. B. A function that will print out ONE clock with clear labels and nice format. C. A function that will print out all 20 clocks by a for-loop and call the function defined in the previous step. D. A function that will print all clocks that has the morning time (i.e., the time that has the values before 12:00:00 ). E. A function that will print the number of all clocks that has even numbers on minutes. We need the count only. Be sure you label your output nicely. 3. All functions in this DRIVER program will need have function prototypes and function Implementations from steps A-E. / Hint for the assignment: Method 1: - Create a project A. A function that will take 2 parameters (the array "clocks" and its size). Use random number generator to generate all data for all 20 clocks. B. A function that will print out ONE clock with clear labels and nice format. C. A function that will print out all 20 clocks by a for-loop and call the function defined in the previous step. D. A function that will print all clocks that has the morning time (i.e., the time that has the values before 12:00:00 ). E. A function that will print the number of all clocks that has even numbers on minutes. We need the count only. Be sure you label your output nicely. 3. All functions in this DRIVER program will need have function prototypes and function Implementations from steps AE. / Hint for the assignment: Method 1: - Create a project - Add 3 files into the project - clockType.h - clockTypelmp.cpp - clockTypeDriverFirstnameLastname.cpp Method 2: - Combine all three files into ONE large source file in the following order: Header file, the driver(or main() function) and class implementation file. Save the final combined file as clockTypeCombinedFirstnameLastname.cpp. You will need only ONE set of include statements Deliverable of this assignment: Please follow the instruction carefully. Do only one of the following: 1. Upload all 3 separate source files (DO NOT UPLOAD the project file), or 2. Upload the single combined file. Note: The driver file should be the driver file that you have created

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions

Question

1. In what ways has flexible working revolutionised employment?

Answered: 1 week ago