Upload
sanchobe1
View
215
Download
0
Embed Size (px)
Citation preview
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
1/31
Course No. & Title : SEWP ZG512 Object Oriented Analysis and Design
Instructor : Prof. Santosh Chobe
Contact details :[email protected]
DISTANCE LEARNING PROGRAMMES DIVISION
BIRLA INSTITUE OF TECHNOLOGY& SCIENCE, PILANI
MS in Software Engineering
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
2/31
2
PROCEDURALPROGRAMMING
Concentrates more on actions and logic
No data hiding
Reusability is difficult
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
3/31
3
OBJECT-ORIENTEDPROGRAMMING
Object-oriented programming (OOP) is a programming language
model organized around "objects" rather than "actions" and data
rather than logic.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
4/31
4
DATA
METHOD METHOD
METHOD METHOD
Object = data + method
OBJECT
Data
Methods
Bicycle as an Object
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
5/31
5
A classis the blueprint from which individual objects are created.
CLASS
A classdefines the characteristics of a thing (object), including its
attributes or properties and the thing's behaviors (the things it can do,
or methods, operations).
The properties and methods defined by a class are called members.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
6/31
6
CLASS
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
7/31
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
8/31
8
Functions and Procedures are attached to an Object andallow the object to perform actions.
Unlike structures, OOP allows you to attach functions and
procedures to your code.
This means that not only can you store details about you
car (the attributes), you can also allow for sub routines such
as drive() and refuel(), which are attached to each class.
METHODS
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
9/31
9
CLASSSTRUCTURE
struct room
{
int length,breadth;};
class room
{
private:int length,breadth;
public:
void getdata();
}
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
10/31
10
A particular instance of a class.
OBJECT
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
11/31
11
Features of Object-Oriented Language
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
12/31
12
ENCAPSULATION
The wrapping up of data and methods into a single unit (called class)
Encapsulation is the mechanism that binds together code andthe data it manipulates, and keeps both safe from outside
interference and misuse.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
13/31
13
ENCAPSULATION
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
14/31
14
DATA HIDING
The insulation of the data from direct access by the program.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
15/31
15
The process by which one object acquires the properties
of another object.
Child Classes can inherit attributes and behaviors from
their parent classes, and can introduce their own.
INHERITANCE
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
16/31
16
INHERITANCE
Bird
Attributes:Features
Lay eggs
Flying Bird
Attributes:
______
______
Non Flying
Bird
Attributes:
_______
_______
Robin
Attributes:
______
Swallow
Attributes:
______
Penguin
Attributes:
______
Kiwi
Attributes:
______
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
17/31
17
POLYMORPHISM
The ability to take more forms.
e. g. + is used for addition and
concatenation.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
18/31
18
POLYMORPHISM
Shape
Draw()
Triangle ObjectDraw(triangle)
Box ObjectDraw(box)
Circle Object
Draw(circle)
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
19/31
19
BENEFITS OF OOP
Reusability
Information Hiding
Software Complexity can be managed
Systems can be easily upgraded from small to
large systems.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
20/31
20
WHATISANALYSISANDDESIGN?
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
21/31
21
Analysis emphasizes an investigation of the problem and
requirements, rather than a solution.
For example, if a new computerized library information
system is desired, how will it be used?
"Analysis" is a broad term, best qualified, as in
requirements analysis (an investigation of the requirements)
or object analysis (an investigation of the domain objects).
ANALYSIS
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
22/31
22
Design emphasizes a conceptual solution that fulfills the
requirements, rather than its implementation.
For example, a description of a database schema and
software objects.
Ultimately, designs can be implemented.
DESIGN
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
23/31
23
Analysis and design have been summarized in the phase
do the right thing (analysis), and do the thing right (design).
ANALYSISANDDESIGN
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
24/31
WHATISOBJECTORIENTEDANALYSIS?
The emphasis is on finding and describing the objects
(or concepts) in the problem domain.
In a Library Information System, some of the conceptsinclude Book, Library, and Student.
24
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
25/31
WHATISOBJECTORIENTEDDESIGN?
The emphasis is defining software objects and how they
collaborate to fulfill the requirements.
In a Library Information System, a Book software object
may have a titleattribute and a getChaptermethod.
25
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
26/31
IMPLEMENTATION
During Implementation, or Object-Oriented Programming,
design objects are implemented, such as a book class in
Java.
Implementation is also known as Codingor Construction.
26
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
27/31
27
ITERATIVEANDWATERFALLPROCESSES
The essential difference between the two is how you break
up a project into smaller chunks.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
28/31
28
WATERFALLPROCESSES
The waterfall style breaks down a project based on activity. To build Software, you have to do certain activities :
requirements analysis, design, coding, and testing.
Our 1-year project might thus have a 2-month analysis
phase, followed by a 4-month design phase, followed by a
3-month coding phase, followed by a 3-month testing
phase.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
29/31
29
ITERATIVEPROCESSES
In this lifecycle approach, development is organized into aseries of short, fixed-length (for example, three-week) mini-
projects called iterations; the outcome of each is a tested,
integrated, and executable partial system.
Each iteration includes its own requirements analysis,
design, implementation, and testing activities.
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
30/31
30
ITERATIVEPROCESSES
The iterative style breaks down a project by subsets of
functionality . You might take a year and break it into 3-month iterations.
In the first iteration, you'd take a quarter of the requirements
and do the complete software life cycle for that quarter :
analysis, design, code, and test .
At the end of the first iteration, you'd have a system that does
a quarter of the needed functionality .
Then you'd do a second iteration so that at the end of 6
months, you'd have a system that does half the functionality .
8/10/2019 2011_C-D_OOAD_Lec No-1_05_04_14
31/31
31
BENEFITS OFITERATIVEDEVELOPMENT
less project failure, better productivity, and lower defect rates;
shown by research into iterative methods
early rather than late mitigation of high risks (technical,
requirements, objectives, usability, and so forth)
early visible progress early feedback, user engagement, and adaptation, leading to a
refined system that more closely meets the real needs of the
stakeholders
the learning within an iteration can be methodically used to
improve the development process itself, iteration by iteration