Anda di halaman 1dari 36

Cricket Scorecard & Analysis System.

ACKNOWLEDGEMENT

We take this occasion to thank God, Almighty for blessing us with his grace
and taking our endeavor to a successful culmination. We extend our sincere
and heartfelt thanks to our esteemed guide, Mr. V. Damodaran for providing
us with the right guidance and advice at the crucial junctures and for
showing us the right way. We extend our sincere thanks to our respected
head of the division Mr. David Peter, for allowing us to use the facilities
available. We would like to thank the other faculty members also, at this
occasion. Last but not least, we would like to thank friends for the support
and encouragement they have given us during the course of our work.

Ram Kumar
Nikesh Jain
Niraj Kumar Verma.

Divison of computer Engineering, SOE Page i


Cricket Scorecard & Analysis System.

ABSTRACT

The Project is for the Cricket Scorecard Analysis .The aim of this project is

to maintain the details of Tournament .In which there are various special

methods which can reduce the overhead of the person maintaining the

Scorecard manually. For this project we have used .NET Framework 4.0

with visual basic. MS SQL the database management software is used in the

project .This is a standalone application. The software will be installed on a

computer on which the administrator will perform the desired operation.

Divison of computer Engineering, SOE Page ii


Cricket Scorecard & Analysis System.

LIST OF TABLES

5.1 Table for player records.................................................................19

5.2 Table for Match...............................................................................20

5.3 Table for Series details................................ ...................................20

5.4 Table for Team................................................................................21

Divison of computer Engineering, SOE Page iii


Cricket Scorecard & Analysis System.

LIST OF FIGURES
Fig 6.1 Team Input ....…………….……………………….22

Fig 6.2 Match Schedule ……………….…….……………..23

Fig 6.3 Player Input..………………….……………………24

Fig 6.4 Scorecard……………………….……………...........25

Fig 6.5 Team Details……………..…………………………26

Divison of computer Engineering, SOE Page iv


Cricket Scorecard & Analysis System.
TABLE OF CONTENTS

ACKNOWLEDGEMENT……………………….………………………..i
ABSTRACT………………………………………………………………ii
LIST OF TABLES……………………………………………………….iii
LIST OF FIGURES……………………………………………………… iv

1. INTRODUCTION…………………………………………...................8

1.1 Brief Background Of The Project…………………………8

1.2 Definition of Problem. ………………………………...….9

1.2.1 Addition of team and players ………………………9


1.2.2 Updating Record ……………………………………9

1.2.3 Match Scorecard ……………………………………10

1.2.4 Tournament record ………………………………….10

2. EXISTING SYSTEM………………………………………….………10

3. PROPOSED SYSTEM……………………………………………….. 11

3.1 Advantage ……………………………………………….... 11

4. TECHNOLOGY ………….………………………………………......12

4.1 .NET……………………………………………………....12

4.2 MS Sql…………………………………………………….17

Divison of computer Engineering, SOE Page v


Cricket Scorecard & Analysis System.
5. DATABASE DESIGN …………..……………………………. .19

5.1 Table of Player Records …………………………….....19

5.2 Table for a Match…………………………………….....20

5.3 Table for Series …... ………………………………….. 20

5.4 Table for Team. …………………………………….… .21

6. INTERFACE DESIGN…………………….……………………..21

6.1 Team Input ....…….……….……………………….22

6.2 Match Schedule ……..………….…….…………….. 23

6.3 Player Input..………..………….……………………24

6.4 Scorecard……………………….……………...........25

6.5 Team Details ……..………..……………………….. 26

7. TESTING…………………….………………………….………..27

7.1 Test case 1……………………………………………………27

7.2 Test case 2……………………………………………………27

8. CONCLUSION…………………….………………………….….28

Divison of computer Engineering, SOE Page vi


Cricket Scorecard & Analysis System.
APPENDICES………………………………………………………29

REFERENCES……………………………………………………...36

Divison of computer Engineering, SOE Page vii


Cricket Scorecard & Analysis System.
CHAPTER 01
INTRODUCTION

Cricket Scorecard & Analysis System include the Storing and maintaining

details of cricket match and tournament as well. Here we are concerned to

maintain the record of every player and teams.

1.1 BRIEF BACKGROUND OF THE PROJECT

The software which we have developed is a standalone application .It has

some exciting features which make it an efficient tool. This software reduces

the manual calculation, makes the insertion, deletion, updating of records

much faster. We have tried our level best to develop this software such that

it mitigates the overhead of person handling the Scorecard. We have

provided a Data Grid View so that while entering the values the Scorer can

