Object Oriented Programming

Let's make a game!

Instructions

Basic Rules of Super Great Minimonopoly

Onto the Review!

(content taken from previous lectures)

Object Oriented Programming

Class


    public class Cat{
        String name;
        String color;

        public Cat(String name, String color){
            this.name = name;
            this.color = color;
        }

        public void meow(){
            System.out.println("MEOW!");
        }
    }
        

Using a Class


  public class TestCat{
      public static void main(String[] args){
          Cat mrWhiskers = new Cat("Mr.Whiskers",
                                  "Gray");
          Cat fuzzles = new Cat("Fuzzles", "Black");

          mrWhiskers.meow();
      }
  }
        

Inheritance

How Access Modifiers Affect Inheritance

do a google search for access modifers java

this vs super

Static

Initialization Blocks

Order of Initialization

Final

Abstract

Interfaces

Interfaces


      interface CanSee { void see(); }
      interface CanMove { void move(); }
      interface CanFly extends CanSee, CanMove {
        void fly();
      }
      public class Bird implements CanFly{
        public void see() { };
        public void move() { };
        public void fly() { };
      }
    

Monopoly Check-In!

Debugging In Eclipse

code here