0% found this document useful (0 votes)
49 views

SD Tutorial ClassesStudents

The document discusses a football information system including actors, use cases, classes, and behaviors. Potential actors are managers and fans. Use cases include selecting a team and viewing fixtures and league tables. Classes identified are manager, player, team, fixture, and more. Behaviors include selecting a team and viewing schedules and standings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

SD Tutorial ClassesStudents

The document discusses a football information system including actors, use cases, classes, and behaviors. Potential actors are managers and fans. Use cases include selecting a team and viewing fixtures and league tables. Classes identified are manager, player, team, fixture, and more. Behaviors include selecting a team and viewing schedules and standings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

COMP1845: Database System Development

Tutorial 6: Objects, classes and UML class diagrams

1. Categorise the following


Categorise the following into either Objects, Classes, States or Behaviours.

Team Club Player Manager


selectForTeam accelerate Lewis Hamilton score
injured moving Car goal
Arsenal League Premiership relegate
Match Result Fixture Old Trafford
draw shoot reschedule booked

Classes: Team, Club, Player, Manager, Match, Result, Car


Object: Lewis Hamilton: Player, Arsenal: Club,Manager:
League,premiership, Match: Old Trafford , Result: Fixture,
States: score, moving, shoot, draw, selectForTeam, goal
Behaviors: booked, injured, accelerate, relegate, reschedule.

2. A Football information system


A football club has a manager must select a team for a match based on player’s past
performance (how many goals they have scored) and their health (are they on form
and injured or need a rest) and their skills (striker, defender, goalkeeper etc.). A
match is played between two clubs in the same division of the football league.
Managers are very keen to choose the right team because their pay is dependant on
whether the team wins or loses and they may get sacked if their team drops down the
league tables or is relagated from one division to a lower division. Games are
organised by the Football Association who schedule the fixtures and maintain the
league tables. A club’s position in the table is dependant how many points they
have. They get 3 points if they win a game and 1 point if they draw. Fans like to see
what fixtures are on and view the league tables.
Your task
1. Identify the potential actors and use cases for this simple football information
system. This should include one to support a manager selecting a team.
The potential actors and use cases:
Actors: Manager, Football players and fans
Use cases: Viewing fixtures, Viewing league tables, Manager selecting a team.

Database System Development Page 1

Page 1
COMP1845: Database System Development
Tutorial 6: Objects, classes and UML class diagrams
2. Produce a list of the classes involved in this scenario (hint: classes are things and
things are nouns).
Manager, Football player, team, fixture, league table, football association, match, fan
3. Depict each class in UML identify any attributes that might exist.

4. Draw a class diagram with associations.

5. List the behaviours that might exist in the system? (hint: talk about the system
and pay attention to any verbs that you use)
Selecting a team
Adding fixture
Updating league tables
Viewing fixtures
Database System Development Page 2

Page 2
COMP1845: Database System Development
Tutorial 6: Objects, classes and UML class diagrams
Viewing league tables
6. Assign the behaviours to classes (hint: think about who would own / have
responsibility for the behaviour).
Selecting a team: Manager classS
Adding fixtures: FootballAssociation class
Updating league tables: FootballAssociation class
Viewing fixtures: FootballAssociation class
Viewing league tables: FootballAssociation class

Database System Development Page 3

Page 3
Tutorial helper sheet
Definitions of Objects v Classes

Definition of a state in UML


One of potentially many different states of an object during its lifetime.

Sample UML CLASS notation


Classes depicted as three compartment rectangle. Associations depicted as a joining
line. Multiplicity depicted as either [Min..Max] or exact number [number].

Insert name of class Name


Insert attributes, i.e.: Attributes
Attribute1: datatype [Min..max] [Min..max]
Attribute2: associated class
Attribute3 Methods
Attribute4
Etc..
Insert methods:
Method1()
Behaviour2()
Etc.

A B Aggregation – class A ‘is made of / has’ class B

A B Composition – class A ‘contains’ class B

A B Specialisation – class A ‘is a kind of / special type of’ B

Database System Development Page 4

Page 4

You might also like