Object-Oriented Software Engineering

handprintSoftware and s/w Development

Nov 18, 2013 (3 years and 9 months ago)

62 views

1

Object
-
Oriented Software
Engineering

CIS 375

Bruce R. Maxim

UM
-
Dearborn

2

OO Concepts
-

1


Object


encapsulates both data (attributes) and data
manipulation functions (called methods,
operations, and services)


Class


generalized description (template or pattern) that
describes a collection of similar objects


Superclass


a collection of objects


Subclass


an instance of a class

3

OO Concepts
-

2


Class hierarchy


attributes and methods of a superclass are
inherited by its subclasses


Messages


the means by which objects exchange information
with one another


Inheritance


provides a means for allowing subclasses to reuse
existing superclass data and procedures


provides mechanism for propagating changes

4

OO Concepts
-

3


Polymorphism


mechanism that allows several objects in
an class hierarchy to have different
methods with the same name


instances of each subclass will be free to
respond to messages by calling their own
version of the method

5

Advantages of OO Architectures


Implementation details of data and
procedures hidden from the outside world


reduces propagation of side effects after changes


Data structures and operators are merged in
single entity or class


this facilitates reuse


Interfaces among encapsulated objects are
simplified


reduces system coupling

6

Class Construction Options
-

1


Build new class from scratch without using
inheritance


Use inheritance to create new class from
existing class contains most of the desired
attributes and operations


Restructure the class hierarchy so that the
required attributes and operations can be
inherited by the newly created class

7

Class Construction Options
-

2


Override some attributes or operations in an
existing class and use inheritance to create a
new class with (specialized) private versions
of these attributes and operations.

8

Object
-
Oriented Evolutionary
Process Model


Customer communication


Planning


Risk analysis


Engineering construction and analysis


Customer evaluation

9

Object
-
Oriented Software
Construction


Identify candidate classes


Look
-
up classes in library


Extract classes if available


Engineer classes if not available


Object
-
oriented analysis (OOA)


Object
-
oriented design (OOD)


Object
-
oriented programming (OOP)


Object
-
oriented testing (OOT)


Put new classes in library


Construct Nth iteration of the system

10

Class Candidates


External Entities


devices or people


Things in Problem Domain


Reports, displays, signals


Events


completion of some task


Roles


manager, engineer, salesperson


Organizational Units


divisions, groups, teams


Structures


sensors, vehicles, computers

11

Criteria for Including Objects



Does object information need to be retained?


Does object provide a set of needed services that
can change its attributes?


Does object have major (important) attributes?


Can you identify common attributes for all object
instances?


Can you identify common operations for all object
instances?


Is it an external entity that produces or consumes
information?

12

Object
-
Oriented Life Cycle Model

13

Management of OO Projects


Establish a common process framework
(CPF).


Use CPF & historic data to eliminate
time & effort.


Specify products & milestones.


Define Q.A. checkpoints.


Manage changes.


Monitor project.

14

OO Project Milestones


Contracts completed.


OO Analysis completed.


OO Design completed.


OO Programming completed.


OO Testing completed.

15

OO Project Metrics


Number of scenario scripts.


Number of key classes.


Number of support classes.


(# key classes)/(# support classes).


Number of major iterations (around
spiral model).


Number of completed contracts.

16

OO Estimation
-

1

1.
Use some effort decomposition technique
(e.g. FP) to determine size estimates.

2.
Use O.O.A. to develop scenario scripts and
count them.

3.
Use O.O.A. to get the number of key
classes.

4.
Categorize types of the user interfaces to
determine support class multiplier:

NoUI = 2.0 TextUI = 2.25 GUI = 2.5 Complex GUI = 3.0

17

OO Estimation
-

2

5.
Estimate the number of support classes

# support classes = (# of key classes) * (UI #)

6.
Estimate total effort

Total effort =

(key + support) * (average # of work units per class)

7.
Cross check class based estimate (6) using

Total effort =

(avg. # of work units per script) * (# of scenario scripts)


Note: takes 15
-
20 days to complete each class.