Java OOP GUIDE / WORK CARD CLASS 2 SOLUTIONS TASK –
PART 1 – CARD CLASS SETUP
TASK –
PART 2 – CARD CLASS SETUP Here
is my solution:
Note:
My solution’s toString() method is slightly different from what the question
asks for. Mine outputs the entire
suit’s name while the question asks for the first letter. To
conform with the question’s requirement, you can simply take the first letter
of the suit by using: return "A
of " + suit.substring(0,
1); TASK –
PART 3 – TESTING THE CARD CLASS
|
||
|