Monday, March 9, 2015

Cricket Score Sheet Project in C

Cricket Score Sheet project is a simple project built using the C programming language. It uses file handling to store various information regarding runs, wickets, overs, extras, and many more. The program can display runs, wickets, names of batsmen and bowlers, overs, extras, economy of bowler, strike rate of batsmen, etc. It also displays the date and time of the game. The source code is complete, error-free and easy to understand.

The source code of this cricket score sheet project needs to be compiled inCode::Blocks IDE using GCC compiler. You can directly download the source code, application file, and other program files of this project from the link below.

Functions used in Cricket Score Sheet Project:

The C source code of this project is very simple and consists of seven user defined functions. They are listed below along with the tasks they perform.
  • void date() –  to store current date or date of game.
  • void printt() – to print the output in specific format.
  • void filewrite() – to write in  a file on hard drive of computer to store the input data such as runs, wickets, balls, over etc.
  • void fileread() – to extract or read the data from the file created to store the data.
  • void fileopen(char) – opens a cricket score sheet project file from the computer.
  • int limitedinput(int) – to input some limited data.
  • void newscoresheet() – to create new score sheet in a new file.
When the project file of cricket score sheet project is executed, it works by following the steps described below:
  • First of all the project displays the welcome screen and the screen fades up to display the main menu.
  • The main menu comprises three options namely:
    -> New Score Sheet
    -> View Score Sheet
    -> Exit
  • If ‘1’ is entered, Cricket Score Sheet project asks for the name of new score sheet. When the file is created, a message is displayed on the screen.
  • Then, the score sheet appears on screen in which the user has to input the following information:
  1. Competition
  2. Venue
  3. Match between and versus
  4. Toss winner team
  5. Elected choice of toss winner
  6. Inning and date
  7. Name of batsman and run hit by each of them
  8. Name of bowler and run given by each blower
  • After inputting these data, the program asks user to input ‘e’ to edit the data and ‘c’ to continue.
  • If the user inputs ‘2’ in the main menu, the program asks for the name of file. If the file is found, it is displayed. Otherwise, error message is printed on the screen.
  • The third option in main menu is exit. If ‘3’ is entered in the main menu, the Cricket Score Sheet project terminates.



1 comment: