[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]
Wed Feb 27 15:59:28 PST 2008

Contents


    CSci201 Lab/08 -- Introduction to C++ Classes and the UML

      Goal

    1. Run, test and add notes to a C++ program with a class and objects.
    2. Practice drawing UML diagrams of C++ code.

      Process

        Download and test the count.cpp program

        [ count.cpp ]

        Add comments to count.cpp

        Draw a diagram of the classes in count.cpp

        Draw a diagram of enum suit on page 243

        To do this start with a normal class with the name "suit" Add the stereotype "enumeration" to the first tab. Add the values as attributes of the class in a later tab -- all public.

        Add a diagram of the class Card from page 243 to your model

        Add a link from Card to suit.

        Add a diagram of class Cardstack from page 244 to the model

        And connect it to Card!

        Add a diagram of Player on page 247

        And connect to Cardstack as a composition (hand) and as an aggregation (pack).

      . . . . . . . . . ( end of section Process) <<Contents | End>>

      Deliverable

      Show the lab teachers your diagrams and updated 'count.cpp' program to earn credit.

      Deadline

      I will be assigning grades at the end of the lab depending on how many of the deliverables are complete and correct.

      If you have time ... try the rest of the figures in chapter 6.

    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