Question: Emphasis on: structs or classes, arrays of structs or classes, sorting You are to read a series of 24-hour time values (hrs and mins only

Emphasis on: structs or classes, arrays of structs or classes, sorting You are to read a series of 24-hour time values (hrs and mins only no secs needed). Use either a struct or go ahead and use the class to represent the time. . Processing (these operations dont necessarily have to be done in this order): 1) Read in the times from the file times.txt and store them in an array (read hours and minutes in integer format and use the SetTime function to store into an array of structs or classes. 2) Modify each time by adding to it a random number of minutes (0-100 minutes) also read from the file. You will probably want to write a function to add a parameter number of minutes to the times. 3) Sort the resulting times into ascending 24-hour clock order. You can use the bubble sort function from the Malik book. You will probably want to write a function to compare two times. You have an EqualTime function, but you probably need to write a greater than function. 4) Print the list of sorted times. You have a PrintTime function that you can use. Input: read from text file times.txt Format: col 1 5 a time in 24-hour-clock format, like this hh:mm 7 9 an integer number of minutes to be added to the time

time.txt

6:45 39

12:00 73

0:00 4

23:59 1

22:45 70

11:59 1

14:15 95

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!