Results 1 to 5 of 5
Thread: UML diagram
- 03-05-2008, 10:20 PM #1
Member
- Join Date
- Jan 2008
- Posts
- 36
- Rep Power
- 0
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.
- 03-06-2008, 08:16 PM #2
Member
- Join Date
- Mar 2008
- Posts
- 2
- Rep Power
- 0
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
------------------------------------
- 03-06-2008, 08:17 PM #3
Member
- Join Date
- Mar 2008
- Posts
- 2
- Rep Power
- 0
you can download StarUml, or the modules for the Netbeans 6.0.1 for some more interesting features of UML
- 03-07-2008, 07:00 PM #4
Member
- Join Date
- Jan 2008
- Posts
- 36
- Rep Power
- 0
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
- 03-08-2008, 06:29 PM #5
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)


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks