Question: JAVA CODE USE ENUM The Task Write a program that finds all sets that can be made from twelve given cards. Sample Input and Output

JAVA CODE USE ENUM

 JAVA CODE USE ENUM The Task Write a program that finds

The Task Write a program that finds all sets that can be made from twelve given cards. Sample Input and Output Input The input to your program will consist of 12 distinct cards arranged on four lines as follows: Each card is represent by a sequence of four characters corresponding to the number of symbols; the shape of the symbols: diamonds (D), squiggles (S), and ovals (O); the fill style of the symbols: solid (S), striped (T), and open (O); and, the color: red (R), green (G), and magenta (M). See the sample input below. Output Output all sets than can found, one per line. For each set, output the numbers of the card in the set in sorted order. The sets should be listed in sorted order using the number of their first card, breaking ties using the numbers of the second and third card in the set. If no sets can be formed, output "no sets". (Do not include any punctuation.) Sample Input and Output Sample Input 3DTG 3DOM 2DSG 15OM 1DTG 2OTR 3DOR 3STG 2DSM 3SSM 30TG 1DTM Sample Output Six sets can be found in the sample input. 123567897781011121291211

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!