COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science Week 6 Lecture.

Slides:



Advertisements
Similar presentations
Chapter 7 Understanding More Complex Requirements Models Using Generalization / Specialization and Whole-Part Hierarchies.
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Using UML, Patterns, and Java Object-Oriented Software Engineering Requirements Analysis (Part 1 – Object Modeling)
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5: Analysis, Object Modeling.
Feb. 13, 2001CSci Clark University1 CSci 250 Software Design & Development Lecture #9 Tuesday, Feb. 13, 2001.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML First Pass: Class Diagrams Battery load()
Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 5, Analysis.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Object Modeling.
Modeling Structure – Class Diagram. Class Diagram.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
Unified Modeling Language
Requirements - 1.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Lecture 6 Requirement analysis Functional Modeling Object Modeling Dynamical Modeling Non-functional requirements Slides adopted from the book and lecture.
程建群 博士(Dr. Jason Cheng) 年03月
Requirements Analysis
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
SOFTWARE DESIGN RAJIKA TANDON
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
Sept. 18, 2003CS WPI1 CS 509 Design of Software Systems Lecture #3 Thursday, Sept. 18, 2003.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
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.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Object Modeling (2) Chapter 3 (2) Part 1: Modeling Concepts Object-Oriented Modeling and Design Byung-Hyun Ha
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
What is a Structural Model?
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.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
CH-4 Advanced class modeling. BookChapter N composed-of Booch BookChapter composed-of UML 1* Figure 2-7. Example of describing a model with two different.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 26, 2001 Analysis.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
UML Review Overview: modeling with UML  What is modeling?  What is UML?  Use case diagrams  Class diagrams  Sequence diagrams  Activity diagrams.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
1 ODB Design Handling Inheritance in ODL M. Akhtar Ali School of Informatics.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
DOMAIN CLASSES – PART 1 BTS430 Systems Analysis and Design using UML.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Business Process and Functional Modeling
UML Diagrams: Class Diagrams The Static Analysis Model
Visit for more Learning Resources
UML Class Diagrams (more notation)
Software Lifecycle Activities
The OO Solution The OO model closely resembles the problem domain
Chapter 2, Modeling with UML
Object Oriented Analysis and Design
Software Engineering Lecture #11.
SYS466 Domain Classes – Part 1.
Chapter 5, Analysis: Object Modeling
Software Lifecycle Activities
Presentation transcript:

COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science Week 6 Lecture

Definition: Object Modeling w Main goal: Find the important abstractions w What happens if we find the wrong abstractions? Iterate and correct the model w Steps during object modeling 1. Class identification Based on the fundamental assumption that we can find abstractions 2. Find the attributes 3. Find the operations/methods 4. Find the associations between classes w Order of steps secondary, only a heuristic w Iteration is important

UML: Class and Instance Diagrams Inspector joe: Inspector mary: Inspector anonymous: Inspector Class Diagram Instance Diagram

Attributes and Values name:string age: integer Inspector name = “Joe” age = 24 joe:Inspector name = “Mary” age = 18 mary: Inspector

1-to-1 and 1-to-many Associations Has- capital One-to-one association One-to-many association City name:String WorkOrder schedule() Task x: Integer y: Integer z: Integer * Country name:String

Aggregation w Models "part of" hierarchy w Useful for modeling the breakdown of a product into its component parts (sometimes called bills of materials (BOM) by manufacturers) w UML notation: Like an association but with a small diamond indicating the assembly end of the relationship.

weight Automobile serial number year manufacturer model color drive purchase Aggregation Engine horsepower volume on off 3,4,5 Wheel diameter number of bolts 2,4 Door open close Battery amps volts charge discharge * Brakelight on off

Inheritance w Models "kind of" hierarchy w Powerful notation for sharing similarities among classes while preserving their differences w UML Notation: An arrow with a triangle Cell MuscleCellBloodCellNerveCell StriateSmoothRedWhitePyramidalCortical

Object Types w Entity Objects Represent the persistent information tracked by the system (Application domain objects, “Business objects”) w Boundary Objects Represent the interaction between the user and the system w Control Objects: Represent the control tasks performed by the system w Having three types of objects leads to models that are more resilient to change. The boundary of a system more likely to change than the control of the system

Example: 2BWatch Objects w UML provides several mechanisms to extend the language w UML provides the stereotype mechanism to present new modeling elements Attach meta information to a diagram inside > tags Naming conventions good for clarity > Year > Month > Day > ChangeDateControl > LCDDisplayBoundary > ButtonBoundary

Roles w A role name is the name that uniquely identifies one end of an association. w A role name is written next to the association line near the class that plays the role. w When do you use role names? Necessary for associations between two objects of the same class Also useful to distinguish between two associations between the same pair of classes w When do you not use role names? If there is only a single association between a pair of distinct classes, the names of the classes serve as good role names

Example of Role Problem Statement:A person assumes the role of repairer with respect to another person, who assumes the role of inspector with respect to the first person. Person * Creates Workorders inspector repairperson * Creates Workorders Person

Qualification w The qualifier improves the information about the multiplicity of the association between the classes. w It is used for reducing 1-to-many multiplicity to 1-1 multiplicity With qualification: A directory has many files, each with a unique name Without qualification: A directory has many files. A file belongs only to one directory. DirectoryFile filename Directory File filename 1*

Example Problem Statement:A stock exchange lists many companies. However, a stock exchange lists only one company with a given ticker symbol.A company may be listed on many stock exchanges, possibly with different ticker symbols. Find company with ticker symbol AAPL. StockExchange Company tickerSym ** lists

Use of Qualification reduces multiplicity StockExchangeCompany tickerSym StockExchange Company tickerSym **

Object Modeling in Practice: Heuristics w Explicitly schedule meetings for object identification w Try to differentiate between entity, boundary and control objects w Find associations and their multiplicity Unusual multiplicities usually lead to new objects or categories w Identify Aggregation w Identify Inheritance: Look for a Taxonomy, Categorize w Allow time for brainstorming, Iterate, iterate

Identifying Associations w Examine verb phrases for association roles w Use qualifiers when possible to reduce multiplicities w Avoid “ravioli” models Too many associations can get too complex Delete redundant associations (i.e. too many paths between two types of object) FieldOfficerEmergency Report Incident writes reports triggers (Can remove 1 of the 3 associations) *

Identifying Attributes w Examine possessive or adjective phrases E.g. the description “of an emergency” w Represent the stored state of an entity object as attribute variables w If an attribute could be made an object, use an association to the object instead (e.g. aggregation) w The details will likely change, so wait until the analysis model is stable before describing all of the details