0% found this document useful (0 votes)
295 views23 pages

Exam Scheduling & Cricket Score Project

The document is a lab project report on a cricket score display project implemented in C programming language. It includes functions to store date, print output, write/read files, open files, and limit input. The code takes batting and bowling details as input, stores them in structures, and allows viewing details by number. It displays a menu to create/view score sheets or exit.

Uploaded by

Ravi Raushan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
295 views23 pages

Exam Scheduling & Cricket Score Project

The document is a lab project report on a cricket score display project implemented in C programming language. It includes functions to store date, print output, write/read files, open files, and limit input. The code takes batting and bowling details as input, stores them in structures, and allows viewing details by number. It displays a menu to create/view score sheets or exit.

Uploaded by

Ravi Raushan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Data Structures & Algorithms

Lab Project Report

On

Exam Scheduling

Cricket Score Display Project

“Bachelor of Technology

(Computer Science with AIML)

Submitted To: Submitted By:

Mrs. Pooja Varshney Raushan kumar jha

Sid:- 102488

(Assistant Professor) (II Year, III Semester)

1
Department of Computer Engineering & Information
Technology

INDEX

Declaration………………………………… 3

Certificate………………………………….. 4

Acknowledgement………………………… 5

Abstract…………………………………… 6

Table of Contents…………………………. 7

Introduction……………………………….. 9

Code Implementation………………….... 14

Reference…………………………………. 25

2
DECLARATION

I declare that my 3rd semester report entitled ‘Cricket Score Display ’


is my own work conducted under supervision of Ms. Pooja Varshney.

I further declare that to the best of our knowledge the report for B.
Tech 3rd Semester does not contain part of the work which has
submitted for the award of B. Tech degree either in this or any other
university without proper citation.

Student’s sign Submitted to:

Ms. Pooja Varshney

(Assistant professor)

3
CERTIFICATE

This is to certify that the project report entitled ‘ Cricket Score


Display’. Is a Bonafide report of the work carried by Raushan Kumar

Jha under guidance and supervision for the partial fulfilment of


degree of the B. Tech CSE at Suresh Gyan Vihar University, Jaipur.

To the best of our knowledge and belief, this work embodies the work
of candidates themselves, has duly been completed, fulfils the
requirement of the ordinance relating to the bachelor degree of the
university and is up to the standard in respect of content, presentation
and language for being referred to the examiner.

Ms. Pooja Varshney Mr. Sohit Agarwal

Assistant Professor HOD, CEIT

4
ACKNOWLEDGEMENT

Working in a good environment and motivation enhance the quality


of the work and I get it from my college through our Data Structure
project. I have been permitted to take this golden opportunity under
the expert guidance of Ms. Pooja Varshney from SGVU, Jaipur. I am
heartily thankful to her to make complete my project successfully.
She has given us her full experience and extra knowledge in practical
field. I am also thankful to my head of department Mr. Sohit Agarwal
and all CEIT staff to guide us. Finally, we think all the people who
had directly or indirectly help as to complete our project.

5
ABSTRACT

One of the most common academic scheduling problems which can


be perceived in any educational system is the exam time table
generation. The presence of vast numbers of students and offered
courses makes it difficult to schedule exams in a limited epoch of
time. An appropriate schedule can be designed by utilizing different
resources like subjects, teachers, students and classrooms in a way to
evade conflicts by fulfilling special types of
constraints. Graph coloring is one decent approach which can deal
with timetable scheduling problem and can satisfy changing
requirements. In this work, we have framed a systemic model by
applying graph vertex coloring approach for generating exam
timetabling with the help of a course matrix generated from given
data of an educational institute. From the problem domain, different
types of constraints viz., hard and soft are figured out and while
solving emphasis is focused on the degree of constraint satisfaction.
Workflow of the system is described by using a case study and the
output which it has generated is efficient and satisfactory.

6
TABLE OF CONTENTS

 Introduction

 Explanation

 Source Code

 Output

 Final Words

 Conclusion

 Reference

7
INTRODUCTION

The Cricket Score Sheet project is a simple application


written in the C programming language. It employs file
management to store data like as runs, wickets, overs,
and extras, among other things. The application may
show runs, wickets, batsman and bowler names, overs,
extras, bowler economy, batsman strike rate, and so on.
It also shows the game's start and end times. The source
code is comprehensive, devoid of errors, and simple to
comprehend.

8
.

Explanation:-
Functions Employed:

This project's C source code is incredibly basic, with just seven user
supplied functions. They're mentioned here, along with the jobs they're
responsible for.

 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 cricket score sheet project file is run, it performs the following
steps:

The project begins by displaying the welcome screen, which fades up to


reveal the main menu. There are three choices on the main menu:

 Create a new score sheet

 View a previous score sheet

 Exit

9
If '1' is entered, the Cricket Score Sheet project prompts for a new score
sheet's name. A notice appears on the screen when the file is
generated. The user must next fill out the score sheet, which includes 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 entering these details, the application prompts the user to press 'e'
to amend the information and 'c' to proceed. When the user selects '2'
from the main menu, the application prompts for the file name. The file
is shown if it is found. Otherwise, the screen displays an error
message. Exit is the third option on the main menu. The Cricket Score
Sheet project is terminated if the number '3' is entered in the main
menu.

Source Code for Cricket Score Display Project Using


C Language
#include<stdio.h>

#include<stdlib.h>

struct batsman
10
{

char name[25];

int
runs,score,balls,toruns,tobal,ones,twos,threes,fours,sixes;

int max_six,max_run,max_four;

float str;

}pl1[100],pl3;

struct bowler

char name[25];

int runsgv,wkttkn,overs;

int max_w;

float econ;

}pl2[100],pl4;

int main()

int plno,choice;
11
int i,n,m;

printf("Enter the Batsman detail:\n");

printf("Enter the number of batsman:\n");

scanf("%d",&m);

for(i=0;i<m;i++)

printf("Enter name of batsman%d:\n",i+1);

scanf("%s",pl1[i].name);

printf("Enter the number of ones scored by player%d:\n


",i+1);

scanf("%d",&pl1[i].ones);

printf("Enter the number of twos scored by player%d:\n


",i+1);

scanf("%d",&pl1[i].twos);

printf("Enter the number of threes scored by player%d:\


n ",i+1);

12
scanf("%d",&pl1[i].threes);

printf("Enter the number of fours scored by player%d:\n


",i+1);

scanf("%d",&pl1[i].fours);

printf("Enter the number of sixes scored by player%d:\n


",i+1);

scanf("%d",&pl1[i].sixes);

printf("Enter the balls played by the player%d:\


n",i+1);

scanf("%d",&pl1[i].balls);

printf("\nEnter the bowlers details:\n");

printf("Enter the number of bowlers:\n");

13
scanf("%d",&n);

for(i=0;i<n;i++)

printf("\nEnter name of bowler%d:",i+1);

scanf("%s",pl2[i].name);

printf("Enter the runs given by the bowler%d:\n ",i+1);

scanf("%d",&pl2[i].runsgv);

printf("Enter the overs bowled by the bowler%d:\


n",i+1);

scanf("%d",&pl2[i].overs);

printf("Enter the wickets taken by the bowler%d\


n",i+1);

14
scanf("%d",&pl2[i].wkttkn);

printf("Thank you all details are recorded\n");

do

printf("Enter the choice:\n 1)Batsman detail:\n


2)Bowlers detail:\n 3)Match summary:\n 4)Record:\n 5)Exit\n
");

scanf("%d",&choice);

switch(choice)

case 1:

printf("Enter the batsman number to see his


details\n");

scanf("%d",&plno);

15
plno--;

printf(" Player Detail\


n");

printf("======================================================
=====================\n");

printf(" Batsman runs balls


fours sixes sr \n");

printf("======================================================
=====================\n");

pl1[plno].runs=(1*pl1[plno].ones)
+(2*pl1[plno].twos)+(3*pl1[plno].threes)+(4*pl1[plno].fours)
+(6*pl1[plno].sixes);

pl1[plno].str=(pl1[plno].runs*100.00)/pl1[plno].balls;

printf(" %-15s %-14d %-13d %-11d %-11d %-9.2f\n\


n",pl1[plno].name,pl1[plno].runs,pl1[plno].balls,pl1[plno].fou
rs,pl1[plno].sixes,pl1[plno].str);

break;

case 2:

printf("Enter the bowlers number to see his


details\n");

16
scanf("%d",&plno);

plno--;

printf(" Player Detail\n


");

printf("======================================================
===========\n");

printf(" Bowler overs runs


wicket economy\n");

printf("======================================================
===========\n");

for(i=0;i<n;i++)

{ pl2[plno].econ=pl2[plno].runsgv/pl2[plno].overs;

printf(" %-15s %-14d %-13d %-11d %-11.2f\n\


n",pl2[plno].name,pl2[plno].overs,pl2[plno].runsgv,pl2[plno].w
kttkn,pl2[plno].econ);

break;

case 3:

printf(" Match summary\n");

17
printf("======================================================
====================\n");

printf(" Batsman runs balls


fours sixes sr \n");

printf("======================================================
====================\n");

for(i=0;i<1;i++)

pl1[i].runs=(1*pl1[i].ones)
+(2*pl1[i].twos)+(3*pl1[i].threes)+(4*pl1[i].fours)
+(6*pl1[i].sixes);

[Link]+=pl1[i].runs;

pl1[i].str=(pl1[i].runs*100.00)/pl1[i].balls;

printf(" %-15s %-14d %-13d %-11d %-11d %-


9.2f\n\
n",pl1[i].name,pl1[i].runs,pl1[i].balls,pl1[i].fours,pl1[i].si
xes,pl1[i].str);

printf("TOTAL RUNS:%d\n\n",[Link]);

printf("\n\n");

printf("======================================================
===========\n");

printf(" Bowler overs runs


wicket economy\n");

18
printf("======================================================
===========\n");

for(i=0;i<n;i++)

{ pl2[i].econ=pl2[i].runsgv/pl2[i].overs;

printf(" %-15s %-14d %-13d %-11d %-11.2f\n\


n\
n",pl2[i].name,pl2[i].overs,pl2[i].runsgv,pl2[i].wkttkn,pl2[i]
.econ);

break;

case 4:
pl3.max_run=0,pl4.max_w=0,pl3.max_four=0,pl3.max_six=0;

for(i=0;i<m;i++)

pl1[i].runs=(1*pl1[i].ones)
+(2*pl1[i].twos)+(3*pl1[i].threes)+(4*pl1[i].fours)
+(6*pl1[i].sixes);

if(pl3.max_run<pl1[i].runs)

pl3.max_run=pl1[i].runs;

19
}

if(pl3.max_six<pl1[i].sixes)

pl3.max_six=pl1[i].sixes;

if(pl3.max_four<pl1[i].fours)

pl3.max_four=pl1[i].fours;

if(pl4.max_w<pl2[i].wkttkn)

pl4.max_w=pl2[i].wkttkn;

printf("Highest runs scored by the batsman:%d\


n",pl3.max_run);

printf("Max

20
Output:-

21
Final words:-
We encourage that you use this project as a reference,
much like the other projects on our site. It is strongly
discouraged to use this cricket score sheet project with
little or no changes. After you've finished examining this
project, try developing your own code. This project will
show you how to utilize file handling effectively in a C
mini project, as well as how to store and display data
using files.

Conclusion
The Time table scheduling problems are directly related to the number of

constraints involved. Higher number of constraints might raise more numbers of

complexities. There is no fixed algorithm to solve this class of problem. In this

work, we generated the exam time schedule automatically with the help of

graph coloring approach by taking the list of subjects, number of faculties

available to conduct the exams, number of rooms available for conducting the

exams, and the room capacity as inputs. Also, it has successfully satisfied some

of the important hard and soft constraints. The system also achieves fairness,

accuracy, and optimal exam time period. In future, we are planning to add the

class routine generation problem with the help of a teacher-subject conflict

matrix by applying edge-coloring with bipartite graph. Also with a large

numbers of input data system will be tested.


22
REFERENCE

Cricket Score Display Project Using C Language - Studytonight

[Link]

[Link]

23

Common questions

Powered by AI

The exam timetable scheduling problem involves hard and soft constraints. Hard constraints must be fulfilled for a valid schedule and include factors like non-overlapping exam times for students. Soft constraints, while desirable, are not mandatory and might include preferences for exam times or locations. These constraints are managed using graph vertex coloring, which helps to allocate exams without conflicts and with optimal resource utilization. The project employs a systemic model using a course matrix which takes inputs like subject numbers, faculty availability, and room capacities to generate a conflict-free schedule .

File management in the cricket score sheet project enables persistent storage of match data such as runs, wickets, innings details, etc., across multiple sessions. This facilitates features like creating new score sheets, accessing past records, and editing existing files without data loss. It allows the project to handle multiple datasets efficiently, providing scalability and robustness to the application's functionality .

Algorithm selection critically influences the efficacy of solving the exam timetable scheduling problem. The choice of graph vertex coloring offers structured conflict resolution, handling complex constraint scenarios efficiently. This method adapts to various constraints, ensuring conflict-free scheduling and optimal resource usage. However, while it provides flexibility and mitigation of common obstacles, its performance can vary with constraint complexity and data scale, necessitating robust algorithmic tweaks to maintain satisfactory results under diverse conditions .

Graph coloring in exam timetable generation involves assigning colors (time slots) to vertices (exams) such that no two adjacent vertices (exams with shared students or resources) share the same color, thus avoiding scheduling conflicts. The logic centers around minimizing the number of colors while accommodating all constraints, using the graph's course matrix to understand inter-exam conflicts and dependencies. This approach allows efficient resource utilization and conflict resolution without manual interventions .

The project manages incorrect user inputs by showing an error message if the specified file name for a score sheet is not found. This interface design, part of the C programming structure, ensures that the user is aware of input errors and can reattempt accessing the correct file, thereby preventing system crashes and maintaining user experience .

The current exam timetable scheduling model, while effective, faces limitations regarding the diversity of constraints it can handle and the complexity of real-world scenarios. It may struggle under high constraint diversity, requiring manual adjustments and additional computational resources. The model's reliance on predefined algorithms may not adapt well to unexpected variables or future changes in scheduling policies, indicating a need for more dynamic solutions and the incorporation of machine learning techniques to enhance adaptability .

The project proposes future expansions including incorporating class routine generation by applying edge-coloring with bipartite graphs to solve teacher-subject conflict matrices, thus addressing broader scheduling challenges. It also plans to test the system with a larger dataset to validate and improve the system's effectiveness, efficiency, and scalability .

The cricket score sheet project manages input and storage by utilizing file management functions in C programming. It employs functions like 'filewrite()' to store input data such as runs and wickets onto the computer's hard disk, and 'fileread()' to read this stored data. The project allows for creating a new score sheet, viewing existing score sheets, and involves user inputs to record details like batsman's and bowler's performance using functions such as 'limitedinput()' and 'newscoresheet()' .

The project ensures accurate presentation by systematically calculating and displaying statistics based on user inputs. For batsmen, it calculates runs using gathered data like the number of ones, twos, threes, fours, and sixes, along with balls faced to compute strike rates. Similarly, for bowlers, it computes economy rates from runs given and overs bowled. The project presents these statistics in a formatted output, ensuring clarity and accuracy, using detailed C programming functions such as 'printt()' and switches for user-driven data access .

The course matrix serves as a foundational data structure in the timetabling process. It represents the relations and constraints among courses, such as which exams must not occur simultaneously. Using graph vertex coloring, each course is treated as a vertex and conflicting exam slots are represented as edges between vertices. The task is to color each vertex (schedule each exam) such that no two adjacent vertices (conflicting exams) share the same color (time slot), creating a feasible timetable while respecting constraints .

You might also like