Professional Documents
Culture Documents
Class Diagrams
Responsibilities
-- seek path Driver
-- avoid obstacles
SteeringMotor MainMotor
Motor
move(d:Direction, s:Speed)
stop()
resetCounter()
Status status()
Integer distance()
4 CS6359.OT1: Module 7 Lawrence Chung
Modeling a Logical Database
A Logical Database is by and large for detailed design or
implementation. Class diagrams are used to provide more semantics to
the data in the database at the analysis and design phase.
Recall that UML is for conceptual modeling.
From a general class diagram, first identify classes whose state must be
persistent (e.g. after you turn off the computer, the data survives,
although the program doesn’t).
Create a class diagram using standard tagged value, (e.g. {persistent} ).
Expand to include structural details, specifically attributes and
associations.
Identify common patterns which cause database problems; create
intermediate abstractions if necessary.
Use tools, if available, to transform logical design (e.g., tables and
attributes) into physical design (e.g., layout of data on disk and indexing
mechanisms for fast access to the data).
1..*
GuiEventHandler EventHandler() {}
{ Java}
7 CS6359.OT1: Module 7public void handleRequest() {}
Lawrence Chung
}
Reverse Engineering
How do we translate a logical database schema + database operations
into a collaboration?
Reverse Engineering involves the process of transforming code into a
model through mapping from a specific implementation language.
Steps
Identify the rules of mapping from a specific language.
Use a tool; point the tool to the code.
Query the model to obtain desired information for the model.
GuiEventHandler EventHandler() {}
{ Java}
8 CS6359.OT1: Module 7public void handleRequest() {}
Lawrence Chung
}
Hints & Tips
Separate your analysis models from your design models.
They are at different levels of abstraction.
They have different contextual vocabulary.
Elements of a well-structured class diagram.
Focuses on one aspect of a system’s static design view. (e.g., from
performance aspect of the static structure of the system)
Contains only essential elements for that aspect.
Provides sufficient details for the level of abstraction.
Give diagrams a name that communicates their purpose.
Diagram layout.
Minimize crossing of arcs.
Co-locate semantically related elements.
Use notes and color as visual cues.
In general one relationship type will dominate each diagram;
don’t confuse the issue.