View
 

Lab 6a: Jack II

Page history last edited by Mr. Kretsch 7 months ago

Name: __________________

Objective: Objectdraw input

You will add input processing to your Jack-o-Lantern

Instructions 

  1. Open your Jack project.

  2. If you haven't already done so, add a sun and moon. The moon comes out when it’s night, the sun comes out when it’s day.

  3. Add an onMouseClick() method that does the following:

    • If the user clicks on a facial feature, change the feature’s color to yellow.

    • If the user clicks on the pumpkin, change all facial features to black

    • If the user clicks on the background, move the sun or moon to the clicked location.

  1. Add an onMouseEnter() method that turns the scene to night.

  2. Add an onMouseExit() method that turns the scene to day.

  3. Print your source code and hand in with your grading sheet.  

Extra credit for

  1. Additional points might be given for cool stuff.

Grading

 

Points

Extra

Correct

Incorrect

Notes

Facial feature click

5

 

 

 

 

Pumpkin click

5

 

 

 

 

Enter and exit window

5

 

 

 

 

Other cool stuff

 

 

 

 

 

Total points

15

 

 

 

 

Notes

 
 
 
 
 
 
 
 

 

 

Comments (0)

You don't have permission to comment on this page.