Object-Oriented Software Development

from sept 2002, the OO course will be given by Ralf Laemmel
[] guestspeakers college practicum resources

talk show tell print

OOP style guide

design specification

A minimal article contains an abstract, introduction, body, conclusion and reference list.

Identify the most important classes of your application and their responsibilities, describe the evolution of your design, and the pros and cons of the current design (E.g. "The original implementation contained a single object controlling the entire application. We changed the design and distributed the functionality of the control object over the objects X, Y, and Z. The main reason for this was that the control object needed knowledge about every single class in our application, which was a maintenance nightmare. Additional advantages include ... However, the disadvantage is ..." or "We moved functionality from classes X, Y, and Z to a common base class. We defined this base class as an abstract base class (it has pure virtual member function f1 and f2) because ..." or "We used the MVC paradigm (or Document/View) to separate the GUI from the rest of the application", etc)

implementation

header files and class definitions (C++)

It is a good custom to create a header file for each class you define. Try to move as much implementation as possible from the header file into the separate corresponding implementation file.

Try to keep your header files as small as possible. Do not include other files in your header unless:

Use forward declarations for all other class names used in the header, and include the corresponding class definitions in the implementation file. This style avoids "recursive include" errors and unnecessary re-compilation in combination with makedepend. Example:

   // file example.h:
   #ifndef	_EXAMPLE_H_
   #define	_EXAMPLE_H_
   
   #include <widgets/canvas.h>	// base class
   #include <list.h>		// data member
   
   class button;			// forward declarations
   class widget;			// ... included in example.cc
   
   class example: public canvas {
     public:
       example(widget* w, ...);
       virtual ~example();
       ...
     private:
       button* Cancel;
       list<int>	score;
   };
   
   #endif
  

constructors, destructors, operators and other member functions


[] guestspeakers college practicum resources
eliens@cs.vu.nl