CJCoding With Joseph
15free / daySign inCreate account

Piece is an abstract class with two abstract methods, and its finished describe() method uses both. Two classes extend it in this file, Bishop and Rook, and each one must give a body to both abstract methods before it can be created. Complete all four bodies.

Requirements: 1. In Bishop, symbol() returns B and value() returns 3. 2. In Rook, symbol() returns R and value() returns 5. 3. symbol() returns a String, so the letter goes in double quotes.

Do not change the Piece class, and keep Bishop without the word public, because a Java source file may contain only one public class.

Do NOT write a main method.

Expected output

R is worth 5
B is worth 3

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
Abstract ClassesClasses
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.