Results 1 to 5 of 5

Thread: UML diagram

  1. #1
    alpdog14 is offline Member
    Join Date
    Mar 2009
    Posts
    57
    Rep Power
    0

    Default UML diagram

    I need to develop a UML diagram for the following code snippet:

    Java Code:
    Branch trunk = new Branch(){
    Branch branch2 = new Branch();
    Mango mango_1 = new Mango();
    Mango mango_2 = new Mango();
    Branch branch3 = new Branch();
    Branch sub_branch = new Branch();
    Mango mango_3 = new Mango();
    Mango mango_4 = new Mango();
    Peach peach_1 = new Peach();
    Branch trunk2 = new Branch();
       trunk.addChild(branch2);
       branch2.addChild(mango_1);
       branch2.addChild(mango_2);
       trunk2.addChild(branch3);
       branch3.addChild(sub_branch);
       sub_branch.addChild(mango_3);
       sub_branch.addChild(mango_4);
       sub_branch.addChild(peach_1);
    }
    The UML diagram should be based on a size() that calculates all the fruit in the trunk{}. Can anyone help me with this?

  2. #2
    ojn
    ojn is offline Senior Member
    Join Date
    Aug 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

    Default

    I think you forgot to post a link to your own UML diagram and ask questions about specific parts of it that you're having problems with.

    Because surely you're not expecting someone to do this homework for you? That would be dishonest, unhelpful and most importantly cheating. And I can promise you that will never happen.

  3. #3
    alpdog14 is offline Member
    Join Date
    Mar 2009
    Posts
    57
    Rep Power
    0

    Default

    I am asking for guidance, not for someone to do it for me. You do not have to be so harsh, asking for help is not a crime. So my UML diagram that I started is attached, any help would be most appreciated.
    Attached Files Attached Files

  4. #4
    ojn
    ojn is offline Senior Member
    Join Date
    Aug 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

    Default

    Quote Originally Posted by alpdog14 View Post
    I am asking for guidance, not for someone to do it for me.
    And just how was anyone supposed to know that from your original post? All you did was dump your homework without asking a specific question. We're not mind readers you know. ;)

    Unfortunately I cannot open your file as I don't have an application that supports .doc files.

  5. #5
    alpdog14 is offline Member
    Join Date
    Mar 2009
    Posts
    57
    Rep Power
    0

    Default

    I apologize, here is a jpg of my UML,
    Attached Thumbnails Attached Thumbnails UML diagram-uml.jpg  

Similar Threads

  1. UML diagram
    By JackDaniels in forum New To Java
    Replies: 7
    Last Post: 03-08-2011, 03:11 AM
  2. How to generate Data Flow Diagram(Work Flow Diagram)
    By stsivaraj in forum AWT / Swing
    Replies: 1
    Last Post: 12-22-2010, 11:21 PM
  3. XML ER diagram
    By palrakesh in forum XML
    Replies: 0
    Last Post: 06-07-2010, 07:48 AM
  4. plz i need help ((ER diagram))
    By sweet angle in forum JDBC
    Replies: 9
    Last Post: 02-01-2009, 10:28 PM
  5. UML diagram
    By jvasilj1 in forum New To Java
    Replies: 4
    Last Post: 03-08-2008, 06:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •