UML – Class Diagrams.

Slides:



Advertisements
Similar presentations
UML (cont.) “The Unified Modeling Language User Guide” by G. Booch, J. Rumbaugh and I. Jacobson ● Classes ● Relationships ● Class diagrams ● Examples.
Advertisements

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.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Unified Modeling Language
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Object-Oriented Analysis and Design
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Chapter 14 (Web): Object-Oriented Data Modeling
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Unified Modeling Language (UML)
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Chapter 14: Object-Oriented Data Modeling
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
UML CLASS DIAGRAMS. Basics of UML Class Diagrams What is a UML class diagram? Imagine you were given the task of drawing a family tree. The steps you.
Systems Analysis and Design in a Changing World, Fifth Edition
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.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 Object-oriented and Structured System Models.
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.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Chapter 16 Applying UML and Patterns Craig Larman
® 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.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
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.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
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?
Object-Oriented Data Modeling
Design Model Lecture p6 T120B pavasario sem.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
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.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
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.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Unified Modeling Language (UML)
Object-oriented and Structured System Models
The Movement To Objects
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Object-Oriented Techniques
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Software Architecture & Design Pattern
ניתוח מערכות מידע א' הרצאה 3
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
Unified Modeling Language
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Software Design Lecture : 14.
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

UML – Class Diagrams

Objectives What is UML? UML Diagrams Use Case Diagram Class Diagram

What is UML? The Unified Modeling Language (UML) is a standard  language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. UML uses graphical notations to express the design of software projects. Modeling is necessary for readability and reuse of systems.

UML Diagrams UML modeling consists of nine different diagrams to model a software system. Each UML diagram is designed to let developers and customers view a software system from a different perspective and in varying degrees of abstraction.

UML Diagrams Use case Diagram Class Diagram Object Diagram State Diagram Activity Diagram Sequence Diagram Collaboration diagram Component diagram Deployment diagram

Use case Diagram Use case diagram displays the relationship among actors and use cases. Actors: An actor is any entity that performs certain roles in a given system. For example, In a banking application, a customer entity represents an actor. Similarly, the person who provides service at the counter is also an actor.

Use case Diagram Use Case: A use case in a use case diagram is a visual representation of a distinct business function in a system. For example, In a banking application, a deposit function represents a use case. To identify use cases, you should list the discrete business functions the user might do in order to complete an action. For a banking application it might be: deposit money withdraw money

Use case Diagram

Class Diagram Class diagrams model class structure and contents using design elements such as classes, packages and objects. A class diagram is a diagram showing a collection of classes and interfaces, along with the collaborations and relationships among classes and interfaces. A class diagram is composed of: Class: A class has a business functionality called methods, and properties that reflect unique features of a class. The properties of a class are called attributes.

Class Diagram For example: Let us take a class named Student. The Student class encapsulates student information such as student id #, student name, and so forth. Student id, student name, and so on are the attributes of the Student class. The Student class also exposes functionality to other classes by using methods such as getStudentName(), getStudentId(), and the like. Let us take a look at how a class is represented in a class diagram.

Class Diagram The following diagram shows a typical class in a class diagram:

Elements of a Class Diagram Attributes correspond to the class level variables (but not variables declared within the body of a method). Operations correspond to methods in Java. Public members (attributes or operations) can be referenced directly by any classes in this or any other model package (more on packages later). Private members can only be referenced in the same class where they’re declared. Protected members can be referenced in the same class or in any descendants of that class (more on inheritance later). Package scope members can be referenced by any classes in the same UML package only.

Access Specifiers

Static Members Static members can be referenced without instantiating the class to which they belong. In UML, static members are underlined.

Abstract Classes Abstract classes are partially implemented and force us to extend it before we can use its functionality. In class diagrams, the name of an abstract class is specified in italics Abstract methods that must be implemented in subclasses of the abstract class are again specified in italics.

Dependencies A dependency is a using relationship that states that a change in a specification of one thing may effect another thing that uses it You will use dependencies in the context of classes to show that one class uses another class as an argument in its method’s signature.

Generalization A generalization is a relationship between a general thing (a superclass) and a more specific kind of that thing (a subclass). It is a is-a-kind-of relationship.

Association An association represents a relationship that specifies that objects of one thing are connected to objects of another.

Aggregation An association in which one class represents a larger thing, which consists of smaller things is called an aggregation relation It is a has-a relationship meaning an object of the whole has objects of the part.

Composite In a composite aggregation, an object may be a part of only one composite at a time. For example, a Frame belongs to exactly one Window. In simple aggregation, a part may be shared by several wholes. For example a Wall may be a part of one or more Room objects.

Realization-Interfaces A realization relationship shows that one class implements the interface of another class. A realization can be represented in two ways. Design View (canonical form) System’s Implementation View (elided form)

Realization

Packages

Package - Client

Package - Policies

Package - GUI