Professional Documents
Culture Documents
Diagrams
Itntroduction to UML by Jan Pettersen Nytun, page 1
LocatedAt * *
3 Diagrams
A diagram is typically a view of a part of the model, showing modeling elements and some of the relationships between them. A diagram do not have to be complete, some elements may be missing or presented in a simplified fashion. UML: A well-formed model is one that is semantically self-consistent and in harmony with all related models.
Itntroduction to UML by Jan Pettersen Nytun, page 3
Static views
Use Case Diagrams Class Diagrams Object Diagrams
Model
include
association
include
use case
system boundary
Itntroduction to UML by Jan Pettersen Nytun, page 5
Person
Register as student
<<become>>
Stude nt
<<becom e>>
Adm
CourseParti cipan t
Instructor
Make/edit course
Lecture r
Course
*
CourseModule
1..* name
Student
Course
*
1..*
CourseModule
name : String description : String
1
Student
Course
Student
* StudentCourseProfile finished : boolean public class Student extends Person {{ public class Student extends Person //// ////Navigation Navigation public StudentCourseProfile[] public StudentCourseProfile[] studentCourseProfile; studentCourseProfile; public Student() {{ public Student() }}
public class Person {{ public class Person protected String name; protected String name; protected String imail; protected String imail; protected String homePage; protected String homePage; //// ////Navigation Navigation protected Course[] responsibleFor; protected Course[] responsibleFor; protected Course[] techResponsibleFor; protected Course[] techResponsibleFor; public Person() {{ public Person() }}
}}
}}
relization
public void read(){ terminal.print("Name: "); name = terminal.readLine(); ... }
relization/implements
Person Register
Storable
SortableRegister
Person
Object
HiA: Company
noOfEmploees=600
object class
Object Diagram
Language:
Department :LocatedAt
Gimlemoen: Office
HiA: Company
LocatedAt Office 1..* Possible object diagram
Engineering :
Department
:LocatedAt
Grooseveien: Office
noOfEmploees = 60 0
HiA:Co ma ny
Gim le mo en:Office
You can not specify attributes inside object; One solution to this short-coming is to use a comment!
controllerViewer
register
create
setData(name, ..)
person
insert(person)
1: register()
user
controllerViewer
1.1: data := getData() 1.4: insert(person)
person
register
Power turned on
Set time
Door closed
Time out
Door open
Simple microwave oven: - Power can be on or off - Time can be set after the power has been turned on
init/init()
Running
stop/ stop() start/start()
Loaded start
/start()
destroy/destroy()
Stopped
controller
person
register
supply person-data
forward person-data
process person-data
insert person
Demo.html
applet2.class
applet2.java
logo.gif
Register.class
ISortable
network LAN
PC
PC
client:
browser:
Internet Internet
Multi-tier Architecture
view: browser/jsp/servlet controller: jsp/servlet model: businessObjects
- MVC -
server1:
:WebServer
:ServletContainer
:html :html
s1:Servlet
s2:Servlet
j1:Jsp
j2:Jsp
Intranet Intranet
b1:BusinessObject b2:BusinessObject
b3:BusinessObject b4:BusinessObject
server2:
:DB
Itntroduction to UML by Jan Pettersen Nytun, page 25
References
[1] Grady Booch, James Rumbaugh and Ivar Jacobson: The Unified Modeling Language User Guide. Addison-Wesley, 1999 James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy and William Lorenzen: Object-Oriented Modeling and Design. Prentice Hall, 1991 Martin Fowler with Kendall Scott: UML Distilled. Addison-Wesley, 1997 Terry Quatrani: Visual Modeling with Rational Rose and UML. Addison-Wesley, 1998 Ari Jaaksi: A Method for Your First Object-Oriented Project. JOOP - The Journal of Object-Oriented Programming, Januar 1998 Rational software: http://www.rational.com/uml/documentation.html
Itntroduction to UML by Jan Pettersen Nytun, page 26