Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Please! Introduction to Programming Using C++ CPS 171 - Machine Problem 8 - Classes Soccer Game. Write a program that reads the following data

image text in transcribedimage text in transcribedimage text in transcribed

C++ Please!

Introduction to Programming Using C++ CPS 171 - Machine Problem 8 - Classes Soccer Game. Write a program that reads the following data about soccer teams into classes: Team's name, Team's Total Points. Each team has 11 players. Each player class has Player's name, Player's number, Points scored by Player. The program should keep an array of 4 teams of the Team class, i.e. each element is for a different team. The program should read the information for each player from the input file. It should then display a table that lists each team and its players' numbers, names and points scored. The program should also calculate the total points earned by each team. The program should display the top two teams that have the most points. The program should also determine which player earned the most points on each team and display these players' information. Program must 2 classes, one called TeamClass and the other one is PlayerClass. The output should be formatted to look like the following screen shot except it should work for 4 teams. TEAM \#1 Team's name: NNNNNNNNN Team's point: XXX (the sum of the points of its players' points) ...etc. (repeat these for the 4 teams and their players) The player with the most points on Team \#1 is FFFFFFFFF LLLLLL The player with the most points on Team \#2 is FFFFFFFFF LLLLLL ..etc. The top two teams with the most points are: Team \#X with points PPP and Team \#Y with points PPP The data for the teams and their players should be stored in file called teams.txt as follows: the first line is the team name followed by its 11 players. Each player line has the number of the player, the first name, the last name and number of the points scored in the tournament. ARGENTINE 1Lionel2Paulo3Julian4Emiliano5Lisandro6Rodrigo7Angel8Lautaro9Alexis10Enzo11ChristianMessiDybalaAlvarezMartinezMartinezDePaulDiMariaMartinezMacFernandezRomero162013453001 BRAZIL Please turn in the team.h, team.cpp, player.h, player.cpp, driver.cpp, team.txt, player.txt and the output.txt files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Would you change the ending of the book? If so, how?

Answered: 1 week ago