Lecture 9

        class Man extends Human {
                // add the things unique to a Man
        }
        class Man extends Human {
                boolean beard = false;

                public boolean hasBeard() {
                        return beard;
                }
        }
        class Human {
                protected String name;

                public Human(String n) {
                        name = n;
                }

                public String getName() {
                        return name;
                }
        }

        class Man extends Human {
                private boolean beard;

                public Man(String name, boolean beard) {
                        super(name);
                        this.beard = beard;
                }

                public boolean hasBeard() {
                        return beard;
                }
        }
        Man me = new Man("Darrell", false);
        System.out.print(me.getName());
        if(me.hasBeard())
                System.out.println(" has a beard.");
        else
                System.out.println(" has no beard.");
        private boolean setName(String n)
        me.setName("Bob");
        public String getName() {
                return "Man";
        }
        super.name
        super.getName();
        Man me = new Man("Darrell", false);
        Human h = me;
        Human h = new Human("Darrell");
        Man me = (Man)h;
        Human h = new Human("Darrell");
        Man m = new Man("Darrell", false);
        Human temp = h;

        temp.eat();     // calls the eat method of Human
        temp = m;
        temp.eat();     // calls the eat method of Man
        variableName instanceof className
        h instanceof Man
        private boolean isInOrder(Object o1, Object o2) {
                if(o1 instanceof Integer) {
                        // method to compare Integers
                } else if(o1 instanceof String) {
                        // method to compare Strings
                } else {
                        // method to compare everything else
                }
        }
        Integer i1 = (Integer)o1;
        Integer i2 = (Integer)o2;
        if(i1.intValue() < i2.intValue())
                return true;
        else
                return false;