Contents > C: List of Design Rules > C.4 Property Rules

C.4 Property Rules

Rule: UnnamedCategory: Completeness
Severity: 1-highApplies to: all areas
The attribute has no name.

Rule: CapitalizedCategory: Naming
Severity: 3-lowApplies to: all areas
Attribute names should start with a lowercase letter.

This is a recommended style guideline in the UML standards [OMG03], [OMG05].

  • It is common practice in many programming languages to capitalize constant identifiers, including attributes. Therefore, the rule does not report read-only attributes that start with an uppercase letter.

Rule: KeywordCategory: Naming
Severity: 2-medApplies to: design
Attribute name is a Java or C++ keyword.

Rule: PublicAttrCategory: Style
Severity: 2-medApplies to: all areas
Non-constant attribute is public.

External read/write access to attributes violates the information hiding principle. Allowing external entities to directly modify the state of an object is dangerous. State changes should only occur through the protocol defined by the interfaces of the object. Make the attribute private or protected.

Rule: NoTypeCategory: Completeness
Severity: 2-medApplies to: design
The attribute has no specified type.

Without a type, the attribute has no meaning in design, and code generation will not work. Specify a type for the attribute.