22-Object Oriented Design, UID-15!03!2024
22-Object Oriented Design, UID-15!03!2024
Presented By,
Dr.Baiju B V
Assistant Professor
School of Computer Science and Engineering
1
VIT, Vellore
OBJECT ORIENTED DESIGN
• An object-oriented system is made up of interacting objects that maintain their own
local state and provide operations on that state.
• The representation of the state is private and cannot be accessed directly from
outside the object.
• Object-oriented design processes involve designing object classes and the
relationships between these classes.
• These classes define the objects in the system and their interactions.
• When the design is realized as an executing program, the objects are created
dynamically from these class definitions.
• To develop a system design from concept to detailed, object-oriented design, you
need to:
1. Understand and define the context and the external interactions with the system.
2. Design the system architecture.
3. Identify the principal objects in the system.
4. Develop design models.
5. Specify interfaces.
1. System Context and Interactions
• The first stage in any software design process is to develop an understanding of the
relationships between the software that is being designed and its external
environment.
• This is essential for deciding how to provide the required system functionality and
how to structure the system to communicate with its environment.
• System context models and interaction models present complementary views of the
relationships between a system and its environment:
1. A system context model is a structural model that demonstrates the other
systems in the environment of the system being developed.
2. An interaction model is a dynamic model that shows how the system
interacts with its environment as it is used.
• The context model of a system may be represented using associations.
• Associations simply show that there are some relationships between the entities
involved in the association.
• The environment of the system using can be documented using a simple block
diagram, showing the entities in the system and their associations.
• The systems in the environment of each
weather station are a weather information
system, an onboard satellite system, and a
control system.
• The cardinality information on the link shows
that there is a single control system but
several weather stations, one satellite, and
one general weather information system. System context for the weather station
• Each use case represents an interaction with the system
Weather station use cases
Report weather : Send weather data to the weather information system
Report status : Send status information to the weather information system
Restart : If the weather station is shut down, restart the system
Shutdown : Shut down the weather station
Reconfigure : Reconfigure the weather station software
Powersave : Put the weather station into power-saving mode
Remote control : Send control commands to any weather station subsystem
• Each possible interaction is named in an ellipse, and the external entity involved in
the interaction is represented by a stick figure
• Weather station interacts with the weather information
system to report weather data and the status of the
weather station hardware.
• A control system do the interactions that can issue
specific weather station control commands.
• The stick figure is used in the UML to represent other
systems as well as human users.