LLD - Design — Chess Game
Given the following pseudo-code, what will be the output when calling
move() on each piece in the list?class Piece { move() { return 'generic move'; } } class Knight extends Piece { move() { return 'L-shape move'; } } class Bishop extends Piece { move() { return 'diagonal move'; } } pieces = [new Piece(), new Knight(), new Bishop()] for p in pieces: print(p.move())