Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!