Deliverables
By the end of the lab you should have prepared UML diagrams of the classes
in section 7.5 of the text book.
Process
- Open the book and turn to page 243 where it gives C++ declarations for
suit and Card.
- Open Dia and start a new diagram.
- Draw a new class called 'suit' with stereotype 'enumeration' and attributes:
'clubs', 'diamonds', 'hearts', and 'spades'. It has no operations.
- Draw a class Card that fits the code on page 243.
Since a Card has a suit called f you should connect them with a composition.
- Turn to page 244 and draw the class 'Cardstack'. You show a vector like this
stack:Card[*]{ordered}
- Again link Cardstack to Card...
Now draw a diagram of Plaer on page 247 and connect up to Cardstack. Note. hand
is part of Player and so you should use composition but pack is a reference and
so you should use a plain arrow.
. . . . . . . . . ( end of section Process) <<Contents | End>>
Note -- no need to draw the definitions of the functions or the main program.