Docsity

Java Code Stubs for UML Diagrams: Creating Classes and Shapes, Study notes of Computer Science

Toggle sidebar
bg1
1/14/2009
1
Static UML to code
Write Java Code Stubs for this
diagram
+getSalary()
-Name
-Address
-City
-State
-Zip
-Occupation
Person
Write Java Code Stubs for this
diagram
+getSalary()
-Name
-Address
-City
-State
-Zip
-Occupation
Person
-Title
-PayGrade
-JobCode
Occupation
-Has
*
-Job
0..1
Write Java Code Stubs for this
diagram
Student Class
-Has
11
Write Java Code Stubs for this
diagram
Student Class
-Has
1*
Student Class
-Has
1*
Write Java Code Stubs for this
diagram
Student Class
11
Student Class
**
pf3

Partial preview of the text

Download Java Code Stubs for UML Diagrams: Creating Classes and Shapes and more Study notes Computer Science in PDF only on Docsity!

Static UML to code

Write Java Code Stubs for this

diagram

+getSalary()

-Name

-Address

-City

-State

-Zip

-Occupation

Person

Write Java Code Stubs for this

diagram

+getSalary()

-Name -Address -City -State -Zip -Occupation

Person

-Title -PayGrade -JobCode

Occupation -Has

-Job

Write Java Code Stubs for this

diagram

Student -Has Class

Write Java Code Stubs for this

diagram

Student -Has Class

Student -Has Class

Write Java Code Stubs for this

diagram

Student Class

Student Class

Write Java Code Stubs for this

diagram

Student Grade

Need to show the constructors here.

Write Java Code Stubs for this

diagram

Node

1

Write Java Code Stubs for this

diagram

+draw()

Shape

Square

Identify abstract and concrete methods and attributes

Write Java Code Stubs for this

diagram

+draw()

Shape

Square

Identify abstract and concrete methods and attributes

Circle

Write Java Code Stubs for this

diagram

+draw()

Shape

Square Circle

Container

1 *

show the creation of circle show the inovcation of circle's draw method

Write Java Code Stubs for this

diagram

Expression Term

1 1..

Factor

1

1..

(^1) FactorExpr Identifier

1