Problems with Java UML Class using Mutators and Accessors

I am suppose to make a Driver called Black Jack and a Class program called Card. I have not made the Driver class yet because the professor asked us to do the class program Card first. This is what the teacher has said to use:

Teacher File of problem

Above is the file describing what I am to use. ABSOLUTELY USE NO ARRAYS OR ARRAY LIST, we have not learned that yet and are only allowed to use things we have learned. I have asked a lot of people for help and they always say use arrays and dont understand why I cant use them.

My code so far... Sorry the tabs and spacings are not right I usually figure those out later on.

import java.util.Scanner;

public class Card

private final int MAX = 13;
private int face, suit, points, Spades, Clubs, Diamonds, Hearts, Ace, Jack, Queen, King;
prive int randomNumber = new newCard();

public Card() {
randomNumber = newCard()

public Card(int faceValue,int suitValue) {
        Ace = 1;
        Jack = 11;
        Queen = 12;
        King = 13;

        Hearts = 1;
        Diamonds = 2;
        Clubs = 3;
        Spades = 4;



public void setFace(int face)
face = face

public void setSuit(int suit)
suit = suit


public int getFace()
    return face;}

public int getSuit()
    return suit;}

public int getPoints()
    return points;}


public String toString()
        return "Players cards are " + " ";



My problem Is i have no idea what needs to be done with the mutators I have been putting face = face but its not working out, Also how am i suppose to output the toString method Because im not quiet understanding how the whole face and suit thing is suppose to work the suits is like hearts = 1 and faces are like Jacks =11 I am thinking my program would get confused and output the wrong ones.


First try this.face = face that should do the assignment in setFace. Same for suit. Your default constructor needs to use the java.util.Random class to generate your card values. getPoints should calculate a cards value based on the file you have been given i.e. if face card = 10 etc

Need Your Help

Unit tests for printing in Java Swing

java swing testing

I have some code that uses the Swing/AWT printing functionality that I want to unit test. It uses the systems native print dialog, but is there any way to get the JVM to intercept that and replace it

Auth GET failed: 500 Internal Server Error


i have problem with swift..when i execute swift -V 2.0 -A -U cookbook:demo -K openstack stat