If it is not explicitly told in following recipe, setting up services are described for Ubuntu 16.04 server, but applications are described for Ubuntu 16.04 and/or Lubuntu 16.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.

8. Unified Modeling Language

Main steps

General info

  1. Review presentation UML

      

Set up tools

  1. Install Dia and Calligra Flow graphical editors:

    sudo apt-get install dia calligraflow

    and investigate how to use them for different diagrams.

  2. Install GreenUML plugin

Complete exercise

  1. Investigate jtm.activity07 package
  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 Animals.png file in the same package
  5. Implement methods of necessary classes to pass unit tests

Use GreenUML to create a class diagram for Animal, Mammal, Bird, Dog, Hawk classes.
Also generate getters and setters for class properties:

  1. 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();
  2. 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();
  3. 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();
  4. 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();
  5. 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();
  6. Export created 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/

UML standard

Other modeling tools

Other UML editors

Other useful editors


  
Tags:
Created by Valdis Vītoliņš on 2020-05-28 13:55
Last modified by Valdis Vītoliņš on 2020-05-28 13:58
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License