//An instance of this class represents a sequence of Positions //Each member of the sequence is orthogonally adjacent to its // predecessor and successor. //A Position in this Path occurs no more than once in this Path import java.util.ArrayList; public class Path { //Instance Variable private ArrayList path; //Constructor public Path() { this.path = new ArrayList(); } //Accessor: //Returns COPIES of the Positions in this Path in the // same order in which they occur in this Path public Position[] getPath() { return null; } //Mutator: //Add a new Position after the current last Position in this Path //A Runtime Exception is thrown if // - the new Position duplicates a Position already in this Path // - the new Position is not adjacent to the last Position public void extend(Position step) { } //Mutator: //Remove and return the last Position from this Path //A Runtime Exception is thrown if this Path is empty public Position backUp() { return null; } //Override public String toString() { return ""; } }