|
In design, close attention is paid to the external view of each class (messages, parameters, public data, and public processes) and the internal view (private data and private processes).
OO Design Approach:
Suggested Models:
Class Library
A pre-written, pre-tested library of reusable classes (modules) which can be inherited (utilized) by multiple programs which are developed within the common framework.
Encapsulation
The data and the processes or functions (program code) which manipulate the data are encapsulated into stand alone object called a class.
Inheritance
A higher level class can contain other lower level classes. In this situation, the higher level derived class inherits and utilizes all of the data and processing (program code) contained in the lower level objects (parent classes). General functions in parent class, custom functions in the sub-classes.
Polymorphism
An operator or function can perform one way when used within one class but perform differently when used by another class. The system builder defines these multiple behaviors based on the requirements of the object. This allows the objects (classes) to be reused with operational changes without rewriting the program code.This makes inheritance possibilities more flexible.
OO Tips:
Objected Oriented Design encourages disciplined and forward focused planning as each new class (module) is created. Care should be taken on the part of the designer to insure a high level of reusability. The advantage is not just the elimination of redundant data but also the elimination of redundant processes.