Class Diagram for Cricinfo
Understand how to create a class diagram for Cricinfo using the bottom-up approach.
We'll cover the following...
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:
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:
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:
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
classThe
ODI
classThe
T20
class
The class diagram is shown below:
Stadium
The Stadium
class represents the information about ...