Question: Need help with these classes please! will upvote! Student # 101047681 Deck Class: import java.util.List; /* finish all of the constructors and methods given here

Need help with these classes please! will upvote!

Student # 101047681

Need help with these classes please! will upvote! Student # 101047681 Deck

Deck Class:

import java.util.List;

/* finish all of the constructors and methods given here */

/* do NOT add any public attributes or methods */

/* add any protected/private attributes you need */

public class Deck{

public Deck(){}

public Deck(int nun_jokers){}

public List getCards(int num_cards){return null;}

public Card getCard(){return null;}

public void addCard(Card c){}

}

Hand class:

import java.util.List;

public class Hand{ protected List cards; public Hand(List cards){ this.cards = cards; } public int numberOfCards(){ if( this.cards == null ){ return -1; }else{ return this.cards.size(); } } public List getCards(){ return this.cards; } /* remove and return the specified card from the hand */ /* return null if the card is not in the hand */ public Card remove(Card card){return new StandardCard(Card.SUITS[4], Card.RANKS[1]);} /* add the specified card to the hand */ public void add(Card card){} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!