Chapter One Object Orientation
Chapter One Object Orientation
Chapter One Object Orientation
1
Brain storming questions
What does it mean:
oobject?
oclasses?
oObject-oriented?
Why Object-orientation?
2
Two Orthogonal Software
3
Traditional Approach:
It is:
o Collection of procedures(functions)
o Focuses on functions and procedures
o Different styles and methodologies for each steps of process.
o Moving from one phase to another is phase complex.
o Increasing duration of project
o Increase complexity.
4
Object Oriented methodology:
It is:
o Combination of data and functionality.
o Focuses in object, classes, modules that can be easily replaced,
modified, and reused.
o Decrease duration of the project.
o Moving one phase to another is easy.
o Reduces complexity and redundancy.
5
Object-Oriented System Development Methodology
6
Why Object-Orientation?
Because :
o Easier to maintain,
o More robust,
7
What is Object?
An object is:
• A thing
• An entity
• Something can pick up or kick
• Anything that can be imagine that has its own identity.
8
• Objects have their own independence
existence.
• Each object has their own identity.
• Object is depict by the standard
notation of object.
• Equal objects are not identical.
9
Basic Concepts of Object
• Polymorphism
• Object Relationships
• Aggregation and Object Containment
10
Class:
Vehicle
• Class is a set of objects.
• Class has common structure and behaviour. landVehicle
waterVehicle
• Object is single instances of a class. airVehicle
Exercise: Group the following objects in one of Truck Bus
Automobile
these classes Air Vehicle, Land Vehicle or Water Ship
Boat
Vehicle. Plane Helicopter
11
Behaviour:
• It denotes the collection of methods that abstractly describes where an object is
capable of doing.
• A collective term for all of an object’s operations.
Methods:
• It encapsulate the behaviour of the object.
• It provide interfaces to an object and hide any of the internal structures and states
maintained by the object.
Message
• It is the instruction and method is the implementation.
• An object understands a message when it can match message to a method that has
same name as of it.
• Objects interact with each other by sending and receiving messages.
• Objects perform operations in response to messages
12
Information Hiding:
• It is the principle of concealing the internal data and procedures of an object.
• Providing an interface to each object in such a way as to reveal as little as
possible about its inner workings.
Encapsulation:
• An object is said to encapsulate the data and a program
• Encapsulation or information hiding is a design goal of an OO system.
Class Hierarchy:
• System made up of interrelated components.
• At the top of the class hierarchy are the most general classes
• At the bottom class hierarchy are the most specific classes .
• A subclass inherits all of the properties and methods defined in its super class.
13
Example:
• The vehicle class is the super class.
• Air Vehicle, Land Vehicle, and Water
Vehicle are the sub class of the class
vehicle.
• Two types of hierarchy: IS–A” hierarchy
o IS–A” hierarchy:
o Part-of Hierarchy
Part-of Hierarchy
14
Polymorphism:
• It means that the same operation may behave differently on different
classes.
Relationships: Polymorphism
• It's the relationships among classes that provide the foundation for the
structure of a new system
• Association represents the relationships between objects and classes.
• Associations are bidirectional with different annotations.
Aggregation:
Association
• As each object has an identity.
• One object can refer to other objects.
• This is known as aggregation.
Composition:
Composition
• Strong aggregation.
• A relationship where the part can exist independently of the whole. Aggregation
15
Inheritance:
• Objects to be built from other objects.
• Object will take commonality of a new class.
• Three types of inheritance: Single, Dynamic, and
Multiple inheritance.
• Single inheritance: an object built from a single object.
• Multiple Inheritances: an object built from two or
more object.
• Dynamic inheritance: allows objects to change and
evolve over time.
16
Unified Approach
• UA establishes a unifying and unitary framework works by
17
• The unified approach to software development revolves around (but is
not limited to) the following processes and concepts.
o Object-oriented analysis
o Object-oriented design
o Continuous testing
18
The methods and technology employed include:
• Layered Approach
• Component-based development
19
Object-Oriented Analysis
20
Object-Oriented Design
21
Iterative development and continuous Testing
• Development must be iterate and reiterate until you are satisfied with the system.
• Repeat the entire process, reworking the design or moving on to re-prototyping and retesting.
• Continue this refining cycle through the development process until you are satisfied with the
results.
22
UA repository
• In modern business, best practice sharing is a way to ensure that solutions to
process and organization problem.
23
Layered Approach
• Most software development tools are two layered
architecture interface and data.
• The functions of the interface from the function of the
business better to isolated each other.
• This approach also isolates the business from the details
of the data access.
• There are three layered approach. These are:
1. User Interface layer
2. Business layer
3. Access layer
24
Business Layer:
• Contains all the objects that represent the business.
• Shows how objects interact to accomplish the business process performed.
• These objects should not be responsible for the following:
1. Displaying details
2. Data access details
25
View Layer:
• The user interface layer consists of objects with which the user interacts as well
as the objects need to manage or control the interface.
26
Access Layer:
• The access layer contains objects that know to communicate with the place
where the data actually resides.
• Regardless of where the data actually resides the access layer has two major
responsibilities:
1. Translate results
2. Translate request
27
THANK YOU!!
28