MSIS 670 ObjectOriented Software Engineering Week 11 Object
MSIS 670: Object-Oriented Software Engineering Week 11: Object Modeling (2) Class Diagram Fall 2007
Figure 1: UML Models using Use-Case Driven Approach (Rosenburg, 1999)
Static Modeling: Class Diagram • The Class Diagram shows classes’ single or multiple inheritance hierarchies and classes’ other interconnections via the association, composition, and aggregation constructs.
UML class and object diagrams
Software Engineering Observation 4. 6 • At early stages in the design process, classes often lack attributes (and operations). Such classes should not be eliminated, however, because attributes (and operations) may become evident in the later phases of design and implementation.
Identifying Class Attributes – Look for descriptive words and phrases in the requirements document – Create attributes and assign them to classes – Each attribute is given an attribute type – Some attributes may have an initial value – Some classes may end up without any attributes • Additional attributes may be added later on as the design and implementation process continues – Reference-type attributes are modeled more clearly as associations
A Class Diagram (Under construction)
State (Chart) Diagrams • A state (chart) diagram – shows the status that objects of that class may assume and the transitions the objects may make from state to state. • The state diagram is ideal for modeling an attribute with characteristics as: – The attribute possesses few values, and – The attribute has restrictions on permitted transitions among those values
Example: State Diagram
- Slides: 10