subject

1. write a class for time objects that store three integer values for hour, minute, and second. also, write a program to test the functionality of your class. make sure it does all of the following:

create time objects with no values (default)

create time objects with all three values (hour, minute, second)

change the value for hour

display military time

display standard time

2. define a class for an elevator that only services three floors. your class must store variables for currentfloor (int), goingup (bool), and goingdown (bool). write a default constructor function for the class and two member functions: goup() and write an elevator test program. have the program execute the following steps using the methods in the class:

start on the first floor.

go to the second floor (don’t forget to update the boolean variable goingup).

go to the third floor

go to the fourth floor (or at least try to)

go back to the second floor

go back to the first floor

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, jhitotw
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
image
Computers and Technology, 23.06.2019 19:00, jacobbecker99
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u. s. 483 (1954). b. international shoe co. v. washington, 326 u. s. 310 (1945) c. haynes v. gore, 531 u. s. 98 (2000). d. international shoe co. v. washington, 14 u. s. code 336.
Answers: 1
image
Computers and Technology, 23.06.2019 21:20, nicki76
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
You know the right answer?
1. write a class for time objects that store three integer values for hour, minute, and second. also...

Questions in other subjects:

Konu
Spanish, 22.02.2021 19:20
Konu
Medicine, 22.02.2021 19:20