UML class diagrams (1) - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

UML class diagrams (1)

Description:

keep OO concepts separate from implementation language. operate at a more abstract level ... The parentheses delimit the argument list of the constructor call. ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 6
Provided by: alph8
Category:
Tags: uml | class | delimit | diagrams

less

Transcript and Presenter's Notes

Title: UML class diagrams (1)


1
UML class diagrams (1)
  • UML Unified Modeling Language
  • We use only class diagrams, not other UML
    diagrams
  • Purpose
  • keep OO concepts separate from implementation
    language
  • operate at a more abstract level than programming
    language, to avoid making implementation
    decisions when designing code

2
UML class diagrams (2)
  • Class box
  • Class name
  • Properties
  • Behaviors
  • Only as much detail as is needed
  • Relationships
  • inheritance
  • implemention
  • composition
  • dependency
  • association

3
UML class diagrams (3)
4
Where do objects come from?
  • Objects are instances of classes
  • We instantiate classes
  • e.g. new chapter1.Terrarium()
  • There are three parts to this expression
  • new
  • chapter1.Terrarium
  • ()

5
The parentheses delimit the argument list of the
constructor call. In this case there are no
arguments being passed along to the constructor,
so the argument list is empty.
new is a reserved word in Java. This means
that the word new has a special meaning in the
Java language.
  • new chapter1.Terrarium()

new is the name of an operator whose job it is
to create an instance of a given class
chapter1.Terrarium is the name of the class we
are instantiating. It is a compound name,
consisting of a package name (chapter1) and the
name of the class constructor (Terrarium),
separated by a dot . A constructor
initializes the state of a newly created object.
Write a Comment
User Comments (0)
About PowerShow.com