Question: Creating a version of the card game SET in Java, using classes Card, Triad, Group, Deck, and Simulation. I have the card class created already(below)
Creating a version of the card game SET in Java, using classes Card, Triad, Group, Deck, and Simulation. I have the card class created already(below) but I need the other 3. The Triad class should be set up -cards:Card, Triad(Card, Card, Card), isSet():Boolean, toString():String and it determines if the cards dealt are a SET. Each of the set of 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. The Group class should implement Iterable interface and is created to show how many sets were created, so you have Triad class that should tell the user if the dealt cards either is or is not a SET and you have the Group class that returns below that says number of SETS made. The Deck class should extend Group and is just created to shuffle and deal the cards. The Simulation class is the main method and is the only class with a static method. This class should allow the user to input a number of cards to deal, and after dealing out that number of cards 10,000 times print how many times there was at least one set and what was the average number of sets dealt.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
