Mini-project 3: Unified Modeling Language Diagramming
Instructions
The purpose of this mini-project is to give you practice making UML diagrams.
Create a module called MP3. In MP3, create a new package called "UML" (right click on the M3 module in the Packages tool window to the left, select "New" → "Package"; name it "UML"). The package should now appear in the Package tool window, under the MP3 module. Right click the UML package and select "Diagrams" → "Show Diagram...".
In the diagram editor, click the following buttons so they look like the screen shot below: Fields, Constructors, Methods, Edge Creation Mode, and Show Dependencies.
Following the process we used in class, make a UML diagram for the following set of classes:
- an interface named
Growl
with the methodgrowl
, which returns nothing and takes no parameters - a class named
Animal
with the private data membersname
andowner
, as well as setters and getters for them, and a constructor that sets them - a class named
Cat
that is a subclass ofAnimal
and implements theGrowl
interface - a class named
Tabby
that is a subclass ofCat
- a class named
Flamepoint
that is a subclass ofCat
- a class named
Dog
that is a subclass ofAnimal
and implements theGrowl
interface - a class named
Bird
that is a subclass ofAnimal
and has the private data memberbeakLength
, along with a setter and getter, and constructor for that member
Note that for some situations, it may be easier to edit the resulting class in code. That's easy to do in IntelliJ as it automatically creates a Java class for each UML diagram class. When you're finished, you can save your diagram to a JPG or PNG. Check this to make sure everything is displayed correctly (I've see the the PNG appear all black, but JPG worked fine for me).
Submission
See this page for the rubric. See the Canvas page to upload your submission.
(Back to top)