170 likes | 188 Views
Learn about the essential steps of Object-Oriented Analysis (OOA) and key structures involved in developing robust object diagrams. Discover how to identify objects, define attributes, and establish associations in the OOA process.
E N D
The OOA Process - I Steps and Rules Objects and Structures
The Steps of OOA - Part 1 • identify objects (classes) • identify key structures • generalization - specialization (“ISA”) • whole - parts (“PART-OF”) • association (relationship) • define attributes ===> Static Object Diagram ===> incomplete Object Dictionary
The Steps of OOA - Part 2 • define services via scenarios • services per object • message passing between objects • coordination of message passing • states and transitions ===> Scenarios ===> complete Object Dictionary
OOA - Object • generalization of a set of real-life entities/objects • groups a set of attributes (schema) • can be active (services) • has memory (states) • participates in structures • label: typically a noun • specified in the object dictionary label label
OOA - Object Class & Instance • A symbol for an object class and its object instances. • a description of one or more objects with a uniform set of attributes and services, and the actual object instances belonging to the given class • “usual way” to model an object label
OOA - Object Class • Object Class only • NO instantiations possible • a generalization of one or more objects with a uniform set of attributes and services • can have attributes, services, states • used in classification structures to organize object hierarchies label
OOA - Whole-Part • groups objects by combining smaller parts into larger units • forms a hierarchy by • aggregation • decomposition • cardinalities must be specified (min , max) • no inheritance whole (min,max) (min,max) (min, max) (min, max) part1 part2
OOA - Generalization-Specialization • groups objects based on similarity of attributes and services • forms a class hierarchy by • generalization • specialization • attributes, services, etc. are inherited by the more specialized from the more general objects gen spec1 spec2
Employee Inheritance name address Manager Programmer experience courses list of prg-lang.
Student Employee Multiple Inheritance ==> Inheritance Lattices Major GPA name address Teaching Assistant
obj2 OOA - Association • provides free mapping between objects • complements the two predefined structural types • forms a network of objects by using binary relationship types • cannot carry attributes • supports access to partner-object (via “foreign key”) obj1 (min,max) label (min,max)
Manages which department? Follow association. Since when? Attribute of ...? access Manager Department (1,N) (1,1) manages
OOA - Attributes • exist only as elements of an object • attributes model • the data portion of the object • state information • foreign keys (implement association) • no separate graphical representation (part of the object symbol) • specified in the object dictionary
Scope of Attributes • the data capsule principle • attributes are local to each object • attributes are global to all services in the object
An Attribute’s “Life-Cycle” • During analysis and design we specify the attribute’s type and constraints. • The initial value of an attribute is assigned during the creation of an object instance. • Attribute values can be manipulated only by the object’s local services. • Attributes keep their value until the object instance is explicitly deleted (persistance).
Attributes and Inheritance • are inherited in a classification hierarchy • inheritance is mandatory • multiple inheritance is possible ===> position attributes as high in the classification hierarchy as possible
Attributes in the Object Dictionary • specify for each attribute (= data dictionary) • name • informal description • purpose • range of values • related data items • formal data structure specification (e.g. BNF)