see that whether the data are being correctly inserted to the database or not.

Divison of computer Engineering, SOE Page viii


Cricket Scorecard & Analysis System.
1.2 DEFNITION OF THE PROBLEM
This software has mainly four modules:

1. Addition of team and players

2. Updating Record

3. Match Scorecard

4. Tournament record

1.2.1 Addition of team and players


Here the Scorer will add a team and the players in each team for a

tournament. Scorer will be able to add matches in a tournament and

can input the score as needed. While entering the data we have taken care of

all the exception cases so that if the Scorer makes any mistake then he/she

will be warned and until they do not enter the correct values they cannot

proceed further. This is a very exciting feature of our software because it is

very user friendly and chances of error is reduced to minimum

1.2.2 Updating record


After a match we just need to select the date and click the update button, it

will automatically update all the tournament records. By selecting a team or

a player we can see the career details of a team or a player This searching

Divison of computer Engineering, SOE Page ix


Cricket Scorecard & Analysis System.
makes it a very powerful tool, because the Scorer can directly choose the

person whose record he/she wants to update .We can just imagine that how

our software mitigate the overhead of the Scorer.

1.2.3 Match scorecard


Selecting the match we will be able to see the scorecard for both teams of

that particular match.

1.2.4 Tournament record


We are storing the details of all matches of tournaments which will be

updated after every match by Scorer.

CHAPTER 02
EXISITING SYSTEM
There is no existing system in SOE till now for cricket scorecard & analysis.

Divison of computer Engineering, SOE Page x


Cricket Scorecard & Analysis System.
CHAPTER 03

PROPOSED SYSTEM
It provides a very attractive interface to the Scorer. There are facilities for

adding series, adding team, players to a team, records of a player, records of

a team. It also has facilities to display the match scorecard.

3.1 ADVANTAGES
1) We maintain a database of all the teams so the Scorer has to enter the

data of all teams only once. So it saves time as well as effort.

2) Calculation errors can be avoided easily as well as error checking is

also done so That if any error occurs then a warning will be displayed.

While entering the values the Scorer can see the values in Data Grid

-View .If there is any mistake occurs in entering the values then the

Scorer can delete it and reinsert the values again easily.

3) Viewing of the records of players of a team is very fast, so if the

Scorer wish to see the information related to any player or team then

he /she can go through it very easily.


Divison of computer Engineering, SOE Page xi
Cricket Scorecard & Analysis System.

4) If the Scorer has to update the tournament status he/she is not needed

to go to each player’s information and update it rather than he/she can

do it very easily by selecting the date and clicking the update button.

CHAPTER 04
TECHNOLOGY
As the name suggest, here we deal with the software requirement of the

project. The programming language which we have used is Visual Basic

.NET to serve and retrieve the data from MSSQL database. MSSQL is used
to create the data base.

4.1VISUAL BASIC .NET

Divison of computer Engineering, SOE Page xii


Cricket Scorecard & Analysis System.

Windows Forms: - It is usually to design the user interface for windows


application.

Web Forms: - It is used to design user interface for web application.

Web Services:- It enables us to access software components as the


Internet through the use of web protocols such as HTTP and SMTP.Frame

Work Base Class Library:-It contains set of classes and interfaces that we

can use to quickly develop different type of applications using different

.NET compatible langugaes.


Divison of computer Engineering, SOE Page xiii
Cricket Scorecard & Analysis System.
CLR:-It is the module that actually runs the .NET applications.

Namespaces – it is a collection of similar classes similar to packages in


java. System. Data is namespace to support the following classes-

1) DataSet

2) DataRow etc. which has been used in our program

System.Data.SqlClient in a namespace to support the following classes-

1) SqlConnection

2) SqlCommand

3) SqlDataAdapter etc. which has been used in our program

An instance of DataSet is nothing but the memory version of the data of

the database.

An instance of SqlDataAdapter is used to take the data from the

Database residing in the hard-disc to the dataset.

An instance of SqlConnection class is used to establish the connection

between database and interface of the user.

Further DataSource of the Datagridview communicate the dataset in

memory to the user interface inputted data.

Divison of computer Engineering, SOE Page xiv


Cricket Scorecard & Analysis System.
An instance of DataRow is used to navigate through the row of the table

SqlCommand is used to execute the sql statements especially update,

delete, add etc. the change affected in the dataset (i.e., memory version

of the data) but not in the permanent storage and to do this

SqlDataAdapter is used and further the updated value is fetched to the

dataset and thereafter datasource is used to fetch the data to the user

interface from the dataset. This cycle continued whenever such sql

