Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started