analysis design (ooad)vvtesh.co.in/teaching/bigdata-2020/slides/lecture6-ooad.pdf · 2020-02-05 ·...

28
Venkatesh Vinayakarao (Vv) Love Tarun Object Oriented Analysis and Design (OOAD) An Introduction Venkatesh Vinayakarao [email protected] http://vvtesh.co.in Assistant Professor Indian Institute of Information Technology, Sri City, Chittoor https://vvtesh.sarahah.com/ The art of simplicity is a puzzle of complexity. –Douglas Horton.

Upload: others

Post on 09-Jul-2020

10 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Venkatesh Vinayakarao (Vv)Love Tarun

Object Oriented Analysis and Design(OOAD)

An Introduction

Venkatesh [email protected]://vvtesh.co.in

Assistant ProfessorIndian Institute of Information Technology, Sri City, Chittoor

https://vvtesh.sarahah.com/

The art of simplicity is a puzzle of complexity. –Douglas Horton.

Page 2: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Agenda

• Introduction• Why is large-scale software engineering so complex?

• How to address this complexity?

• Object Oriented Analysis and Design (OOAD)• Hierarchy and Abstraction

• Classes and Objects

• Unified Modeling Language (UML)

187

Page 3: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

House Rule

• Raise your hand if you know the answer.

• Do not shout out unless offered a chance by your instructor.

188

Page 4: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Software Engineering (SE) is very challenging! Why?

189

Page 5: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Challenges in SE

● Over-specification and under-specification

● Relying on star performers

● Weak personnel and problem employees

● Requirements creep

● Code not even understood by the author – done by trial and error

● Designing, Coding, …

● …

● …. and >100 more!

190

Page 6: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Challenges in RE

Challenges in the Problem Space

(Analysis)

Challenges in the Solution Space

(Design)

Requirements Implementation

How to deal with these challenges?

191

Page 7: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

How to tame complexity?

Can we learn from the world around us?

192

Page 8: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

How to get All India Rank 1 in JEE?

*Am not AIR 1 in JEE. Just for fun.

193

Page 9: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

How did we humans build this?

194

Page 10: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

We could build these too!

195

Page 11: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

196

How to tame complexity?

Can we learn from the world around us?

Page 12: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Taming Complexity

1. Hierarchy

2. Abstraction

3. Keeping Related Things Together

4. Polymorphism

Key Principles

197

Page 13: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Do you recognize this?

Table of Contents of C Programming Book

198

Page 14: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Taking These Ideas to Software Engineering!Object Oriented Analysis and Design

Page 15: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Objects are Everywhere!

• We are inherently Object Oriented!

• An Example Object:

• Identity (Venkatesh)

• Data (Height = 5’ 6’’, Weight = 80 KG*, …)

• Behavior (Lecture, Put Students to Sleep, …)

*May be slightly more. ☺

Objects have Identity, Data and Behavior associated with them.

200

Page 16: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Student

Abstraction

“Student” is a class. The objects namely “Ravi”, “Surya” and “Bhaskar”

belong to the “Student” class.

Ravi Surya Bhaskar

201

Page 17: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Abstraction

• Classroom• Classroom 101

• Student• Student1• Student2• …

• Faculty• Faculty1

• Electrical Fitting• Light

• Power Saver Light• PSL 1• PSL 2 … and so on.

Objects are instances of a class.

A class called “Student”.

202

Page 18: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Class Vs. Object

• Object has:• Identity (Jimmy).

• Data (four legged).

• Behavior (barks).

• Class has:• Data (Dogs are four legged [quadruped]).

• Behavior (Dogs bark).

203

Page 19: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Quiz

• Which of the following is not a “class”?• Employee

• Train

• Vehicle

• India

204

Page 20: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Quiz

• Which of the following is not a “class”?• Employee

• Train

• Vehicle

• India

205

Page 21: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Quiz

• Which of the following is not an “Object”?• LG Q6 Mobile Phone

• Venkatesh V

• Pinakini Express

• Employee with ID 231

206

Page 22: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Quiz

• Which of the following is not an “Object”?• LG Q6 Mobile Phone

• Venkatesh V

• Pinakini Express

• Employee with ID 231

207

Page 23: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

208

Two Volunteers Please…

Page 24: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

209

Page 25: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Describe this!

210

Page 26: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

1. Specification

2. Visualization

3. Construction

Part of the problem in industry today is related to

211

Page 27: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

Unified Modeling LanguageA way to address these problems!

Page 28: Analysis Design (OOAD)vvtesh.co.in/teaching/bigdata-2020/slides/Lecture6-OOAD.pdf · 2020-02-05 · •Object Oriented Analysis and Design (OOAD) •Hierarchy and Abstraction •Classes

What is UML?

Unified Modeling language (UML)

is a

standardized modeling language

enabling developers to

specify, visualize, construct and document

artifacts of a software system.

213