![]() ![]() Activity diagram: from your game you find that there is some repetition, and some decisions have to be made at different stages in the game.The Use Case diagram tells you how your system interacts with its environment. One question you should check, if the timer is an actor. Use Case diagram: this is pretty straightforward, you identify the actor as the player, and write down all the use cases that the player can do.We now need to make the connection between the play and UML. Does your simulation work, did you forget something? Maybe you need to add another object, like a timer. ![]() Play the game for at least one or two turns. The student who writes the minutes, will write down who said what to whom, i.e., everything that was said between the objects and the actor and the objects amongst themselves. Now start the game: the actor and the different objects interact by talking to each other. For this one student is the 'actor', one student will write the minutes (protocol), and the other students will be objects (such as bricks). Once you have identified all the objects, start playing the real game. how would you calculate a score for the game?.what restrictions exist on the movement of the bricks, how would you implement them?.how does the player interact with the bricks?.is the player who plays the game also an object or is she an actor?.how many bricks can there be, how do they interact?.what properties does that student/brick have? (color,shape.).have each student represent an object, e.g., a brick.looking at the game, try to identify objects, for instance the bricks that are dropping are objects.build teams of 5 to 6 students per team. ![]() We first need to identify 'objects' and second we must find out how they relate and talk to each other. But before we can start we need to analyze the game. If you recall from class, when inventing UML, the Three Amigos started with something that was called Object Oriented Analysis and Object Oriented Design. (However, I had students who did not know it, so in case you don't please learn about it and play it for a little before continuing with this lab). Actors never turn into objects, actors are always outside the system, hence the Tetris example below is much better. Important Note: the restaurant example actually is not a very good example, because it may give you the impression that actors become objects. Look at the classes generated and compare them with your model. In StarUML you right-click with your mouse in the class diagram, and select 'Generate Code'. Once you are done with the class diagram, try out the 'Generate Code' feature. Take the restaurant example from class and create all the different UML diagrams we created in class using StarUML or your favorite UML modelling tool. To learn how to use objectiF, take a look at their tutorial. Lab 1b: objectiF (30 min) Īnother UML modelling tool, which is free for personal use is objectiF. More details can be found at the following StarUML Tutorial. After that you can create all kinds of UML diagrams by right-clicking on the model. Then in the Model Explorer add a new model by right-clicking on the ’untitled’ thing. Start StarUML, and select ’Empty Project’ at the startup. A small disadvantage is that it is no longer supported, hence it is limited to Java 1.4 and C# 2.0, which is very unfortunate. StarUML is a free UML modelling tool that is quite powerful, it allows for forward and reverse engineering. We need to learn about a UML modelling tool. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |