Software Architecture and Design

Assignment # 1

Due Date:  2024, 23:59 pm.

Requirement: Draw the Class and a Sequence (One Scenario only) Diagram for the following case study. (Hand sketch is accepted)

 

Case Study: Basketball game

 

Suppose you’re an analyst building a model of the game of basketball, and you’re interviewing a coach in order to understand the game. The conversation might go something like this:

 

Analyst: “Coach, what’s basketball all about?” Coach: “The goal of the game is to shoot the ball through the basket and score more points than your opponent. Each team consists of five players: two guards, two forwards, and a centre. Each team advances the ball toward the basket with the objective of ultimately shooting the ball through the basket.”

 

Analyst: “How does it advance the ball?” Coach: “By dribbling and passing. But the team has to take a shot at the basket before the shot clock expires.”

 

Analyst: “Shot clock?” Coach: “Yes. That’s 24 seconds in the pros, 30 seconds in international play, and 35 seconds in college to take a shot after a team gets possession of the ball.”

 

Analyst: “How does the scoring work?” Coach: “Each basket counts two points, unless the shot is from behind the three point line. In that case, it’s three points. A free throw counts one point. A free throw, by the way, is the penalty a team pays for committing a foul. If a player fouls an opponent, play stops and the opponent gets to shoot at the basket from the free throw line.”

 

Analyst: “Tell me a little more about what each player does.” Coach: “The guards generally do most of the dribbling and passing. They’re typically shorter than the forwards, and the forwards are usually shorter than the centre. All the players are supposed to be able to dribble, pass, shoot, and rebound. The forwards do most of the rebounding and intermediate range shooting, while the centre stays near the basket and shoots from close range.”

 

Analyst: “How about the dimensions of the court? And by the way, how long does a game last?” Coach: “In international play, the court is 28 meters long by 15 meters wide. The basket is 10 feet off the ground. In the pros, a game lasts 48 minutes, divided into four 12 minute quarters. In college and international play, it’s 40 minutes divided into two 20 minute halves. A game clock keeps track of the time remaining.”