Professional Documents
Culture Documents
1.Space efficiency
2.Time efficiency
2.1 Worst case efficiency
2.2 Best case efficiency
2.3 Average case efficiency
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 ,but also some factors then find we have to fine
worst,best and average case efficiencies separately.
• Differentiate OOP, OOA & OOD.
Object Oriented Programming
….contd
Object Oriented Design
a) typing
b) concurrency
c) persistence
a) What is Abstraction?
Increasing
abstraction Vehicle
Car
Ford
: Professor
ProfessorNandhini
Class Name Only
Professor Nandhini
ProfessorNandhini: Object Name Only
Professor
Class and Object Name
2a) What is a Class?
a + b = 10
Professor
ProfessorRani
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( )
2d)The Relationship Between
Classes and Objects
Objects Class
Professor
Professor Jones
3 What is an Attribute?
• Another name – properties
• It describe the state (data) of an object.
• Example
Class
Car
Cost
Attributes
Color
Manufacturer
Model
4) What is method (or) procedure?
• Define its behavior (what an object is
capable of doing).
CourseOffering
Class
addStudent
deleteStudent
getStartTime
Operation getEndTime
5a) Inheritance
• It allows objects to be built from other
objects.
• It is a relationalship between classes.
(one class is the parent of other (derived)
class.
• The parent class is also known as the
base class (or) superclass.
5b) Example: Single Inheritance
• One class inherits from another
Ancestor
Account
Superclass balance
(parent) name
number
Withdraw()
CreateStatement()
Generalization
Relationship
Checking Savings
Utility Vehicle
5d) Example: Multiple Inheritance
• A class can inherit from several other
classes
FlyingThing Animal
multiple
inheritance
• Association
– Aggregation
• Dependency
• Generalization
• Realization
7b)Relationships: Association
• It represents the relationships between objects &
classes.
Association Name
Association
Role Names
Employee Employer
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
7d)Relationships: Aggregation
Whole Part
College Department
Aggregation
7f) Relationships: Aggregation
• (e.g.) a car object of other objects such as
engine, seat and wheel objects.
Car
Dependency relationship
7h) Relationships: Generalization
• It is a relationship between a general thing
(called the superclass or parent) & a more
specific kind of that thing (called the
subclass or child)
Canonical form
(continued)
Software Development Life
Cycle
• System development refers to all activities that
produces the solution.
– Prototyping model
– Evolutionary Model
• Incremental model
• Spiral model
• WIN - WIN model
System/information
engineering
What
How
Do It
Test
Use
Prototyping Model
Customer
Communication Quick Design
Customer
evaluation of Build
Prototype Prototype
Incremental Model
increment 1
delivery of
4th increment
calendar time
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
3a) OO System Development : A Usecase
Driven Approach
Build a Use-Cases
model
Object analysis
Validate test