Day 4 -- Outline

Day 4 -- Outline


I. Conceptual Model of Object Oriented Design
    1. Design
        A. Set of Modules
            1. classes
            2. functions/procedures
        B. Relationships between modules
            1. calls (between functions and methods)
            2. uses  (between classes)
            3. inherits (between classes)
    2. ADT Logical Definition
        A. Domain Definition -- set of possible values
            1. Usually defined informally with BNF like syntax
            2. Class Invariant
        B. Method Definitions
            1. Signatures
            2. Semantics - Pre and Post Conditions
    3. ADT Physical Implementation
        A. Definition goes into .h file
            1. Use c++ "class" to define an object class
            2. Domain definition is provided by Comments
            3. Method signatures are defined by prototypes
            4. Method semantics are defined by Comments
            5. More than definition goes into .h file
               a. Domain Implementation goes into Private or Protected part of
                  class definition in .h file
               b. Inline method implementations go into .h files
        B. Implementation goes into .c file
            1. Mostly non-inline method implementations

CS Dept Home Page  BYU Home Page  OSM Home Page
Last updated 30 Apr 1996