statement is executed.

MD_Settings() method is used to connect the database to the user

interface window.

MD_Fillevents () method is used to fill all the text boxes of the user

interface for example updated value.

MD_FillCombo() method is used to fill the combo box of the form, so that

the user can navigate through the database for a particular team

which is the primary key in our case.

Form1_Load() method is the first ever method which is executed just

during the loading of a form. We keep three method in this event viz.

MD_Settings(), MD_Fillevents(), MD_Fillcombobox(). As above

mentioned the MD_Settings() will connect whereas the MD_Fillevents()

Divison of computer Engineering, SOE Page xv


Cricket Scorecard & Analysis System.
will fill the user interface textboxes with the first row of the table,

whereas the MD_FillCombo() will fill the combobox entry with the

selected team or selected player as needed by us according to choice.

Thus we keep the code for the connection to database in this very event.

The ‘Add’ button is used to add a row to the database table, clearly this

event will use an instance of the SqlCommand class to manipulate the

data in the table.

The ‘Update’ button is used to update a particular row of the table

The ‘Delete’ button is used to delete a particular record from the table.

Four navigation button is provided to navigate through the rows of the

table viz., next, previous, first, last.

The exit button is to exit from the window.

ComboBox1_SelectedIndexChanged() method handle one other

important aspect, it facilitates the user go through the row or record of

the table with the selected input in the combobox, here this selected

input is out primary key ‘Team Name’. As we click the selected

date, the text boxes show their fields value.

Types of connection  there is two types of connection

Divison of computer Engineering, SOE Page xvi


Cricket Scorecard & Analysis System.
1) Direct or connected architecture

2) Indirect or disconnected architecture

In the direct connection architecture, the data is updated, deleted or

added directly to the database without any intermediate things such as

dataset etc.

while in the disconnected architecture, a copy of database is first brought

into the dataset (memory version of database) and then the

communication is done through this version of the data and finally the

permanent database is updated. Hence, this architecture needs an

additional intermediate medium to communicate with the data.

4.2 MSSQL

Microsoft SQL is a computer application used to create desktop, enterprise,

and web-based database systems.It is used at different levels and with

various goals.

Divison of computer Engineering, SOE Page xvii


Cricket Scorecard & Analysis System.

DATABASE TABLE VIEW

CREATE DATABASE CREATE TABLE CREATE VIEW

DROP DATABASE DROP TABLE ALTER VIEW

RENAMING RENAMING DROP VIEW

Sql server includes many feature that makes it a powerful database

management system for enterprise networks and smaller networks.These

features includes everything from supporting a wide variety of operating

system to integration with windows and the Microsoft server application.

Divison of computer Engineering, SOE Page xviii


Cricket Scorecard & Analysis System.
CHAPTER 05

DATABASE DESIGN
This chapter deals with the database design of the project. Here, we mention

the Database and tables created. As the project is mainly concerned with the

Cricket Scorecard Analysis, hence the data bases mainly created include the

information about Teams, Series, players, match score and results .The

player records are also contained in the database .Team is the primary key

because two or more team with same name can’t be created.

5.1 TABLE OF PLAYER RECORDS (tblPlayerSeries)


In this table we are storing the career records of players which will be

displayed with team profile.

NAME Avg 50s 100s Wickets Catches Stumps Match Sr Eco


Runs Not
out
Ram 1000 5 142.85 1 2 5 3 0 12 88 5.4
Rajan 750 2 46.88 1 1 3 2 0 18 55 6.1

Divison of computer Engineering, SOE Page xix


Cricket Scorecard & Analysis System.

5.2 Table for a match(tblPlayerMatch).


In this we will store the personal details of a Player for an individual Match

NAME 6s Overs Runs Maiden Wicket Team Sr Date


Runs Balls 4s Given
Ram 100 50 10 4 4 25 0 3 CS 200 18\3\2010
Rajan 40 20 4 4 4 30 1 1 IT 200 18\3\2010

5.3 Table of Series(tblSeries)


Here the details of a particular batsman for one match is stored

Date Team1 Team2 Umpire1 Umpire2 Won MOM Toss


won

3/19/2010 cse it Mr. V. Mr. cse ram cse


Damodaran Sudeep

Divison of computer Engineering, SOE Page xx


Cricket Scorecard & Analysis System.
5.4 Table of Team(tblTeam)

Team Player Player Player Player Player Player13 Player14


1 2 3 4 5
Cse Ram Nikesh Niraj Rahul Ravi Nirbhay Kisore

CHAPTER 06

INTERFACE DESIGN
In this chapter we discuss about the interface design of the project .The

