.

Sunday, May 12, 2019

Programming with Alice Assignment Example | Topics and Well Written Essays - 750 words

Programming with Alice - Assignment ExampleAlice does not have primitive methods to perform front odd leg up and front left hand leg down. It is whence required that the code for this movement be designed. Elegant design requires that methods are kept from being too large. To maintain a small size of it for the methods, additional methods are added to do the small tasks. The following is d iodineA loop is implemented at the point where the mouse takes a step earlier of the mouse. This loop ensures that whenever the mouse takes a step the gag takes another step of the same magnitude so that the mouse is always one step ahead of the hurl.The following step is transforming the storyboard into program code. The first action of the storyboard is the mouse turns to see the cat. The first method is therefore turn to face. We use the turn to face to make the mouse turn to look in the counseling of the cat. The next step is the cat taking one step external from the cat. We use the m ove absent method.Alice contains stop statements that are vital in controlling movements. In the cat chase program the cat moves away from the cat while the cat moves towards the mouse. The control statement Do in order is employ to tell Alice to first make the cat look at the mouse and the mouse move away from the cat.Other actions must be done together. When the front right leg is up for example, the front left leg must be held down. To achieve this functionality Alice is told to Do this actions together through the DO together control statement.To implement this program into Alice a scene must first be created. The initial scene is a room (Farooq, 2012). The intention of the cat is to catch the mouse. It should follow it while the mouse should always be one step ahead of the cat. We select the room scene and then a cat and a mouse.The next stage is in the program code editor program. The code that makes the program is written. In Alice the program code editor is at the bottom right of the main window. The instructions are edited in the area

No comments:

Post a Comment