User Profile
Collapse
-
i tried it this way but it gives me an error and i dont know how to fix it
Card.java:19: unreachable statement
suit = generator.nextI nt(4) + 1;
^
1 error
import java.util.Rando m;
public class Card
{
private static Random generator = new Random();
public final static int spades = 0,hearts = 1, diamonds = 2, clubs = 3;...Leave a comment:
-
help with card program
The question says: Design and implement a class called Card that represents a standard playing card. Each card has a suit and a face value. Create a program that deals 20 random cards.
this is the card class i made but i dont know if it right...i also don't know how to creatre a program that deals random cards.
public class Card
{
public final static int spades = 0,hearts = 1, diamonds = 2,... -
-
Help with student program
Modify the Student class so that each student object should also contain the scores for three tests. Provide a constructor that sets all instance values based on parameter values. Overload the constructor such that each test score is assumed to initially be zero. Provide a method called setTestScore that accepts two parameters: the test number (1 through 3) and the score. Also provide a method called getTestScore that accepts the test number and...
No activity results to display
Show More
Leave a comment: