Thread: UML diagram
View Single Post
  #2 (permalink)  
Old 03-06-2008, 09:16 PM
inay inay is offline
Member
 
Join Date: Mar 2008
Posts: 2
inay is on a distinguished road
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
------------------------------------
Reply With Quote