Which tactic appropriately exploits UML’s syntax and semantics for modular reification?

You are asked to provide UML model content such that other modelers may use the Classes of your model as modular, partial specifications to be more fully specified by their models. You decide to provide a Vehicle Class that represents a partial specification of automobiles and allows tailoring of this class through the other modelers’ choices of kinds of propulsion such as a gasoline motor, an electric engine, or a manual cycle system. You want to limit which Class kinds the other modelers can choose as their propulsion system.

Which tactic appropriately exploits UML’s syntax and semantics for modular reification?
A . Model GasolineMotorVehicle. ElectricEngineVehicle. and ManualCyclingVehicle as specialized versions of your Abstract Class Automobile.
B . Model Vehicle as a Template Classifier with a Class Parameter named Thrustor that is constrained to be a derivative of an Abstract Class PropulsionSystem
C . Model Vehicle as a Class with a Property named thrustor of Type Enumeration Class Thrustor that has Enumeration Literals GasolmeMotor. ElectncEngme. and ManualCycler.
D . Model three separate Packages named GasolineMotor Vehicles. ElectricEngme Vehicles, and ManualCyclmg Vehicles and Package Import into each of these the Package with your Vehicle Class.

Answer: B

Explanation:

The approach described in option B aligns with the concept of template classifiers in UML, which allows for the creation of parameterized elements that can be instantiated with different arguments. By modeling Vehicle as a template classifier with a parameter named Thrustor, other modelers can instantiate this template with their chosen propulsion system, as long as it is a type that specializes the PropulsionSystem abstract class. This method provides the flexibility needed for modelers to tailor the Vehicle class to different propulsion systems while enforcing that only derivatives of PropulsionSystem can be used as the actual parameter for Thrustor. This tactic of using template classifiers and class parameters is an application of UML’s syntax and semantics for creating modular and customizable models. This practice is detailed in the UML 2.x Superstructure Specification, particularly in the sections describing template classifiers and their parameters.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments