Professional Documents
Culture Documents
Unit - 1 (Introduction To OOAD)
Unit - 1 (Introduction To OOAD)
1
Important Programming Models
2
Algorithm Analysis
1.Space efficiency
2.Time efficiency
2.1 Worst case efficiency
2.2 Best case efficiency
2.3 Average case efficiency
3
Algorithm analysis (Continued…)
4
Algorithm analysis (Continued…)
Case 1:
If the algorithm is depending only on the input size ,
we need not to find best,worst and average case efficiencies
separately.
Case 2:
If the algorithm is depending not only on the input
size ,bust also some factors then find we have to fine
worst,best and average case efficiencies separately.
5
• Differentiate OOP, OOA & OOD.
6
Object Oriented Programming
7
Object Oriented Analysis
….contd
8
Object Oriented Design
9
Introduction
• System development refers to all activities that
produces the solution.
10
Object Model
• The main principles of object model are
a) abstraction
b) encapsulation
c) modularity
d) hierarchy
e) typing
f) concurrency
g) persistence
11
Major Elements of Object Model
a) abstraction
b) encapsulation
c) modularity
d) hierarchy
12
Minor Elements of Object Model
a) typing
b) concurrency
c) persistence
13
a) What is Abstraction?
14
b) What is Encapsulation?
• Hides the details of the implementation (data &
procedure) of an object
(e.g.) Hides the details of the implementation from
clients.
- Provides the interface.
15
c) What is Modularity?
• The breaking up of something complex
into manageable pieces
16
d-1) What is Hierarchy?
• Ranking or Ordering of abstraction
Increasing
abstraction Vehicle
Car
Ford
18
e) Typing
• It is the enforcement of the class of an
object, such that objects different types
may not be interchanged, or at the most ,
they may be interchange only in very
restricted ways.
20
g) Persistence
• It is the property of an object through
which the object continues exists after its
creator ceases to exists and / or the
objects location moves from the address
phase in which it was created.
21
Basic Concepts of Object
Orientation
• Object
• Class
• Attribute (Property)
• Method (Procedure)
• Inheritance
• Interface (Polymorphism)
• Relationships
22
1a) What is an Object?
• It is a combination of data & logic that
represents some real world entity, either
physical, conceptual, or software
23
1b) Representing Objects
• An object is represented as rectangles
with underlined names
: Professor
ProfessorNandhini
Class Name Only
Professor Nandhini
ProfessorNandhini: Object Name Only
Professor
Class and Object Name
24
2a) What is a Class?
25
2b) Representing Classes
• A class is represented using a
compartmented rectangle
a + b = 10
Professor
Professor Rani
26
2c) Class Compartments
• A class is comprised of three sections
– The first section contains the class name
– The second section shows the structure
(attributes)
– The third section shows the behavior
(operations)
Class Name Professor
name
Attributes empID
Operations create( )
save( )
delete( )
change( )
27
2d)The Relationship Between
Classes and Objects
Objects Class
Professor
Professor Jones
28
3 What is an Attribute?
• Another name – properties
• It describe the state (data) of an object.
• Example
Class
Car
Cost
Attributes
Color
Manufacturer
Model
29
4) What is method (or) procedure?
• Define its behavior (what an object is
capable of doing).
CourseOffering
Class
addStudent
deleteStudent
getStartTime
Operation getEndTime
30
5a) Inheritance
• It allows objects to be built from other
objects.
• It is a relational ship between classes.
(one class is the parent of other (derived)
class.
• The parent class is also known as the
base class (or) super class.
31
5b) Example: Single Inheritance
• One class inherits from another
Ancestor
Account
Superclass balance
(parent) name
number
Withdraw()
CreateStatement()
Generalization
Relationship
Checking Savings
Utility Vehicle
33
5d) Example: Multiple Inheritance
• A class can inherit from several other
classes
FlyingThing Animal
multiple
inheritance
35
7a) Relationships
• Association
– Aggregation
• Dependency
• Generalization
• Realization
36
7b)Relationships: Association
• It represents the relationships between objects &
classes.
Association Name
Association
Role Names
Employee Employer
37
7c)Relationships: Association
• It is rendered as a solid line.
• It has a name & a role.
Name Direction
ASSOCIATION NAMES
Name
Works for
Person Company
Association
Person Company
Employee Employer
38
7d)Relationships: Aggregation
39
7e) Relationships: Aggregation
• (e.g.)
Whole Part
College Department
Aggregation
40
7f) Relationships: Aggregation
• (e.g.) a car object of other objects such as
engine, seat and wheel objects.
Car
41
7g) Relationships: Dependency
• A relationship between two model elements where a
change in one may cause a change in the other
• Non-structural, “using” relationship
Dependency relationship
42
7h) Relationships: Generalization
• It is a relationship between a general thing
(called the super class or parent) & a more
specific kind of that thing (called the
subclass or child)
43
7j) Relationships: Generalization
Shape
Base class
origin
move( )
resize( )
Generalization display( )
44
7k) Relationships: Realization
Canonical form
45
8) Review: Introduction to Object Orientation
(continued)
46
Software Development Life
Cycle
• System development refers to all activities that
produces the solution.
47
2e) Software Development Process
– Linear Sequential Model (Or) Waterfall model
– Prototyping model
– Evolutionary Model
• Incremental model
• Spiral model
• WIN - WIN model
48
Linear Sequential Model
System/information
engineering
49
(e.g.) The waterfall software development process
What
How
Do It
Test
Use
50
Prototyping Model
Customer
Communication Quick Design
Customer
evaluation of Build
Prototype Prototype
51
Incremental Model
increment 1
delivery of
4th increment
calendar time
52
Spiral Model
Pla nn in g
Risk Ana lysis
C usto m e r
Co m m unic a tio n
C usto m e r
Eva lua tio n Co nstruc tio n & Re le a se
53
3a) OO System Development : A Usecase
Driven Approach
Build a Use-Cases
model
Object analysis
Validate test
54
3b) OO System Development : A
Usecase Driven Approach
55
4c) OO Analysis
56
4d) OO Design
57
4e) OO Design - Guidelines
– Reuse rather than build a new class.
– Design a large no. of simple classes rather
than a small no. of complex classes.
– Design methods.
– Critique what you have proposed. If
possible, go back & refine the classes.
58
4f) Prototyping
59
4g) Testing
1.White box testing
2.Black box Testing
60
THANK YOU!
61