...

/

Untitled Masterpiece

Understand how to create a class diagram for ESPNcricinfo using the bottom-up approach.

In this lesson, we’ll identify and design the classes, abstract classes, and interfaces based on the requirements we have previously gathered from the interviewer in our ESPNcricinfo system.

Components of ESPNcricinfo

As mentioned, we will design the ESPNcricinfo system using a bottom-up approach.

Admin

The Admin class manages the system and adds and modifies updates. The representation of the class is shown below:

Press + to interact
The Admin class
The Admin class

Run, ball, and wicket

The Run class records the number and type of runs scored on a ball. The Ball class records every detail of a ball, such as the number of runs scored, if it was a wicket-taking ball, etc. The Wicket class records the details of the wicket, including its type, the player that bowled, and the player that was declared out.

The mentioned classes are shown below:

Press + to interact
The Run, Ball, and Wicket classes
The Run, Ball, and Wicket classes

Over and innings

The Over class represents all the details of an over of the innings. The Innings class represents the details of a match innings. The two classes are shown below:

Press + to interact
The Over and Innings classes
The Over and Innings classes

Match

The Match class is an abstract class that has three child classes that represent the types of matches that can take place.

  • The Test class

  • The ODI class

  • The T20 class

The class diagram is shown below:

Press + to interact
The Match and its derived classes
The Match and its derived classes

Stadium

The Stadium class represents the information about a stadium, including its name, address, and capacity. The UML representation of this class is given below:

Press + to interact
The Stadium class
The Stadium class

Player, coach, and umpire

The Player class includes the information of a player and their statistics. The Coach class contains the information of a coach. The Umpire class contains the information of an umpire. The three classes are shown below:

Press + to interact
The Player, Coach, and Umpire classes
The Player, Coach, and Umpire classes

Team, tournament

...