Code.org Notes
Discussing what I learned from code.org this week.
public class PainterPlus extends Painter {
PainterPlus subclass extends from Painter superclass
PainterPlus myPainterPlus = new PainterPlus();
Making a new object, PainterPlus, from the class myPainterPlus
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