You have been hired by Detroit Football team as an assistant of the main coach. You need to modify a program to take all the information (jersey number, name, height, accuracy and yearly salary) of each player and find the information of the best player who has best accuracy among them. You should consider the accuracy in a range [0-10]. Take all the information using a struct data type in C++. Like, struct teamDetroit { int jersey_num[10]; string name[10]; double height[10]; float accuracy[10]; int salary[10]; }; Moreover, take only 3 players information and put the player name as a single name (either first_name or last name). Sample input: Team of Detroit: Put the information of: 1 th player Enter the jersey_num: 2 Enter the name of player: Bob Enter the height of player in inch: 72 Accuracy is: 7.6 Enter the salary of player: ($)13000 Put the information of: 2 th player Enter the jersey_num: 4 Enter the name of player: John Enter the height of player in inch: 67 Accuracy is: 7.8 Enter the salary of player: ($)16000 Put the information of: 3 th player Enter the jersey_num: 6 Enter the name of player: Bill Enter the height of player in inch: 68 Accuracy is: 4.5 Enter the salary of player: ($)14000 Sample Output: The best player of this team is: Jersey Number: 4 Name: John Height is: 67 Accuracy is: 7.8 Salary of player: ($)16000

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

You have been hired by Detroit Football team as an assistant of the main coach. You need to modify a program to take all the information (jersey number, name, height, accuracy and yearly salary) of each player and find the information of the best player who has best accuracy among them. You should consider the accuracy in a range [0-10]. Take all the information using a struct data type in C++.

Like,

 

struct teamDetroit

{

    int jersey_num[10];

    string name[10];

    double height[10];

    float accuracy[10];

    int salary[10];

};

 

 

Moreover, take only 3 players information and put the player name as a single name (either first_name or last name).

 

Sample input:

Team of Detroit:

 

Put the information of: 1 th player

Enter the jersey_num: 2

Enter the name of player: Bob

Enter the height of player in inch: 72

Accuracy is: 7.6

Enter the salary of player: ($)13000

 

Put the information of: 2 th player

Enter the jersey_num: 4

Enter the name of player: John

Enter the height of player in inch: 67

Accuracy is: 7.8

Enter the salary of player: ($)16000

 

Put the information of: 3 th player

Enter the jersey_num: 6

Enter the name of player: Bill

Enter the height of player in inch: 68

Accuracy is: 4.5

Enter the salary of player: ($)14000

Sample Output:

The best player of this team is:

Jersey Number: 4

Name: John

Height is: 67

Accuracy is: 7.8

Salary of player: ($)16000

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
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