screen Design related operation performed . All the option available in the

interface and their constraint are discussed.

Divison of computer Engineering, SOE Page xxi


Cricket Scorecard & Analysis System.
6.1 TEAM INPUT….

Team Input will store the details of the team . i.e. the name of members of

the team. Here the scorer has the option of adding, updating, deleting.

From this page scorer can directly jump to match schedule.

Divison of computer Engineering, SOE Page xxii


Cricket Scorecard & Analysis System.
6.2 MATCH SCHEDULE
Match Schedule will show the details of match i.e the match are played

between who two teams .who are the umpires for that match ,who won the

toss ,who batted first ,who won the match and so on.

Divison of computer Engineering, SOE Page xxiii


Cricket Scorecard & Analysis System.
6.3 PLAYER INPUT
Here the scorer inputs the details of a particular player for one match. Two

different matches are differentiated by date .From this page we can go to

Scheduled Match, we can delete records of any player .we can add a new

player input or we can move out of the page by pressing the Exit button.

Divison of computer Engineering, SOE Page xxiv


Cricket Scorecard & Analysis System.
6.4 SCORECARD
Here we can see the scorecard of 1st innings of match .The scorecard will

show full details of the first batted team i.e. runs score by the batsman, No’s

of 4s and 6s hit by him, who outs him, what is his current status and so on.

Divison of computer Engineering, SOE Page xxv


Cricket Scorecard & Analysis System.
6.5 TEAM DETAILS

Team details show the Squad of the team for the match. i.e Name of the

players who are playing ,who are the reserved player and so on.

Divison of computer Engineering, SOE Page xxvi


Cricket Scorecard & Analysis System.
CHAPTER 07
TESTING
Software testing can be looked upon as among the many process of software

development organization performance, that provide the best opportunity to

correct any fault in the developed system. Following are some sample cases

of testing.

7.1 TEST CASE 1


We have entered all the information about the player of a team for a match.

All these information are stored in the data base. After that we checked that

whether the mathematical calculation which we have done for the

calculation of total runs , strike rate, average is correct or not?

RESULT: It was found that all the values are computed correctly.

7.2 TEST CASE 2


It was strongly needed that the type mismatch must be avoided for example

the name of a team must be a string. If by mistake scorer inputs any other

character than string than it must show an error window.

RESULT: All the details is entered correctly without any error.

Divison of computer Engineering, SOE Page xxvii


Cricket Scorecard & Analysis System.

CHAPTER 08

CONCLUSION
This project is implemented by using Visual Basic .NET as a programming

language. MSSql is used to create , maintain the data base. This software is a

standalone application ,so it will be installed on a single computer and all

the data will be entered by the dedicated Scorer. She/he needs to update the

records of a team.

The primary function of the project is to maintain a record of cricket

tournament. It will store all the details of the team as well as team members.

It will automatically update the data and all the calculation will be done by

itself. We don’t need to update the record of any player manually e.g. his

strike rate, career average. In totality this project tries to mitigate the

overhead of the scorer and provide a fast, error free and secure environment.

Divison of computer Engineering, SOE Page xxviii


