8. Unified Modeling Language
Main steps
General info
Review presentation UML
Practical exercise
Complete exercise
- Investigate jtm.activity07 package
- Create class Animal.
- Add private field int age;
- Add public method void setAge(int age), which allow to set only non-negative number;
- Add public method int getAge();
- Create class Mammal, which extends Animal.
- Add private field boolean isDomestic;
- Add public method void setIsDomestic(boolean isDomestic);
- Add public method boolean getIsDomestic();
- Create class Bird, which extends Animal.
- Add private field boolean canFly.
- Add public method void setCanFly(boolean canFly);
- Add public method boolean getCanFly();
- Create class Dog, which extends Mammal.
- Add private field String name;
- Add public method void setName(String name), which allow to set only name with letters, starting with capital letter;
- Add public method String getName();
- Create class Hawk, which extends Bird.
- Add private field String color;
- Add public method void setColor(String color);
- Add public method String getColor();
- Select Start menu — Graphics — Dia and create new drawing.
- Choose UML from list of stencils
- Draw UML Class diagram representing classes in jtm.activity07 package (except Test class)
- Export saved diagram into Animals.png file and save it in ../src/main/java/jtm/activity07/ folder of the project
Additional info
Green UML user guide: https://www.clear.rice.edu/comp310/Eclipse/GreenUML/
Dia Diagram editor guide: http://dia-installer.de/shapes/UML/index.html.en
UML standard
- Superstructure — how to use UML
- Infrastructure — UML described with UML itself
Other modeling tools
- IBM System Architect
- Omondo
- Umbrello UML Modeller
- Sketch It! plugin for IntelliJ IDEA
- ObjectAid plugin for Eclipse Modeling Tools
Other UML editors
Other useful editors
- JavE ASCII editor
- ditaa ASCII to png editor
- MOLA editor (for Windows only)