IBM Support

A child class will always inherit a state chart from its parent class

Question & Answer


Question

Can a child class be configured to not inherit a state chart from its parent class in IBM Rational Rhapsody?

Cause

There are scenarios where the state chart for a child class will be very different from that of its parent. You may want to remove the state chart and start from scratch, but this is not possible given the rules of inheritance.

Answer

There is no way to prevent a state chart from being inherited.

If the class was being coded by hand, there would be no way to specify what is inherited from the parent class. What is inherited can be overridden and modified, but not removed.

The same is true in this case, the Override Inheritance option (on the right-click menu of the state chart in the browser) can be used to alter the inherited state chart, but not delete it.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.3;7.4;7.5;7.6;8.0;8.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21655118