15 object orienteddesign

29
Object-Oriented Object-Oriented Design Design Lecture@LPU

description

 

Transcript of 15 object orienteddesign

Page 1: 15 object orienteddesign

Object-Oriented Object-Oriented

DesignDesign

Lecture@LPU

Page 2: 15 object orienteddesign

Challenges of Software Development

0Complexity of software systems0Longevity and evolution of software systems0High user expectations

2

Page 3: 15 object orienteddesign

Outline

Challenges of software development0Software engineering

0 Activities and processes0 Waterfall model0 Software qualities

0Object-orientation0 Iterative development

3

Page 4: 15 object orienteddesign

Software Engineering

0Engineering discipline concerned with all aspects of developing and delivering high-quality and useful software in a cost-effective manner

0Defines activities and products.0Defines the software development processes,

which define the order for carrying out the development activities and the criteria for the deliverables of the activities.

4

Page 5: 15 object orienteddesign

Software Development Activities

5

0Requirements analysis0Design0Implementation and unit testing0Integration and system testing0Maintenance

Page 6: 15 object orienteddesign

Requirements Analysis0Goals

0 To define the problem to be solved, i.e., to establish the functions, services, and constraints of the software to be developed.

0Deliverables0 Requirements specifications itemizing the functional and

nonfunctional requirements, called system [requirements] specifications.

6

Page 7: 15 object orienteddesign

Design0Goals

0 To construct a solution to the problem by establishing an overall architecture of the software, by partitioning the software into components, and by identifying the relationships and dependencies among them.

0Deliverables0 System design document and detailed design document, along

with various diagrams.

7

Page 8: 15 object orienteddesign

Implementation and Unit Testing

0Goals0To implement the software design and test each

individual component to ensure that each unit functions properly with respect to its specification before the units are integrated.

0Deliverables0Source code and unit testing documentation

8

Page 9: 15 object orienteddesign

Integration and System Testing

0Goals0 To integrate the individual components and test the

system as a whole to ensure that the entire software system functions properly with respect to its specification.

0Deliverables0 System testing documentation

9

Page 10: 15 object orienteddesign

Maintenance

0Goals0To improve the system after it is already in use, e.g.,

correcting bugs, improving performance, enhancing functions or services, and adapting to new environments.

0Deliverables0New version and documentation of changes

Longest and most costly activity in the software life cycle!

10

Page 11: 15 object orienteddesign

Software Development Processes

Requirmentsalalysis

Maintenance

Integration andsytem testing

Design

Implementationand unit testing

11

Waterfall Model

Page 12: 15 object orienteddesign

Waterfall (Life Cycle) Model

0Characteristics0 Sequential0 Phase based0 Document driven (often called milestone)

0Benefits0 Discipline and formality

12

Page 13: 15 object orienteddesign

Waterfall Model (Cont.)

0Critical evaluation0Linear, rigid, and monolithic0No accommodations for changes

=> Documents are frozen

=> Ideal model

Q: How to accommodate changes?

Incremental (or evolutionary) approach

13

Page 14: 15 object orienteddesign

Software System Qualities0 Usefulness0 Timeliness0 Reliability

0 Correctness, robustness, availability, …0 Maintainability

0 Maintainable, i.e., possible to make corrections, adaptations, and extensions without undue costs.

0 Reusability0 User friendliness0 Efficiency

0 CPU time, memory, and disk space, etc.0 …

14

Page 15: 15 object orienteddesign

Qualities (Cont.)

15

0Are all of these qualities attainable at the same time?

0Are they of equal importance?0If not, which is more important?

Page 16: 15 object orienteddesign

Maintainability Revisited0Maintenance costs far exceed development costs.0Reliability is attained through repeated corrections.

=> must be maintainable!

16

Page 17: 15 object orienteddesign

What Contributes to Maintainability?

0Flexibility0Simplicity0Readability (understandability)

17

Page 18: 15 object orienteddesign

Flexibility0Changeable

0 The various aspects of software systems should be easily changeable.

0Minimal impact 0 Impact of change should be confined to a small region.0 The correctness of the change should be reasoned by

examining only the small affected region rather than the entire software.

18

Page 19: 15 object orienteddesign

Simplicity

0 Impossible to avoid making mistakes0When things are simple

0 Less error-prone0 Easier to show correctness0 Errors become more obvious and correcting errors is

easier. 0Divide-and-conquer approach

19

Page 20: 15 object orienteddesign

Outline

Challenges of software developmentSoftware engineering0Object-orientation0 Iterative development

20

Page 21: 15 object orienteddesign

Modeling the Real World0 A software system provides a solution to a problem in the

real world. 0 It consists of two essential components:

0 Model: abstraction of a part of the real world0 Algorithm: captures the computations involved in

manipulating or processing the model.

21

AlgorithmModel

Software system

Real world

Abstraction

Interpretation

Page 22: 15 object orienteddesign

How to Model Real World?0Programming languages

0 Tools to describe computer models

0Programming models0 Computation-oriented model (50s ~ 60s)0 Data-oriented model (70 ~ 80s)0 Object-oriented model (90s ~ )

0Balanced view between data and computation

22

Page 23: 15 object orienteddesign

Why O-O Model?

0 Possible to directly represent real world objects in the computer system

0 Thus, solves the so-called impedance mismatch problem.

23

Software systemReal world

Data-oriented model

Software systemReal world

Object-oriented model

Page 24: 15 object orienteddesign

Outline

Challenges of software developmentSoftware engineeringObject-orientation0 Iterative development

24

Page 25: 15 object orienteddesign

Iterative Development0Key characteristics0Consists of a number of success iterations0Each iteration produces a working program0Build system incrementally Monolithic approach of waterfall model

0Benefits0Facilitates and manage changes Minimize and prevent changes

0Examples0Rational Unified Process (RUP) 0Extreme Programming (XP)

25

Page 26: 15 object orienteddesign

Object-Oriented Development

0Approach0Focuses on improving the maintainability and

reusability of software systems through a set of techniques, notations, tools, and criteria.

0Activities0Conceptualization0Object-oriented analysis and modeling0Object-oriented design0 Implementation0Maintenance

26

Page 27: 15 object orienteddesign

Detailed Activities0 Conceptualization

0 To establish the vision and core requirements of the software system to be developed.

0 Object-oriented analysis and modeling0 To build models of the system’s desired behavior, using

notations such as the Unified Modeling Language (UML).0 To capture the essential relevant aspects of the real world

and to define the services to be provided and/or the problems to be solved.

0 To simplify reality to better understand the system to be developed.

27

Page 28: 15 object orienteddesign

Detailed Activities0Object-oriented design0To create an architecture for implementation.0Represented in terms of objects and classes and

the relationships among them.

0Implementation:0To implement the design by using an object-

oriented programming language (e.g., Java)

0Maintenance:0To manage postdelivery evolution effectively.

28

Page 29: 15 object orienteddesign

O-O Processes (e.g., RUP)

29