Docsity

Simple UML - Advance Java Web Technology - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Simple UML - Advance Java Web Technology - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Simple UML

What is UML?

  • UML stands for Unified Modeling Language
  • UML is a diagramming language designed for Object-Oriented programming
  • UML can be used to describe:
    • the organization of a program
    • how a program executes
    • how a program is used
    • how a program is deployed over a network
    • …and more

UML is complex

  • UML is a big, complicated diagramming language
  • UML comprises at least seven or eight different kinds of diagrams
  • This talk will cover just a tiny bit of one kind of diagram, the class diagram
  • A class diagram is often all that is needed to describe a particular Design Pattern

Class diagrams

  • A class diagram shows classes, interfaces, and their relationships
  • We’ll cover most of classes and interfaces, and a few of the most important relationships

Variables I

  • A variable is written as: visibility name : type where:
  • + means public visibility
  • # means protected visibility
  • - means private visibility
  • means default (package) visibility
  • Example: +length:int

Variables II

  • Static variables are underlined
  • An initial value can be shown with = value
  • Example: -numberOfEmployees:int=

means numberOfEmployees is:

  • private
  • static
  • integer
  • and has 10 as its initial value Docsity.com

Example of a class

Card

cardId:int -copy:boolean=false

«constructor» Card(int id) +isKind(desiredKind:int) +isSharable():boolean +toString():String

Types of relationships

A

B

Class B extends class A

C

D

1..

Class C contains 1 to 4 objects of class D

Factory

Product

creates

Other kinds of relations

UML tools

  • Rational Rose is the “real world” standard; full round-trip code generation - Recently acquired by IBM (right under Microsoft’s nose!)
  • Together (from Borland) is a lot like Rational Rose - I haven’t used it in about three years (since before Borland bought it from TogetherSoft)
  • ArgoUML looks interesting (and is open source)
  • BlueJ, of course, displays simple UML diagrams

Tool links

  • Rational Rose
    • http://www- 3.ibm.com/software/awdtools/developer/rosexde/
  • Together
    • http://www.borland.com/together/
  • ArgoUML
    • http://argouml.tigris.org
  • Visio
    • Hard to find info on Microsoft’s site!
    • http://msdn.microsoft.com/office/understanding/visio/
  • Dia
    • http://www.lysator.liu.se/~alla/dia Docsity.com