You are on page 1of 26

Systems Analysis and Design

Introduction to OO Concepts

Topic & Structure of the lesson


Introduction to OO Concepts
Introduction Object-oriented concepts
Object Class Class Relationships Generalization Message Encapsulation Inheritance
CT026-1 Systems Analysis and Design Introduction to OO Concepts

Slide 2 (of 24)

Key Terms you must be able to use


If you have mastered this topic, you should be able to use the following terms correctly in your assignments and exams:
Generalization Message Encapsulation Inheritance

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 4 (of 24)

Introduction
OO Analysis
describes information systems by identifying things called objects popular approach end model = object model represents information systems in terms of objects and object-oriented concepts

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 5 (of 24)

Object-oriented concepts
An object represents a real person, place, event or transaction. Example: When a patient makes an appointment to see a doctor, the patient, doctor and appointment are all objects.

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Object-oriented concepts
Object
computer representation of real-world thing / event described by its:
Attributes characteristics that describe object Methods tasks / functions

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 6 (of 24)

Object
The object's interface consists of a set of commands, each command performing a specific action. An object asks another object to perform an action by sending it a message. The requesting (sending) object is referred to as sender and the receiving object is referred to as receiver.

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Object-oriented concepts
Class
category of similar objects template for all objects of that class

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 7 (of 24)

Object-oriented concepts
Class Relationships
3 kinds
Association
structural connection between classes UML Association Notation bidirectional

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 8 (of 24)

Object-oriented concepts
Association
One-Way Navigation between classes

Named Association

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 9 (of 24)

Object-oriented concepts
Association
Association Rules

Association Multiplicity

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 10 (of 24)

Object-oriented concepts
Aggregation
A whole / part relationship UML Aggregation Notation

Self-aggregation

Aggregating Multiple Classes

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 11 (of 24)

Object-oriented concepts
Generalization
relationship between a superclass and the subclasses

Generalizing Multiple Classes UML Generalization Notation


CT026-1 Systems Analysis and Design Introduction to OO Concepts Slide 12 (of 24)

Object-oriented concepts
Message
objects interact with each other by sending each other messages requesting particular services client / sender initiating object server / receiver receiving object functional approach data passed between processing units; OO program messages passed between objects

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 13 (of 24)

Object-oriented concepts

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 14 (of 24)

Object-oriented concepts
Encapsulation
packaging data and operations into an object provides three software desirable software properties: Modularity, Data Abstraction & Data Hiding An object may only access another object's data by sending it messages. This is called encapsulation and assures that there is a secure process for getting to an object's data.
CT026-1 Systems Analysis and Design Introduction to OO Concepts Slide 15 (of 24)

Object-oriented concepts
Inheritance
a mechanism which allows new classes to be defined in terms of existing classes new class inherits / includes the features (operations and attributes) of the class it is created from

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 16 (of 24)

Object-oriented concepts
Inheritance

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 17 (of 24)

Object-oriented concepts
Polymorphism
the ability to define program entities that take more than one form allows a single message to be interpreted differently by different objects

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 18 (of 24)

Object-oriented concepts
Polymorphism

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 19 (of 24)

Object-oriented concepts
An analogy of polymorphism to daily life is how students respond to a school bell. When the bell (message) rings, however, it has its own meaning to different students (objects). Some: students go home go to the library, and go to other classes Every student responds to the bell, but how they respond to it might be different.
CT026-1 Systems Analysis and Design Introduction to OO Concepts

Quick Review Question


Three items of interest in use case diagrams are:
Objects, activities, and communications Actors, messages, and activities Objects, use cases, and activities Actors, use cases, and communications

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 20 (of 24)

Follow-up Assignment
Briefly explain the difference the following pairs of object-oriented terms. You should include small examples to illustrate your answers:
class / object attribute / operation association / multiplicity subclass / superclass message / method encapsulation / data hiding

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 21 (of 24)

Summary of Main Teaching Points


Introduction to OO Concepts
Introduction Object-oriented concepts
Object Class Class Relationships Generalization Message Encapsulation Inheritance
Introduction to OO Concepts Slide 22 (of 24)

CT026-1 Systems Analysis and Design

Question and Answer Session

Q&A
CT026-1 Systems Analysis and Design Introduction to OO Concepts Slide 23 (of 24)

Next Session
Introduction to UML Diagrams
Use Case Diagram Sequence Diagram Class Diagram

CT026-1 Systems Analysis and Design

Introduction to OO Concepts

Slide 24 (of 24)

You might also like