Background
Now that we know how to make Objects, we can use them to easily make programs that would have been very complicated otherwise. In this assignment, you will create a class that represents a single playing card (the Card class), and another class that represents a deck of playing cards (the Deck class). Once you complete both of the classes, you can test your work by running a simple javaBlackjackgame that will be provided to you.
Exercise
To test your code AND play a fun game of Blackjack, put theHand.javaandBlackjack.javafiles into the same folder as your Card.java and Deck.java files. Then, compile & run Blackjack.java to play the game. I suggest playing the game a few times to make sure everything works properly. After playing for a little bit,submit onlyCard.javaandDeck.javato gradescopeto make sure the autograder is happy as well. Here is some sample output from a successful game of blackjack (and yeah, I won):
VERY IMPORTANT NOTE:Gradescope will compile and run Blackjack.java to test your code. I understand that you did not create Blackjack.java. When Compiling Blackjack.java, java also compiles Card.java, Deck.java, and Hand.java. If the program compiles and says there is an issue within Blackjack.java, it means there’s a problem with the code that call into your classes! Blackjack.java was compiled and tested before going onto Gradescope.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here