Cric Mantra
As a cricket fan, I want to maintain
my own data of each match in two aspects. First being all the details of the
match and second being performance of each player. So I want two interfaces to
add the corresponding details.
Interface to add Match details:
The columns it should contain are
Match ID, Match Type, Date, Venue, Team1, Team2, Umpire1, Umpire2, Winner, Man
of the Match
Some rules that this interface
should follow are
- It should not allow to enter a
Match ID which already exists
- Match Type should be a dropdown
- Date should not allow future date
- Team1 and Team2 should be
dropdowns which should be populated from a list which can be dynamically
modified
- Team1 and Team2 should not be same
- Winner should be one of the
playing teams
- Umpire1 and Umpire2 cannot be same
person
- On a same date no team can play
more than one game and no umpire can attend more than one game
- On successfully adding a match
details interface should redirect the user to the second interface where he can
add player performance detail.
Interface to add player performance
details:
It should contain two columns. The Match ID
and Performance. The Performance dropdown should contain Team1 Batting, Team2
Batting, Team1 Bowling, Team2 Bowling and the man of the match. Selecting each
should take you to the required form to enter the player details. After
entering each player detail, the form should take you back to the Performance
page.
Team1 and Team2 Batting interfaces:
The columns which these interfaces should
contain are Match ID, Batsman, Out, Bowled, Caught By, Run Out By, Stumped By,
Description, Runs, Balls, 6’s and 4’s.
-The Match ID should be populated from a drop
down which contains values entered in the Match Details form.
-Same batsman cannot be entered twice for the
same Match ID.
-There are 10 ways in which a batsman can be
out. All these should be populated in the drop down for Out column. In
addition, it should contain Not Out and Did Not Bat status.
-The Bowled, Caught By, Run Out By and Stumped
By columns should be accordingly for the different selections in the drop down
for Out column.
-Description column should be auto updated on
input in the above columns.
-The number of 4’s and 6’s hit should
aggregate to less than or equal to the total runs taken.
-The Batsman should at least face one ball to
score a run.
-The batsman should face at least two balls to
score runs and be out by Bowled, Caught, Stumped, LBW, Hit the ball twice, Handling
the ball or Hit wicket.
-The batsman should face at least one ball to
be out by Bowled, Caught, Stumped, LBW, Hit the ball twice, Handling the ball
or Hit wicket.
-There can only be a maximum of two not outs
and 11 players entered for one Match ID.
Team1 and Team2 Bowling interfaces:
The columns which these interfaces should
contain are Match ID, Bowler, Overs, Maidens, Runs and Wickets.
-The Match ID should be populated from a drop
down which contains values entered in the Match Details form.
-Same bowler cannot be entered twice for the
same Match ID.
-The maximum number of overs bowled by a
bowler is 10 and total overs are 50 for a Match.
-The overs can be incomplete and it should be
of the form x.y where y in [0, 5]. Y should not be greater than 5.
-The number of maidens bowled cannot be
greater than the number of overs bowled. The maidens should be integer value.
-The total number of wickets cannot exceed 10
for a Match ID.
-Maidens cannot be less than overs-runs.
Man Of the Match interface:
The columns it should contain are Player Name, Match ID, Role, Runs,
6's, 4's, Overs bowled, Maidens Bowled and Wickets.
Some rules that this interface should follow are
- Match ID should be a dropdown populated from the existing Match IDs
which were already entered using the first interface
- Role should be a dropdown whose values can be Batsman, Bowler,
All-rounder, Batsman/WK and Bowler/WK.
- When the role selected is a batsman, the following fields should not
be shown to user. They are Overs bowled, Maidens Bowled and Wickets taken.
-Similarly if the role selected is bowler Runs, 4’s and 6’s should not
be shown to the user.
- No two man of the Match is possible for the same match.
Develop an application satisfying
the above requirements. Please contact in case of any ambiguity and add any
sensible features if missed after confirming.