Introduction to UML Lian Yu Department of Computer Science and Engineering Arizona State University Tempe, AZ 85259.

Slides:



Advertisements
Similar presentations
Based on Java Software Development, 5th Ed. By Lewis &Loftus
Advertisements

Unified Modeling Language Philip Liew
Java Software Solutions
Chapter 4: Writing Classes
Problem Solving #1 ICS Outline Review of Key Topics Review of Key Topics Example Program Example Program –Problem 7.1 Problem Solving Tips Problem.
Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al.
Writing Classes in Java
Aalborg Media Lab 28-Jun-15 Software Design Lecture 7 “Object Oriented Design”
Data Analysis (and User Interaction) GEOG 463 5/7/04.
1 Creating Classes. 2 Writing Classes Thus far, we have mainly used existing classes in the Java library  (also main classes for executing) True object-oriented.
Ch4: Software Architecture and Design. 1 The role of analysis and design  Software construction may be partitioned into the following phases:  Req.
1 CSE 403 Design and UML Class Diagrams Reading: UML Distilled Ch. 3, by M. Fowler These lecture slides are copyright (C) Marty Stepp, They may not.
1 TCSS 360, Spring 2005 Lecture Notes Design Phase and UML Class Diagrams Relevant Reading: UML Distilled, Third Edition M. Fowler.
UML January 24, 2011 CSE 403, Winter 2011, Brun Design and UML Class Diagrams.
Unified Modeling Language
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements.
1 (c) elsaddik CSI 1102 Introduction to Software Design Prof. Dr.-Ing. Abdulmotaleb El Saddik University of Ottawa (SITE.
Object Oriented Design and UML
Writing Classes (Chapter 4)
CSE 1301 Lecture 11 Object Oriented Programming Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
1 Announcements Research Paper due Friday November 19 For Wednesday read
CSE 1302 Lecture 7 Object Oriented Programming Review Richard Gesick.
2/9/98 Thomas O’Reilly 1 A Quick UML Introduction.
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
UML DIAGRAMS Unified Modeling Language for Object Oriented Programming Unified Modeling Language for Object Oriented Programming.
1 Object Oriented Design and UML Class Relationships –Dependency –Aggregation –Inheritance Reading for this Lecture: L&L 6.4 – 6.5.
CH06: Considering Objects TECH Computer Science  Set, Class, Type  …of…  Objects, Actors, Agents  Data and Actions Object-Oriented Design and Development.
1 Forward and Reverse Engineering. 2 The UML is not just an OO modeling language. It also permits forward engineering (FE) and reverse engineering (RE).
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
6. Object-Oriented Design Based on Java Software Development, 5 th Ed. By Lewis &Loftus.
31-Oct-15 Simple UML IB Computer Science. 2 What is UML? UML stands for Unified Modeling Language UML is a diagramming language designed for Object- Oriented.
1 Object Oriented Design and UML Class Relationships –Dependency –Aggregation –Interfaces –Inheritance Interfaces Reading for this Lecture: L&L 6.4 – 6.5.
Chapter 6 Object-Oriented Design. © 2004 Pearson Addison-Wesley. All rights reserved6-2 Object-Oriented Design Now we can extend our discussion of the.
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Using COMET with Visio Visio UML Modeling. Creating a Drawing After opening Visio, you will see a list of templates available.
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
Static class members.
© 2004 Pearson Addison-Wesley. All rights reserved September 12, 2007 Encapsulation ComS 207: Programming I (in Java) Iowa State University, FALL 2007.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object Oriented Analysis and Design Class and Object Diagrams.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
1 Object-Oriented Design Now we can extend our discussion of the design of classes and objects Chapter 6 focuses on: software development activities determining.
INFSY 535.  Small systems  Larger systems 1.Understand the program requirement- what 3. Write and test each part (unit testing) 4. Maintenance 2. Specify.
Department of Electrical Engineering and Computer Science University of Central Florida Fall 2014.
Outline Software Development Activities Identifying Classes and Objects Static Variables and Methods Class Relationships Interfaces Enumerated Types Revisited.
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
25/2/16. Software Design (UML) ClassName attributes operations A class is a description of a set of objects that share the same attributes, Operations.
1 Chapter 4: Writing Classes  Chapter 4 focuses on: class definitions encapsulation and Java modifiers method declaration, invocation, and parameter passing.
© 2006 Pearson Education C4 D7 Obj: to describe relationships between objects HW: p.250 #4.19 Do Now: p.248 True/False #4.6 – 4.10.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
© 2004 Pearson Addison-Wesley. All rights reserved November 2, 2007 Class Relationships ComS 207: Programming I (in Java) Iowa State University, FALL 2007.
Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480.
CS 350 – Software Design UML – The Unified Modeling Language – Chapter 2 The Unified Modeling Language is a visual language used to create models of programs.
COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.
Design and UML Class Diagrams
TCSS 305 (Stepp) OO Design with UML Class Diagrams
Unified Modeling Language
Lecture on Design Phase and UML Class Diagrams
Object Oriented Programming
Object Oriented Programming
Chapter 5 – Writing Classes
Outline Anatomy of a Class Encapsulation Anatomy of a Method
Object Oriented Programming Review
Using Diagrams to Represent Program Structure
Introduction to UML Sources:
Chapter 4: Writing Classes
Presentation transcript:

Introduction to UML Lian Yu Department of Computer Science and Engineering Arizona State University Tempe, AZ 85259

UML, UML Diagrams UML stands for the Unified Modeling Language UML diagrams show/visualize relationships among classes and objects Several types of UML diagrams exist, each designed to show specific aspects of object-oriented program design

Class Diagram A UML class diagram consists of one or more classes, each with sections for the class name, attributes, and methods Depending on the goal of the diagram, the attribute and/or methods sections can be left out of any class Lines between classes represent associations Associations/aggregation can show multiplicity

Class Diagram Attributes and methods may be marked as: Private, indicating they are not visible to callers outside the class Protected, they are only visible to children of the class Public, they are visible to all SymbolMeaning +-#+-# Public Private Protected

UML Class Diagrams A UML class diagram for the FlipRace program: FlipRace main (args : String[]) : void Coin face : int flip() : void isHeads() : boolean toString() : String 12

Object Diagram A UML object diagram consists of one or more instantiated objects. It is a snapshot of the objects during an executing program, showing data values coin1 : Coin face = 0 coin2 : Coin face = 1

Association in UML Two classes having a general association Those classes are “aware” of each other Objects of those classes may use each other for the specific services This sometimes is referred to as a use relationship

Association When a class participates in an association, it has a specific role that it plays in that relationship A role is just the face the class at the near end of the association presents to the class at the other end of the association. association role name

Aggregation in UML An aggregate object is an object that contains references to other objects For example, an Account object contains a reference to a String object (the owner's name) An aggregate object represents a has-a relationship A bank account has a name Likewise, a student may have one or more addresses

Aggregation in UML An aggregation association is shown in a UML class diagram using an open diamond at the aggregate end StudentBody + main (args : String[]) : void + toString() : String 12 Student - firstName : String - lastName : String - homeAddress : Address - schoolAddress : Address + toString() : String - streetAddress : String - city : String - state : String - zipCode : long Address

Tools to Draw UML Diagrams Microsoft Visio Rational Rose