CS计算机代考程序代写 public class InheritanceTester {

public class InheritanceTester {
public static void main(String[] args) {
Rook rook1 = new Rook(2, 4);
rook1.move(4,10);
System.out.println(“rook1 location: ” + rook1);
System.out.println();
Piece rook2 = new Rook(3,5);
rook2.move (4,4);
System.out.println(“rook2 location: ” + rook2);
System.out.println();
Piece rook3 = new Piece(4,6);
rook3.move(8,12);
System.out.println(“rook3 location: ” + rook3);

System.out.println(rook1.equals(rook2));
}
}