Designing for Inheritance

I l @ ve RuBoard

During analysis, inheritance hierarchies among key abstractions (i.e., classes) are established. During design, the inheritance hierarchies are refined to

  • Increase reuse

  • Incorporate design level classes

  • Incorporate chosen library classes

Analysis diagrams are reviewed to identify commonality of attributes, operations, and relationships. Superclasses are defined to hold the newly discovered commonality. This reduces the amount of code to be written and tested . It also enforces uniformity ; i.e., the same item cannot be handled differently in two different classes if the two classes inherit it from a common superclass.

Code Generation and Design

The final step of design for an iteration is to add the methods that every good C++ class needs ”for example, constructors, destructors, and copy constructors. These method can be added by hand, but this entails a lot of typing. This is why the ability to add these types of methods to a class is found in the Rose code generators.

Rational Rose has very powerful code-generation capabilities. Code is generated based on information obtained from the diagrams, the specifications, and the options specified in the code-generation properties for each type of element. Step-by-step guides to some of the code generation capabilities of Rational Rose may be found in the appendixes.

I l @ ve RuBoard

Visual Modeling with Rational Rose 2002 and UML
Visual Modeling with Rational Rose 2002 and UML (3rd Edition)
ISBN: 0201729326
EAN: 2147483647
Year: 2002
Pages: 134

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: