110 likes | 220 Views
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.
E N D
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 • Object-Oriented Analysis & Design:The application of objects to understanding existing systems, and in specifying new or improved systems • Object Modeling:Technique for identifying objects in the system and the relationships among them
Concepts • Objects: Entities in the environment, capable of being seen, touched, sensed; and of experiencing events. • Attributes: characteristics of objects • Behavior(s): Things an object can do, or you can do to an object: methods • Encapsulation: packaging attributes and methods together in the object.
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.
SSN, Name, Addr, Phone; Employee:Dep, Sal, Ins Faculty:Ten, TrmDeg Students:Maj, Advr, Hrs Admin’r:Level, Vac Classes / Sub & Super Classes
Concepts … • Object/class relationships:Natural relationship among classes, just as in the entity-relationship data model • Messages: How one object interacts with, i.e, how it calls or uses another object • Polymorphism: Behaviors of the same name can differ markedly with objects.“Shut” is a different action for objects door, window, suitcase, drawer, faucet, mouth.
verb Modeling process What do these look like?(Figure 8.8) • Identifying 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 relationships • Object Association Model
Identifying objects • Identify actors (people, places, & things) and use cases (transactions) • Constructing the use casemodel diagram:Which actors involved in which cases • Documenting use case course of events • Name the initiating actor • Generally describe the transaction • Step-by-step process through typical case • Pre-and-post conditions (before and after case) • Assumptions: performance, security, etc. Figure 8.9
Identifying objects … • Identifying use case dependencies showing which case must follow which • 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!) … • Finding potential objects, selecting objects: remove duplicates (synonyms), actors outside the system, non-unique actors, etc…
Organizing objects and relationships • Identify associations and multiplicity:what one object needs to know about or do to (or do with) another object • Identifying generalizations and specializations … subtypes/super-types … as in person employee manager • Identifying aggregation relationships(is part of …), e.g., Truck cab & trailer • Preparing the object association model(Figure 8.16) What does this remind you of?