Wednesday, February 22, 2012

ET0700 PROGRAM DESIGN (ET0700)

ET0700: Program Design EEE
Lab Test 1 Sample Page 1
Name:_________________ Adm. No.: ___________ Class: _______
Duration: 50 mins. Lab Test 1 Sample Marks:_______
Question:
Design an Alice world with a Snow template and 2 Penguins. Rename your 2
characters to DeDe and SiSi. Drop in a Snowman object. Align the 2 Penguins
such that they are hidden behind the Snowman object.

Given the chronological flow of actions, program the Alice world.

Do In Order
    DeDe move out from the Snowman
    DeDe turns to face the camera
    SiSi move to 2 metre on the right of DeDe
    SiSi turns to face the camera
Do Together
     DeDe jump 1 metre and at the same time make 2 revolutions
     SiSi jump 1 metre and at the same time make 2 revolutions
     DeDe ask for a number and save to dedeVar
     SiSi ask for a number and save to sisiVar
Compute the formula and assign the result to resultVar
     resultVar = dedeVar * dedeVar + 3/ sisiVar


DeDe read out the result

DeDe will read out the result with the message “The calculated result is XXX”
where XXX is the computed value.

ET0700: Program Design EEE                              Lab Test 1 Sample Page 2

1. Start a new world in Alice and rename the world method from my first
method to your name pXXXXXXX e.g. Tan Bo Lang p1234567
marks_______________(5)

2. Identify the objects to be placed in the Alice world.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________

marks_______________(10)

3. Add the objects into the Alice world and rename the 2 Penguin characters to
DeDe and SiSi.

marks_______________(20)

4. Program the Alice world to simulate the scenario. Save your world using
the filename pXXXXXXXLabTest1.a2w where XXXXXXX is your
admission number and send it to your lecturer. You may demonstrate the
world to your lecturer.

marks_______________(55)

5. Be creative and enhance your Alice world with extra matching objects and
programming (e.g. walking simulation etc.)

marks_______________(10)

________________________________________________________
Answer:

download link for Lab Test 1 Sample Page ___________________________________________________________

ET0700: Program Design EEE
Lab Test 2 Sample Page 1
Name:_________________ Adm. No.: ___________ Class: _______
Duration: 50 mins. Sample Lab Test 2 Marks:_______

Question:
Design an Alice world with a glass template and 2 Animal characters.

1. Start a new world in Alice and rename the world method from my first method to
your name pXXXXXXX LabTest2 e.g. Lee Kee Seow p1234567LabTest2.

marks_______________(6)

2. Rename the two characters to Akido and Mashino.

marks_______________(4)

3. Create a custom method, JumpAndRoll, for Akido to simultaneously move up one
metre and turn left, howManyRolls of full revolutions and after which move back
to the same position, where howManyRolls is an input number parameter.

marks_______________(20)

4. Create a custom method, AskNumberOfRolls, for Mashino :-

a. To prompt for a number and save it into a variable, numberOfRolls.

marks_______________(15)

b. Generate a random integer number ranging from 0 to 6. If the number is
less than three, make Akido to jump and roll numberOfRolls of times and
repeat the action for two times, otherwise make Akido to jump and roll
numberOfRolls of times and repeat the action for four times. You are to
make use of the Loop statement and the JumpAndRoll method.

marks_______________(40)

5. Create an event to handle When a SPACE key is typed, to call the
AskNumberOfRolls method.

marks_______________(15)

download link for Lab Test 2 Sample Page 1
______________________________________________________



LEGO MINDSTORMS NXT software Program
download link for LEGO MINDSTORMS NXT software Program

No comments:

Post a Comment