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

  What is the primary advantage of a wireless lan

What is the primary advantage of a wireless LAN? What is a Basic Service::, eat. List the current versions of wireless LAN technology.

  Write a procedure that accepts pointers to two arrays

Write a procedure that accepts pointers to two arrays of double words and the size of both arrays (The arrays are equal in length.).

  Create a program that can display information

Create a program that can display information about the first ten elements in the periodic table. The periodic table of is a table of the chemical elements.

  Write a bash script to translate the file permissions

Write a Bash script to translate the file permissions from octal format to symbolic format. Accept the user input interactively.

  Write the c function itox to convert integer to a hex string

Write the C function itox() to convert an integer to a hex string. Its prototype is described in the header file xbits.h in this directory.

  Illustrates the significant milestones of the internet

This assignment provides you with an opportunity to build a timeline that illustrates the significant milestones of the Internet.

  Why is tcp termed a reliable protocol

Why is TCP termed a reliable protocol? What is the significance of the port number? How will you find out the port number finger uses?

  What technologies would be necessary to facilitate plan

Explain how electronic document management is or could be used in your Information Systems class to eliminate all paper flow between the students and professor.

  Explain computer programming is art or science

Which programming language appeals to you, and which language do you consider least appealing.

  Design two concrete classes circle and square that inherits

design an abstract class called shape. this class must contain a single constructor that accepts a single numeric value

  Write down the objective function

E19: Numerical Methods for Engineering Applications Spring 2016 - HOMEWORK 8. Write down the objective function f(l, r) to be minimized, in terms of l and r. It should be equal to the surface area of each type of section, weighted by the appropriat..

  Why you chose the number of wireless access points

Following your submission in the Week Two individual assignment, "Logical Network Diagram," the client approved your logical network diagram for their three.

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