Object Oriented System Methodology
Object Oriented System Methodology
CHAPTER-1
CHAPTER OBJECTIVES:
INTRODUCTION:
Software process: It describes how the work is to be carried out to achieve the original goal
based on the system requirement. Each process consists of number of steps and rules that should
be performed during development.
Traditional technique
1
TRADITIONAL APPROACH OBJECT ORIENTED SYSTEM
DEVELOPMENT
Collection of procedures(functions) Combination of data and functionality
Focuses on function and procedures, Focuses on object, classes, modules that
different styles and methodologies for can be easily replaced, modified and
each step of process reused.
Moving from one phase to another phase Moving from one phase to another phase
is complex. is easier.
Increases duration of project decreases duration of project
Increases complexity Reduces complexity and redundancy
More robust
Easier to maintain
Promotion of reusability
2
Higher level of abstraction
Object orientation approach support abstraction at object level.
Object encapsulates both data and functions. So they work at higher level of
abstraction.
So designing, coding, testing and maintaining the system are much simpler.
Promotion of reusability
Objects are reusable because they are modeled directly out of real world problem
domain.
OBJECT ORIENTATION:
Object oriented methods enable us to create sets of objects that work together
synergistically to produce software that better module their problem domains than similar
systems produced by traditional techniques. The system created using object oriented methods
are easier to adapt changing requirements, easier to maintain, more robust, promote greater
design.
3
High level of abstraction:
Top-down approach:
It supports abstraction of the function level.
Traditional Approach:
The software development using this approach requires different styles and
methodologies for each step of the process. So moving from one phase to another requires more
complex transistion.
Object-oriented approach:
We use the same language to talk about analysis, design, programming and
database design. It returns the level of complexity and reboundary, which makes clearer and
robust system development.
A class in an object-oriented system carefully delineates between its interface and the
implementation of that interface. The attributes and methods are
encapsulated within a class (or) held together tightly. The classes are grouped into subsystems
but remain independent one class has no impact on other classes. Object oriented approach is not
a magical one to promote perfect design (or) perfect code. Raising the level of abstraction from
function level to object level and focusing on the real-world aspects of the system, the object
oriented method tends to
Promotion of Reusability:
Objects are reusable because they are modeled directly out of real world. The classes are
designed generically with reuse. The object orientation adds inheritance, which is a powerful
technique that allows classes to built from each other. The only different and enhancements
between the classes need to be designed and coded. All the previous functionality remains and
can be reused without change.
4
OVERVIEW OF UNIFIED APPROACH:
The UML (Unified Modeling Language) is a set of notations and conventions used to describe
and model an application.The Unified Approach (UA) specifies the tasks or steps to develope an
application,The heart of UA is Jacobson’s usecase.The UA consists of the following concepts:
Usecase driven approach
Utilizing the UML for modeling
Object oriented analysis
Object oriented design
Repositories of reusable classes and maximum reuse
The layered approach
Incremental development and prototyping
Continuous testing
5
6
SUMMARY
The UML (Unified Modeling Language) is a set of notations and conventions used to
describe and model an application.The Unified Approach (UA) specifies the tasks or steps to
develope an application. The heart of UA is Jacobson’s usecase.The UA consists of the
following concepts:
Usecase driven approach
Utilizing the UML for modeling
Object oriented analysis
Object oriented design
Repositories of reusable classes and maximum reuse
The layered approach
Incremental development and prototyping
Continuous testing
KEY TERMS
7
MULTIPLE CHOICE
4. Data- centric methodology: You think how to structure the data, and then build
the algorithm around that structure.
(a) Algorithm-centric methodology (b) Data- centric methodology
REVIEW QUESTION
8
CHAPTER-2
Object Basics
Object-oriented approaches attempt to build models that mimic the “real world”
Many systems we want to build involve things that exhibit behaviour as well as
languages like Simula, Smalltalk, Eiffel and, later, C++ and Java
9
Now there are also object-oriented analysis and design techniques and tools (e.g.
Object-orientation has also been argued to be a more natural approach than other
techniques
OO CONCEPTS
Attributes Concept of
Object and messages Encapsulation
and method & information
classes hiding
Object
Class Basics aggregation
hierarchy
polymorphism Object
relationships
&
associations
10
OBJECT AND CLASSES
WHAT IS AN
OBJECT ?
physical entity
conceptual entity
Chemical
process
software entity
Linked List
A more formal definition
An object is a concept,
abstraction, or thing
with sharp boundaries
and meaning for an
A Class = a set of objects that share a common structure and a common behaviour
11
A single object is simply an instance of a class
Main role of a class is to define the properties and procedures (the state &
Ex :
Class : CAR
Defines the property = color
Each individual car will have a
value for this property, such as
maroon, red, blue or black
Ex:
CAT
Class name
Colour
Methods Food preference
Size
Weight
Attributes
Class
Catch mouse diagram
Eat
miaow
12
object behavior is described in methods or procedures
a method = a function or procedure that is defined for a class and typically can
access the internal state of an object of that class to perform some operation
CONCEPT OF MESSAGES
Ex : when you press on the brake pedal of a car, you send a STOP message to the car
object. The car object knows how to respond to the STOP message
Information hiding is the principle of concealing the internal data and procedures
13
Encapsualtion or information hiding is a design goal of an OO system
In object-oriented system, everything is an object and each object is responsible for itself.
For example:
Windows applications needs windows object that can open themselves on screen and
either display something or accept input.
Windows object is responsible for things like opening, sizing, and closing itself.
Chart object is responsible for maintaining its data and labels and even
for drawing itself.
Review of objects:
The object-oriented system development makes software development easier and more natural
by raising the level of abstraction to the point where applications can be implemented. The name
object was chosen because “everyone knows what is an object is ”. The real question is “what do
objects have to do with system development” rather that “what is an object?”
Object:
A car is an object a real-world entity, identifiably separate from its surroundings. A car
has a well-defined set of attributes in relation to other object.
14
Attributes:
Data of an object.
Properties of an object.
Methods:
Procedures of an object.or
Behaviour of an object.
The term object was for formal utilized in the similar language. The term object means a
combination or data and logic that represent some real-world entity.
Properties represent the state of an object. In an object oriented methods we want to refer
to the description of these properties rather than how they are represented in a particular
programming language.
15
For example:
An employee object knows how to compute salary. To compute an employee salary, all
that is required is to send the compute payroll message to the employee object.So the
simplification of code simplifies application development and maintenance.
16
For example:
When we press on the brake pedal of a car, we send a stop message to the car object. The
car object knows how to respond to the stop message since brake have been designed with
specialized parts such as break pads and drums precisely respond to that message.
Different object can respond to the same message in different ways. The car, motorcycle
and bicycle will all respond to a stop message, but the actual operations performed are object
specific.It is the receiver’s responsibility to respond to a message in an appropriate manner. This
gives the great deal or flexibility, since different object can respond to the same message in
different ways. This is known as polymorphism.
Objects are grouped in classes:The classification of objects into various classes is based
its properties (states) and behaviour (methods). Classes are used to distinguish are type of object
from another. An object is an instance of structures, behaviour and inheritance for objects. The
chief rules are the class is to define the properties and procedures and applicability to its
instances.
Class Hierarchy:
An object-oriented system organizes classes into a subclass super class hierarchy. The properties
and behaviours are used as the basis for making distinctions between classes are at the top and
more specific are at the bottom of the class hierarchy. The family car is the subclass of car. A
subclass inherits all the properties and methods defined in its super class.
17
Inheritance:
It is the property of object-oriented systems that allow objects to be built from other objects.
Inheritance allows explicitly taking advantage of the commonality of objects when constructing
new classes. Inheritance is a relationship between classes where one class is the parent class of
another (derived) class. The derived class holds the properties and behaviour of base class in
addition to the properties and behaviour of derived class.
18
Dynamic Inheritance:
Dynamic inheritance allows objects to change and evolve over time. Since base classes provide
properties and attributes for objects, hanging base classes changes the properties and attributes of
a class.
Example:
A window objects change to icon and basic again. When we double click the folder the contents
will be displayed in a window and when close it, changes back to icon. It involves changing a
base class between a windows class and icon class.
Multiple Inheritances:
Some object-oriented systems permit a class to inherit its state (attributes) and behaviour from
more than one super class. This kind or inheritance is referred to as multiple inheritances.
For example:
Utility vehicle inherits the attributes from the Car and Truck classes.
Information hiding is the principle of concealing the internal data and procedures of an
object. In C++ , encapsulation protection mechanism with private, public and protected
members.
In per-class protection:
Class methods can access any objects of that class and not just the receiver.
In per-object protection:
Methods can access only the receiver. An important factor in achieving encapsulation is
the design at different classes of objects that operate using a common protocol. This means that
many objects will respond to the message using operations tailored to its class. A car engine is an
example of ncapsulation. Although engines may differ in implementation, the interface between
the driver and car is through a common protocol.
19
Polymorphism:
Poly _ ”many”
Morph _ “form”
It means objects that can take on or assume many different forms.Polymorphism means
that the same operations may behave differently on different classes. Booch defines
polymorphism as the relationship of objects many different classes by some common super class.
Polymorphism allows us to write generic, reusable code more easily, because we can specify
general instructions and delegate the implementation detail to the objects involved.
POLYMORPHISM
Poly means “many” and morph means “form”, Polymorphism = many forms
Mechanism by which several methods can have the same name and implement the
Ex : Adding two matrices is a different process from adding two integers, BUT it
Ex :
important issue in association is cardinality ==> how many instances of one class
20
AGGREGATIONS
All objects except the most basic ones, are composed of and may contain other
objects
Ex : a spreadsheet is an object composed of cells, and cells are objects that may
Breaking down objects into the obejcts from which they are composed is
decomposition
Car
21
Object Relationship and associations:
Association represents the relationships between objects and classes. Associations are
bidirectional. The directions implied by the name are the forward direction and the opposite is
the inverse direction.
A pilot “can fly” planes. The inverse of can fly is “is flown by “. Plane “is flown by” pilot
Cardinality:
It specifies how many instances of one class may relate to a single instance of an associated
class. Cardinality constrains the number of related objects and often is described as being “one”
or “many”.
Consumer-producer association:
Aggregations:
All objects, except the most basic ones, are composed of and may contain other objects.
Breaking down objects in to the objects from which they are composed is de composition. This is
possible because an objects attributes need not be simple data fields, attributes can reference
other objects. Since each object has an identity, one object can refer to other objects. This is
known as aggregation. The car object is an aggregation of other objects such as engine, seat and
wheel objects.
22
Static and Dynamic Binding:
Determining which function has to be involved at compile time is called static binding. Static
binding optimized the calls. (Ex) function call. The process of determining at run time which
functions to involve is termed dynamic binding. Dynamic binding occurs when polymorphic call
is issued. It allows some method invocation decision to be deferred until the information is
known.
Example:
Cut operation in a edit submenu. It pass the cut operation to any object on the desktop, each or
which handles the message in its own way.
Object Persistence:
Objects have a lifetime. They are explicitly created and can exist for a period of time that has
been the duration of the process in which they were created. A file or database can provide
support for objects having a longer lifeline, longer than the duration of the process for which
they are created. This characteristic is called object persistence.
Meta-Classes:
In an object-oriented system every thing is an object, what about a class? Is a class an object?.
Yes, a class is an object. So, If it is an object, it must belong to a class, such a class belong to a
class called a meta-class (or) class or classes.
23
24
25
Summary
Finding out about the objects (or more correctly, Classes) involved in a system,
their behavior, the way they change over time, and their interactions with each other, is
the task of Object-Oriented Analysis and Design. Information hiding is the principle of
concealing the internal data and procedures of an object and providing an interface to
each object in such a way as to reveal as little as possible about its inner
workings.Protocol is the set of rules that governs the communication.Static binding is
the process of determining which functions to invoke at compile time is termed as static
binding. The process of determining which functions to invoke at runtime are called as
dynamic binding.
26
KEY TERMS
Association
Class
Object
Protocol
Information hiding
Static binding
Dynamic binding
MULTIPLE CHOICE
27
REVIEW QUESTIONS:
28
CHAPTER-3
CHAPTER OBJECTIVES:
Software development
• Analysis, design, implementation, testing & refinement to transform users’ need into
• Object-oriented approach
responsibilities
29
– how they use system can give insight into requirements, eg: analyzing incentive
• transformation 2 (design) - begins with problem statement, ends with detailed design
30
Waterfall Model – from ‘what’ to ‘use’
understood
31
Building high quality software
• Test according to
– what it should do
• 4 quality measures
– correspondence
• measures how well delivered system matches needs of operational
environment, as described in original requirements statement
– validation
• task of predicting correspondence (true correspondence only determined
after system is in place)
– correctness
• measures consistency of product requirements with respect to design
specification
– verification
• exercise of determining correctness (correctness objective => always
possible to determine if product precisely satisfies requirements of
specification)
32
4 Quality Measures
Verification vs Validation
• Verification
– am I building the product right ?
– Begin after specification accepted
• Validation
– am I building the right product ?
– Subjective - is specification appropriate ? Uncover true users’ needs , therefore
establish proper design ?
– Begins as soon as project starts
33
– designs traceable across requirements, analysis, design, implementation & testing
can be produced
– all design decisions can be traced back directly to user requirements
– usage scenarios can be test scenarios
34
Using Jacobson et al. life cycle model – traceable design across development
35
Object-oriented software development
• Activities
• Object-oriented design
• Prototyping
• Component-based development
• Incremental testing
• Encourages
– incremental development
• Use Case, is a name for a scenario to describe the user–computer system interaction.
• Determine system requirements, identify classes & their relationship to other classes in
domain
– Scenarios can help (in traditional development, it is treated informally, not fully
documented)
36
Use case
• Typical interaction between user & system that captures users’ goal & needs
– In simple usage, capture use case by talking to typical users, discussing various
– can be used to examine who does what in interactions among objects, what role
they play, intersection among objects’ role to achieve given goal is called
collaboration
– expressing high level processes & interactions with customers in a scenario &
analyzing it
– when use case model better understood & developed, start identifying classes &
Identifying objects
37
– incentive payroll - employee, supervisor, office administrator, paycheck, product
• Intangible objects ?
• Documentation
– 80-20 rule
Object-oriented Design
• Goal : to design classes identified during analysis phase & user interface
– Eg. add objects for user interface to system (data entry windows, browse
windows)
– Highly incremental, eg. can start with object-oriented analysis, model it, create
object-oriented design, then do some more of each again & again, gradually
– Activities & focus of oo analysis & oo design are intertwined, grown not built
Object-oriented Design
38
– Design & refine classes
• Design large number of simple classes rather than small number of complex classes
• Design methods
Prototyping
• Prototype – version of software product developed in early stages of product’s life cycle
features of system
– Gives users chance to comment on usability & usefulness of user interface design
– Can assess fit between software tools selected, functional specification & user
needs
– Can further define use cases, makes use case modeling easier
39
• Important to construct prototype of key system components shortly after products are
selected
– Build prototype with use-case modeling to design systems that users like & need
• New trend: (eg. rapid application development) prototype refined into final product
– Prototype used as means to test & refine user interface & increase usability of
system
– Test, evaluate & build further till all components work properly
Categories of Prototypes
• Horizontal prototype
– Contain no functionality
• Vertical prototype
• Hybrid prototypes
– Major portions of interface established, features having high degree of risk are
40
• Analysis prototype
– Aid in exploring problem domain, used to inform user & demonstrate proof of
concept
• Domain prototype
development team
Developing prototypes
prototype built)
• Should involve representation from all user groups that will be affected by project
– To ascertain all that the general structure of the prototype meets requirements
• Purpose of review
– Demo that prototype has been developed according to spec & that final spec is
appropriate
– Collect info about errors & problems in systems, eg user interface problems
41
– Give management & everyone connected with project glimpse of what technology
can provide
– No more cars, computers, etc custom designed & built for each customer
Component-based development
assembly of pre-built, pre-tested, reusable software components that operate with each
other
42
Application Wrapping
• Application/component wrapper
– Provides interface to interact with both new & legacy software systems
– Off the shelf not widely available, mostly home-grown within organization
• Software component
– Can request service form another component or deliver its own services on
request
43
Component wrapping technology
Open Connectivity
• Set of tools & techniques to build application faster than typically possible with
traditional methods
• Iterational development
– Implement design & user requirements incrementally with tools like Delphi,
44
Incremental testing
• Software development and all of its activities including testing are an iterative process.
• Turning over applications to quality assurance group not helping since they are not
Reusability
– Design reusability
– What has been done before to solve problem similar to this one ?
• Need
Reuse Strategy
• Information hiding
• Conformance to naming standards
• Creation & administration of an object repository
• Encouragement by strategic management of reuse as opposed to constant redevelopment
• Establish target for % of object in project to be reuse
45
The SW Development Process
needs
Transformation 1
problem
statements
What are the uses of
the system ? analysis
Transformation 2
design
problem system
problem
implementation
software
detail
product
Transformation 3
46
Transformation 1 (analysis) – translates the user’s needs into system
The emphasis on the analysis & design aspects of the SW life cycle, is intended to
for change )
47
SUMMARY
KEY TERMS
System Development process
Transformation analysis
Prototypying
Rapid Application Development (RAD)
Component-based development (CBD)
48
MULTIPLE CHOICE
1. System Development process is the process to change, refine, transform & add to
existing product
(a) system development process (b) system methodology
2. Transformation analysis means translates user’s need into system’s requirements &
responsibilities
(a) Transformation analysis (b) Transformation design
3. Prototyping is important to construct a prototype of some of the key system components
shortly after the products are selected
(a)Prototyping (b) Horizontal prototype
4. Rapid Application Development (RAD) is a set of tools and techniques that can be used
to build an application faster than typically possible with traditional methods.
(a)RAD (b) CBD
5. Component-based development (CBD) is an industrialized approach to the Software
development process
(a)RAD (b) CBD
REVIEW QUESTIONS
1. What is the waterfall SDLC?
2. What is software development process?
3. What is software correspondence?
4. What is software correctness?
5. What is software validation?
6. What is software verification?
7. How is software verification different from validation?
8. What is prototyping and why is it useful?
9. Write the advantages and disadvantages of prototyping?
10. What is Use Case modeling?
11. What is RAD?
12. Why is CBD important?
13. Why is reusability important?
14. What are the types of prototyping?
15. Define class with example.
16. List the transformation involved in the software development process.
49