0% found this document useful (0 votes)
42 views12 pages

Cricket Match Management System Design

Cricinfo is a cricket website that allows admins to track cricket matches and players, record ball-by-ball commentary, and display statistics, with classes defined for teams, players, matches, innings, balls, and more. The system requirements specify tracking cricket data like players, matches, and stats while supporting queries. Use cases allow admins to add data and commentators to provide live commentary.

Uploaded by

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

Cricket Match Management System Design

Cricinfo is a cricket website that allows admins to track cricket matches and players, record ball-by-ball commentary, and display statistics, with classes defined for teams, players, matches, innings, balls, and more. The system requirements specify tracking cricket data like players, matches, and stats while supporting queries. Use cases allow admins to add data and commentators to provide live commentary.

Uploaded by

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

Design Cricinfo

Let's design Cricinfo.


Cricinfo is a sports news website exclusively for the game
of cricket. The site features live coverage of cricket
matches containing ball-by-ball commentary and a
database for all the historic matches. The site also provides
news and articles about cricket.
[Link] ¬
System Requirements
We will focus on the following set of requirements while
designing Cricinfo:

1 The system should keep track of all cricket-playing teams


and their matches.

2 The system should show live ball-by-ball commentary of


cricket matches.

3 All international cricket rules should be followed.

4 Any team playing a tournament will announce a squad (a


set of players) for the tournament.

5 For each match, both teams will announce their playing-


eleven from the tournament squad.

6 The system should be able to record stats about players,


matches, and tournaments.

7 The system should be able to answer global stats queries


like, “Who is the highest wicket taker of all time?”, “Who
has scored maximum numbers of 100s in test matches?”,
etc.
8 The system should keep track of all ODI, Test and T20
matches.

Use case diagram


We have two main Actors in our system:

• Admin: An Admin will be able to add/modify players,


teams, tournaments, and matches, and will also record
ball-by-ball details of each match.
• Commentator: Commentators will be responsible for
adding ball-by-ball commentary for matches.
Here are the top use cases of our system:

• Add/modify teams and players: An Admin will add players


to teams and keeps up-to-date information about them in
the system.
• Add tournaments and matches: Admins will add
tournaments and matches in the system.
• Add ball: Admins will record ball-by-ball details of a
match.
• Add stadium, umpire, and referee: The system will keep
track of stadiums as well as of the umpires and referees
managing the matches.
• Add/update stats: Admins will add stats about matches and
tournaments. The system will generate certain stats.
• Add commentary: Add ball-by-ball commentary of
matches.
[Link] ¬
Use case diagram
Class diagram
Here are the main classes of the Cricinfo system:

• Player: Keeps a record of a cricket player, their basic


profile and contracts.

• Team: This class manages cricket teams.

• Tournament: Manages cricket tournaments and keeps


track of the points table for all playing teams.

• TournamentSquad: Each team playing a tournament will


announce a set of players who will be playing the
tournament. TournamentSquad will encapsulate that.

• Playing11: Each team playing a match will select 11 players


from their announced tournaments squad.

• Match: Encapsulates all information of a cricket match.


Our system will support three match types: 1) ODI, 2) T20,
and 3) Test

• Innings: Records all innings of a match.

• Over: Records details about an Over.

• Ball: Records every detail of a ball, such as the number of


runs scored, if it was a wicket-taking ball, etc.

• Run: Records the number and type of runs scored on a


ball. The different run types are: Wide, LegBy, Four, Six,
etc.
• Commentator and Commentary: The commentator adds
ball-by-ball commentary.

• Umpire and Referee: These classes will store details about


umpires and referees, respectively.

• Stat: Our system will keep track of the stats for every


player, match and tournament.

• StatQuery: This class will encapsulate general stat queries


and their answers, like “Who has scored the maximum
number of 100s in ODIs?” or, “Which bowler has taken the
most wickets in test matches?”, etc.
[Link] ¬
Class diagram
1__#$!@%!#__unknown.svg ¬
Activity diagrams
Record a Ball of an Over: Here are the steps to record a
ball of an over in the system:
2__#$!@%!#__unknown.svg ¬
Code
Here is the high-level definition for the classes described
above.

Enums, data types, and constants: Here are the required


enums, data types, and constants:
Java

