I would like help writing this code as it is due on friday
Programming Project #3 A Linked List Text BlackJack Card Game (15 points) One of the best examples of a using a Link List is a card game. A deck of 52 cards could be a list of 52 card objects. To deal a card, remove a link from the deck and insert it into another list, the players hand. Your mission, is to start with this code and build a BlackJack card game. Obviously the program is just the start, it creates the link list that represents deck of cards. Your job is complete the game of BlackJack (aka 21). The cards you see on the screen will be part of a Linked List. When you deal a hand of cards, you must remove a card from the decks list and move the dealt card to the hands linked list. Make sure you pay attention to the following guidelines for this project: Use at least 2 linked lists in your game. For BlackJack it would be a deck and players hand. Show both lists on the screen. Design upgrades to the Card class for use in scoring and display. The card class must have member variable(s) that allow you to determine the rank/suit of the card and determine scoring (Ace's are 1 or 11 points, King/Queen/Jack/Ten are 10 points, Two through Nine are worth their face value). Use the linked lists when displaying cards or scoring hands. When you access cards in a linked list use the following pseudo code to do it: current card = list.first while (current card is NOT null) display current card on the screen current card = current card.next Here are some hints that make this project easier: The card value (ex. Ace hearts, 2 clubs) is is determined by a simple integer zero to 51. cardnum 0 to 12 are the Ace clubs, 2 clubs, ... King clubs cardnum 13 to 25 are the Ace diamonds, 2 diamonds, ... King diamonds cardnum 26 to 38 are the Ace hearts, 2 hearts, ... King hearts cardnum 39 to 51 are the Ace spades, 2 spades, ... King spades The Deal menu option should deal 2 cards from the deck and move them to the players hand. The hit menu option should deal 1 NEW card from the deck and move it to the players hand. The stand menu option ends the game. It means the player does NOT want more cards. The cheat toggle menu option will be implemented AFTER the game is done. At first just show ALL the cards in the deck so the player knows exactly what will be dealt. But, once you have the code working have cheat toggle HIDE the cards, so the user does NOT know what will be dealt next. This option turns cheat on/off. Get the basic game working, once that is done start implementing more features Partial credit warning! Do as much as you can, a partially working game is better than turning in nothing. The basic play is: Deal, Hit zero or more times, then stand. After the stand that hand is done and a new game should be started by doing 'Deal' again. DO NOT create a new deck between games, just deal from smaller deck link list. If you want to go easy on yourself, I would get Deal/Hit/Stand (repeat) working first. Just display the simple numbers for the card values, make sure the movement of cards from the deck to the player is working. Once the dealing works, then display the NAME of the cards instead of the numbers (ex. Ace Sp vs. 0) Once the display look nice, work on scoring (Ace's are 1 or 11 points, King/Queen/Jack/Ten are 10 points, Two through Nine are worth their face value). Or Google 'Blackjack scoring'. The goal of the game is to score 21 (or close to it). If the player scores 21 with the first TWO cards, game over they win. If the Player, exceeds 21 game over, they lose. The player should STAND if they think the next card will exceed 21 for their hand. Optional, do NOT attempt unless full game is working. Add a dealer hand that automatically plays againts the players hand. This requires you to have scoring working, do not attempt unless scoring is working. Here is the code you should start with. Please place EACH class in its own .java file package project3; import java.util.Scanner; /** * ************************************************************* * Project Number 3 - Comp Sci 182 - Data Structures TEXT Link List Start Code - * Build your program starting with this code Card Game Copyright 2005-2020 * Christopher C. Ferguson This code may only be used with the permission of * Christopher C. Ferguson ************************************************************** */ public class Project3 { private CardList theDeck = null, theHand = null; //////////// MAIN //////////////////////// public static void main(String[] args) { Project3 tpo = new Project3(); tpo.showMenu(); } public void showMenu() { boolean keep_playing = true; theDeck = new CardList(52); theHand = new CardList(0); Scanner input = new Scanner(System.in); int option; System.out.println("Welcome to Link List BlackJack"); while (keep_playing) { theDeck.showCards("The Deck: ", 3); theHand.showCards("The Hand: ", 52); System.out.print("1)Deal 2)Hit 3)Stand 4)Cheat Toggle 5)Quit: "); option = input.nextInt(); switch(option) { case 5: keep_playing = false; break; } } } } // End Of class Project3 /** * *************************************************************** * Class Link, the base class for a link list of playing cards May be placed in * a file named Link.java * ***************************************************************** */ class Link { protected Link next; public Link getNext() { return next; } public void setNext(Link newnext) { next = newnext; } } // end class Link /** * *************************************************************** * Class Card, the derived class each card is one object of type Card May be * placed in a file named Card.java ***************************************************************** */ class Card extends Link { private boolean showcard = true; private int cardnum; public Card(int card) { cardnum = card; } public Card getNextCard() { return (Card) next; } public String getCardNum() { if (showcard) { return "" + cardnum; } else { return "**"; } } public String getCardSuit() { return "SSS"; } public String getCardRank() { return "RRR"; } public void setShowcard(boolean b) { showcard = b; } } //end class Card /** * *************************************************************** * Class CardList, A Linked list of playing cards May be placed in a file named * CardList.java * * Note : This class can be used to create a 'hand' of cards Just Create another * CardList object, and delete cards from 'theDeck' and insert the into the new * CardList object * ***************************************************************** */ class CardList { private Card firstcard = null; private int numcards = 0; public CardList(int num) { // pass zero for an empty list, pass 52 for a full deck numcards = num; //set numcards in the deck for (int i = 0; i < num; i++) { // load the cards card temp = new card(i); if (firstcard != null) { temp.setnext(firstcard); } firstcard = temp; } } public card getfirstcard() { return firstcard; } public void showcards(string message, int maxcards) { card current = firstcard; system.out.print( message); while (current != null) { system.out.print(current.getcardnum() + " " ); current = current.getnextcard(); num;="" i++)="" {="" load="" the="" cards="" card="" temp="new" card(i);="" if="" (firstcard="" !="null)" {="" temp.setnext(firstcard);="" }="" firstcard="temp;" }="" }="" public="" card="" getfirstcard()="" {="" return="" firstcard;="" }="" public="" void="" showcards(string="" message,="" int="" maxcards)="" {="" card="" current="firstcard;" system.out.print(="" message);="" while="" (current="" !="null)" {="" system.out.print(current.getcardnum()="" +="" "="" "="" );="" current=""> num; i++) { // load the cards card temp = new card(i); if (firstcard != null) { temp.setnext(firstcard); } firstcard = temp; } } public card getfirstcard() { return firstcard; } public void showcards(string message, int maxcards) { card current = firstcard; system.out.print( message); while (current != null) { system.out.print(current.getcardnum() + " " ); current = current.getnextcard();>