subject

Objective: Exercise step-wise refinement to produce an object-oriented way of sorting a hand of cards. This will make use of the object oriented-concept of an interface. It should also exercise understanding of an ArrayList. Use good coding habits to avoid hard-coding values, avoid user input errors and bullet-proof your code. Description: Have the user enter a hand of cards from the console in random order. Write a program that does a sort on a collection of a custom object (not using a library in C#) to order the cards. Then print to the console a least-to-greatest ordered arrangement of the cards. Playing cards are ordered by value then by suit. The program should take any number of cards, so this could be a hand of five, seven or thirteen cards. For values, assume: 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 <10< J < Q < K < A For suits, assume: Hearts < Diamonds < Clubs < Spades For simplicity of input this will only deal with capital letters, so if the user enters a lowercase letter, you should capitalize it. Example: If a user enters 7H (it means 7 of hearts), 3C (it means 3 of Clubs), AH (it means ace of hearts), and AS (ace of spades), then it should print 3C, 7H, AH, and AS.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
William travels a lot on business purpose. he needs to regularly communicate with his business partner. he also needs to send out weekly reports to his boss while he is traveling. which web-based application best suits william’s needs? (social media, webmail, wiki) is the best web-based application for william. he can access this application via the internet using a (digital cable, fax machine, web browser).
Answers: 1
You know the right answer?
Objective: Exercise step-wise refinement to produce an object-oriented way of sorting a hand of card...
Questions
question
Geography, 14.08.2020 15:01
question
Mathematics, 14.08.2020 15:01
question
Mathematics, 14.08.2020 15:01
question
Mathematics, 14.08.2020 15:01
question
History, 14.08.2020 15:01
question
Biology, 14.08.2020 15:01
question
Mathematics, 14.08.2020 15:01
question
Mathematics, 14.08.2020 15:01
Questions on the website: 13722361