Engineering Quality Software

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design: Object Modeling – Class Diagrams
Advertisements

Chapter 14 (Web): Object-Oriented Data Modeling
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Chapter 14: Object-Oriented Data Modeling
Chapter 14: Object-Oriented Data Modeling
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
Jerry KotubaSYST39409-Object Oriented Methodologies1 Object Oriented Methodologies Week04.
Copyright Flying Kiwi Productions Inc. 1 An Introduction to Object-Oriented Analysis Objects and UML in plain English. Chapter.
Session 11 The Class Diagram: Aggregation and Generalization Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented.
R McFadyen Chapter 7 Conceptual Data Modeling.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
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.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Jerry KotubaSYST39409-Object Oriented Methodologies1 Object Oriented Methodologies Week05/06.
Object-Oriented Data Modeling
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
LESSON05 Jerry Kotuba Object Oriented Methodologies 1.
Database Design – Lecture 12 Object Oriented Database Design cont’d.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi © 2013 Pearson.
Object Oriented Methodologies
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
UML Class & Object Diagram I
Enhanced Entity-Relationship (EER) Model
Unified Modeling Language (UML)
Object-Oriented Modeling
Unified Modeling Language Tutorial
Enhanced Entity-Relationship and Object Modeling Objectives
© Shamkant B. Navathe CC.
Sachin Malhotra Saurabh Choudhary
DATA REQIREMENT ANALYSIS
The Movement To Objects
EER Model – Chapter
Session 2 Welcome: The sixth learning sequence
OBJECT ORIENTED CONCEPT
Visit for more Learning Resources
Chapter 5: Structural Modeling
Class Diagrams.
Systems Analysis and Design With UML 2
Unified Modeling Language
Enhanced ER Modeling Transparencies
Class diagram Description
System Modeling Chapter 4
UML Class Diagrams: Basic Concepts
Object Oriented Analysis and Design
Domain Class Diagram Chapter 4 Part 2 pp
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
Object Oriented Analysis and Design Using the UML
Software Engineering Lecture 10.
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Chapter 8 Properties of Objects and Classes
UML Class & Object Diagram I
Copyright 2007 Oxford Consulting, Ltd
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Appendix A Object-Oriented Analysis and Design
Enhanced Entity-Relationship (EER) Modeling
Chapter 4 System Modeling.
Appendix A Object-Oriented Analysis and Design
Introduction to Object-Oriented Software Development
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
From Class Diagram to Contract Diagram
Presentation transcript:

Engineering Quality Software Week09

SYST30009 - Engineering Quality Systems Agenda This week Review last class Class Diagrams Sheridan SYST30009 - Engineering Quality Systems

Class Diagrams Learning Objectives Construct a class diagram from a narrative including relationships and multiplicities. Identify and represent inheritance hierarchies in a class diagram. Learn what is meant by a concrete and/or abstract class. How to determine and note the constraints for generalization / specialization relationships. Learn how to describe Whole-to-Part relationships on a class diagram. How to draw all these relationships using System Architect. Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Class Diagrams Document the static structure of the system They define what classes there are and how they are related The symbol on the right defines the data and behaviour encapsulated by a class. Objects “know things and know how to do things!” Sheridan SYST30009 - Engineering Quality Systems

Using System Architect Demo exercise Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Types of Objects From last class… Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Objects- Review We need to know what types of things the user works with routinely. Many types Tangible Intangible Important to include information from all types of users Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Jacobson’s Three Types Of Objects Entity Interface Control Sheridan SYST30009 - Engineering Quality Systems

Attributes & Behaviors Behavior (methods & operations) Real world Data world Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Class Diagram Showing Two Classes Object Diagram with Two Instances Sheridan SYST30009 - Engineering Quality Systems

Associations/Relationships relationship among object classes solid line connecting classes association is named i.e. drives where line connects to class is called “association role” Sheridan SYST30009 - Engineering Quality Systems

Associations with Multiplicity * * shows number of objects in an association lower..upper bound bounds are inclusive 2..5 0..1 = optional one 0..* = optional many 1..* = many 1 = exactly one * * * * * * Sheridan SYST30009 - Engineering Quality Systems

The complexity of the Many-to-many relationships Examples Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Your turn… SLATE – Lesson 08 Class Diagram Exercises Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Subclasses Some instances of a class (subclass) may be grouped together based on features not shared by the rest of the class. Attributes Behavior Relationships Key verb is “isakinda” (and inverse, “canbea”). Sheridan SYST30009 - Engineering Quality Systems

Subclasses and Inheritance A subclass is made up of selected instances from another class, the “Parent class” or “superclass.” A superclass includes all the instances of the subclass, plus possibly more as well. Sheridan SYST30009 - Engineering Quality Systems

Subclasses and Inheritance Each subclass then adds attributes and behaviors that it needs but the other one doesn’t. Inheritance is when a subclass instance, in addition to the attributes and behavior it has by virtue of being in the subclass, also has all the attributes and behavior that instances of the superclass have. Sheridan SYST30009 - Engineering Quality Systems

Subclasses and Inheritance The subclass relationship actually is a relationship in the way we have used that word. It requires a verb (one in each direction). “isakinda” “canbea” isakinda canbea Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Object-Oriented To be considered truly O-O, a language, database, etc. must support: Objects, Classes, Inheritance, and Polymorphism Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems With subclasses, we can show more detail about relationships on our diagram. For instance, in most companies, only managers can hire and fire. In other words, only certain kindsa employees can do certain tasks. (only a baker can bake) We are able to show that some relationships affect only a subclass, not every instance. Subclasses Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems Your turn… SLATE- Inheritance Exercise Sheridan SYST30009 - Engineering Quality Systems

Generalization, Inheritance & Constraints generalization path solid line with hollow arrowhead pointing from subclass to superclass indicate basis of generalization name the path for the attribute being removed = called the discriminator discriminator shows which property is abstracted by a generalization relationship Sheridan SYST30009 - Engineering Quality Systems

Constraints on Generalization constraints on the subclasses overlapping: descendent may be descended from more than one of the subclasses student can be both a research and teaching assistant disjoint: descendent may not be descended from more than one of the subclasses patient can not be both out and resident Sheridan SYST30009 - Engineering Quality Systems

Constraints on Generalization complete: all subclasses are listed only have out and resident patients incomplete: all subclasses are not listed more subclasses are available can have casual, part-time employees Sheridan SYST30009 - Engineering Quality Systems

Whole-to-Part Associations The UML provides ways to model two types of whole-to-part associations – aggregation and composition. Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009-Engineering Quality Software Definitions aggregate: In an aggregation, the class representing the whole. aggregation: An association between classes representing a part-to-whole relationship in which the parts and the whole may exist independently and in which a single part may be associated with more than one whole at the same time. Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009-Engineering Quality Software Definitions…cont’d composite: In a composition, a class representing the whole. composition: An association between classes representing a whole-to-part relationship in which the parts may belong to only one whole at a time and the whole does not exist without its parts. Jerry Kotuba SYST30009-Engineering Quality Software

Example of an Aggregation . Jerry Kotuba SYST30009-Engineering Quality Software

Example of a Composition . Jerry Kotuba SYST30009-Engineering Quality Software

Aggregation and Composition . Jerry Kotuba SYST30009-Engineering Quality Software

Categories of Whole-to-Part Associations There are three relationships that sometimes occur in an object model: Assemblies of parts Members of groups Containers and their contents You may find these useful for making your model a better tool for understanding and communication. The model can always be built without these. They do not really affect its use for system design, just for talking to the users. Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009-Engineering Quality Software Assemblies of parts Taking something apart into its components is a technique we humans often use to understand how something works. Often we find it improves our understanding to model A product and its components A business consists of branches, departments, etc. A country consists of states, provinces, counties, boroughs, shires, towns, villages, cities, etc. Jerry Kotuba SYST30009-Engineering Quality Software

Containers and their contents Container-Contents is a different and less common relationship. In some situations we may find it helpful to view a relationship as one of these, e.g., Truck or Aircraft and the Products or Shipments that it carries An actual shipping container and the goods it holds A ship, bus or airplane and its passengers A building and the businesses it houses. Jerry Kotuba SYST30009-Engineering Quality Software

Assemblies of parts Vs Containers and their contents A Container, however, is still a perfectly good Container, even without its Contents The jar is still OK even without the “hunny.” And the Contents are perfectly OK without the Container (although the “hunny” might get all over one’s paws!) The essential difference between these relationships is that: With Assemblies of parts, if you take the component away, the assembly (whole) probably won’t work any more Take a wheel off a car Take a hand off a clock Take a leg off a table. Jerry Kotuba SYST30009-Engineering Quality Software

Collection-Member (members of groups) Collection-Member is also a different and relatively uncommon relationship. Sometimes we meet an actual collection: A library full of books An art gallery A stamp or jewelry collection A fleet of trucks, ships or aircraft Other times it may help to use this to describe: A place of worship, club or regiment and its members An inventory of furniture or equipment A herd, mob, flock, school or skein of animals. Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009-Engineering Quality Software How to show it in SA… Draw the usual association link. The “edit” the Association link and under the “aggregation” column select “aggregate” for Basic or “composite” for Composition Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009-Engineering Quality Software Your Turn… Think about a book, which consists of a cover, table of contents, chapters and an index. Chapters in turn have pages, paragraphs and words. Show the special case of association between classes described here including the multiplicity. Jerry Kotuba SYST30009-Engineering Quality Software

SYST30009 - Engineering Quality Systems Your turn… SLATE – ICE04 & ICE05 Vehicle Registration System Sheridan SYST30009 - Engineering Quality Systems

SYST30009 - Engineering Quality Systems What Comes Next? State Diagrams Sheridan SYST30009 - Engineering Quality Systems