Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program called CardWord that takes user input describing a playing card in the following shorthand notation: Card Values: A Ace 2 . .

Write a program called CardWord that takes user input describing a playing card in the following shorthand notation:
Card Values:
A Ace
2...10 Card values
J Jack
Q Queen
K King
Suit Values:
D Diamonds
H Hearts
S Spades
C Clubs
Your program should print the full description of the card.
Sample Output:
Enter the card notation: QS
Queen of Spades
Implement a class CardWord whose constructor takes the card notation string and whose getDescription method returns a description of the card. If the notation string is not in the correct format, the getDescription
method should return the string "Unknown".
Create a CardTester to test all of the functions of the CardWord class.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

Students also viewed these Databases questions

Question

How do i calculate the beta?

Answered: 1 week ago