Programming for non-majors – Unit 7

Learning Outcomes

  • Construct a scene
  • Construct a method
  • Demonstrate Boolean functions
  • Demonstrate conditional loops
  • Modify object properties

To Do List

  1. Read chapter 7
  2. Watch lecture video
  3. Watch assignment video
  4. Complete assignment
  5. Complete chapter 7 quiz

Reading

  • Chapter 7 – Repetition: Definite and Conditional Loops

Videos

While Loop

 


Assignment

Summary:
Use a button to make a chicken hop and spin.




Total points: 100

Instructions:
  1. Add a chicken, a button and 3 other objects (2 points each)
  2. Set the button property to red (the button inside the button object…not the whole button) (5 points)
  3. While the button is red the chicken hops. Use a WHILE loop (10 points)and create a method called “hop” (5 points). Add code to your hop methods to simulate a hopping motion (5 points).
  4. While the button is green the chicken spins. Use a WHILE loop (10 points)and create a method called “spin”(5 points). Add code to your hop methods to simulate a spinning motion (5 points).
  5. When the button is clicked it will change to green if  the button is red (5 points) and change to red if the button is green (5 points). Create a method called “check color” (5 points).  Create a mouse click event to activate the “check color” method (5 points).
  6. Add another chicken (5 points) and create another method for when the player clicks on chicken #2  (5 points). Add code to your method to make the chicken do something spectacular (10 points).
  7. Add other objects to enhance the scene (5 points).
  8. Login to Blackboard (or Epic for Academic Partnership students) and submit your Alice project file.

Quiz

Login to Blackboard and take the Chapter 7 quiz.

No comments:

Post a Comment