![]() The actual enrollment in a course happens in the course object, because it will know if the class is full. Label it 'enroll student' with a calling parameter of 'student ID' integer, and a return type of boolean at the execution occurrences. Now I add another message from 'student' to 'course'. We'll explain more about this in a moment. An execution occurrence shows how long a method will last. Click on the line and select 'add execution occurrences'. Then click on the message line to select it. You'll get a default name which you should rename to 'click on enroll'. To create an interaction, click on the 'message' tool in the right hand panel, then click and drag a line from the 'user' lifeline to the 'student' lifeline. Next, drag the 'user', 'student' and 'course' objects from the model panel on the left, to the drawing surface as shown. This creates a generic actor which you can rename to 'user'. This will present the following context menu from which you should select 'add new' and 'actor'. ![]() To do this, open up the 'packages' section of the model in the left display panel, right click on 'default'. Actors supply external inputs to the system. At this point we need to add a special sort of object called an 'actor'. In the next dialog, select 'student' from the browser, and click 'new'. To start the sequence diagram select 'tools', 'diagrams', 'sequence diagram', as shown in this context menu. Okay so, open our project wherever it is, create a sequence diagram, add the 'enroll student', 'student ID' bool method as shown here. We'll need this for our sequence diagram. ![]() Now that the project's open, let's do a quick review of what we did and add another operation to the course 'class'. When you double click on that, you'll open your project right away, and none of the file open dialog stuff. ![]() Best thing to do is, find your project, create a shortcut for it, and put that shortcut on your desktop. If you navigate to where your project is, Rhapsody doesn't remember the file path, so you have to reenter the path each time. is useless because you can't store a project in that folder, you can't write to it. The problem is, if you want to open a preexisting model, the file open dialog defaults to the install folder, which if its program file's X86 IBM slash Rhapsody etc. Here's a tip: if you have a Rhapsody shortcut on your desktop, it's fine for starting Rhapsody. Now we're going to build a sequence diagram with Rhapsody. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |