Defining a Class Classes are used to create objects and to define object data types and methods. Classes are defined when you have an object that you are going to program.

public class Menu
//definition of a class called Menu used for program

Calling a method An object is calling a method when the code is trying to get the object to complete an action

int choice = sc.nextInt();  // calling a  method from scanner
//scans the next input of data as an integer

Mutating Data An object is mutating data when it takes the original input of data and mutates it, returning it as different data

input3 = new Scanner(System.in);
            System.out.println("Enter a degree in Celsius as a double: ");
            double celsius = input3.nextDouble();
            double kelvin = (celsius + 273.0); //mutation is taking double input and using arithmetic to mutate it
            System.out.println( celsius + " degree Celsius is equal to " + kelvin + " in Kelvin");
            input3.close();

Console, GUI, Code.org Differences

  • Console:inputs and outputs seen as code, not visuals* GUI: Uses visuals and interactive as compared to consoles
  • Code.org: easy to understand learning platform, learned about extends, inheritance, classes, and methods