[N.A.B.G. picture]

Programming with Class: A Practical Introduction to Object Oriented Programming with C++


The table of contents given below includes links to additional materials. Some complete chapters, and various subsections, are available either as Postscript files or directly readable "html" text.

    Section 1: Introduction to Object Oriented Programming


    Introduction to Object-oriented Programming
  1. Why adopt Object Oriented Programming?
    1. Problems with conventional programming styles: The low productivity of development programmers* The maintenance programmers*Disjoint processes for "Analysis", "Design" and "Implementation"* Software costs*
    2. The source of the problems: The original specification pervades the code* Meyer's topless program* The problems of top-down design*
    3. Saved by "modular programming"? Programming with modules* Exploiting "generic" packages*
    4. Limitations of "modular programming"? Changing the software to meet a change in specification:* "The standard library modules is never what I need"* Meyer's modules that are simultaneously "Closed" and "Open":*
    5. Object Oriented Programming: Inheritance and Dynamic Binding: Inheritance* Dynamic dispatch of function calls*
    6. An OO example
    7. Consistency of model: Analysis-Design-Implementation
    8. Why adopt OOP?
    9. References

  2. A History of OO programming
    1. Simula
    2. Smalltalk
    3. The Artificial Intelligentsia: Actors, Frames, and OO extensions to Lisp
    4. Objective C
    5. Apple's Pascal dialects: Classcal and Object Pascal
    6. C++
    7. Eiffel
    8. References
    9. Exercises

  3. How OO Languages Work, (Postscript source)
    1. "SpaceInvaders": An example program that uses objects
    2. Classes: defining the structure and behaviour of objects
    3. Defining class hierarchies
    4. Access controls and inheritance
    5. Forms for class hierarchies that use single inheritance
    6. Multiple Inheritance: Class hierarchies as Directed Acyclic Graphs (DAGs)* Name conflicts with multiple inheritance* Ambiguities with repeated inheritance* Realistic applications of multiple inheritance*
    7. Summary on Declaring the Structures of Objects
    8. Creating instances of classes
    9. Representation of Objects, and Code for Classes, in Memory
    10. Methods have an implicit object reference parameter
    11. Exploiting polymorphism in a program's structure
    12. Explicit support for abstract classes
    13. Summary on the Definition and Use of Objects
    14. Extended OO features: "generic" or "parameterized" classes
    15. Extended OO features: Automatic Garbage Collection
    16. Extended OO features? Exception handling
    17. Extended OO features: Assertions
    18. References



  4. Section 2: Introduction to theuse of C++ as an Object Oriented Implementation Language.

    Introduction to C++
  5. C++ : minor extensions to C
    1. Comments
    2. Function Prototypes
    3. Default arguments for functions
    4. Automatic type coercions
    5. const declarations
    6. Inline function definitions
    7. Types void and void*
    8. Declarations of enumerated types and structs
    9. Declarations/definitions as statements
    10. Reference types
    11. New dynamic store manipulations
    12. Scope qualifier operator
    13. Stream Input and Output
    14. References.
  6. Programmer Defined Data Types in C++
    1. Simple Types: Points and Rectangles: C++ Class Declaration* Definition of member functions* Class as the unit of protection* Constructors* Overloaded member functions* Simple version of class Point* Enhancing class Point: inline functions improve efficiency* Constant instances of programmer defined types* Operator functions* Constructors as type conversion functions* Stream I/O with programmer defined types* Friend functions* Class Rectangle* Initializing component objects* Using an enumerated type defined by a class* const data members* Examples of stream I/O functions for Point and Rectangle
    2. A class with resource management responsibilities Memory leaks and "destructors"* Dangling pointers and class specific assignment operators* Classes with separately allocated data members* Class "String"
    3. Watching a program work: side-effects of constructors and destructors
    4. A "cluster" of related classes: LinkedList and friends Class LinkedList* Planning interactions among objects* Class LinkedList: Implementation details* Class Link* Class LinkedListIterator* Enhancement of the LinkedList class cluster*
    5. Assoc: a class "employing a subcontractor"
    6. Data characterising a class and shared by all its instances
    7. Summary on "Programmer Defined Types"
    8. References

  7. C++: Inheritance and virtual functions
    1. Strict Inheritance: extending an existing class
    2. Planning for extension: "Protected Access"
    3. Planning for extension: "Virtual Functions" Replacing an inherited behaviour* Static or dynamic binding for member functions* A standard form for a base class*
    4. "private" inheritance
    5. Class LinkedList and friends revisited A Design for class Item and its Subclasses* Extended LinkedList class
    6. Example: SpaceInvaders
    7. Example: Operating System Simulation The Assignment* Finding the objects and their classes* Design and Implementation detail*
    8. Exercises



  8. Section 3: Tools and Class Libraries

    Exploiting Reusable Code
  9. Development Tools and Libraries
    1. Class Libraries Component libraries* Graphics User Interface Libraries* Framework libraries
    2. Class browsers
    3. Debugging aids
    4. Development Environments
    5. References

  10. Simple Use of a Framework Class Library, (Postscript source)
    1. Framework Class Libraries The problem domain addressed by framework libraries* Handling a user's commands* Example frameworks*
    2. Display Structures
    3. Cards program
    4. Cards: Analysis and Design A data model for the Cards program* A display structure for the Cards program* Application and Document classes* Some scenarios for object interactions*
    5. Detailed design A Data model for Cards* Views for Cards*
    6. Implementations
  11. Additional Features of Framework Class Libraries
    1. Command Objects The role of command objects* Simple command objects that handle menu commands* Command objects that handle mouse-based editing actions* Commands that add data* More advanced uses of Command objects*
    2. Object I/O The representation of objects in memory and in files* Transferring heterogeneous collections to/from files* Framework support for input and output of objects*
    3. The cloning of Objects
    4. "Dependencies"
    5. Using the command-handler chain
  12. An Example "Editor" Program
    1. The :Finite State Machine (FSM)" program
    2. FSM: Analysis The principal objects* Analyzing interactions among objects* Classes and responsibilities resulting from the analysis*
    3. Some design decisions
    4. Implementations
    5. Exercise



  13. Section 4: Intermediate topics

    Intermediate Topics
  14. OO Developments. From Analysis, through Design,to Implementation , (text in readable html)
    1. Analysis
    2. Design: From Blobs to Boxes Firming up the classes and identifying additional classes* Identifying class hierarchies* Using class libraries* Documenting the design*
    3. Detailed design: Have you covered É?
    4. Implementation:
    5. Generalizing to create a new class library?
    6. Benefits?
    7. References

  15. Intermediate C++
    1. Template functions
    2. Template Classes Class Buffer: a simple template class* Class LinkedList and friends (again)* Class Bintree*
    3. Nested Classes
    4. Access and Inheritance revisited
    5. Multiple Inheritance Inheriting interfaces or combining "types"* Inheriting from partially implemented and concrete classes*
    6. Exceptions
    7. References

  16. Eiffel
    1. Introduction Origins of Eiffel* Inheritance in Eiffel* A complete system - language plus standard class libraries and support tools*
    2. Classes
    3. Objects
    4. Features
    5. Functions and procedures
    6. Statements and Control structures
    7. Inheritance
    8. A simple example
    9. Assertions
    10. Exception handling
    11. "Once"
    12. "Holes" in the type system?
    13. Example The "assignment" - a chase game* Finding the objects and their classes* Implementation
    14. Postscript
  17. (Macintosh disk associated with book)

    Of possible related interest is a tutorial on the use of Symantec's Think Class Library.


    Last modified March 1996. Please email questions to nabg@cs.uow.edu.au