/** * Author: Josiah Yoder et al. * User: yoder * Class: SE1011-011 * Date: 10/21/13 1:18 AM * Lesson: Week 7, Day 1 */ import java.util.Scanner; public class Example011_6_2 { public static void main(String[] ignored) { // Local variable: // A variable declared inside a method or control structure. // Goes out of scope at the end of the method. // Instance variable // A variable stored in an instance of s class, // that is, stored in an object. // Class variables // Not yet covered // Control flow: // e.g. if, while, for, do-while, else, switch. // Why object-oriented programming? // 1. Natural way of thinking // combine variables & methods into objeccts // 2. Modularity // OO programming allows us to encapsulate (hide) // implementation details. } }