Introduction to using Magicdraw version 11.5 Written by: Robin Beaumont e-mail: [email protected] Date last updated: Thursday, 03 August 2006 Version: draft 1 Contents 1 Required Resources ....................................................................................................................................... 1 2 Revision ........................................................................................................................................................... 1 3 Our problem .................................................................................................................................................... 2 4 Setting your perspective you will use in MagicDraw .................................................................................. 3 5 Creating a new project ................................................................................................................................... 4 6 Creating a new Diagram ................................................................................................................................. 5 7 The project window and diagram toolbar - moving around and Zooming ............................................... 7 8 Removing the grid on the drawing canvas .................................................................................................. 8 9 Creating a Actor .............................................................................................................................................. 8 10 Creating individual use cases and associations ..................................................................................... 9 11 Tidying the lines ........................................................................................................................................ 10 12 Adding notes ............................................................................................................................................. 10 13 Saving your project and diagram ............................................................................................................ 11 14 Displaying diagram information .............................................................................................................. 11 15 Include, Extend and Inheritance .............................................................................................................. 12 16 Finding out properties .............................................................................................................................. 12 17 Learning more about Use Case diagrams .............................................................................................. 13 18 A common interface .................................................................................................................................. 13 1 Required Resources You need the following resources to work through this document: The from “Scenarios for practicing modelling techniques” http://www.robin-beaumont.co.uk/virtualclassroom/contents.htm and handout follow the available links You have installed a copy of magicdraw on your PC. A version of MagicDraw downloadable from http://www.magicdraw.com/. If you are reading this document as part of a course you are undertaking with the Royal college of Surgeons (Edin) you are registered as part of the academic programme for Magicdraw which means you are entitled to use the full personal edition of MagicDraw, to enable you to do this you need to contact your course administrator who has the codes to unlock the personal edition of MagicDraw. The purpose of this tutorial is to provide you with the skills to draw Use Case diagrams in Magicdraw version 11.5. Other document explains what Use case diagrams are and where they fit into the modelling process. 2 Revision You should possess knowledge of what Use case diagrams are before working through this practical handout. An excellent introduction can be found at: http://www.developer.com/design/article.php/10925_2109801_1 Also a good book chapter on Use Cases can be found at; http://www.visualparadigm.com/special/requestootsamplechapters.jsp Using MagicDraw to Create UML Use Case diagrams 3 Our problem In this handout we are going to produce a UML Use Case diagram from a narrative scenario. To find out about the scenario open the document ''Scenarios for practicing modelling techniques” from http://www.robin-beaumont.co.uk/virtualclassroom/contents.htm and read through the Local Community Radio Station scenario. From this scenario have produced a tentative list of Actors and Use cases: Actor Use Case Hospitals Create item Schools Create programme Manager Administrator Present Programme Recording engineer Maintain feedback log Editor Monitor Presenter Book studio Secretary Maintain equipment Volunteer I assume you have worked through the material explaining what a Use Case diagram is and how you derive the required information from a narrative scenario. Now lets see how we use the above information to create a UML Use Case diagram in MagicDraw. Robin Beaumont [email protected] 31/07/2017 Page 2 of 13 Using MagicDraw to Create UML Use Case diagrams 4 Setting your perspective you will use in MagicDraw The first time you open MagicDraw after installing it asks you to specify what type of user you are ('user perspective'). Set the options as shown in the screen shot below. The first screen is rather cluttered, to say the least, so the first thing I suggest you do is close the Welcome window Although the screen appears very complex you can think of it as consisting of 4 main areas: Menu Toolbars Browser window Drawing Canvas Robin Beaumont [email protected] 31/07/2017 Page 3 of 13 Using MagicDraw to Create UML Use Case diagrams 5 Creating a new project We are now ready to create a new project which will include our Use case diagram. To do this click on the menu option File -> new project. Selecting this menu option brings up a dialogue box asking a name for the project and a place to save it. The screen shot below tells you which options to choose in each dialogue box. Finally click the OK button on the first dialogue box: Robin Beaumont [email protected] 31/07/2017 Page 4 of 13 Using MagicDraw to Create UML Use Case diagrams 6 Creating a new Diagram We now have a relatively empty screen, let's review some interesting aspects of it before moving on. Along the toolbar at the top of the screen there are a series of icons these allow you to easily create new UML diagrams of various types. Along the left hand side of the screen there is a panel with four tabs along the top of it clicking on the third one 'diagrams' provides us with a graphical display of any diagrams we might have in the project, as we would expect this is empty at the moment. Finally notice that the middle of the tool bar provides you with details of the actual project filename 'radio station.mdzip' along with where it is on the hard drive. Besides clicking on the appropriate icon on the toolbar to create a new diagram is it possible to do it the old fashioned way by using the menu option Diagrams -> Use Case Diagrams. Once you choose this the Use case diagrams dialogue box appears which is empty at the moment, click the 'Add' button and follow the instructions below in the screen shot. Robin Beaumont [email protected] 31/07/2017 Page 5 of 13 Using MagicDraw to Create UML Use Case diagrams Once you click the Create button another dialogue box appears just close it by clicking the ?? [lost details] button. Robin Beaumont [email protected] 31/07/2017 Page 6 of 13 Using MagicDraw to Create UML Use Case diagrams 7 The project window and diagram toolbar - moving around and Zooming Robin Beaumont [email protected] 31/07/2017 Page 7 of 13 Using MagicDraw to Create UML Use Case diagrams 8 Removing the grid on the drawing canvas One thing I find annoying is the grid on the drawing canvas, following the details below to remove it. 9 Creating a Actor The panel on the immediate leftof the drawing canvas provides a easy way of creating a dragging various UML elements onto the drawing canvas Exercise 1: Follow the instructions above to create the project Radio Station and a UML use case diagram called Overview. Robin Beaumont [email protected] 31/07/2017 Page 8 of 13 Using MagicDraw to Create UML Use Case diagrams Exercise 2: Add the following actors to your use case diagram: 10 Creating individual use cases and associations To create individual Use Cases you select the use case icon on the left hand panel and drag it oto the drawing canvas. To name it you just start to type in it. Actors in Use Case diagrams communicate with Use cases via associations (this does not have the same meaning as associations in UML Class diagrams I tend to think of these as messages). The diagram on the left shows you how to create an association. The pop up menu appears when the Use case is selected. Robin Beaumont [email protected] 31/07/2017 Page 9 of 13 Using MagicDraw to Create UML Use Case diagrams 11 Tidying the lines Once you start to add a number of associations the diagram will become to look rather messy one easy way of tidying it up is to change the style of the lines. I would recommend that you usually keep the same line style for all the lines within a particular diagram. 12 Adding notes The Use case diagram we are creating is just an overview of the system we are beginning to model, one of the main purposes of a Use Case diagram is to encourage discussion between all the stakeholders therefore an initial diagram will contain many questions that will need clarifying in drawn out meetings. Exercise 3: Modify your Use Case diagram to resemble the one below: Robin Beaumont [email protected] 31/07/2017 Page 10 of 13 Using MagicDraw to Create UML Use Case diagrams 13 Saving your project and diagram 14 Displaying diagram information It is possible to display a table showing such things as the diagram name, author, and creation, modification dates. While in the drawing canvas right mouse click in an empty part of the diagram you want to add the information table to. A properties menu appears which you just need to click on the 'Show diagram info' option. Once you have done this and click on the OK button a information table will appear in the diagram. You can move the table by clicking on it and dragging it around the diagram. You can also change its contents, look and feel by selecting it and then right clicking which brings up its own properties box. Robin Beaumont [email protected] 31/07/2017 Page 11 of 13 Using MagicDraw to Create UML Use Case diagrams 15 Include, Extend and Inheritance You use the same technique as described above to add other diagram elements such as include, extend and inheritance associations. In the example below I have indicated that the process of creating a programme involves creating items. 16 Finding out properties It is easy to find out what characteristics of a particular element (e.g. actor, Use case, association etc) you can edit. You can either select the element by left mouse clicking on it then once selected RIGHT mouse click which brings up a menu. Alternatively you can constantly see the characteristics of the currently selected element by moving to the properties tab of the browser window. Rather than selecting the element you want on the actual diagram you can go to the containment tab of the browser window and select what you want there. Robin Beaumont [email protected] 31/07/2017 Page 12 of 13 Using MagicDraw to Create UML Use Case diagrams 17 Learning more about Use Case diagrams MagicDraw comes with two case studies, the Inventory control system and a Library system. The Inventory control system has a simple Use case diagram while the Library system contains a much more complex one. I personally feel that the Inventory control system's Use case diagram reflects the spirit of the Use case diagram more accurately. See what you think. 18 A common interface I thing you might be interested to know that superficially the screen layout of MagicDraw is very similar to a number of other Case tools so once you have learnt it you should have little difficulty moving to others. It is important to realise that while each Case tool may look initially very similar in fact most offer very different features. The screen shot opposite is that of another UML case tool VP-UML. End of document Robin Beaumont [email protected] 31/07/2017 Page 13 of 13
© Copyright 2026 Paperzz