Need help understanding uml diagram

T

Tag

Hey, im trying to use a uml diagram to build a simple java program
however my prof is horrible at explaining things. He gave us a uml
diagram but it has no descriptions or information. He wants us to make
a simpl kilometer to mile conversion program, however he has added an
"observer" and i dont not understand what it is suppose to do nor do i
understand one of the classes labeled KMSubject,

Ive uploaded the image here:
http://farm3.static.flickr.com/2248/2285573269_cc20b99592_o.jpg

if anyone could help explain this i would be greatful
 
A

Arne Vajhøj

Tag said:
Hey, im trying to use a uml diagram to build a simple java program
however my prof is horrible at explaining things. He gave us a uml
diagram but it has no descriptions or information. He wants us to make
a simpl kilometer to mile conversion program, however he has added an
"observer" and i dont not understand what it is suppose to do nor do i
understand one of the classes labeled KMSubject,

Ive uploaded the image here:
http://farm3.static.flickr.com/2248/2285573269_cc20b99592_o.jpg

if anyone could help explain this i would be greatful

Talk about over engineering !!

:)

Regarding observer subject then try read:

http://www.javaworld.com/javaworld/javaqa/2001-05/04-qa-0525-observer.html

Arne
 
T

Tag

Talk about over engineering !!

:)

Regarding observer subject then try read:

http://www.javaworld.com/javaworld/javaqa/2001-05/04-qa-0525-observer...

Arne

ok im sorry im still stuck in my understanding. What would my
observers be that i would add to the list in this diagram? When i
notify all observers, will that simply be to tell them to output their
text, or do i notify them to tell them to "start" the calculation? See
my hardest part about this is he provides no documentation and i am
not even sure what is suppsoe to happen where.
 
P

Patricia Shanahan

Tag said:
ok im sorry im still stuck in my understanding. What would my
observers be that i would add to the list in this diagram? When i
notify all observers, will that simply be to tell them to output their
text, or do i notify them to tell them to "start" the calculation? See
my hardest part about this is he provides no documentation and i am
not even sure what is suppsoe to happen where.

Actually, there are some descriptions and documentation - in the UML
boxes. For example, I would put the actual conversion logic in
KMConverterLogic, which is supposed to have methods like mile2kilo. It
does not return a result, but there is a field result and a method
getResult(), so I put the mile2kilo result in the result field, and make
getResult() return the result of the last calculation. Similarly, it
appears that errors should be recorded in errorStatus and returned by
getErrorStatus().

I think you need to go through the UML in detail, looking at each box
the way I looked at KMConverterLogic, treating the identifiers,
parameters, and return types as the documentation.

Patricia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top