+ All Categories
Home > Documents > Ch02-Approaches to System Development

Ch02-Approaches to System Development

Date post: 14-Apr-2018
Category:
Upload: mad2k
View: 221 times
Download: 0 times
Share this document with a friend
27
Chapter 2:  Approaches to S ystem Development : Object Orientation
Transcript
Page 1: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 1/27

Chapter 2:

 Approaches to System

Development :

Object Orientation

Page 2: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 2/27

Chapter 2

What Is an Object?

An entity that encapsulates data and

 behavior 

- Objects are categorized into classes

- Each individual object is an instance of a

class

Page 3: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 3/27

Chapter 2

What Is Encapsulation?

The characteristic of object-orientation in

which data and behavior are bundled into a

class and hidden from the outside world

Access to the data and behavior is provided

and controlled through an object’s interface 

Page 4: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 4/27

Chapter 2

What Is a Class?

• A category of objects that share the same

attributes, operations, relationships, and

semantics

• All objects are instances of classes

Page 5: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 5/27

Chapter 2

Name

Attributes

Operations

Page 6: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 6/27

Chapter 2

What Is an Attribute?

• Attribute- a named property of a class that

describes a range of values that instances of 

the attribute might hold

• Attributes are the way classes encapsulate

data

Page 7: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 7/27

Chapter 2

Attributes are properties containing values

Minus sign

indicates

these are

private

(hidden)

Page 8: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 8/27

Chapter 2

What Is an Operation?

A behavior of an object

Implemented in classes are methods

Methods are identified and invoked by their  signatures, including name, parameters, and

return type

Page 9: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 9/27

Chapter 2

Signature has

name, parameters,

return type

Methodimplements

the behavior

Page 10: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 10/27

Chapter 2

Plus sign

indicates

these are

public(accessible)

Page 11: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 11/27

Chapter 2

What Is Generalization?

A relationship between a more general (or 

 parent) class and a more specific (or child)

class

The more specific class has additional

attributes and operations

Page 12: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 12/27

Chapter 2

What Is Inheritance?

The mechanism by which the more specific

class in a generalization relationship

includes the attributes and operations of themore general class

Page 13: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 13/27

Chapter 2

Generalization

represented by

arrows from

subclass to

superclassSubclasses

inherit all

attributes and

operations of 

superclasses

Page 14: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 14/27

Chapter 2

What Is Polymorphism?

The ability for different classes of objects to

respond to identical messages in different

ways

Polymorphism = “having many forms” 

Different behaviors for the same message

Page 15: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 15/27

Chapter 2

Here, eachtype of 

vehicle has

its own

version of 

calcPrice()

Page 16: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 16/27

Chapter 2

What Is a Component?

A replaceable part of a system

 providing a clearly defined function

through a set of interfaces

Group of classes working together toward a common end; a subsystem

Page 17: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 17/27

Chapter 2

What Is an Interface?

The mechanism by which users of a

component invoke its behaviors and

manipulate its properties

The interface is implemented by method

signatures

Page 18: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 18/27

Chapter 2

Interfaces arerepresented

as small

rectangles

Page 19: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 19/27

Chapter 2

What Is an Association?

A relationship or link between instances of (or objects) of classes

Three types:

 –  Simple associations: no ownership

 –  Aggregations : part-whole relationships where the partcan exist independently of the whole

 –  Compositions : part-whole relationships where the partand the whole are fully dependent on each other 

Page 20: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 20/27

Chapter 2

This is a binary association, showing roles and multiplicities

roles

multiplicities

Page 21: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 21/27

Chapter 2

Systems Modeling

Systems modeling – creating an abstraction of a

system

Abstraction – focusing on the relevant aspects andignoring other details

UML is a modeling approach, involving these

diagrams:

 –  Use-case, sequence, communication, class, object,

activity, state, composite structure, package,

component, deployment

Page 22: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 22/27

Chapter 2

Unified Modeling Language

(UML) A standard notation for representing object-

oriented systems

Boxes represent classes, components, packages,objects –  Containing attributes and operations

 –  Provide interfaces to external entities

Lines represent generalization and other relationships

Page 23: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 23/27

Chapter 2

Sample

UML

Diagram

Page 24: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 24/27

Chapter 2

UML Diagrams

Use-case diagram – shows use cases, actors, andrelationships describing user interactions withsystem

Sequence diagram – shows interactions of objectsvia message-passing in time-ordered manner 

Communication diagram – similar to sequencediagram, but without the time-ordering

Page 25: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 25/27

Chapter 2

UML Diagrams

Class diagram – shows set of classes and

relationships (generalizations and associations)

Object diagram – shows specific instances of a

class diagram

Activity diagram – shows flow of activities, or 

wokflow of objects

Page 26: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 26/27

Chapter 2

UML Diagrams (cont.)

State diagram – shows transitioning of an object

from state to state in response to events

Composite structure diagram – shows how a

component whole is made up of its parts

Package diagram – shows logical grouping of 

analysis or design elements

Page 27: Ch02-Approaches to System Development

7/27/2019 Ch02-Approaches to System Development

http://slidepdf.com/reader/full/ch02-approaches-to-system-development 27/27

Chapter 2

UML Diagrams (cont.)

Component diagram – shows software

components or modules and their 

relationships

Deployment diagram – shows configuration

of runtime processing nodes and their components


Recommended