CS51 - Fall 2009 - Lecture 6

  • Primitive types
  • using a boolean variable as the condition in an if-statement
  • int, long, float, double
  • operations: +, -, /, *, %
  • mixing types in an expression
  • == for objects and primitive types

  • PongPaddleBounded
  • paddle behavior might remind you of Better3PointBasketball
    example from last time.
  • coding the full thing requires looking at:
  • how to implement, when to use classes
  • loops
  • active objects
  • Creating new classes
  • ClassyBasketball
  • Class contains:
             public class NameOfClass {
                  // constants
    
                  // instance variables
    
                  // constructor(s)
    
                  // method(s)
             }