The Object-Oriented Thought Process Chapter 09

Slides:



Advertisements
Similar presentations
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Advertisements

Analysis Modeling.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
System Analysis - Data Modeling
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
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.
Software Engineering Chapter 8 Fall Analysis Extension of use cases, use cases are converted into a more formal description of the system.Extension.
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
Putting together a complete system Chapter 10. Overview  Design a modest but complete system  A collection of objects work together to solve a problem.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
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.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Lecture 6: Structural Modeling
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 3: Modeling Data in the Organization
Modeling data in the Organization
Object Oriented Systems Design
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Business System Development
Business Process and Functional Modeling
UML Diagrams: Class Diagrams The Static Analysis Model
Chapter 8: More About OOP and GUIs
Databases Chapter 16.
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
The Object-Oriented Thought Process Chapter 1
Analysis and Design with UML: Discovering Classes and Relationships
OO Domain Modeling With UML Class Diagrams and CRC Cards
Abstract descriptions of systems whose requirements are being analysed
OBJECT RELATIONSHIPS, ATTRIBUTES, AND METHODS
Analysis and Design with UML: Discovering Classes and Relationships
Analysis and Design with UML: Discovering Classes and Relationships
UML Diagrams: The Static Model Class Diagrams
Domain Class Diagram Chapter 4 Part 2 pp
Chapter 6 System and Application Software
CSCI 1260 – Lecture 2: Instantiation, Aggregation, and Composition
The Object-Oriented Thought Process Chapter 07
Database Systems: Design, Implementation, and Management Tenth Edition
Use Cases.
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter 20 Object-Oriented Analysis and Design
INFS 6225 Object Oriented Systems Analysis & Design
Understand and Use Object Oriented Methods
Chapter 3: Modeling Data in the Organization
CHAPTER 9 (part a) BASIC INFORMATION SYSTEMS CONCEPTS
Analysis and Design with UML: Classes and Relationships
Chapter 4 Entity Relationship (ER) Modeling
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 6 System and Application Software
Chapter 6 System and Application Software
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Entity Relationship (ER) Modeling
Chapter 6 System and Application Software
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
ITEC324 Principle of CS III
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
The OOTP is intended to get you thinking about how OO concepts are used in designing object-oriented systems. Note: not talking about OO technologies that.
Presentation transcript:

The Object-Oriented Thought Process Chapter 09 Building Objects and Object- Oriented Design

How Objects Are Related Both inheritance and composition represent ways that objects interact. When inheritance is used, the end result is, at least conceptually, a single class that incorporates all the behaviors and attributes of the inheritance hierarchy. When composition is used, one or more classes are used to build another class.

Composition Relationships The reason to use composition is that it builds systems by combining less complex parts. This is a common way for people to approach problems. Studies show that even the best of us can keep, at most, seven chunks of data in our short-term memory at one time.

Is-a and Has-a For consistency, we stick with phrases like “is-a animal” and “has a engine,” Even though “is a animal” and “has an engine” are grammatically correct. We do this because I want to simply state the rules as “is-a” and “has-a.”

Building in Phases Another major advantage in using composition is that systems and subsystems can be built independently. Perhaps more importantly, tested and maintained independently. For large software systems to work properly and be easily maintained, they must be broken into smaller, more manageable parts.

Types of Composition Generally, there are two types of composition: association and aggregation. In both cases, these relationships represent collaborations between the objects. In many designs, both association and aggregation are used.

Is Composition a Form of Association? Some texts say that composition is a form of association, and some say that an association is a form of composition. In any event, in this book, we consider inheritance and composition the two primary ways to build classes. In this book, association is considered a form of composition.

Aggregations Perhaps the most intuitive form of composition is aggregation. Aggregation means that a complex object is composed of other objects. When you go into an appliance store, the salesperson does not say, “Let me show you this aggregation of microchips, a picture screen, a tuner, and so on.” The salesperson says, “Let me show you this TV.”

Associations Associations present both the whole and the parts. As stated in the stereo example, the various components are presented separately and connect to the whole by use of patch cords (the cords that connect the various components).

Aggregation Versus Association An aggregation is a complex object composed of other objects. An association is used when one object wants another object to perform a service for it.

Using Associations and Aggregations Together A computer system is used to describe associations and also contains some aggregation. Although the interaction between the computer box, the monitor, the keyboard, and the mouse is association, the computer box itself represents aggregation. You see only the computer box, but it is actually a complex system made up of other objects, including chips, motherboards, video cards, and so on.

Avoiding Dependencies When using composition, it is desirable to avoid making objects highly dependent on one another. One way to make objects very dependent on each other is to mix domains. In the best of all worlds, an object in one domain should not be mixed with an object in another domain, except under certain circumstances. .

Cardinality Cardinality is defined as the number of objects that participate in an association and whether the participation is optional or mandatory. Which objects collaborate with which other objects? How many objects participate in each collaboration?

Cardinality Notation The notation of 0 . . . 1 means that an employee can have either zero or one spouse. The notation of 0 . . . n means that an employee can have any number of children from zero to an unlimited number. The n basically represents infinity.

Optional Associations One of the most important issues when dealing with associations is to make sure that your application is designed to check for optional associations. This means that your code must check to see whether the association is null.