Question
Trying to create a version of the card game SET in Java, and I need to implement a isSet () : boolean to determine if
Trying to create a version of the card game SET in Java, and I need to implement a isSet () : boolean to determine if the cards dealt are a SET. The three cards have four attributes number, shading, color, and shape and each attribute assumes one of three possible values,Number: { One, Two, Three } Shading: { Solid, Striped, Open } Color: { Red, Green, Purple } Shape: { Ovals, Squiggles, Diamonds }. It is defined as a set if with respect to each of the four attributes, the cards are either all the same or all dierent. For Example: First Card is one green oval with a solid shading, Second Card has two green ovals with solid shading and the Third Card has three green ovals with solid shading, all cards have the same shape (ovals), the same color (green), and the same shading (solid), and each card has a dierent number of ovals. If that Third Card was three green squiggles with solid shading it wouldn't be a set because the shape wasn't an oval. I have the Triad(Card, Card, Card) just having trouble with the isSet () : boolean part of my code.
Triad -cards:CardD +Triad(Card,Card,Card) +isSet0:boolean +toString0:StringStep 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