Answered step by step
Verified Expert Solution
Link Copied!

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

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago