Questions 21-25 refer to the code from the GridWorld case study. A copy of the code is provided in the
Appendix.
Consider the following code segment.
Location loci = new Location(3, 3);
Location loc2 = new Location(3, 2);
if(locl.equals(loc2.getAdjacentLocation(Location.EAST)))
System.out.print("aaa");
if (locl.getRow() == loc2.getRow())
System.out.print("XXX");
if (loclogetDirectionToward(loc2) == Location.EAST)
System.out.print("555");
What will be printed as a result of executing the code segment?
(A) aaaXXX555
(B) aaaXXX
(C) XXX555
(D) 555
(E) aaa