Cricket Scorecard & Analysis System.
APPENDICES
SQL CONNECTION STRING
Dim con As New SqlConnection("Data Source = .\SQLEXPRESS;
Attachdbfilename = '" & System.Environment.CurrentDirectory &
"\dbCricket.mdf';" & "Integrated Security = True ; Connect TimeOut = 30 ;
User Instance = True")

Dim msql As String = "select * from tblTeam"

Dim da As New SqlDataAdapter(msql, con)

Dim dst As New DataSet

CODE FOR ADDITION OF TEAM


Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdd.Click

Dim result As Integer

result = MessageBox.Show("ARE YOU SURE?", "CONFIRMATION


BOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)

If (result = Windows.Forms.DialogResult.Yes) Then

Dim insertsql As String = "insert into tblTeam "

insertsql &= " values"

insertsql &= " ('"

insertsql &= txtTeam.Text & "','"

insertsql &= txtPlayer1.Text & "','"


Divison of computer Engineering, SOE Page xxix
Cricket Scorecard & Analysis System.
insertsql &= txtPlayer2.Text & "','"

insertsql &= txtPlayer3.Text & "','"

insertsql &= txtPlayer4.Text & "','"

insertsql &= txtPlayer5.Text & "','"

insertsql &= txtPlayer6.Text & "','"

insertsql &= txtPlayer7.Text & "','"

insertsql &= txtPlayer8.Text & "','"

insertsql &= txtPlayer9.Text & "','"

insertsql &= txtPlayer10.Text & "','"

insertsql &= txtPlayer11.Text & "','"

insertsql &= txtPlayer12.Text & "','"

insertsql &= txtPlayer13.Text & "','"

insertsql &= txtPlayer14.Text & "')"

Dim cmd As New SqlCommand(insertsql, con)

MsgBox(insertsql)

Dim added As Integer = 0

Try

con.Open()

added = cmd.ExecuteNonQuery()

da.Update(dst, "tblTeam")

Divison of computer Engineering, SOE Page xxx


Cricket Scorecard & Analysis System.
MsgBox("Record Inserted")

Catch ex As Exception

MsgBox(ex.ToString())

End Try

dst.Clear()

'da.Update(dst, "tblTeam")

da.Fill(dst, "tblTeam")

DataGridView1.DataSource = dst.Tables(0)

con.Close()

End If

End Sub

UPDATION OF RECORDS

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click

Dim insertsql As String

insertsql = "update tblTeam set Team='" & txtTeam.Text & "', "

insertsql &= "Player1='" & txtPlayer1.Text & "', "


Divison of computer Engineering, SOE Page xxxi
Cricket Scorecard & Analysis System.
insertsql &= "Player2='" & txtPlayer2.Text & "', "

insertsql &= "Player3='" & txtPlayer3.Text & "', "

insertsql &= "Player4='" & txtPlayer4.Text & "',"

insertsql &= "Player5='" & txtPlayer5.Text & "', "

insertsql &= "Player6='" & txtPlayer6.Text & "', "

insertsql &= "Player7='" & txtPlayer7.Text & "', "

insertsql &= "Player8='" & txtPlayer8.Text & "', "

insertsql &= "Player9='" & txtPlayer10.Text & "',"

insertsql &= "Player10='" & txtPlayer10.Text & "', "

insertsql &= "Player11='" & txtPlayer11.Text & "', "

insertsql &= "Player12='" & txtPlayer12.Text & "', "

insertsql &= "Player13='" & txtPlayer13.Text & "', "

insertsql &= "Player14='" & txtPlayer14.Text & "'"

insertsql &= "where Team=" & txtTeam.Text

MsgBox(insertsql)

Dim cmd As New SqlCommand(insertsql, con)

Dim added As Integer = 0

Try

con.Open()

added = cmd.ExecuteNonQuery()

Divison of computer Engineering, SOE Page xxxii


Cricket Scorecard & Analysis System.
MsgBox("Record Updated")

da.Update(dst, "tblTeam")

Catch ex As Exception

MsgBox(ex.ToString())

End Try

dst.Clear()

da.Fill(dst, "tblTeam")

DataGridView1.DataSource = dst.Tables(0)

con.Close()

End Sub

CODE FOR DELETION

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnDelete.Click

Dim result As Integer

result = MessageBox.Show("ARE YOU SURE?", "CONFIRMATION


BOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)

If (result = Windows.Forms.DialogResult.Yes) Then

Dim insertsql As String

Divison of computer Engineering, SOE Page xxxiii


Cricket Scorecard & Analysis System.
insertsql = "delete from tblTeam where Team= '" & txtTeam.Text &
"'"

MsgBox(insertsql)

Dim cmd As New SqlCommand(insertsql, con)

Dim added As Integer = 0

Try

con.Open()

added = cmd.ExecuteNonQuery()

MsgBox("Record Deleted")

da.Update(dst, "tblTeam")

Catch ex As Exception

MsgBox(ex.ToString())

End Try

dst.Clear()

da.Fill(dst, "tblTeam")

DataGridView1.DataSource = dst.Tables(0)

con.Close()

End If

End Sub

Divison of computer Engineering, SOE Page xxxiv


Cricket Scorecard & Analysis System.
CODE FOR CALCULATION OF STRIKERATE & ECONOMY

Private Sub calculate()

Dim niraj As Decimal

niraj = Val(txtRuns.text) / Val(txtballs.text)

StrikeRate = niraj * 100

niraj = Val(txtRunsGiven.text) / Val(txtOvers.Text)

Economy = niraj

End Sub

Divison of computer Engineering, SOE Page xxxv


Cricket Scorecard & Analysis System.

REFRENCES :-

[1] Mastering Microsoft Visual Basic 2008

Author:- Evangelos Petroutsos

Publisher:- Sybex

[2] google.com

[3] SQL The Complete Reference, 3rd Edition

Author:- James Groff, Paul Weinberg and Andrew J. Oppel

Divison of computer Engineering, SOE Page xxxvi