CS 40 - Lecture 4

Cover page image

Cay S. Horstmann

Lecture 3 Recap

???

How Can You Get Alice Outside Class?

Please log in to ActiveLecture.org. Click Discuss, type 1 2 3, click Send.

  1. I already installed it
  2. I brought my laptop today so I can get installation help
  3. I will bring my laptop on Thursday so I can get help
  4. I will install it myself over the weekend and use the eCampus discussion feature if I have problems
  5. I need to use a computer in a lab that has Alice preinstalled

How Was the Lab Work on Tuesday?

Please respond in ActiveLecture.org

  1. Too easy/boring
  2. Just right
  3. Too hard/confusing

Thanks for your feedback!

Decisions, Decisions...

???

If/Else

Example: Eating the Closest Cookie

???

Lab #1

Alice Tedium

Recipe for dragging the condition "if the distance from the ESS to cookie1 is less than the distance from the ESS to cookie2".

  1. Drag an if/else tile. When forced to make a choice, select true from the menu.
  2. Click on world, then functions in world's details
  3. Drag the a < b tile into the if, replacing the useless true.
  4. When forced to make choices for a and b, pick any values.
  5. Now click on evilStepSister, then functions in evilStepSister's details
  6. Now drag the distance to tile over the useless value to the left of the <
  7. Repeat for the right side

While

Example: Waiting for the Toaster

???

Lab #2

Reminders

???