A tele match event has been held in a primary school. Three teams are allowed to participate in this match, with each team consisting of four participants. Five (5) events were contested, namely E1, E2, E3, E4 and E5. Table 1 and Figure 1 show the scores that have been collected by each team for the five events. Write a C++ program which can assist the tele match committee to determine the winner for these events. Your program should be able to do the following tasks: a) The program will read input data: team ID, participant ID and scores for the five events namely E1, E2, E3, E4 and E5 from an input file named “input.txt” into an array marks[12][7] with int type. (***Array can be 2-dimensional or 3-dimensional). b) The program must be able to notify the user if the input file cannot be opened (failed to open) with proper prompt. The example for user notification where the file fails to open is shown in Figure 2. c) Calculate the total score for each participant. d) Calculate the total score for

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

A tele match event has been held in a primary school. Three teams are allowed to participate in this match, with each team consisting of four participants. Five (5) events were contested, namely E1, E2, E3, E4 and E5. Table 1 and Figure 1 show the scores that have been collected by each team for the five events. Write a C++ program which can assist the tele match committee to determine the winner for these events. Your program should be able to do the following tasks:
a) The program will read input data: team ID, participant ID and scores for the five events namely E1, E2, E3, E4 and E5 from an input file named “input.txt” into an array marks[12][7] with int type. (***Array can be 2-dimensional or 3-dimensional).
b) The program must be able to notify the user if the input file cannot be opened (failed to open) with proper prompt. The example for user notification where the file fails to open is shown in Figure 2.
c) Calculate the total score for each participant.
d) Calculate the total score for each team.

Team ID Participant ID E1 E2 E3 E4 E5
1001
10
5
8
10
6
1002
8
7
10
7
9
1
7 10 10 6 10
71
1003
1004
10
10
8
7
2001
7
8
10
9
10
2002
10
8
7
8
10
2
2003
8
8
8
10
2004
7
8
8
8
8
3001
10 10|
10
9
10
3002
8
7
8
8
3003
7
8
9
10
6.
3004
8
6
8
7
7
8.
6.
3.
Transcribed Image Text:Team ID Participant ID E1 E2 E3 E4 E5 1001 10 5 8 10 6 1002 8 7 10 7 9 1 7 10 10 6 10 71 1003 1004 10 10 8 7 2001 7 8 10 9 10 2002 10 8 7 8 10 2 2003 8 8 8 10 2004 7 8 8 8 8 3001 10 10| 10 9 10 3002 8 7 8 8 3003 7 8 9 10 6. 3004 8 6 8 7 7 8. 6. 3.
Expert Solution
steps

Step by step

Solved in 6 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education