Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Oriented Technology
The material that will be discussed is
covered by Bahrami A., "Object
Oriented System Development",
McGraw Hill, 2003. [Chapter 1,2,5]
System Analysis and Design
• INTRODUCTION
– Systems are created to solve problems.
*Traditional : Top-Down
Object Oriented Fundamentals
Principles of Object-Oriented
Basic Terminologies Systems
• Objects • Abstraction
• Classes • Encapsulation
• Encapsulation and data • Modularity
hiding
• Hierarchy
• Message Passing
• Inheritance • Typing
• Polymorphism • Concurrency
• Generalization and • Persistence
Specialization
• Links and Association
• Aggregation
Benefits Of OOT
• Helps faster development of software
• Increased Quality
• Modular Architecture
• Reusability
• Hassel-free updates
• Reduces development risks
A Case Study - A Payroll Program
• Consider a payroll program that processes
employee records at a small manufacturing
firm. This company has three types of
employees:
– Managers: Receive a regular salary.
– Office Workers : Receive an hourly wage and are
eligible for overtime after40 hours.
– Production Workers: Are paid according to a piece
rate.
Structured Approach-Payroll Program
FOR EVERY EMPLOYEE DO
BEGIN
IF employee = manager THEN
CALL computeManagerSalary
IF employee = office worker THEN
CALL computeOfficeWorkerSalary
IF employee = production worker THEN
CALL computeProductionWorkerSalary
END
What if we add two new types of employees?
1. Temporary office workers ineligible for overtime
2. junior production workers who receive an hourly wage plus a
lower piece rate
Structured Approach-Payroll Program
Modified
FOR EVERY EMPLOYEE DO
BEGIN
IF employee = manager THEN
CALL computeManagerSalary
IF employee = office worker THEN
CALL computeOfficeWorkerSalary
IF employee = production worker THEN
CALL computeProductionWorkerSalary
IF employee = temporary office worker THEN
CALL computeTemporaryOfficeWorkerSalary
IF employee = junior production worker THEN
CALL computeJuniorProductionWorkerSalary
END
An Object-Oriented Approach-Payroll
Program
• What objects does the application need?
• The goal of OO analysis is to identify objects and
classes that support the problem domain and
system's requirements.
• Some general candidate classes are:
– Persons
– Places
– Thing
• Class Hierarchy
– Identify class hierarchy
– Identify commonality among the classes
– Draw the general-specific class hierarchy
An Object-Oriented Approach-Payroll
Program OO Approach
FOR EVERY EMPLOYEE DO
BEGIN
employee computePayroll
END
Polymorphism concept Used
Polymorphism means that the same
operation may behave differently on
different classes.
Example:computePayroll
Object Oriented Analysis
Modelling
Phase 1 :
Object Oriented Analysis(Modeling)
• object-oriented analysis
1. system requirements are determined
2. the classes are identified
3. the relationships among classes are identified.
Object(static) Models static structure(finds “doers”)
Modeling
Techniques Dynamic
Models time-dependent aspects of system
Used Modeling
Functional
Models Overview of the system
Modeling
• Object Modeling
– The static structure of the software system in terms of
objects.
– It identifies
• the objects
• the classes into which the objects can be grouped into
• the relationships between the objects.
– Model Used : Class Diagram , Object Diagram
• Dynamic Modeling
– Behavior of the system with respect to time and external
changes needs are examined.
– Model Used : Interaction Diagram, Statechart Diagram,
Activity Diagram
• Functional Modelling
– The functional model shows the processes that are
performed within an object and how the data changes as it
moves between methods.
– Model Used :Use case Diagram
The Unified Approach
• UA based on methodologies by Booch,
Rumbaugh and Jacobson tries to combine the
best practices, processes and guidelines along
with the object management groups in unified
modelling language.
• UML is a set of notations and conventions used
to describe and model an application.
• UA utilizes the unified modeling language (UML)
which is a set of notations and conventions used
to describe and model an application.
The UML defines nine graphical
diagrams