Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following procedures for the biplane in Alice 3.3: 2. fly procedure: This procedure should move the whole biplane forward 10 meters. At the

Create the following procedures for the biplane in Alice 3.3:

2. fly procedure: This procedure should move the whole biplane forward 10 meters. At the same time, the propeller of the biplane should turn several rotations. (If you use the animationStyle of begin_and_end_abruptly, it will seem to smooth out the animation.)

3. Go to myFirstMethod, and add a while loop (from the bottom of the screen). If you want the biplane to fly during the entire scene, your loop could say while true is true. The body of the loop should contain a call to the biplanes fly procedure. Test the procedure by running the program.

4. Create the remaining procedures for the biplane. Left biplane should turn left a bit Right biplane should turn right a bit Climb biplane should climb up a bit, then level off again Descend biplane should descend a bit, then level off again You will be unable to test these procedures until you create event listeners in the next step.

5. Click on initializeEventListeners at the top of the screen. Add an Event Listener. Drag an if tile up from the bottom of the screen. At first, the if statement will say if true is true then. Then, you can drag the into the if statement (in place of the true). What we want to end up with is if event isKey LEFT is true then, and on the next line this.biplane left which calls the left procedure. Then move on to the else part of the statement and add another if tile. Continue adding the tiles and coding the events for all the remaining procedures.

6. We will use the following keys for the event handlers: Left left arrow key Right right arrow key Climb up arrow key Descend down arrow key

7. Test your program to make sure that the biplanes movements are correct and that the user of the program can control the biplane with the keyboard.

image text in transcribed8. Using the comments button at the bottom of the screen, add comments at the top of the myFirstMethod procedure that include your name, date, and assignment number. Save the Alice program as Biplane. Alice3 will automatically add a filename extension, .a3p. (Do not type the extension yourself.)

2. fly procedure: This procedure should move the whole biplane forward 10 meters. At the same time, the propeller of the biplane should turn several rotations. (lf you use the animationStyle of begin and end abruptly, it will seem to smooth out the animation.) 3 Go to myFirstMethod, and add a while loop (from the bottom of the screen). If you want the biplane to fly during the entire scene, your loop could say while true is true. The body of the loop should contain a call to the biplane's fly procedure. Test the procedure by running the program. 4 Create the remaining procedures for the biplane .Left - biplane should turn left a bit . Right-biplane should turn right a bit Climb-biplane should climb up a bit, then level off again Descend-biplane should descend a bit, then level off again You will be unable to test these procedures until you create event listeners in the next step Click on initializeEventListeners at the top of the screen. Add an Event Listener. Drag an if tile up from the bottom of the screen. At first, the if statement will say "if true is true then". Then, you can drag the into the if statement (in place of the true). What we want to end up with is "if event isKey LEFT is true then", and on the next line "this.biplane left"which calls the left procedure. Then move on to the else part of the statement and add another if tile. Continue adding the tiles and coding the events for all the remaining procedures. event iskey key ??? 6 We will use the following keys for the event handlers Left-left arrow key . Right-right arrow key Climb-up arrow key Descend- down arrow key Test your program to make sure that the biplane's movements are correct and that the user of the program can control the biplane with the keyboard 7 Using the comments button at the bottom of the screen, add comments at the top of the myFirstMethod procedure that include your name, date, and assignment number. Save the Alice program as Biplane. Alice3 will automatically add a filename extension, .a3p. (Do not type the extension yourself.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

7. Define cultural space.

Answered: 1 week ago