If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

7. Unified Modeling Language

Main steps

General info

  1. Review presentation UML

    Practical exercise

Set up tools

  1. Install Dia :

    sudo apt-get install dia

    and, if it works, also Calligra Sheets:

    sudo apt-get install calligra

    and investigate how to use them for different diagrams.

  2. (If it is not done already) download Eclipse IDE for Enterprise Java Developers from bcserver (if available) or from Eclipse website and extract it in IDEs folder. (If necessary, look for more info here in Latvian).
  3. Install GreenUML plugin

Complete exercise

  1. Investigate jtm.activity07 package
    Use GreenUML to create a class diagram for Animal, Mammal, Bird, Dog, Hawk classes.
  2. Create class diagram with Green UML:
    1. select menu File — New — Other...,
    2. in wizard tree select Green UML — Green UML Class Diagram and press Next,
    3. in wizard select activity07 for name enter: Animals and press Finish.
  3. Draw UML diagram in jtm.activity07 package (excluding ..Test.. classes)
  4. Export class diagram to 1. Implement methods of necessary classes to pass unit tests
  5. Create class Animal.
    1. Add private field int age;
    2. Add public method void setAge(int age), which allow to set only non-negative number;
    3. Add public method int getAge();
  6. Create class Mammal, which extends Animal.
    1. Add private field boolean isDomestic;
    2. Add public method void setIsDomestic(boolean isDomestic);
    3. Add public method boolean getIsDomestic();
  7. Create class Bird, which extends Animal.
    1. Add private field boolean canFly.
    2. Add public method void setCanFly(boolean canFly);
    3. Add public method boolean getCanFly();
  8. Create class Dog, which extends Mammal.
    1. Add private field String name;
    2. Add public method void setName(String name), which allow to set only name with letters, starting with capital letter;
    3. Add public method String getName();
  9. Create class Hawk, which extends Bird.
    1. Add private field String color;
    2. Add public method void setColor(String color);
    3. Add public method String getColor();
  10. Right-clik in diagram, select Save as..., choose type PNG Image (*.png) and save ceated class diagram with all mentioned classes in file Animals.png and save it into ...activity07 package.

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

Other modeling tools

Other UML editors

Other useful editors


Created by Valdis Vītoliņš on 2017-01-03 08:07
Last modified by Valdis Vītoliņš on 2021-06-10 15:46
Xwiki Powered
Creative Commons Attribution 3.0 Unported License