![]() If a repaired diagram is re-checked, errors may still be detected, but these are the irreparable complex errors which the user should attempt to fix prior to submitting the diagram to the automatic marker. Other errors will be repaired on the basis of the most likely error – there are some patterns which occur frequently and have highly likely causes (see Figure 4). Simple errors, by definition, are those that can be repaired without changing the essential meaning of the diagram. Not all errors are repaired – only those that can be dealt with with reasonable certainty. Having identified errors, the tool can be asked to repair the errors (see Figure 3). A textual description of an error can be obtained by right-clicking on the erroneous element and requesting feedback as shown in Figure 2. The syntax checker identifies errors by shading (objects and activations) and change of colour (messages) – although this mechanism may change after usability testing. This facility can be disabled if required, for example if the tool is used in an exam. tool shown in Figure 1 incorporates a syntax checking facility (within the Tools menu). Clearly we've barely scratched the surface of what an OO modeling tool can do, but this gives you a very basic launching point from which you can explore more about the tool. We've created a class diagram and a sequence diagram based on the class diagram. So we've downloaded and installed Rhapsody. Below the partition line, we can draw another sequence diagram if needed. To finish our sequence diagram, we can also put in a partition line as shown. To complete the cycle, we use the 'dependency' tool to draw a dotted return line from the execution occurrence to an execution occurrence to the right as shown. You'll want to rename the default name of the time out to something meaningful. This is done by extending the execution occurrence a bit, making it longer, then selecting 'time out' in the right tool panel, and starting and ending the time out within the extended execution occurrence. So the 'course' object calls its own 'enroll student' method. 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 |