IS514Slide 1 IS514 Lecture Week 7 Class Diagrams II.

Slides:



Advertisements
Similar presentations
Systems Analysis and Design with UML Version 2.0, Second Edition
Advertisements

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
IS514 Lecture Week 9 CRC Cards.
Object-oriented modeling Class/Object Diagrams
© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 1: Requirements and Classes Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented.
IS0514Slide 1 IS0514 Lecture Week 4 Use Case Modelling (2)
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Lecture 12: Chapter 22 Topics: UML (Contd.) –Relationship Structural Behavioral –Diagram Structural Behavioral.
Essentials of class models. 2 A very simple class model In UML, a class is shown in a class diagram as a rectangle giving its name.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 The.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Slide 8B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Object Oriented Software Development Class diagrams: Towards implementation OOSAD Booklet Chapter 4 Seminar: Week 4 Brian Farrimond.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
03/12/2001 © Bennett, McRobb and Farmer Activity Diagrams Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
MORE ON CLASS MODELS Lecture Outline Aggregation and composition Roles Navigability Qualified association Derived association Constraints Association.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
03/12/2001 © Bennett, McRobb and Farmer Use Case Diagrams Based on Chapter 6 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Database Design Concepts Lecture 7 Introduction to E:R Modelling Identifying Entities.
Unified Modeling Language
IS0514 Lecture Week 3 Use Case Modelling.
IS0514Slide 1 IS0517 Lecture Week 8 Class Diagrams III.
ZEIT2301 Design of Information Systems Structural Design: Class Diagrams School of Engineering and Information Technology Dr Kathryn Merrick.
Chapter 13 (Online): Object-Oriented Databases
IS0514 Lecture - Week 2 Best Practice Development Methodology.
Chapter 1: Introduction to Systems Analysis and Design
IS0514Slide 1 IS0514 Lecture Week 5 Introduction to Object Orientation.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Training: INSPIRE Basics EC JRC 1/15 UML class diagram: example INSPIRE UML class diagram for administrative units.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
Lab 04.
Structural Modeling Chapter 7
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
IS0514Slide 1 IS0514 Lecture - Week 1 (Semester 2) Business Systems Development Tools and Techniques.
Class diagram. Purpose of Structural Models Class diagrams represent –Generic Categories (classes) of things (objects) –Define relationships among Generic.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
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.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan,
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
Design Model Lecture p6 T120B pavasario sem.
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
Chapter 12 Object-oriented design for more than one class.
PowerPoint Presentation for Dennis, Wixom & Tegardem Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Class diagrams Terézia Mézešová.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Fundamentals, Design, and Implementation, 9/e Appendix B The Semantic Object Model.
DBMS ER model-2 Week 6-7.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.
1 Chapter 13: Class Diagram Chapter 19 in Applying UML and Patterns Book.
Chapter 5: Structural Modeling
ER Diagrams ● Many different notations are available ● From wikipedia:wikipedia: Entity-relationship modelwikipedia: Entity-relationship model ● How do.
Chapter 12 – Object-Oriented Design
Business System Development
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
IS0514 Lecture Week 3 Use Case Modelling.
Copyright 2007 Oxford Consulting, Ltd
Object Oriented System Design Class Diagrams
Presentation transcript:

IS514Slide 1 IS514 Lecture Week 7 Class Diagrams II

IS514Slide 2 So far Identifying –Classes –Attributes –Operations How to draw basic class diagrams This week –Types of relationships –Multiplicity

IS514Slide 3 Relationships Classes do not exist in isolation It is important to consider how they –Interact –Relate Tend to be VERBS Five principal types of relationships

IS514Slide 4 Type One - Dependency Where one class must know about another Example: – Prospective student knows of a course Not commonly used Used more commonly in design / implementation –Java – import javax.swing.*;

IS514Slide 5 Type Two - Association Classes associated with / related to one another Example –Student studies a course Very Commonly used “Default” type of relationship Student Course studies►

IS514Slide 6 Type Three - Aggregation Classes made up of other classes “Part of” relationship Objects of classes that can exist in their own right Example –Student is a member of a seminar group SeminarGroup Student memberOf ►

IS514Slide 7 Type Four - Composition Class is an integral part of another “Integral part of” relationship Object of classes that cannot exist without the other Example: –Seminar is delivered for a Module Seminar Module deliveredFor ►

IS514Slide 8 Type Five Inheritance Specialisation / generalisation between two classes Example –Part Time Student is a type of Student StudentPartTimeStudent

IS514Slide 9 Creating a Class Diagram Adding relationships Last week we drew a class diagram for a Cinema Update the diagram to include the relationship types

IS514Slide 10 One Solution Film title producer length certificate genre Ticket price time film ◄ for AdultPatron Patron name age buyTicket() seeFilm() ChildPatron of ►

IS514Slide 11 Exercise A garage sells cars, accessories and car parts. The garage sells sport cars, sports utility vehicles and saloon cars. In groups of 3-4 spend 5 minutes –Draw the class diagram for this scenario –Include relationships –Include relationship types –Ignore attributes and operations

IS514Slide 12 One Solution SportsUtilitySportsCar SaloonCar CarParts Car Accessories parts accessories

IS514Slide 13 Exercise Consider Checkers game. Draw the class diagram for it –Include relationships –Include relationship types –Ignore attributes and operations ckers/Checkers.html

IS514Slide 14 Exercise Solution Square Board 64 1 WhiteChe cker WhiteSquare RedChecker BlackSquare Checker On Square

IS514Slide 15 Alternative Naming of relationships Role names can be used instead of relationship names Write role name at either end SquareBoard +theBoard +theSquare

IS514Slide 16 Multiplicity Relationships have a multiplicity Documents how many instances of a class may be associated with instances of another class Numbers placed on relationship to denote –Minimum –Maximum SquareBoard 164 +theBoard+theSquare 1

IS514Slide 17 Multiplicity using multiplicity we can specify :- –an exact number simply by writing it –a range of numbers using two dots between a pair of numbers –an arbitrary, unspecified number using a *

IS514Slide 18 Exercise Example 1 A Student takes up to six Modules where at most 25 Students can be enrolled on each Module. A Student must study at least one Module. Modules will not run if less than 12 Students study them. Example 2 An Order has to come from a single Customer and a Customer may make several Orders over time. Each of these Orders has several Order Lines, each of which refers to a single Product.

IS514Slide 19 Exercise Solutions Exercise 1 Exercise 2 What is missing? Relationship names

IS514Slide 20 This weeks reading ESSENTIAL READING Dennis A, Wixom B, and Tegarden D (2005) System Analysis and Design with UML version 2 second edition, Wiley Chapter 7 Further reading Bennett, S., McRobb, S. and Farmer, R. (2002) Object- Oriented Systems Analysis and Design using UML, 2nd Edition, McGraw-Hill Pages

IS514Slide 21 Summary Types of associations –Dependency –Association –Aggregation –Composition –Inheritance Multiplicity Next Week – more class diagrams including –Association Classes –Object Diagrams –Constraints –Visibility