This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes UML sequence diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "UML sequence diagram" Watch "UML sequence diagram" New topic
Author

UML sequence diagram

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
from the attached UML sequence diagram, what class / method / business logic you will implement ?

Thanks


[Thumbnail for Screen Shot 2013-06-24 at 8.02.03 PM.png]

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

I don't understand what you are asking. Is there some context to this question?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I am new to UML sequence diagram, I want to make some implementation based on this diagram. Here is my try, please correct me if anything is wrong.

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Oh! Now I understand the question.

Your code is close. Two changes:
obj1.create(); // name should match diagram
startObject.getAttribute(); // call is on startObject because that's where the arrow starts

Creating object 1 and get attribute both go from the first line. They should be from the same object. Which is the sender at left. This page demonstrates it wll.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UML sequence diagram