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 on the board
private int row;
private int column;
public ChessPiece(int r, int c)
{
row = r;
column = c;
}
}
Below, write a constructor for your Queen
subclass
(the constructor only, not the complete class declaration).
The constructor should take both the row and column values as
parameters and pass those values to the superclass constructor.
Do not write any other methods--just the constructor.
Your feedback will appear here when you check your answer.