Python
public class Address {
    private String streetAddress;
    private String city;
    private String state;
    private String zipCode;
    private String country;
}

public class Person {


    private String name;
    private Address address;
    private String email;
    private String phone;
}

public enum MatchFormat {


    ODI,
    T20,
    TEST
}

public enum MatchResult {


    LIVE,
    FINISHED,
    DRAWN,
    CANCELED
}

public enum UmpireType {


    FIELD,
    RESERVED,
    TV
}

public enum WicketType {


    BOLD,
    CAUGHT,
    STUMPED,
    RUN_OUT,
    LBW,
    RETIRED_HURT,
    HIT_WICKET,
    OBSTRUCTING
}

public enum BallType {


    NORMAL,
    WIDE,
    WICKET,
    NO_BALL
}

public enum RunType {


    NORMAL,
    FOUR,
    SIX,
    LEG_BYE,
    BYE,
    NO_BALL,
    OVERTHROW
}

Admin, Player, Umpire, Referee, and Commentator: These


classes represent the different people that interact with
our system:
Java

Python

// For simplicity, we are not defining getter and setter functions. The reader can
// assume that all class attributes are private and accessed through their respective
// public getter method and modified only through their public setter method.

public class Player {


    private Person person;
    private ArrayList<PlayerContract> contracts;

    public boolean addContract();


}

public class Admin {


    private Person person;
    public boolean addMatch(Match match);

    public boolean addTeam(Team team);

    public boolean addTournament(Tournament tournament);


}

public class Umpire {


    private Person person;

    public boolean assignMatch(Match match);


}

public class Referee {


    private Person person;

    public boolean assignMatch(Match match);


}

public class Commentator {


    private Person person;

    public boolean assignMatch(Match match);


}

Team, TournamentSquad, and Playing11: Team will


announce a squad for a tournament, out of which, the
playing 11 will be chosen:
Java

Python

public class Team {


    private String name;
    private List<Player> players;
    private List<News> news;
    private Coach coach;

    public boolean addTournamentSquad(TournamentSquad tournamentSquad);


    public boolean addPlayer(Player player);
    public boolean addNews(News news);
}

public class TournamentSquad {


    private List<Player> players;
    private List<TournamentStat> tournamentStats;

    public boolean addPlayer(Player player);


}

public class Playing11 {


    private List<Player> players;
    private Player twelfthMan;

    public boolean addPlayer(Player player);


}

Over, Ball, Wicket, Commentary, Inning, and Match: Match


will be an abstract class, extended by ODI, Test, and T20:
Java

Python

public class Over {


    private int number;
    private List<Ball> balls;

    public boolean addBall(Ball ball);


}

public class Ball {


    private Player balledBy;
    private Player playedBy;
    private BallType type;

    private Wicket wicket;


    private List<Run> runs;
    private Commentary commentary;

}
public class Wicket {
    private WicketType wicketType;
    private Player playerOut;
    private Player caughtBy;
    private Player runoutBy;
    private Player stumpedBy;
}

public class Commentary {


    private String text;
    private Date createdAt;
    private Commentator createdBy;
}

public class Inning {


    private int number;
    private Date startTime;
    private List<Over> overs;

    public boolean addOver(Over over);


}

public abstract class Match {


    private int number;
    private Date startTime;
    private MatchResult result;

    private Playing11[] teams;


    private List<Inning> innings;
    private List<Umpire> umpires;
    private Referee referee;
    private List<Commentator> commentators;
    private List<MatchStat> matchStats;

    public boolean assignStadium(Stadium stadium);

    public boolean assignReferee(Referee referee);


}

public class ODI extends Match {


    //...
}
public class Test extends Match {
    //...
}

Mark as Completed
←    Back
Design LinkedIn
Next    →
Design Facebook - a social network
Stuck? Get help on   
DISCUSS

Send feedback

6 Recommendations

Common questions

Powered by AI

The concept of 'Playing11' integrates into the Cricinfo system's handling of matches by dictating the specific set of players actively participating in a game. Each team selects 11 players from its announced 'TournamentSquad' specific to a match, which aligns with game-day strategies and team requirements . By structurally differentiating 'Playing11' from the larger squad, the system efficiently manages live match operations and associated data, such as real-time performance metrics of the in-play athletes .

In the Cricinfo system, Admins are responsible for the overall management and record-keeping of matches, which includes recording ball-by-ball details. The Admin's role ensures that each delivery in a match is accurately documented in the system . On the other hand, Commentators add narrative to these details by providing descriptive commentary for each ball bowled. This collaboration between admin entries and commentary enriches the live coverage experience for users .

The Cricinfo system tracks player statistics using a combination of key components such as 'Player', 'Match', 'Over', and 'Ball'. The 'Player' class contains fundamental player information and runs data while the 'Match' class captures the player performances specific to matches . During a match, details about each 'Over' and 'Ball' are meticulously recorded, including runs made and wickets taken . These components interconnect via match records that tie performances to player profiles, enabling comprehensive queries like determining top scorers or most wicket-takers . Such an interconnected setup allows for accurate and updated statistical analysis across matches and tournaments .

Enums in the Cricinfo system provide a structured means of defining and handling finite sets of cricket match details and statuses consistently across the application. They allow important match-related attributes like 'MatchFormat', 'MatchResult', 'UmpireType', and 'WicketType' to be predefined as fixed lists, ensuring data integrity and simplifying the process of checking and assigning values . This approach reduces errors and enhances code readability by providing descriptive and constrained sets of values for crucial match components .

Umpires and referees play distinct roles in the Cricinfo system to ensure orderly and fair conduct of cricket matches. Umpires, designated as fields, reserved, or TV, directly oversee match progress, making crucial on-field decisions and maintaining the flow of the game . Referees, on the other hand, handle the overarching management and disciplinary aspects, such as ensuring adherence to the laws of cricket and arbitration in case of disputes . This role differentiation in the system ensures comprehensive governance and operational integrity for each match, reflecting the real-world dynamics of cricket administration .

Differentiating between run types such as Wide, LegBy, Four, Six, etc., is crucial for the Cricinfo system as it affects match outcomes, player statistics, and strategic insights. Accurately categorizing runs helps in analyzing the performance of both batsmen and bowlers. For instance, wides and no-balls contribute to the number of extras, impacting a bowler's statistics, while fours and sixes highlight a batsman's aggressive scoring ability . Moreover, these distinctions aid in calculating net run rates and other derived statistics essential in tournament contexts .

The Cricinfo system handles the complexity of international cricket schedules and player data by utilizing a structured approach to class design and relational data management. Key classes like 'Team', 'Tournament', and 'Player' facilitate granular tracking of players' schedules and statistics through their integration into a broader data network that includes matches, innings, and tournaments . Moreover, the system employs automated functionalities such as stat queries and ball-by-ball commentary to ensure real-time updates and consistency with ongoing and historical records . These integrated components allow the system to efficiently manage the multifaceted data inherent in international cricket contexts .

Maintaining historical databases is crucial for the Cricinfo system as it supports a comprehensive analysis of cricket performance over time, aiding in historical comparisons, strategic planning, and fan engagement. Historical data provides the backbone for statistical queries, like identifying record-holders and performance trends . The system utilizes this data not only for generating insights during live matches but also for archival purposes, offering fans access to cricket history, and supporting journalists and analysts with reliable information . By preserving detailed historic statistics, the system enhances its role as a central repository for cricket enthusiasts and professionals .

The class hierarchy in the Cricinfo system is structured to systematically manage cricket matches through abstraction and specialization. The 'Match' class serves as the base class encapsulating generic match details such as match number, start time, result, and involved teams . This class is then extended by specific match types like 'ODI', 'Test', and 'T20', each inheriting base match properties while potentially introducing attributes and methods unique to their formats. This hierarchical organization ensures code reusability and facilitates handling specific rules and structures of different cricket formats .

The Cricinfo system ensures international cricket rules are followed by integrating them as part of its core functionalities and data handling processes. The system maintains detailed records of teams, matches, and player statistics, which are structured to align with the official formats of ODI, Test, and T20 matches . Furthermore, the system requires match procedures to include steps like announcing squads for tournaments and selecting playing elevens, maintaining adherence to official guidelines . Finally, adherence to rules is checked through automated consistency in data handling, such as recording ball-by-ball commentary and maintaining match and player statistics according to international standards .

You might also like