Write a program that takes user input describing a playing card in the following shorthand notation:

Notation

  

Meaning



A

  

Ace



2 … 10

  

Card values



J

  

Jack



Q

  

Queen



K

  

King



D

  

Diamonds



H

  

Hearts



S

  

Spades



C

  

Clubs

Your program should print the full description of the card. For example,

Enter the card notation:
4S
Four of spades

Implement a class Card 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".

Complete the following files:

Card.java

CardTester.java

Use the following file:

CardPrinter.java

import java.util.Scanner;

/**
   This is a test for the Card class, which outputs the full
   description of a deck of cards.
*/
public class CardPrinter
{
   public static void main(String[] args)
   {
      Scanner in = new Scanner(System.in);
      
      System.out.println("Enter the card notation:");
      String input = in.nextLine();
      Card card = new Card(input);
      System.out.println(card.getDescription());
   }
}