0% found this document useful (0 votes)
21 views

System Design - OOD-9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

System Design - OOD-9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

System design & Analysis

D R . LO B N A M O H A M E D A B O U E L - M A G D
Object Oriented
System Design
Classes and Objects
A class is the general template we use to define and
create specific instances, or objects.
Every object is associated with a class.
For example, all of the objects that capture information
about patients could fall into a class called Patient,
because there are attributes and methods that all
patients share.
Object Oriented Design
Object-oriented systems focus on capturing the structure
and behavior of information systems in little modules that
encompass both data and processes.
These little modules are known as objects
• in most object-oriented programming
languages, both classes and instances of
classes can have attributes and methods.

•Class attributes and methods tend to be


used to model attributes (or methods) that
deal with issues related to all instances of the
class.

•For example, to create a new customer


object, a message is sent to the customer
class to create a new instance of itself.
Methods and Messages
Methods implement an object’s behavior. A method
is nothing more than an action that an object can
perform. Methods are very much like a function or
procedure in a traditional programming language.

Messages are information sent to objects to trigger


methods. A message is essentially a function or
procedure call from one object to another object.
Encapsulation and Information
Hiding
Encapsulation is simply the combining of process and data into a single
entity.
The principle of information hiding suggests that only the information
required to use a software module be published to the user of the module.
Inheritance
Used to identify higher level, or more general, classes of
objects. Common sets of attributes and methods can be
organized into super classes.
classes are arranged in a hierarchy whereby the super
classes, or general classes, are at the top, and the subclasses,
or specific classes, are at the bottom.
The relationship between the class and its superclass is
known as the A-Kind-Of (AKO) relationship. For example, a
salesperson is A-Kind-Of employee
Inheritance makes it simpler to define classes. Instead of
repeating the attributes and methods in the employee and
customer classes separately, the attributes and methods
that are common to both are placed in the person class and
inherited by those classes below it.
Polymorphism and Dynamic Binding
Polymorphism means that the same message can be interpreted
differently by different classes of objects.
Benefits of Object-Oriented Systems
Analysis and Design

• Concepts like polymorphism, encapsulation, and inheritance


taken together allow analysts to break a complex system into
smaller, more manageable components, to work on the
components individually
• modularity makes system development easier to grasp, easier to
share among members of a project team
• Finally, many people argue that “object think” is a much more
realistic way to think about the real world.
UNIFIED MODELING LANGUAGE
UML
• The objective of the Unified Modeling Language is to
provide a common vocabulary of object-based terms and
diagramming techniques that is rich enough to model any
systems development project from analysis to design. The
current version of UML, version 2.0
• The diagrams are broken into two major groupings:
• one for modeling the structure of a system
• and one for modeling behavior
Structure diagrams are used for representing the data
and static relationships that are in an information
system.
Behavior diagrams provide the analyst with a way to
depict the dynamic relationships among the instances or
objects that represent the business information system.
Four Fundamental UML
Diagrams
use case diagrams
class diagrams
sequence diagrams
behavioral state machine diagrams.
USE CASE DIAGRAM
Use cases are the primary drivers for all of the UML
diagramming techniques.
The use case communicates at a high level what the
system needs to do.
Elements of a Use Case Diagram

A use case diagram illustrates in a very simple way the main functions of
the system and the different kinds of users who will interact with it.
Creating a Use Case Diagram
You should note that the use case diagram is similar to
information found in DFD context and level 0 diagrams.
Identify Use Cases
Draw the System Boundary
Place the Use Cases on the Diagram
Identify the Actors
Add Association Relationships
CLASS DIAGRAM
• The class diagram is a static model that supports the static
view of the evolving system.
• It shows the classes and the relationships among the classes
that remain constant in the system over time.
• The class diagram is very similar to the entity relationship
diagram (ERD) ; however, the class diagram depicts classes,
which include attributes, behaviors, and states, while entities
in the ERD include only attributes.
Elements of a Class Diagram
Represents a kind of person, place, or
thing about which the system must
capture and store information.
Has a name typed in bold and centered
in its top compartment.
Has a list of attributes in its middle
compartment.
Has a list of operations in its bottom
compartment.
Does not explicitly show operations that
are available to all classes.

Represents properties that describe


the state of an object.
A method
Represents the actions or functions that a
class can perform.
Can be classified as a constructor, query,
or
update operation.
Includes parentheses that may contain
special parameters or information needed
to perform the operation.
An association
Represents a relationship between multiple
classes, or a class and itself.
Is labeled by a verb phrase or a role
name, whichever better represents the
relationship.
Can exist between one or more classes.
Contains multiplicity symbols, which
represent the minimum and maximum times a
class instance can be associated with the related
class instance.
Creating a Class Diagram
Identify Classes
Identify Attributes and Operations
Draw Associations between the Classes Associations
SEQUENCE DIAGRAM
A sequence diagram illustrates the objects that
participate in a use case and the messages that pass
between them over time for one use case.
A sequence diagram is a dynamic model that supports a
dynamic view of the evolving systems.
It shows the explicit sequence of messages that are
passed between objects in a defined interaction.
Elements of a Sequence
Diagram
Creating a Sequence Diagram
Identify Objects For example, the instances of classes used for the
Purchase A Tune scenario include Customer and Tune. These should be
placed in boxes and listed across the top of the drawing.
• Add Messages passed from object to object, with the
arrow pointing in the message’s transmission direction.
The arrows should be placed in order from the first
message to the last to show time sequence.
• Place Lifeline and Execution Occurrences Last, you will
need to show when objects are participating in the
sequence. A vertical dotted line is added below each
object to represent the object’s existence during the
sequence, and an X should be placed below objects at
the point on the lifeline where they are no longer
interacting with other objects. You should draw a narrow
rectangular box over top of the lifelines to represent
when the objects are sending and receiving messages.
BEHAVIORAL STATE MACHINE
DIAGRAM

A behavioral state machine diagram


is a dynamic model that shows the
different states that a single class
passes through during its life in
response to events, along with its
responses and actions.
Elements of a Behavioral State
Machine Diagram
State A state is a set of values that describes an object at a
specific point in time
Event An event is something that takes place at a certain point in
time and changes a value(s) that describes an object, which in
turn changes the object’s state.
Creating a Behavioral State
Machine Diagram

Identify the States The first step is to identify the various states that a 
selected tune will have over its lifetime.
Identify the Transitions The next step is to identify the sequence of 
states that selected tune object will pass through during its lifetime and
then determine exact what causes each state to occur.
exercise
Draw the Use Case and class diagram of your project

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy