Lab 04.

Slides:



Advertisements
Similar presentations
1 Object-oriented design Part 2: OO tools & UML. 2 CRC cards Design tool & method for discovering classes, responsibilities, & relationships Record on.
Advertisements

Object-Oriented Analysis and Design: Object Modeling – Class Diagrams
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Ch 12: Object-Oriented Analysis
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2005] February 12, 2009.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2002] February 27, 2007.
Page 1  Copyright © 1997 by Rational Software Corporation Class Diagrams A class diagram shows the existence of classes and their relationships in the.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
Page 1 What is the UML? UML stands for Unified Modeling Language The UML combines the best of the best from – Data Modeling concepts (Entity Relationship.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
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: 
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Developed by Reneta Barneva, SUNY Fredonia for CSIT 425 Requirements Modeling.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
©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.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
UML Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
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.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
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.
Design Jon Walker. More UML ● What is UML again?
Design Model Lecture p6 T120B pavasario sem.
Relationships Relationships between objects and between classes.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
Page 1  Copyright © 1997 by Rational Software Corporation Putting the UML to Work The ESU University wants to computerize their registration system –
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
Inf 43: Introduction to Software Engineering May 7, 2016.
Appendix 3 Object-Oriented Analysis and Design
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Business System Development
Chapter 5: Structural Modeling
Class Diagrams.
Design (2).
Entity-Relationship Model
Introduction to Unified Modeling Language (UML)
UML SEQUENCE AND CLASS DIAGRAMS
UML Diagrams: The Static Model Class Diagrams
Object Oriented Analysis and Design
CS 426 Senior Projects Chapter 9: Relationships
Object Oriented Analysis and Design Using the UML
Systems Analysis and Design With UML 2
UML Class Diagram.
Introduction to Unified Modeling Language (UML)
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

Lab 04

What is Class diagram? A class diagram shows the existence of classes and their relationships in the logical view of a system UML modeling elements in class diagrams are: Classes, their structure and behavior. relationships components among the classes like association, aggregation, composition, dependency and inheritance Multiplicity and navigation indicators Role names or labels.

Major Types of classes: Concrete classes A concrete class is a class that is instantiable; that is it can have different instances. Only concrete classes may be leaf classes in the inheritance tree. Abstract classes An abstract class is a class that has no direct instance but whose descendants classes have direct instances. An abstract class can define the protocol for an operation without supplying a corresponding method we call this as an abstract operation. An abstract operation defines the form of operation, for which each concrete subclass should provide its own implementation.

RELATIONSHIP: Association Aggregation Composition Inheritance Dependency Instantiation

ASSOCIATION: These are the most general type of relationship: It denotes a semantic connection between two classes It shows BI directional connection between two classes It is a weak coupling as associated classes remain somewhat independent of each other Example: CUSTOMER ATM system

AGGREGATION: This is a special type of association The association with label “contains” or “is part of” is an aggregation It represents “has a “ relationship It is used when one object logically or physically contains other The container is called as aggregate It has a diamond at its end The components of aggregate can be shared with others It expresses a whole - part relationships

AGGREGATION: Example: ATM card Customer

COMPOSITION: Window Client Area This is a strong form of aggregation It expresses the stronger coupling between the classes The owner is explicitly responsible for creation and deletion of the part Any deletion of whole is considered to cascade its part The aggregate has a filled diamond at its end Window Client Area

INHERITANCE: The inheritance relationship helps in managing the complexity by ordering objects within trees of classes with increasing levels of abstraction. Notation used is solid line with arrowhead,shown below. Generalization and specialization are points of view that are based on inheritance hierarchies. Account CurrentAccount SavingAccount

DEPENDENCY: Client Server Dependency is semantic connection between dependent and independent model elements. This association is unidirectional and is shown with dotted arrowhead line. In the following example it shows the dependency relationship between client and server. The client avails services provided by server so it should have semantic knowledge of server. The server need not know about client. Client Server

INSTANTIATION This relationship is defined between parameterized class and actual class. Parameterized class is also referred as generic class. A parameterized class can’t have instances unless we first instantiated it Example: Queue<int> Queue Element

What is Cardinality? : Definition: Number of instances of each class involved in the dialogue is specified by cardinality. Common multiplicity values: Symbol Meaning 1 One and only one 0..1 Zero or one M…N From M to N (natural integer) 0..* From zero to any positive integer 1..* From one to any positive integer Also thought can be given about navigability to every applicable relationship.

Reaching the class diagram: In collaboration diagram we have shown the objects, their interaction and detailed message signature. This information is carried forward to the class diagram. At this point,we group the similar objects and form classes. Messages get mapped to responsibilities for respective classes. Find the attributes for every class. Transform the links to appropriate relationships. Relationship is further refined with respect to multiplicity and navigability. This complete procedure brings the minimal class diagram [for withdraw cash use case, normal flow.]

Class diagram [for withdrawal of cash, normal flow] Customer 1 1 1..* 1..* 1..* 1..* ATMSystem 0..* 0..* Transaction 1 1 1 1 1..* 1..* Bank[Branch] 1 1

What more to the Class Diagram? Till this slide we have worked out the essentials of class diagram for withdrawal of cash use case, normal flow of events. Similar exercise required to be carried out for every scenario and clubbed all in the class diagram. At this point, we refine this integrated class diagram to add further fine details. Approximate sketch for this class diagram has been shown at the end of this module. Refinement attributes should be updated right from sequence diagram to class diagram. Next few slides will take into the discussion of refinement attributes. This process of iterative and incremental development will continue till there is no change in two consecutive iteration.