F05 SENG 311 Final Solutions

From Craig

You have been assigned to a development team which is creating an application that will help the NHL (National Hockey League) schedule its regular season. Every June, each team within the league must supply the NHL with a list of dates that the team will be available to play and a list of dates where their home arena is available. The league determines if there are any dates where no teams will play (eg. Christmas day, all-star game, during olympics, etc). Under normal operation, the application will attempt to compute schedules for the league. However, algorithms for computing schedules often produce poor schedules so the application requires that the operator can manually adjust and/or add games to the season.


1. Based on the above information and your own further analysis, write the Use Case for “Add Game to Season”. If you need to make any assumptions about the requirements to complete this question, state those assumptions. (10%)


Use Case: Add Game to Season

An operator indicates to the system that he/she wishes to add a game to the current NHL season. The operator specifies the home team, the away team and the date of the game. The system verifies that the date specified is within the current season and that it does not correspond with one of the NHL's no-play dates. The system verifies that the home and away team exist within the system. The system verifies that the home team's arena is available for the date specified and also verifies that both the home and away team are available to play on the specified date and that neither team are already scheduled to play a game on the date specified. Should any of the previous verifications fail, the operator is notified of the error with an appropriate error message. Otherwise, a game is scheduled for the specified date for the teams specified.


2. Write a successful scenario based on your Use Case from question #1. Draw the sequence diagram for that scenario. (10%)

Jim indicates to the system that he wishes to add a game to the current NHL season. He specifies that the home team is the Calgary Flames, that the Edmonton Oilers are the away team and that he would like to schedule the game for December 17, 2005. The system verifies that December 17, 2005 is within the current season and that it does not correspond with one of the season's no-play dates. The system verifies that both the Calgary Flames and Edmonton Oilers exist within the system. The system identifies that Calgary's arena is the Saddledome and verfies that it is available for December 17, 2005. The system verifies that December 17, 2005 is listed within both Calgary and Edmonton's "available to play" dates. The system also verifies that neither Calgary nor Edmonton are currently scheduled to play a game on December 17, 2005. All of the verifications pass and a game is scheduled between the Calgary Flames and the Edmonton Oilers in the Olymipic Saddledome for December 17, 2005.

Missing image
NewGame.gif
Complete Sequence Diagram


NOTE! This is a complete solution. You did not need to create this level of depth on the exam to receive an "A" for this question.


3. Draw the class diagram (including any managers and controller classes) which supports your Use Case, Scenario and Sequence Diagram. Be sure to include all navigability and multiplicity as well as any identified attributes and methods. (10%)

Missing image
F05SENG311ClassDiagram.gif
Image:F05SENG311ClassDiagram.gif