[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci & Eng Dept] / [R J Botting] >> [CSci201] >> [Lab01] >> index
[Index] [Schedule] [Syllabi] [Glossary] [Labs] [Projects] [Resources] [Grading] [Search ]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Thu Feb 28 11:17:02 PST 2008

Contents


    cs201/lab09 -- Drawing UML diagrams of C++ Code

      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

      1. Open the book and turn to page 243 where it gives C++ declarations for suit and Card.
      2. Open Dia and start a new diagram.
      3. Draw a new class called 'suit' with stereotype 'enumeration' and attributes: 'clubs', 'diamonds', 'hearts', and 'spades'. It has no operations.
      4. 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.
      5. Turn to page 244 and draw the class 'Cardstack'. You show a vector like this
         		stack:Card[*]{ordered}
      6. 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.

    Abreviations

  1. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular C++ compiler.
  2. TBA::="To Be Announced", something I have to do.
  3. TBD::="To Be Done", something you have to do.

End