CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.

Slides:



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

UML an overview.
ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Unified Modeling Language
Sucha Smanchat  Steps in OOAD using UML  Use Case Diagram  Sequence Diagram / Communication Diagram  Class Diagram  State.
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
UML – Class Diagrams.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
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 Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
Unified Modeling Language
Unified Modeling Language
Introduction To System Analysis and design
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Introduction to UML By: Prof. Aiman Hanna Department of Computer Science, Concordia University, Montreal, Canada.
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.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
Object-Oriented Analysis and Design An Introduction.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
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.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Copyright © 2013 Curt Hill UML Unified Modeling Language.
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Design Jon Walker. More UML ● What is UML again?
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
CSE 403, Spring 2008, Alverson Using UML to express Software Architecture.
CSE 403, Spring 2007, Alverson Using UML to express Software Architecture.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Introduction to OOAD and the UML
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Unified Modeling Language, Version 2.0 Chapter 2.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 3: Introducing the UML
Fall 2007 Week 9: UML Overview MSIS 670: Object-Oriented Software Engineering.
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.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
IB Computer Science Content developed by Dartford Grammar School Computer Science Department UML.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
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.
Object-Oriented Analysis and Design
Unified Modeling Language
Software Engineering Lecture #11.
Unified Modeling Language
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Introduction to UML Sources:
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
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:

CSE 219 Computer Science III UML

UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent systems visually –provides a system architecture –makes coding more efficient and system more reliable –diagrams show relationships among classes and objects Can software engineering be automated? –Visual programming –Patterns & frameworks –CASE tools

Types of UML Diagrams Use Case Diagram - displays the relationship among actors and use cases Class Diagram - models class structure and contents. Also displays relationships such as aggregation, inheritance, etc … Sequence Diagram – shows interaction among constructed objects Others: –State, Activity, Collaboration, Communication, Component, & Deployment Diagrams

A set of scenarios that describe an interaction between a user and a system UML Use Case Diagrams Done first in a project design –helps you to better understand the system requirements To draw a Use Case Diagram: –List a sequence of steps a user might take in order to complete an action. –Example actor: a user placing an order with a sales company

UML Class Diagrams A UML class diagram consists of one or more classes, each with sections for: –class name –instance variables –methods Lines between classes represent associations –Uses –Aggregation (HAS-A), also known as containment –Inheritance (IS-A)

UML Class Responsibilities Diagrams PairOfDice State Info:die1: Die die2: Die Responsibilities: access instance variables roll dice calculate total Die State Info:number of faces value facing up Responsibilities: access instance variables roll die Class Name Responsibilities to be translated into methods State info to be translated into instance variables

UML Class Diagrams Derived from class responsibilities diagrams Show relationships between classes –Class associations denoted by lines connecting classes –A feathered arrow denotes a one-directional association ClassA Instance variable info Method header info ClassB Instance variable info Method header info Feathered arrow means ClassA knows of and uses ClassC, but ClassC has no knowledge of ClassA ClassC Instance variable info Method header info Connecting line means ClassA and ClassB have a relationship

Method and Instance Variable Descriptions Instance Variables Format –variableName : variableType –For example, upValue : int Method Header Format –methodName(argumentName : argumentType): returnType –For example, setDie1(newDie1 : Die) : void –$ denotes a static method or variable, for example: $ myStaticMethod(x : int) : void

UML Class Diagrams & Aggregation UML class diagram for PairOfDice & Die: Die numFaces: int upValue : int getUpValue() : int getNumFaces() : int roll() : void PairOfDice die1: Die die2: Die getDie1() : Die getDie2() : Die getTotal() : int rollDice() : void setDie1(newDie1: Die) : void setDie2(newDie2: Die) : void 12 Denote multiplicity, 2 Die object for each PairOfDice object Diamond denotes aggregation PairOfDice HAS-A Die

UML Class Diagrams & Inheritance public class Student extends Person Person name: String age : int getAge() : int getName() : String setAge(newAge: int) : void Triangle denotes inheritance Student IS-A Person Student gpa: double getGPA() : double setGPA(newGPA: double) : void

12 Encapsulation We can take one of two views of an object: –internal - the variables the object holds and the methods that make the object useful –external - the services that an object provides and how the object interacts From the external view, an object is an encapsulated entity, providing a set of specific services These services define the interface to the object –abstraction hides details from the rest of the system

Class Diagrams and Encapsulation In a UML class diagram –public members can be preceded by + –private members are preceded by - –protected members are preceded by # Die - numFaces: int - upValue : int + getUpValue() : int + getNumFaces() : int + roll() : void PairOfDice - die1: Die - die2: Die + getDie1() : Die + getDie2() : Die + getTotal() : int + rollDice() : void + setDie1(newDie1: Die) : void + setDie2(newDie2: Die) : void

Interfaces in UML ( 2 ways to denote an interface 1. >, OR 2. >

Abstract Classes in UML ( 2 ways to denote a class or method is abstract: 1.class or method name in italics, OR 2.{abstract} notation

UML Sequence Diagrams Demonstrate the behavior of objects in program –describe the objects and the messages they pass –diagrams are read left to right and descending

UML Sequence Diagrams(Continued) Sequence of messages of a simple Restaurant system. - Patron ordering food and wine - Drinking wine then eating the food, and finally paying for the food.

What will we use UML Diagrams for? Class Diagrams –describe all of our classes for our game