Class Diagram Details CS 124.

Slides:



Advertisements
Similar presentations
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.
Advertisements

CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
UML – Class Diagrams.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
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.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Object-Oriented Analysis and Design
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements.
Introduction to Java Class Diagrams. Classes class Account { … } Account.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
UML Review – class diagrams SE 2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
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.
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 Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
Using COMET with Visio Visio UML Modeling. Creating a Drawing After opening Visio, you will see a list of templates available.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Design Model Lecture p6 T120B pavasario sem.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Class diagrams Terézia Mézešová.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
INFSY 535.  Small systems  Larger systems 1.Understand the program requirement- what 3. Write and test each part (unit testing) 4. Maintenance 2. Specify.
Inheritance and Subclasses CS 21a. 6/28/2004 Copyright 2004, by the authors of these slides, and Ateneo de Manila University. All rights reserved L16:
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.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
UML Review – class diagrams SE-2030 Dr. Mark L. Hornick 1.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 Classes and Objects Patrick Bailey Keith Vander Linden Calvin College.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Appendix A: UML Java Software Structures: Designing and Using Data.
COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Method – Notation 8 Hours.
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Business System Development
Unified Modeling Language
UML Class Diagrams (more notation)
Chapter 16 UML Class Diagrams.
Unified Modeling Language—UML A Very Brief Introduction
Class Diagrams.
Today’s Objectives Define the Problem Domain
Packages, Interfaces & Exception Handling
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
CS 174: Server-Side Web Programming February 12 Class Meeting
UML Diagrams: The Static Model Class Diagrams
Object Oriented Analysis and Design
The Basics of Class Diagrams for a single class
Software Engineering Lecture #11.
Object Oriented Analysis and Design Using the UML
UML Class Diagram.
Unified Modelling Language
Class and Object Diagrams
Understand and Use Object Oriented Methods
Business Analysis More on Classes Chris Russell O2.41
Copyright 2007 Oxford Consulting, Ltd
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
Static Modeling using Class Diagrams
Chapter 16 Class Diagrams.
Object Oriented System Design Class Diagrams
The generalization of class
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Class Diagram Details CS 124

Perspectives Level of detail in UML diagrams is often dependent on perspective taken Perspectives Conceptual: Analysis; focus on domain, mapping with code not strict Specification: Design; focus on interfaces, implicit code consequences Implementation: Development; focus on code details

Class Details For conceptual perspective, class names are often sufficient For specification and implementation perspectives, class details are often provided BankAccount BankAccount deposit() withdraw() BankAccount balance:double deposit() withdraw()

Attributes visibility name:type = initial-value Example - balance:double = 0 means a balance variable is private, of type double, and is initialized to 0 Some portions (e.g., visibility, type, or initial value) may be suppressed depending on perspective and emphasis Visibility: + public, - private, # protected / means the attribute can be derived from other attributes or associations

Operations / Methods visibility name(parameter-list):return-type Examples + withdraw( amount: double ) + getBalance(): double Some portions may be suppressed depending on perspective and emphasis Visibility: + public, - private, # protected

Attribute and method specifiers/constraints Underline name and type if attribute or method is static (class-level) Use property-list (enclosed in curly braces) to provide further specifications (also called constraints) BankAccount balance: double minBalance: double = 1000 {frozen} addAccount() deposit() withdraw() getBalance() {query}

Class variations If the class is an interface For abstract classes Italicize class name and prefix with <<interface>> Or, use lollipop notation Implementing classes connected using a realization (like generalization but with dotted line) For abstract classes Italicize and indicate {abstract} Italicize abstract methods

Associations There are several options when specifying associations Particularly for many-to-many associations Using an association class Using a qualified association Promote the association class to a full class Attributes versus associations

Aggregations Aggregation (hollow diamond) versus composition (filled diamond) Composition: part lives and dies with the whole Possibility of having a * multiplicity on the side of the composite Perhaps an association is better in this case Safest way through: always use aggregation  even when the parts are strict

Generalization Single versus multiple classifications Use of discriminators for multiple classifications Constraints (e.g., {complete})