To answer your question from earlier:
ChessPiece pawn1Black;
pawn1Black = new Pawn("BLACK", "PAWN" , 1 , 0);
OR:
Pawn pawn1Black;
pawn1Black = new Pawn("BLACK", "PAWN" , 1 , 0);
If you are...
Type: Posts; User: aussiemcgr
To answer your question from earlier:
ChessPiece pawn1Black;
pawn1Black = new Pawn("BLACK", "PAWN" , 1 , 0);
OR:
Pawn pawn1Black;
pawn1Black = new Pawn("BLACK", "PAWN" , 1 , 0);
If you are...
Pretty much. If you wanted to make ChessPiece abstract, you could do this without actually implementing the methods in the ChessPiece class.
For example of how abstract and overriding methods work:...
Ok, I understand your problem.
Your ChessPiece array contains implemented subclasses of ChessPiece, but the "type" of the array is ultimately: ChessPiece. This means that the only methods and...
Your colleague is suggesting that ChessPiece should be abstract. Abstract classes cannot be initialized, so you cannot create any "ChessPiece" objects. This would be correct, since you don't want...