Results 1 to 5 of 5

Thread: UML diagram

  1. #1
    jvasilj1 is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Default UML diagram

    can someone help me in making a UML diagram.
    here are the specifcations I came up with.

    1. Construct an inheritance hierarchy with at least three classes.

    2. Specify instance variables and methods for each class.

    3. Draw the UML diagram.

    4. Don't forget the accessability symbols

    + for public,
    - for private,
    # for protected.

    5. Use the letter S for static methods or instance variables.

    6. Make sure that each base class, derived class pair satisfies an is-a relationship.

    7. Use arrows to indicate an inheritance relationship. Each arrow points from the derived class to the base class.

    8. Pick at least one method (other than the toString method) that is overridden in a derived class.

  2. #2
    inay is offline Member
    Join Date
    Mar 2008
    Posts
    2
    Rep Power
    0

    Default

    here is an example for a Person class which has variables of name and age with a constructor and some basic methods

    -------------------
    Person
    ------------------
    //variables
    -name: String
    -age: int
    ---------------------
    //constructor

    +Person(String name, int age)
    creates a Person object with a given age and name

    //methods
    +setName(String name) //just for example
    +getName() : String
    +setAge(int age)
    +getAge(): int
    ------------------------------------

  3. #3
    inay is offline Member
    Join Date
    Mar 2008
    Posts
    2
    Rep Power
    0

    Default

    you can download StarUml, or the modules for the Netbeans 6.0.1 for some more interesting features of UML

  4. #4
    jvasilj1 is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Default

    ok i came up with this i need the UML with specs according to my orignal post showing INHERITANCE

    my 3 parts are

    chief of police
    .
    .
    .
    .
    .
    sergent.
    .
    .
    .
    .
    officer


    can u desing a UML with my orignal specs for those three

  5. #5
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    9

    Default

    jvasil, UML is not that difficult. If you can code in Java, or any language for that matter.. I would assume you can probably devise a way to draw up your specifications into a UML- they're just drawing of your programming ideas. You can even develop code first and then output UML based on your code in an IDE like Netbeans("reverse engineering").
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Posting Permissions

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