Section Three: Writing Code (Program One)

 

class Walker

{

    private String name;

    private String race;

    public static final String NEMESIS = "Sauron";

    public Walker ()

    {

        name = "";

        race = "";

    }

    public String getName () { return name; }

    public void setName (String n) {name = n; }

    public String getRace () {return race; }

    public void setRace (String r) {race = r;}

}

 

class LOTR

{

    public static void main (String [] argv)

    {

        Walker w1 = new Walker ();

         }

}