Distinguishing repetitive code with the same implementation
- by KyelJmD
Given this sample code
import java.util.ArrayList;
import blackjack.model.items.Card;
public class BlackJackPlayer extends Player {
private double bet;
private Hand hand01 = new Hand();
private Hand hand02 = new Hand();
public void addCardToHand01(Card c) {
hand01.addCard(c);
}
public void…