Introduction to UMLet
Now that we know how to use classes and create Java programs, it's time to introduce you to another important aspect of computer programming - design. Up to this point, our projects have been small and you may not yet realize the benefits of good design, but trust us, the time will come (cough Tetris cough). Well-thought-out design will benefit you as your projects increase in scope. This lab will teach you the basics of design, design diagrams (called UML diagrams), and inheritance trees, and introduce you to UMLet, a program designed (wink) to make your UML diagrams easy to read and easy to make.
Goal: Learn to use UML diagrams, inheritance trees, and UMLet!
Let's begin with familiarizing ourselves with UMLet, which you will be using to create all of the diagrams required for your project design questions. UMLet is a very simple diagram editor that will help you make readable and easily editable UML and inheritance diagrams. While design diagrams for LiteBrite and TASafeHouse are not too complex, diagrams for later programs will have numerous classes and associations, all of which can lead to cluttered and illegible diagrams when done by hand. UML diagrams done by hand are also difficult to edit; make a mistake and the eraser will become your best friend. UMLet can eliminate this hassle if used properly.
Now, let us review the features of UMLet that will be most useful to you.
Check Point 1
- Start UMLet by typing '
umlet' into a shell.
The UMLet Interface

- Editor region: This is where your active diagram can be found. The commands for the editor are your standard Windows shortcuts (i.e., CTRL-s to save, CTRL-c to copy). If more than one file is open, they will appear in the form of several tabs at the top of the editor screen for easy access and viewing. Components in this window can be dragged around, enlarged, rotated, and otherwise manipulated with the mouse.
- Components region: This is where all of the components of your diagrams reside. You will not need all of these symbols for your diagrams, and we will go over which symbols you need to know. To add a component to your editor region, double click on the component.
- Help/Text Editing Region: When UMLet is first opened, this box has all of the essential elements of UMLet explained, in case you should forget how to do something. You can also change the text size by following their instructions. When an element in the Editor Region is clicked, this area turns into a text editing region for the element (for example, to change the class name, type it in this area). When you click on the blank canvas, this area will turn back into a help area.