subject

Write a program that takes 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 your program should print the full description of the card. for example, enter the card notation: qs queen 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".use the following class as your main class: import java. util. scanner; /**this is a test for the card class, which outputs the fulldescription 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.; }}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:50, nicoleskertich
You have written, as part of a school assignment, a research paper on the solar system. you want to share this paper on your school website. on which type of server will you upload it?
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, bowmanari2154
What is used to analyze and summarize your data without graphical support
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, PresleyPie9452
George is working as a programming team lead. which statements correctly describe the skills that he requires?
Answers: 3
image
Computers and Technology, 24.06.2019 16:50, Ameilasmickle15
How many types of string types does python support?
Answers: 1
You know the right answer?
Write a program that takes user input describing a playing card in the following shorthand notation:...

Questions in other subjects:

Konu
English, 14.06.2020 14:57
Konu
Mathematics, 14.06.2020 14:57