class NameDriver{ public static void main( String [] argss) { Name n1 = new Name("joe", "louie", "pass"); Name n2 = new Name("aretha", "franklin"); System.out.println("Name 1 first name is " + n1.getFirst()); System.out.println("Name 1 middle name is " + n1.getMiddle()); System.out.println("Name 1 last name is " + n1.getLast()); System.out.println(); System.out.println("Name 1 is " + n1.toString()); // println will call your toString method. System.out.println(); System.out.println("Name 2 is " + n1); // implicit call to toString method System.out.println(); System.out.println("Name 2 is " + n2); // implicit call to toString method System.out.println(); // create a second reference to name 2. // Now n3 is pointing to the exact same name // objects as n2. Name n3 = n2; System.out.println("Name 2 is " + n2); System.out.println("Name 3 is " + n3); System.out.println(); if(n3 == n2) { System.out.println("Pointing to the same object"); } System.out.println(); n3 = new Name("sarah","vaughan"); Name n4 = new Name("stevie","ray","vaughan"); // determine if n3 and n4 have the same last name if (n3.getLast().equals(n4.getLast())){ System.out.println("Same Last Name"); }else{ System.out.println("Different Last Name "); } System.out.println(); // line Break; String firstName = n4.getFirst(); /* Outputs to the Console the characters of the name one per line in * diagonal form * */ for (int i = 0 ; i < firstName.length(); i++ ) { for (int j = i; j >= 0; j--) { System.out.print(" "); } System.out.println( firstName.charAt(i) ); } System.out.println(); Name n5 = new Name("joe","louie","pass"); if(n1 == n5) { System.out.println("n1 and n5 same name object"); }else{ System.out.println("n1 and n5 are different name objects, they just happen to have the same data"); } } }