System Analysis and Design Lecture 4
System Analysis and Design Lecture 4
2018-2019
Lecture4
Slide 1
STRUCTURAL MODELS
key Ideas
A structural or conceptual model
describes the structure of the data
that supports the processes in an
organization..
The structure of data used in the
system is represented through CRC
cards, class diagrams, and
object diagrams.
Slide 2
Purpose of Structural
Models
Reduce the “semantic gap” between
the real world and the world of
software
Create a vocabulary for analysts
and users
Represent things, ideas, and
concepts of importance in the
application domain
Slide 3
Classes and Objects
Class – Template to define
specific instances or objects
Object – Instantiation of a
class
Attributes – Describes the
object
Behaviours – specify what an
object can do
Slide 4
Basic Characteristics of
Object Oriented Systems
Classes and Objects
Methods and Messages
Encapsulation and Information
Hiding
Inheritance
Polymorphism
Slide 5
Helpful Hint….’Compile’
C Classes
O Objects
M Methods and Messages
P Polymorphism
I Inheritance
(Last, but not least)
E Encapsulation
Slide 6
Classes and Objects
Slide 7
Encapsulation and
Information Hiding
Encapsulation
combination of data and process into
an entity
Information Hiding
Only the information required to use a
software module is published to the
user
Reusability is the Key Point
an object is used by calling methods
Slide 8
Inheritance
Superclasses or general classes
are at the top of a hierarchy of
classes
Subclasses or specific classes
are at the bottom
Subclasses inherit attributes
and methods from classes
higher in the hierarchy
Slide 9
Class Hierarchy
Slide 10
Classes
Templates for creating instances or
objects
Concrete (can have real instances)
Abstract (only exists to hold subclasses)
Typical examples:
Application domain, user interface, data
structure, file structure, operating
environment, document, and multimedia
classes
Slide 11
Attributes
Units of information relevant to
the description of the class
Only attributes important to the
task should be included
Slide 12
Operations (Methods)
Action that instances/objects
can take
Focus on relevant problem-
specific operations (at this
point)
Slide 13
Relationships
Generalization
Enables inheritance of attributes and
operations [...is a kind of...]
Aggregation
Relates parts to the whole [..is a part
of..]
Association
Miscellaneous(different) relationships
between classes
Slide 14
A CRC Card
Slide 15
Back of CRC Card
Slide 16
CLASS DIAGRAMS
Slide 17
Example Class Diagram
Slide 18
Simplifying Class
Diagrams
A view mechanism can show a
subset of information
Eg. A use-case view that shows
only that part of the diagram
referring to a particular use case.
Eg. A view showing only
aggregations
Eg. A view showing only the class
name and attributes
Slide 19
Object Diagrams
Slide 20
Summary
CRC cards capture the essential elements
of a class.
Class and object diagrams show the
underlying structure of an object-oriented
system.
Constructing the structural model is an
iterative process involving: textual
analysis, brainstorming objects, role
playing, creating the diagrams, and
incorporating useful patterns.
Slide 21