The Durban July is an annual horse race that has been presented every year since 1897. Write a C/C++ program to handle registrations for the race. The program must meet the following specifications: Create a structure (struct) to save the following information for each horse in the race: Name - up to 20 characters; Age - Age in years (integer); Height - The height of the horse in hands (integer); and Time that the horse achieved in the last race in seconds (real value). Create an array of structures (structs) that are used to save the information for four horses. The user types in the information for each horse.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

The Durban July is an annual horse race that has been presented every year since 1897. Write a C/C++ program to handle registrations for the race. The program must meet the following specifications:

  • Create a structure (struct) to save the following information for each horse in the race:
    • Name - up to 20 characters;
    • Age - Age in years (integer);
    • Height - The height of the horse in hands (integer); and
    • Time that the horse achieved in the last race in seconds (real value).
  • Create an array of structures (structs) that are used to save the information for four horses. The user types in the information for each horse.
  • After the horse's information is stored in the array, the schedule for the race must be displayed based on the contents of the array. Iterate through the array and display the information on one line for each horse.
  • The horse with the best time for the previous race is named as the favorite. Iterate through the array, identify the horse with the best time and show it at the bottom of the schedule. Assume that each horse's time will be unique.

See the figure on the picture attatched below for example output.

wate
O Not
Not secure | efundi.nwu.ac.za/portal/site/0a409130-915f-49c4-88b0-a385a6fd7e8f/tool/5ec8c
eFundi
Harse #3 - Age: 4
Horse #3 - Height: 19
Horse #3 - Time for last race: 111.98
Enter details for horse #4:
Horse #4 - Name: African_Night_Sky
Horse #4 Age: 3
Horse #4
Horse #4
Height: 21
Time for last race: 113,55
黄美
******
********
****************************
Roster for next race
: 鶉篝鶉鶉鶉鶉暑暑
****************
****************************
1.
2.
3.
4.
Name: Do_It_Again
Name: Made_To Conquer
Name: Secret_Gate,
Náme: African_Night_Sky Age: 3 years
Age: 3 years
Age: 5 years
Age: 4 years
Height: 18 hands
Height: 20 hands
Height: 19 hands
Height: 21 hands
Last run: 123.21 seconds
Last run: 156.11 seconds
Last run: 111.98 seconds
Last run: 113.55 seconds
********
**********
*****************************************
Race favourite: Secret Gate, with a time of: 111.98
*******************************************************
*轉普普黄普:
Process returned 0 (0x0)
Press. any key to continue.
execution time : 140.929 s
Additional resources for assignment
No attachments yet
Submission
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
Transcribed Image Text:wate O Not Not secure | efundi.nwu.ac.za/portal/site/0a409130-915f-49c4-88b0-a385a6fd7e8f/tool/5ec8c eFundi Harse #3 - Age: 4 Horse #3 - Height: 19 Horse #3 - Time for last race: 111.98 Enter details for horse #4: Horse #4 - Name: African_Night_Sky Horse #4 Age: 3 Horse #4 Horse #4 Height: 21 Time for last race: 113,55 黄美 ****** ******** **************************** Roster for next race : 鶉篝鶉鶉鶉鶉暑暑 **************** **************************** 1. 2. 3. 4. Name: Do_It_Again Name: Made_To Conquer Name: Secret_Gate, Náme: African_Night_Sky Age: 3 years Age: 3 years Age: 5 years Age: 4 years Height: 18 hands Height: 20 hands Height: 19 hands Height: 21 hands Last run: 123.21 seconds Last run: 156.11 seconds Last run: 111.98 seconds Last run: 113.55 seconds ******** ********** ***************************************** Race favourite: Secret Gate, with a time of: 111.98 ******************************************************* *轉普普黄普: Process returned 0 (0x0) Press. any key to continue. execution time : 140.929 s Additional resources for assignment No attachments yet Submission %3D %3D %3D %3D %3D %3D %3D %3D %3D %3D %3D %3D
O Not secure efundi.nwu.ac.za/portal/site/0a409130-915f-49c4-88b0-a385a6fd7e8f/tool/5ec8c381-
eFundi
=Welcome to the Durban July=-
Enter details for horse #1:
Horse #1
Horse #1
Horse #1
Horse #1
Name: Do It_Again
Age: 3
Height: 18
Time, for last race: 123.21
Enter details for horse #2:
Horse #2. - Name: Made_To Conquer
Horse #2
Horse #2
Horse #2 - Time for last race: 156.11
Age: 5
Height: 20 -
Enter details for horse #3:
Horse #3
Horse #3
Horse #3
Horse #3
Name: Secret_Gate
Age: 4
Height: 19
Time for last race: 111.98
Enter details for horse #4:
m Hes
Horse #4
Horse #4
Horse #4
Horse #4
Name: African_Night_Sky
Age: 3
Height: 21
Time for last race: 113.55
************
:善善紳軸兽軸紳袖:
Roster for next race
*********************
:菁善善善善善善:
善善善普善瀞善
*******************
***********
Name: Do It_Again
Name: Made_To_Conquer
Age: 3 years
Age: 5 years
Height: 18 hands
Height: 20 hands
Last run: 123:21 seconds
Last run: 156.11 seconds
2.
Type here to search
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
%3D
Transcribed Image Text:O Not secure efundi.nwu.ac.za/portal/site/0a409130-915f-49c4-88b0-a385a6fd7e8f/tool/5ec8c381- eFundi =Welcome to the Durban July=- Enter details for horse #1: Horse #1 Horse #1 Horse #1 Horse #1 Name: Do It_Again Age: 3 Height: 18 Time, for last race: 123.21 Enter details for horse #2: Horse #2. - Name: Made_To Conquer Horse #2 Horse #2 Horse #2 - Time for last race: 156.11 Age: 5 Height: 20 - Enter details for horse #3: Horse #3 Horse #3 Horse #3 Horse #3 Name: Secret_Gate Age: 4 Height: 19 Time for last race: 111.98 Enter details for horse #4: m Hes Horse #4 Horse #4 Horse #4 Horse #4 Name: African_Night_Sky Age: 3 Height: 21 Time for last race: 113.55 ************ :善善紳軸兽軸紳袖: Roster for next race ********************* :菁善善善善善善: 善善善普善瀞善 ******************* *********** Name: Do It_Again Name: Made_To_Conquer Age: 3 years Age: 5 years Height: 18 hands Height: 20 hands Last run: 123:21 seconds Last run: 156.11 seconds 2. Type here to search %3D %3D %3D %3D %3D %3D %3D %3D %3D
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY