Answered step by step
Verified Expert Solution
Question
1 Approved Answer
beginner java help! Please don't make the code too complicated The goal of this program is to take in user input describing a playing card
beginner java help! Please don't make the code too complicated
- The goal of this program is to take in user input describing a playing card in the following shorthand notation:
A Ace
2....10 Card Values
J Jack
Q Queen
K King
D Diamonds
H Hearts
S Spades
C Clubs
- The user input with is shorthand notation for a single card.
- Your program will then output the full description for that card.
See the sample output below:
Welcome! Enter the Card Notation: QS
You Entered: Queen of Spades
Here is another sample output:
Welcome!
Enter the Card Notation: 4H
You Entered: 4 of Hearts
- To accomplish the goals of this program, you will need to use if statements, else if statements and an else clause (else is required!).
- There are two approaches to the program
- Complete the program using 52 if statements (one for each of the possible value and suit combinations of the playing cards).
- OR, Complete the program with many fewer if-statements, making use of the charAt() and length() methods for Strings
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started