Question
Class Card Properties of Card: -Seed seed -Number number Constructor of Card: Card(BitArray bitArray) {} Define a constructor which takes an object bitArray of type
Class Card Properties of Card: -Seed seed -Number number Constructor of Card: Card(BitArray bitArray) {} Define a constructor which takes an object bitArray of type BitArray and uses the first two elements to define the card seed and the last 3 to define the card number. Methods of Card: Define getters and setters methods for the properties seed and the number.
Override the function toString() in order to print the card (number and seed) using the toString methods of the classes Seed and Number Define the method getColor() retunring the color of the card (using the method getColor() defined in the class Seed ) boolean getColor() {}
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