CSC 1301 Hw1

Alice World: HassonHw1.a2w

Scenario:

This world shows two cars approaching an intersection, where they will have to stop, as indicated by a stop sign. Since the cross-street is a one-way street, both cars must turn right. The initial scene displays only one of the cars and the intersection. In this world, each car will in turn approach the stop sign, stop, turn right, then proceed off the screen.

The assignment’s requirements were fulfilled by:

  1. “It must include at least 2 methods (not including my first animation).”
  2. The world contains 4 methods in addition to my first animation. One methods turns a car’s wheels (where what car in indicated via a parameter), another moves the specified (parameter) car, the third turns the specified (parameter) vehicle and the last performs all the actions (stopping at stop sign, invoking the other methods, etc).
  3. “At least 1 of the methods must have a parameter. This method is to be called at least twice, with different parameter values. “
  4. As indicated above, 3 of the 4 methods involve parameters. Since there are two cars, each of these methods is called at least twice, once for each car.

Note: I have tried this world on two different computers and get slightly different results. One computer has the second car hit the first one. To prevent this, I added an extra wait command; so the cars may seem to be at the stop sign a little too long.

Note2: I used loops and questions since I know how to use them. But everything could have been done the hard way.

The storyboard is as follows:

Scene Number: ____1______

Description
The initial screen. A car is seen approaching a stop sign. The second car is still off the screen.
Sound: N/A
Text: N/A
Scene Number: ____2______

Description
Both cars begin to move toward the stop sign.
Sound: N/A
Text: N/A
Scene Number: ____3______

Description
Car1 reaches the stop sign and stops. Car2 soon stops (in order not to hit Car1).
Sound: N/A
Text: N/A
Scene Number: ____4______

Description
Car1 turns right. Car2 begins to head toward the stop sign again.
Sound: N/A
Text: N/A
Scene Number: ____5______

Description
Car1 turns right. Car2 begins to head toward the stop sign again.
Sound: N/A
Text: N/A
Scene Number: ____6______

Description
Car2 reaches the stop sign and stops. Car1 proceeds to go straight, heading off screen.
Sound: N/A
Text: N/A
Scene Number: ____7______

Description
Car2 turns right. Car1 proceeds to go straight, heading off screen.
Sound: N/A
Text: N/A
Scene Number: ____8______

Description
Car2 proceeds to go straight, right off the screen.
Sound: N/A
Text: N/A