Extends

extends a class (indicates that a class is inherited from another class) inherit attributes and methods from one class to another

public class PainterPlus extends Painter {

PainterPlus subclass extends from Painter superclass

Creating Objects

PainterPlus myPainterPlus = new PainterPlus();

Making a new object, PainterPlus, from the class myPainterPlus

Using Objects

myPainterPlus.turnRight();

Using the myPainterPlus object to turn right (method)

public class Menu

Defining a Class

Mutating Data is when a program takes the original input and mutates it into a different output

input3 = new Scanner(System.in);
System.out.println("Enter your name as a string: ");
String name = input3.nextLine();
System.out.println("Hello " + name );
input3.close();

GUI Console:

  • Javax Swing UI (JFrame)
  • Timer with a TimerTask to allow action to repeatedly occur without halting thread.

Console Menu:

  • A 2D array is used to store COLORS
  • A Control Structure, Switch, is used to process Menu select to code that performs related action