dr. sarah abraham university of texas at austin …€¦ · university of texas at austin computer...

21
Dr. Sarah Abraham University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics CS324e Fall 2017

Upload: doankien

Post on 19-Aug-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Dr. Sarah AbrahamUniversity of Texas at AustinComputer Science Department

UML and System Design

Elements of GraphicsCS324eFall 2017

Page 2: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Student Presentation

Page 3: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

What is UML?

❖ Unified Modeling Language

❖ General-purpose notation for software development

❖ Standard visualization of a system’s design

❖ Allows for easier design and clearer implementation

❖ Provides a common model between programmers to follow project standards

Page 4: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

UML Design

❖ Not code based

❖ Language agnostic

❖ Used beyond code design

❖ Visual depictions of structures and behaviors

❖ Diagrams provide standards depending on purpose

Page 5: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Structural UML Diagrams❖ Describe static or structural aspects of a system

❖ Types of structural diagrams:

❖ Class

❖ Component

❖ Composite Structure

❖ Deployment

❖ Object

❖ Package

Page 6: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Class Diagrams

❖ Describes object-oriented approach to design without any coding

❖ Components represent classes, objects, and interactions between classes and objects

❖ Contains symbols to represent object-oriented concepts and code specifications

Page 7: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

❖ Class name

❖ Class attributes

❖ Shows class fields and types

❖ Class methods (operations)

❖ Shows how class interacts with data

Page 8: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Inheritance

❖ Open arrow points to superclass

❖ Child class assumed to inherit all attributes and methods of parent class

Page 9: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Class Interactions

❖ Models:

❖ Dependencies

❖ Compositions

❖ Relations

❖ Many, many more

Page 10: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Consider…

❖ The Spot class has an (x, y) position and a radius as well as methods display() and move()

❖ How would this look as a UML class diagram?

❖ What would the UML class diagram look like if we create the subclass ColoredSpot that also has a field for color?

Page 11: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Behavioral UML Diagrams❖ Represent dynamic aspects of a system

❖ Types of behavioral diagrams:

❖ Activity

❖ Communication

❖ Interaction Overview

❖ Sequence

❖ State Machine

❖ Timing

❖ Use Case

Page 12: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Activity Diagrams

❖ Provides a flow chart for application functionality

❖ Similar to “wire frames” in design

❖ Useful for describing dynamically-driven systems

❖ Sequential, branching, or concurrent

❖ High level view of the system

Page 13: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy
Page 14: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Sequence Diagrams

❖ Tracks interactions between objects and sending/receiving of messages

❖ Depicts objects in terms of methods and function calls

❖ Lifeline shows creation and deletion of object

❖ Useful for providing detailed description for implementation

❖ Low level view of the system

Page 15: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy
Page 16: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

State Machine Diagrams

❖ Describe the different states of an object throughout its lifetime

❖ Focus on single object rather than entire system

❖ Capture object’s dynamic reactions to events

❖ High or low level view of object

Page 17: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy
Page 18: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Using UML Diagrams❖ Formal diagrams extremely useful for large group projects

❖ Prevents misunderstanding

❖ Diagrams still useful for small group development

❖ Clarifies thoughts

❖ Unifies systems goals

❖ Useful at high and low levels of development

❖ Online programs for drawing (but hand drawn works!)

Page 19: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Question

❖ What are some behavioral diagram types and their properties?

Page 20: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Online UML Diagram Tools

❖ Lucid Chart <https://www.lucidchart.com/>

❖ Gliffy <https://www.gliffy.com/uses/uml-software/>

Page 21: Dr. Sarah Abraham University of Texas at Austin …€¦ · University of Texas at Austin Computer Science Department UML and System Design Elements of Graphics ... Gliffy

Hands-on: Using UML Diagrams❖ Today’s activities:

1. Get together with your group and think about the animation you’d like to create

2. Create a class diagram of an object you might implement for that animation

3. Create either an activity, sequence, or state diagram to capture the flow of the animation and/or user interactions