Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions Icon

Related questions

Question

(Evaluation of Trainees) Use a two-dimensional array to solve the following problem: A company has four trainees (1 to 4) who take five different programs (1 to 5). Once a week, the trainer creates evaluation results for each program taken. Each result contains the following:

 

a.    The trainee number

b.    The program number

c.     The score of that program taken that week (0 to 10 scores)

 

Thus, the trainer creates 5 results per week for each trainee. Assume that the information from all the results for last month is available. Write an application that will read all this information for last month’s results and summarize the total scores by the trainee and by the programAll totals should be stored in the two-dimensional array. After processing all the information for last month, display the results in tabular format, with each column representing a trainee an each row representing a particular programAverage each row to get the average scores of each program for last monthAverage each column to get the average scores by the trainee for last month. Your output should include these row averages and column averages to the right of the totalled rows and to the bottom of the totalled columns, respectively.

 

Here is a sample run:

 

Enter the trainee number (-1 to end): 1

 

Enter the program number: 2

 

Enter the score of that program taken that week (0 to 10): 5.5

Enter the trainee number (-1 to end): 1

 

Enter the program number: 3

 

Enter the score of that program taken that week (0 to 10): 8

Enter the trainee number (-1 to end): 2

 

 

 

Enter the program number: 2

 

Enter the score of that program taken that week (0 to 10): 8

Enter the trainee number (-1 to end): 4

 

Enter the program number: 4

 

Enter the score of that program taken that week (0 to 10): 6

Enter the trainee number (-1 to end): 2


Enter the program number: 1

 

 

Enter the score of that program taken that week (0 to 10): 5

Enter the trainee number (-1 to end): -1

 

 

Program     Trainee 1    Trainee 2     Trainee 3    Trainee 4    Trainee 5    Average

        1                  0                  5                   0                  0                  0                 1

        2               5.5                  8                   0                  0                  0              2.7

        3                  8                  0                   0                   0                 0              1.6

        4                  0                  0                   0                   6                 0              1.2

Average       3.375            3.25                 0                 1.5                0

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