Connect 4

Make a class called Piece with the following instance variables:

  1. color (use a import java.awt.Color)
  2. row
  3. column

A Connect4 Piece is either Color.RED or Color.BLACK

Make a Constructor with three parameters in the same order listed above

Make the following methods:

  1. setColor
  2. getColor
  3. setRow
  4. getRow
  5. setCol
  6. getCol
  7. setLocation(int row, int col)
  8. toString
  9. equals(Piece other) which returns true if the other Piece is the same Color

Add this class in a Java Project with the following classes: