[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] / [CSci202] / 07
[Text Version] [Syllabus] [Schedule] [Glossary] [Resources] [Grading] [Contact] [Question] [Search ]
Notes: [01] [02] [03] [04] [05] [06] <07> [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Wed Apr 20 13:59:24 PDT 2011

Contents


    CS202 session 07 -- OO Design and the UML

      Previous -- Streams

      [ 06.html ]

      Preparation

      Study [ uml0.html ] and Chapter 22 and do Review Questions at the end of chapter 22.

      Note -- Software Lifecycles

      Excellent section.

      Note -- Aggregation

      I don't like the use of aggregation (<>-----) in this book's UML diagram. I reccommnd you use a simple association (-------) with, possibly, and arrow head (------>) instead. The book also omits multiplicities on aggregations. It helps to show the non-default values: 1, 0..1, , etc.

      Follow my notes [ uml0.html ] instead.

      Note -- CRC cards

      I don't like using these. I prefer UML sequence and communication diagrams combined with class diagrams instead. I will not refer to them in this course.

      Definition of a Use Case -- How user gets something they want

      I think that the best place to start a project is by writing down a list of steps that help a user achieve a valuable goal. The list of steps is called a scenario and provides a start on the "main program". A use case can have many scenarios, including those where the user fails to get what the want.

      A use case is a collection of scenarios that are assoicated with a particular user achieving a particular goal.

      Example use case -- Student registers for class

        Main Scenario
        1. Student logs in with SID and password; system shows classes based on Paws report
        2. Student selects a course from reccomended list and system records enrolment
        3. Repeat until student logs out

        Alternative Scenario 2a -- No open classes fit PAWS
        1. System suggests student talks to an advisor.

        Alternative Scenario 1a -- Bad Password or SID
        1. Student can try twice more before account is locked

      Notice the numbering of the alternative scenario that indicates the step where things go wrong.

      Due in

      Hand in one even numbered question+answer at the start of class.

      Bonus deadline for good project 1 today. Will be graded and returned with the others.

      Class Work

        [ 07q.html ]

      Next Lab includes overloaded operators.

      [ lab04.html ] uses the C++ technique mentioned in Chapter 14.1.

      Next -- Recursion

      [ 08.html ] plus Project 1 deadline and quiz 2.

    Glossary

  1. accessor::=`A Function that accesses information in an object with out changing the object in any visible way". In C++ this is called a "const function". In the UML it is called a query.
  2. Algorithm::=A precise description of a series of steps to attain a goal, [ Algorithm ] (Wikipedia).
  3. class::="A description of a set of similar objects that have similar data plus the functions needed to manipulate the data".
  4. constructor::="A Function in a class that creates new objects in the class".
  5. Data_Structure::=A small data base.
  6. destructor::=`A Function that is called when an object is destroyed".
  7. Function::programming=A selfcontained and named piece of program that knows how to do something.
  8. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular and free C++ compiler.
  9. mutator::="A Function that changes an object".
  10. object::="A little bit of knowledge -- some data and some know how". An object is instance of a class.
  11. objects::=plural of object.
  12. OOP::="Object-Oriented Programming", Current paradigm for programming.
  13. Semantics::=Rules determining the meaning of correct statements in a language.
  14. SP::="Structured Programming", a previous paradigm for programming.
  15. STL::="The standard C++ library of classes and functions" -- also called the "Standard Template Library" because many of the classes and functions will work with any kind of data.
  16. Syntax::=The rules determining the correctness and structure of statements in a language, grammar.
  17. Q::software="A program I wrote to make software easier to develop",
  18. TBA::="To Be Announced", something I should do.
  19. TBD::="To Be Done", something you have to do.
  20. UML::="Unified Modeling Language".
  21. void::C++Keyword="Indicates a function that has no return".

End