Lecture 5 -- Primitive Types, More Conditionals

Laundry Lab

Primitive Types

We've seen int, double, boolean

We discussed how arithmetic operations using ints and doubles works.

How do we determine if two values are the same?

More Conditionals

  1. Our first attempt at writing Pong. Unfortunately, the paddle doesn't stay in the boundaries. Click on PongUnbounded to show the example.

  2. Our second attempt at writing Pong. This time the paddle stays in the boundaries. Click on PongPaddleBounded to show the example.

Classes

We briefly discussed the ClassyBasketball example.