The Unified Modeling Language (UML) Class Diagrams.

Slides:



Advertisements
Similar presentations
Modeling Main issues: What do we want to build How do we write this down.
Advertisements

UML (cont.) “The Unified Modeling Language User Guide” by G. Booch, J. Rumbaugh and I. Jacobson ● Classes ● Relationships ● Class diagrams ● Examples.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
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.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Lecture 12: Chapter 22 Topics: UML (Contd.) –Relationship Structural Behavioral –Diagram Structural Behavioral.
UML – Class Diagrams.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Unified Modeling Language
Object-Oriented Analysis and Design
UML Diagrams Computer Science I.
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
CS 3610: Software Engineering – Spring 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
Chapter 16 Applying UML and Patterns Craig Larman
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.
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.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Design Jon Walker. More UML ● What is UML again?
Design Model Lecture p6 T120B pavasario sem.
Software Engineering Lecture 8 Object-Oriented Analysis.
UML / UML 2.0 Diagrams (Part I) 1. Overview of the 13 diagrams of UML Structure diagrams 1.Class diagram 2.Composite structure diagram (*) 3.Component.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 15 The Unified Modeling Language: a Primer.
Chapter 12 Object-oriented design for more than one class.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Association / Aggregation / Composition and inheritance
Class diagrams Terézia Mézešová.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Basic Characteristics of Object-Oriented Systems
UML (Unified Modeling Language)
Object-Oriented Programming
Object-Orientated Analysis, Design and Programming
UML Diagrams: Class Diagrams The Static Analysis Model
The Movement To Objects
Main issues: • What do we want to build • How do we write this down
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Chapter 11 Object-Oriented Design
Unified Modeling Language
UML Class Diagrams: Basic Concepts
UML Diagrams: The Static Model Class Diagrams
UML Class Diagram.
Understand and Use Object Oriented Methods
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object Oriented System Design Class Diagrams
Presentation transcript:

The Unified Modeling Language (UML) Class Diagrams

Unified Modeling Language A standardized modeling language for the conceptualization and design of software systems Two types of diagrams: structure diagram and behavior diagram There are a lot of diagram types in the UML (14 types!) but we will focus only on a few in this class

Common Structure Diagrams Class Diagram – Illustrates classes, with attributes and methods, along with their relationships – We will focus primarily on class diagrams, since they are by far the most commonly used Component Diagram – Illustrates how components (each with an API or similar connecting interface) interfaces with other components Object Diagram – Illustrates the objects instantiated in a system at a single point in time Package Diagram – Illustrates the packages in a system and their dependencies

Common Behavior Diagrams Activity Diagram – A “flow chart” of sorts Interaction Diagram – The message sequence chart is one type of interaction diagram Use Case Diagram – Represents dependencies among use cases State Machine Diagram – Displays states and transitions

UML Diagrams are related Each diagram is a different view of a system These classes belong to those packages.

A Class Class/Object Name Attributes Methods/Operations A class name should be descriptive (Italic if abstract) The attributes of a class defines its properties, what data the class stores The methods/operations of a class specify what the class does

Visibility of Attributes and Methods

Associations

Specific Associations: Aggregate Aggregations – “has a” relationships – A class is a container of other classes – Does not imply ownership, (ie. when the “parent” gets destroyed, the aggregates do not) – Ex: A magazine has articles, but if the magazine goes out of business, the articles don’t necessarily disappear (they may live on as part of another publication)

Specific Associations: Composite Composition – combining simple objects into a more complex whole – Can have multiple objects composed into one – Implies an “owns a” relationship – If the parent is destroyed, all its composites are typically destroyed – Ex: If we delete the article we no longer care about Facebook comments on the article

Difference between Composition and Aggregation Composition: – Composed of multiple parts – Parts have no independent existence – The structured whole makes the object Aggregation: – Does not imply ownership – Parts have independent existence – May be called a composition if the distinction is not important

Generalization/Specialization Generalization: “a parent” Specialization: “a child”, inherits from a general class

Realization (Implementation) Relationship where one class (the client) implements another (the supplier) Represented with a dashed line from the implemented class to the implementation

Dependencies A “using” relationship specifying that a change in the specification of one thing may affect another thing that uses it Common when the client class: – Uses a supplier class that has global scope – Uses a supplier class as a parameter – Uses a supplier class as a local variable – Sends a message to the supplier

UML Examples This level of detail is usually reserved for the Design and Implementation phases – Deliverable 3: design – Deliverable 4: implementation You will not need to add all of these details in your Deliverables 2 or 3

Source: bigelow.ch

Combinations of UML Diagrams A class might have behavior attached to it Behavior specified usually through a UML activity diagram or a UML state diagram