Question: / * * Click nbfs: / / nbhost / SystemFileSystem / Templates / Licenses / license - default.txt to change this license * Click nbfs:

/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
*/
package card;
/**
* A class that models playing card Objects. Cards have
* a value (note that Ace =1, Jack -11, Queen =12, King =13)
* A suit (clubs, hearts, spades, diamonds).
* There are 52 cards in a deck, no jokers.
* This code is to be used in ICE1. When you create your own branch,
* add your name as a modifier.
* @author srinivsi
*/
public class Card {
private String suit; //clubs, spades, diamonds, hearts
private int value;//1-13
public static final String [] SUITS ={"Hearts", "Diamonds", "Spades", "Clubs"};
/**
* @return the suit
*/
public String getSuit(){
return suit;
}
/**
* @param suit the suit to set
*/
public void setSuit(String suit){
this.suit = suit;
}
/**
* @return the value
*/
public int getValue(){
return value;
}
/**
* @param value the value to set
*/
public void setValue(int value){
this.value = value;
}
}
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package card;
/**
* A class that fills a magic hand of 7 cards with random Card Objects
* and then asks the user to pick a card and searches the array of cards
* for the match to the user's card. To be use

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!