Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java, I have code for a Triad class for this card game but I'm having trouble with my TestTriad class to see if the
In Java, I have code for a Triad class for this card game but I'm having trouble with my TestTriad class to see if the code works. Using code below create a TestTriad class. Thankyou.
public class Triad private Card[] cards; e public Triad(Card one, Card two, Card three) cards new Card[3]; cards[0] = one; cards[1]-two; cards [2]-three; e public boolean isSet() return cards[0].getShading().equals (cards [1].getShading)) && cards[0].getShading().equals (cards [2].getShading)) && cards[0].getColor().equals (cards [1].getColor()) && cards[0].getColor().equals (cards[2].getColor()) && cards[0].getShape().equals (cards [1].getShape()) && cards[0].getShape).equals (cards [2].getShape()); e 0verride public String toString() return "Triad [cards-" Arrays.tostring(cards) +"]";l
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