.Open CSci202 Laboratory 02 Diagrams (previous): See .See http://www/dick/cs202/lab01.html . Goals By the end of the lab you should know how to draw and print diagrams using the `Dia` tool. `Dia` is a simple, free, and useful diagramming tool. It runs on UNIX and MSWindows platforms (Mac users had similar program 20 years ago). . Deliverables Due at end of Lab Period Show me some diagrams that includes `at least two` UML diagrams. These should be based on any of the UML diagrams in the book. There are lots. Pick one and see how well you can duplicate it. . Hints I will start the lab with a demo of how `dia` works. Have the book ready! Don't forget to have fun with Dia. .Open Ideal Procedure Start Dia. This may be on the desktop, in a "Start" menu (under Graphics?), or you may have to open a terminal window and type the command .As_is dia & The "&" means that "dia" starts up in a new window and returns control to your terminal. You can use the terminal and "Dia" windows at the same time. Wait for a "Dia" control/toolkit window to pop up. In the toolkit look for the drop down menu of diagram types and select UML. Stretch the toolkit window to see all the "UML" symbols. This is important. Use the "File"->"New Diagram" to start a new diagram. Select a shape in the toolkit, and use the mouse in the drawing window to draw something. Repeat with different figures in the tool kit. Select a figure by clicking on it. Right click and a menu pops up. The `Edit` submenu lets you copy, cut, paste, delete, etc. the selected figure. Try it. Double click a symbol to see what other options are available. These are fun and useful. At the bottom of the toolkit is a line and arrow menu. You can specify just about any kind of arrow or line. The left box is the first end as you draw it, and the right hand box selects the other end. The middle selects dots, dashes, solid, etc. Select the symbols in the third line of the `top` toolkit to get lines, curves, rectilinear lines, etc. Experiment with drawing some arrowhead lines of different types. When you draw a line, you can drop one end on to a blue connection point and the line will attach itself so that when the symbol moves, so does the end of the arrow. Try this out. You can draw an arrow from one blue cross to another and connect two symbols. Before you print from Dia you may have to select a default printer for it to use. Select the System Menu -> Preferences -> Hardware -> ...Printer and pick the printer in your laboratory. To print a diagram, first Right Click in the drawing and pull down to File->Page Setup In this dialog select "Fit to 1 by 1" in the scaling section. Then "OK". Print by right Click->File->Print diagram. In the toolkit: T means Text. Try using it to add words to a diagram. Double click text to change font. Double clicking most objects lets you change their colors and other properties... try this out. Creating UML classes and objects always involves double clicking and filling in some tabs. When in doubt: double click a symbol to change details. This is how you change the name of a class and add attributes and operations. Try it! You can also attributes and operations by double clicking and selecting optins. Try this. Simplified diagrams with just names make complex software and data bases much clearer. Also look at some of my diagrams and see if you can duplicate them. .Close Ideal Procedure .Open Dia options To save a file: right-click the diagram and select File->Save... Reopen a saved file by menu File->Open in the Dia Tool window. Use File->Defaults/Options/Properties? menu to change things you dislike about Dia. To learn how to put your diagram on the WW, take CSci320 with me! .Close Dia options . Next Classes .See http://www/dick/cs202/lab03.html .Close CSci202 Laboratory 02 Diagrams