next up previous contents
Next: Lecture 1: Use Cases Up: Lecture 0: Introduction to Previous: Commentary

Lecture 0 Exercise

These are simple exercises to introduce you to the UML diagramming conventions. You may answer these using Pencil and Paper. If you are not familiar with a diagramming tool (e.g., xfig on UNIX) you might learn to draw them using the tool of your choice.
1.
Draw a diagram to show each of the following Basic UML modelling elements:
(a)
a class with
i.
Name: Window,
ii.
Attributes: origin, size,
iii.
Operations: open(), close(), move(), display();
(b)
an interface with name: ISpelling;
(c)
a collaboration with name: Sales Order Validation;

(d)
a use case with name: Place Order;

(e)
an active class with name: Event Manager and operations: suspend() and flush();
(f)
a component with name CheckPoint.java;
(g)
a node with name Server.
2.
Draw a diagram to show a package with the name: Race Analyser.

3.
Draw a diagram to show a message with the operation name: display exchanged between objects in an interaction.

4.
Draw a diagram to show a state with the name: Waiting.

5.
Draw a diagram to show a note with the text ``using Pseudo Random Function''.
6.
Draw a diagram to illustrate each of the following relationships:
(a)
Dependency;
(b)
Association with multiplicity and role names;
(c)
Generalisation;
(d)
Realisation.
7.
Use adornments to show an abstract class with name: Transaction and two public operations execute() and rollback(), a private operation timeStamp() and a protected operation priority().

8.
For each of the following give an example diagram to show the difference between
(a)
a class and its objects;
(b)
an interface and its implementation.
9.
Give an example diagram to illustrate each of the following:
(a)
Stereotype class;
(b)
Tagged values;
(c)
Constraint.
10.
A University Course Registration System uses Course, Course Offering, Student class with some suitable class stereotypes, attributes, operations, and relationships. Give a Class diagram showing appropriate
(a)
Class stereotypes, names, attributes, operations;
(b)
Associations, aggregations, multiplicities and navigation.


next up previous contents
Next: Lecture 1: Use Cases Up: Lecture 0: Introduction to Previous: Commentary
Ananda Amatya
11/3/1999