Class Diagrams Chapter 3. Classes and Objects Classes are the descriptions –definitions Objects are the things –instances.

Slides:



Advertisements
Similar presentations
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
Advertisements

Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Ch 12: Object-Oriented Analysis
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
© Copyright Eliyahu Brutman Programming Techniques Course.
Lecture a: Additional UML Models: Package, Activity, Deployment Lecture b: Generalization, Aggregation and Additional Domain Model Notation Copyright W.
Use Case Analysis – continued
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
1 CSE 403 Design and UML Class Diagrams Reading: UML Distilled Ch. 3, by M. Fowler These lecture slides are copyright (C) Marty Stepp, They may not.
1 TCSS 360, Spring 2005 Lecture Notes Design Phase and UML Class Diagrams Relevant Reading: UML Distilled, Third Edition M. Fowler.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Business Modeling Domain Modeling Source: Use Case Driven Object Modeling with UML – A Practical Approach By Doug Rosenberg ISBN:
The Unified Modeling Language (UML) Class Diagrams.
Chapter 7 Designing Classes. Class Design When we are developing a piece of software, we want to design the software We don’t want to just sit down and.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
Big Java Chapter 12. Software Process - Waterfall Analysis Design Implementation Testing Deployment Does not work well when rigidly applied! established.
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
IT 21103/41103 System Analysis & Design. Chapter 05 Object Modeling.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
CSC 395 – Software Engineering Lecture 14: Object-Oriented Analysis –or– Ripping the Band-Aid Off Quickly.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
PROG Object Oriented Programming II With Java PROG Object Oriented Programming II With Java Class Relationships.
What is a Structural Model?
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Object Oriented Analysis and Design Class and Object Diagrams.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
12 OBJECT-ORIENTED DESIGN CHAPTER
1 Object-Oriented Design Now we can extend our discussion of the design of classes and objects Chapter 6 focuses on: software development activities determining.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 11 Object-Oriented.
Class diagrams Terézia Mézešová.
1 Unified Modeling Language Michael K. Wildes University of California, Riverside – Extension Program Presentation 2.
Fall 2007 Week 11: Object Modeling (2) Class Diagram MSIS 670: Object-Oriented Software Engineering.
Unified Modeling Language (UML)
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
CS 350 – Software Design UML – The Unified Modeling Language – Chapter 2 The Unified Modeling Language is a visual language used to create models of programs.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Chapter 12 – Object-Oriented Design
TCSS 305 (Stepp) OO Design with UML Class Diagrams
DATA REQIREMENT ANALYSIS
Object-Oriented Analysis and Design
The Object-Oriented Thought Process Chapter 1
Unified Modeling Language
Lecture on Design Phase and UML Class Diagrams
Today in OOAD Today in Lab Review EU-Lease Assignment (Vision)
OBJECT RELATIONSHIPS, ATTRIBUTES, AND METHODS
Class Diagrams – Part I Chapter 3.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Use Case Analysis – continued
ITEC324 Principle of CS III
ITEC324 Principle of CS III
Presentation transcript:

Class Diagrams Chapter 3

Classes and Objects Classes are the descriptions –definitions Objects are the things –instances

CSC535 Objects What’s an object? –It’s a “thing” that interacts with other “things” to address the task at hand –It contains attributes (data items) which represent its current state –It contains methods (functions) which are used to manipulate it

CSC535 Objects What’s an object? –An object is a grouping of attributes and behaviors into a single entity

CSC535 Primary and Support Objects What’s a primary object and what’s a support object? –Primary objects Those that are obvious Those that are fundamental to the system Those on which all team members agree must be included in the system (without persuasion) –Support objects Those that you really have to stretch to come up with Those which cause debates among team members Those which you’re just not sure about

CSC535 Primary and Support Objects Identify primary objects early in the design process –This should be relatively easy Leave the support objects for later (maybe even for the implementation phase) Don’t hesitate to change the list of primary objects as the design progresses –Actually, it’s expected to change –Eventually, they’ll all be primary objects since they compose the running system and without them the system will fail [to compile/link/bind at runtime]

CSC535 Tangible and Intangible Objects What’s a tangible object and what’s an intangible object? –Tangible objects generally represent things (nouns) within the system –Intangible objects generally represent calculations (verbs) within the system –It’s not important to specify whether an object is tangible or intangible –It is important to consider both types of object when identifying objects

CSC535 Object Identification How do you identify objects? –Nouns People Places Things –Things with multiple use –Things that store data or state –Things that are composites of other things –Things that are ancestors of other things –Things that perform a useful function

CSC535 Object to Object Relationships How do objects relate to one another? –Inheritance (“is-a” relationship) –Association/Composition (“has-a” relationship) –Application specific (neither of the above)

CSC535 UML Class Symbol Class In the early stages of the design you should not be overly concerned (or concerned at all?) with the attribute and method fields

CSC535 UML Relationship Symbols Inheritance (Generalization) (“is-a”)

CSC535 UML Relationship Symbols Association/Composition (“has-a”) Containing contains 1 Contained Class object An instance of Contained Class may belong to either Containing Class 1 or 2 but not both

UML Relationship Symbols Association/Composition (“has-a”) –There is also something called aggregation which is nothing more than association –Most use the association arrow and not the aggregation diamond

CSC535 UML Relationship Symbols Application Specific (association) –Use this when two objects are related but not by a “has a” or “is a” – you shouldn’t really need to do this but you might

CSC535 UML Relationship Symbols Dependency

CSC535 Class Diagram The result of identifying objects (classes) and their relationships will be a UML Class Diagram The Class Diagram represents the static (unchanging) nature of the system design –It represents compile-time relationships, not run- time usage We will revisit class diagrams later, adding more detail

CSC535 Object Identification Guidelines Eliminate all preconceived notions. Don’t strive for perfection…yet. Don’t get into heated debates over the inclusion or exclusion of a class…yet. If you do debate, realize the difference between a debate and an argument –Debate – good –Argument – bad Don’t get formal…yet. –Remember that UML can be used in “sketch”, “blueprint”, and “programming language” modes – concentrate on “sketch” right now Don’t toss out far fetched ideas too soon. Remember the difference between interface and implementation –Don’t think about the implementation right now. Think about code reuse. Keep in mind that this is an iterative process.

CSC535 Deliverables