11
Object Modeling J. Stephen Schiavo Missouri Southern State University

Object Modeling

Embed Size (px)

DESCRIPTION

Object Modeling. J. Stephen Schiavo Missouri Southern State University. Object Modeling. Definition Concepts Objects, attributes, methods, encapsulation Classes, generalization, specialization Object/class relationship Messages Polymorphism Modeling process. Definition. - PowerPoint PPT Presentation

Citation preview

Page 1: Object Modeling

Object Modeling

J. Stephen SchiavoMissouri Southern State University

Page 2: Object Modeling

Object Modeling

DefinitionConcepts

Objects, attributes, methods, encapsulationClasses, generalization, specializationObject/class relationshipMessagesPolymorphism

Modeling process

Page 3: Object Modeling

Definition

Object-Oriented Analysis & Design:The application of objects to understanding existing systems, and in specifying new or improved systemsObject Modeling:Technique for identifying objects in the system and the relationships among them

Page 4: Object Modeling

Concepts

Objects: Entities in the environment, capable of being seen, touched, sensed; and of experiencing events.Attributes: characteristics of objectsBehavior(s): Things an object can do, or you can do to an object: methodsEncapsulation: packaging attributes and methods together in the object.

Page 5: Object Modeling

Concepts …

Classes: set of objects with common attributes and behaviors.

Retail Stores, Students, Vehicles, …

Generalization: gathering common aspects of similar classes to form a super-type

Specialization: distinguishing one instance of a class by adding or modifying attributes or methods to create a subtype.

Page 6: Object Modeling

Classes / Sub & Super Classes

Students:Maj, Advr, Hrs

Faculty:Ten, TrmDeg

Admin’r:Level, Vac

Employee:Dep, Sal, Ins

SSN, Name, Addr, Phone;

Page 7: Object Modeling

Concepts …

Object/class relationships:Natural relationship among classes, just as in the entity-relationship data modelMessages: How one object interacts with, i.e, how it calls or uses another objectPolymorphism: Behaviors of the same name can differ markedly with objects.“Shut” is a different action for objects door, window, suitcase, drawer, faucet, mouth.

Page 8: Object Modeling

Modeling processIdentifying objects

Use case (‘yooss’ case)modeling – scenarios

Use case: sequence of steps in a task

Actor: anything interacting with system;a user or role; internal, or external

Organizing objects and relationshipsObject Association Model

What

do t

hese l

ook li

ke?

(Figu

re 8.

8)

verb

Page 9: Object Modeling

Identifying objects1. Identify actors (people, places, & things)

and use cases (transactions)2. Constructing the use case model diagram:

Which actors involved in which cases3. Documenting use case course of events

a. Name the initiating actorb. Generally describe the transactionc. Step-by-step process through typical cased. Pre-and-post conditions (before and after case)e. Assumptions: performance, security, etc.

Figure 8.9

Page 10: Object Modeling

Identifying objects …

4. Identifying use case dependencies showing which case must follow which

5. Document alternative course of events for non-typical situations: an order from a credit-impaired client; booking a flight for a disabled person or for a VIP ( or for a disabled VIP!) …

6. Finding potential objects, selecting objects: remove duplicates (synonyms), actors outside the system, non-unique actors, etc…

Page 11: Object Modeling

Organizing objects and relationships1. Identify associations and multiplicity:

what one object needs to know about or do to (or do with) another object

2. Identifying generalizations and specializations … subtypes/super-types … as in person employee manager

3. Identifying aggregation relationships(is part of …), e.g., Truck cab & trailer

4. Preparing the object association model(Figure 8.16) What does this remind you of?