0
/ 50
Below is a ChessPiece
class that we will be using as a superclass for a Queen
subclass.
public class ChessPiece { // the location of this...
Below is a ChessPiece
class that we will be using as a superclass for a Queen
subclass.
public class ChessPiece
{
// the location of this chess piece in our microworld
private int row;
private int column;
public ChessPiece(int r, int c)
{
row = r;
column = c;
}
}
Below, write the constructor for the Queen
subclass. You'll need to
call super
, but calling super()
without parameters won't work. You'll need to pass the
row and column values through to the superclass.
Your feedback will appear here when you check your answer.