A program to help the administration of a football league

Assignment Help Computer Engineering
Reference no: EM132194780

Write a C++ program to help the Administration of a football league to manipulate the list of players registered in different teams.

There are 26 teams participating in the league, each is denoted by a letter in the range A to Z. Each team can have 11 players at most.

The information of all teams' players are stored in a text file named 'players.dat'.

Each line from the input file contains the details of one player; where the player's details include his first-name and familyname, the age (in years), and the team's letter (from the range A-Z). --see the sample input below

The intended program will perform the following tasks: ? Continuously displaying a menu for the user until the user selects 'X' (or 'x') to exit the program.

The menu provides 4 options: Add Player (A or a), Team Inquiry (I or i), Print Statistics (P or p), and Exit (X or x). ? When the 'Add Player' operation is selected, the main function will ask the user to provide all the information of the new player, then it calls a user-defined function named addPlayer(...) to add the player to the file.

Before the record is added to the file, two things must be checked: o The provided team-letter must be in the range A-Z.

This must be validated via another userdefined function named teamCodeIsValid(...); and a suitable error message should be displayed by the function addPlayer(...) if the letter is invalid. o The number of the players in the specified team must be less than 11 before adding the new player.

This must be counted and returned via another user-define function named countPlayers(...); and a suitable error message should be displayed if the team is already full. ? When the 'Team Inquiry' operation is selected, the main function should ask the user to provide the letter of the desired team, then it calls a user-defined function (named displayTeam(...)) to display the details and the number of all players in the team.

If the specified team has no players at all, then the function displayTeam(...) should display a suitable notification to the user. ?

When the 'Print Statistics' operation is selected, the main function will call a user-defined function named printStat(...) to display a statistical report which shows the number of players in each team (see sample output). HINT: CONSIDER USING THE FUNCTION countPlayers(...).

Reference no: EM132194780

Questions Cloud

Calculate the average of the elements : Write a C program such that you initialize the elements of array S to the even integers from 10 to 40 and calculate the average of the elements.
Ask the user for the value of four resistors in your series : The "main" section of the program will ask the user for the value of four resistors in your series circuit and the total voltage (V) applied to the series.
Write c program that helps a professor to manage records : Write C program that helps a Professor to manage student records. Each student's record contains information like Student ID.
Write a c program that finds the nth prime number : Write a C program that finds the nth prime number and prints it on the screen. A prime number is a number that is only divisible by 1 and by itself.
A program to help the administration of a football league : Write a C++ program to help the Administration of a football league to manipulate the list of players registered in different teams.
Write a c program which will flip a single bit in a number : Write a C program which will flip a single bit in a number entered by the user using the binary representation of the number. The user should input the original
A program that initializes an array with ten random integers : Write a C++ program that initializes an array with ten random integers and then prints all elements in two lines of output containing.
Write a program that creates a vector of given elements : Write a C++ program that creates a vector of 15 integer elements. Using an iterator, assign each element a value that is three times of its current value.
Write a c program that contains a structure : Write a C program that contains a structure that uses predefined types and union. Create a struct with name, age, kind (Either child, college student, or adult)

Reviews

Write a Review

Computer Engineering Questions & Answers

  There is a common misconception that analog technology is

there is a common misconception that analog technology is no longer used in the transmission of digital data. however

  Define how you feel unit testing should be conducted

define how you feel unit testing should be conducted for a program with lots of conditional expressions.

  For which purposes is a digital secure certificate not used

cis407a- For which of the following purposes is a digital secure certificate not used? Which of the following SQL statements will search for a given last name in the tblEmployees table based on a search variable name's strSearch?

  Create an interface source file for the temperature class

Create an interface source file for the Temperature class. this is the Temperature class code in java: public class Temperature { public double c2F(double c) { return (9 * (c/5) + 32); } public double f2C(double f) { return (5 * (f-32) / 9); } }

  Modify a program that reads a line of text

Write down a program that reads a line of text, changes each uppercase letter to lowercase, and places each letter both in a queue and onto a stack. The program should then verify whether the line of text is a palindrome.

  Create a data structure diagram for internal data

Create a data structure diagram for internal data at your organization and identify external support data to the organizations suppliers.

  Discuss the various prototypes developed in budget control

Discuss the various prototypes developed in the budget control example as either throw-away or evolutionary prototypes.

  Explain the embarrassing privacy issue

WikiLeaks is an international non- profit organisation that publishes secret information, news leaks and classified media from anonymous sources.

  Compare the merits and demerits of atm to those of frame

atm and frame relay. please respond to the followingcompare the advantages and disadvantages of atm to those of frame

  Explain what the database roles

Describe steps necessary to setup SQL Server security.

  Create a storyboard for a four page website

Create a storyboard for a four (4) page Website (one (1) home page and three (3) sub pages) and one (1) Cascading Style Sheet (.css).Using Microsoft Word, Microsoft Visio, or Dia, create a diagram of the layout and navigation structure.Explain the ..

  Which employees does paula roberts supervise

Write an SQL Statement to add a new teller to Headquarters and an IT Manager to headquarters. MAke up the information for the other columns.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd