Class Diagram for Cricinfo

Understand how to create a class diagram for Cricinfo 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 Cricinfo system.

Components of Cricinfo

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

Admin

The Admin class is responsible for managing the system as well as adding and modifying 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 ...