Computers and Technology

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.; }}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 11:00, dirttrackr75
Which of the statements below describe the guidelines for the use of text in presentation programs? a. do not use numbered lists. b. fonts should be appropriate for your audience. c. limit the number of fonts you use to three or four. d. only use bulleted lists for sales promotions. e. select font sizes that are appropriate for your delivery method. f. use font colors that work well with your background. select all that apply
Answers: 1
image
Computers and Technology, 24.06.2019 17:50, yssbammy
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, jose4197
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
image
Computers and Technology, 25.06.2019 05:10, mathbrain58
Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_dict') as key-value pair. the program then asks if the user wants to enter more data (more data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. note: ignore the case where the name is already in the dictionary. example: name: pranshu number: 517-244-2426 more data (y/n)? y name: rich number: 517-842-5425 more data (y/n)? y name: alireza number: 517-432-5224 more data (y/n)? n [('alireza', '517-432-5224'), ('pranshu', '517-244-2426'), ('rich', '517-842-5425')]
Answers: 3
Do you know the correct answer?
Write a program that takes user input describing a playing card in the following shorthand notation:...

Questions in other subjects: