Identifying Object Relationships, Attributes, and Methods

Slides:



Advertisements
Similar presentations
Identifying Object Relationships, Attributes and Methods.
Advertisements

System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Lecture 9 Object-Oriented Analysis
Systems development life cycle & development methodologies
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
7M701 1 Software Engineering Systems Models Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 7 (some items)
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 71 System models l Abstract descriptions of systems whose requirements are being analysed.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 Software Engineering: System Models 14 September 2009.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Chapter 5: Modeling Systems Requirements: Events and Things
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
Systems Analysis and Design in a Changing World, Fifth Edition
OBJECT-ORIENTEDNESS KCDCC. WHAT IS OBJECT-ORIENTEDNESS? KCDCC model system as a collection of interacting objects O-O Modelling O-O Programming similar.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
Chapter 7 System models.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
System models l Abstract descriptions of systems whose requirements are being analysed.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Unit-3 Identifying use cases Object Analysis Classification Identifying Object relationships Attributes and Methods.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
CSC241 Object-Oriented Programming (OOP) Lecture No. 3.
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
1 Class responsibilities & relationships. 2 Responsibilities Responsibilities describe a class’s purpose in terms of its functionality Responsibilities.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Domain Modeling Yonglei Tao.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
MODULE:VII OBJECT ANALYSIS: CLASSIFICATION
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
Extended ER Modelling. Extended E-R Features: Specialization Top-down design process; we designate subgroupings within an entity set that are distinctive.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Identifying Object Relationships, Attributes, and Methods.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
Unit-3 Identifying use cases Object Analysis Classification
Identifying Object Relationships, Attributes and Methods
DATA REQIREMENT ANALYSIS
The Movement To Objects
EKT472: Object Oriented Programming
UNIT-III object-oriented analysis process
Class diagram Description
Abstract descriptions of systems whose requirements are being analysed
OBJECT RELATIONSHIPS, ATTRIBUTES, AND METHODS
ATS Application Programming: Java Programming
Object Oriented Analysis and Design
Domain Class Diagram Chapter 4 Part 2 pp
Understand and Use Object Oriented Methods
Inheritance: Introduction
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
Object Oriented Analysis and Design
Presentation transcript:

Identifying Object Relationships, Attributes, and Methods

Objects Relationships Three types of relationships among objects are: Association. Super-sub structure (also known as generalization hierarchy). Aggregation and a-part-of structure.

Associations A reference from one class to another is an association. Basically a dependency between two or more classes is an association. For example, Jackie works for John.

Associations (Con’t) Some associations are implicit or taken from general knowledge.

Guidelines For Identifying Associations Association often appears as a verb in a problem statement and represents relationships between classes. For example a pilot can fly planes.

Guidelines For Identifying Associations (Con’t) Association often corresponds to verb or prepositional phrases such as part of, next to, works for, contained in, etc.

Common Association Patterns Common association patterns include: Location Association: next To, part of, contained in, ingredient of etc. : For example cheddar cheese is an ingredient of the French soup. The common association patterns are based on some of the common associations defined by researchers and practitioners: Rumbaugh et al., Coad and Yourdon, and others.

Common Association Patterns (Con’t) Communication association—talk to, order to. For example, a customer places an order with an operator person.

Eliminate Unnecessary Associations Implementation association. Defer implementation-specific associations to the design phase. Ternary associations. Ternary or n-ary association is an association among more than two classes

Eliminate Unnecessary Associations (Con’t) Directed actions (derived) associations can be defined in terms of other associations. Since they are redundant you should avoid these types of association.

Eliminate Unnecessary Associations (Con’t) Ex. Grandparent of Ken can be defined in terms of the parent association.

Superclass-Subclass Relationships Sub-classes are more specialized versions of their super-classes.

Guidelines For Identifying Super-sub Relationships: Top-down Look for noun phrases composed of various adjectives on class name. Example, Military Aircraft and Civilian Aircraft. Only specialize when the sub classes have significant behavior.

Guidelines For Identifying Super-sub Relationships: Bottom-up Look for classes with similar attributes or methods. Group them by moving the common attributes and methods to super class. Do not force classes to fit a preconceived generalization structure.

Guidelines For Identifying Super-sub Relationships: Reusability Move attributes and methods as high as possible in the hierarchy. At the same time do not create very specialized classes at the top of hierarchy. This balancing act can be achieved through several iterations.

Guidelines For Identifying Super-sub Relationships: Multiple inheritance Avoid excessive use of multiple inheritance. It is also more difficult to understand programs written in multiple inheritance system.

Multiple inheritance (Con’t) One way to achieve the benefits of multiple inheritance is to inherit from the most appropriate class and add an object of other class as an attribute. In essence, a multiple inheritance can be represented as an aggregation of a single inheritance and aggregation. This meta model reflects this situation. Multiple Inheritance Single Inheritance Aggregation

A-Part-of Relationship - Aggregation A-part-of relationship, also called aggregation, represents the situation where a class consists of several component classes.

A-Part-of Relationship - Aggregation (Con’t) This does not mean that the class behaves like its parts. For example, a car consists of many other classes, one of them is a radio, but a car does not behave like a radio. In Chapter 5, we saw that the UML uses hollow or filled diamonds to represent aggregations. A filled diamond signifies the strong form of aggregation, which is composition. For example, one might represent aggregation such as container and collection as hollow diamonds and use solid diamond to represent composition, which is a strong form of aggregation as in this example.

A-Part-of Relationship - Aggregation (Con’t) Two major properties of a-part-of relationship are: transitivity antisymmetry

Transitivity If A is part of B and B is part of C, then A is part of C. For example, a carburetor is part of an engine and an engine is part of a car; therefore, a carburetor is part of a car.

Antisymmetry If A is part of B, then B is not part of A. For example, an engine is part of a car, but a car is not part of an engine.

Where responsibilities for certain behavior must reside? Does the part class belong to problem domain? Is the part class within the system's responsibilities?

where responsibilities ...(Con’t) Does the part class capture more than a single value? (If it captures only a single value, then simply include it as an attribute with the whole class.) Does it provide a useful abstraction in dealing with the problem domain?

A-Part-of Relationship Patterns 1. Assembly An assembly-Part situation physically exists. For example, a French soup consists of onion, butter, flour, wine, French bread, cheddar cheese, etc.

A-Part-of Relationship Patterns 2.Container A case such as course-teacher situation, where a course is considered as a container. Teachers are assigned to specific courses.

A-Part-of Relationship Patterns 3.Collection-Member A soccer team is a collection of players.