From the toolbox, choose "Interface" and click somewhere on the palette.If you choose to use the "Model Explorer", the area we will be interested in is visible after expanding the "Design Model" group. You may notice using the "Model Explorer" on the right is faster to add these, but do however note that adding the classes and interfaces themselves in this toolbox (instead of using the toolbox on the left and clicking on the palette to create the object) will not create the objects in the diagram. Repeat the same process to create a class called Rectangle with private _width and _height fields of type double.Specify the data type in the properties box by typing double in "Type". Add an "Attribute" (or field) to Circle by right-clicking the object on the diagram, expanding the "Add" menu, and pressing the green "Attribute" button. Rename the class to Circle by double clicking on the name. This should create a new class with a generic name. Now to begin actually creating the diagram, from the "Toolbox" which starts by default on the left side of the screen, select the "Class" icon, and left-click somewhere on the diagram window.The program will sometimes default to using an "Analysis Model", which we are not interested in for this lab. Important! Be sure that the subtitle bar, just above the diagram palette, says "Main (Design Model)".From the "File" menu, choose "Save", and select a location to save the project. Save the project now so you do not lose any progress if some problem arises.If the box was not present, go to the "File" menu and choose "New Project". After starting SU, a template box titled "New Project by Approach" may be present: if it is, select "Empty Project" and press "Ok".Once SU is installed, start the program.And here is a direct link to the package itself. The package, StarUML, is open source software, licensed under the GPL (GNU Public License), and is freely available for download from its homepage. Installation: To begin, we must first install the software we will be using.For that, after creating the diagram using SU, you'll edit the resulting stub code to add the rest of the functionality to the code, filling in what each method should do. SU will generate code that reflects the class structure, but not the specific actions on any objects. Perform the following steps to create the UML diagrams shown below. In this lab, we will use SU to design a Pizza program. SU can also reverse engineer Java source/byte code to produce the corresponding UML diagrams. StarUML (SU) is a tool to create UML class diagrams and automatically generate Java "stub code". StarUML: a tool to create class diagrams and other types of diagrams in the Unified Modeling Language (UML).COMP 212 Lab 1.5: StarUML COMP 212 Lab 1.5: UML and more Java Syntax
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |