Question: GUIDELINES BELOW must be written in Java please help will upvote if working! HW4: for this homework, you will create a card matching game. You

 GUIDELINES BELOW must be written in Java please help will upvote

GUIDELINES BELOW

if working! HW4: for this homework, you will create a card matching

game. You will use the Math.random() class method to generate a pseudo

must be written in Java please help will upvote if working!

HW4: for this homework, you will create a card matching game. You will use the Math.random() class method to generate a pseudo random card value (Ace - King) and suit (Clubs, Diamonds, Hearts, Spades). Then prompt the user to enter a card value and suit. Then compare the two for a match. Informing the user of the result. Directions: Create your matching card game by Welcoming the user to your game, prompt them for their full name and wishing them luck based on their first name in all caps. Then have them enter a card value and a card suit. Generate a random card value and suit using the random method. Use an if / else statement to compare the results of both the card value and suit of the user's guess to the computer guess for a match. Notify the user if the cards match in value and suit. See key below to guide you. Include the following items in your code. Save your file as HW4[your_initials].java. Upload when completed with no compiler errors. 1. comments for author, date, class, and assignments at the top of your file with corresponding data: Example: / Author: your name Date: current date Class: CSC 160 Assignment: HW2 / 2. comments ( 5 pts) - add a single line of comments for your program description 0 add single line of comments describing your code as needed 3. declare and initialize variables appropriately 4. prompt the user: - first welcome the user and inform them the name of the game - have the user enter their full name and then wish them luck with their first name in capital letters 5. input from the keyboard: - validate user entered a correct selection value, otherwise, notify the user with descriptive text the entry was incorrect 6. pre-built class methods use at least ONE char data type and char method in your program use at least ONE String type and String method in your program to generate a pseudo random card for values of 113(AK) use the following Math.random() method and values to cast and truncate the double return value to a card of an integer value: intcard=(int)(Math.random()13+1);//using+1oneavoidsrollingzero 7. determine ace and face cards - if a card value is a 1 , then print Ace in output - if a card value is a 11,12 , or 13 then print Jack, Queen, or King in output 8. determine suit - using Math.random() to generate numbers 14 for suit and using a Switch statement of if / else to set the suit value in characters or text based int value: Example: int suit =( int )( Math.random () 4+1); if ( suit ==1) \{ \} String cardSuit = "Hearts"; 9. determine match - determine if the user's card number and suit matches the computer's number \& suit 10. escape sequence & display to the user notify the user of the card guess for the number \& suit notify the user of the computer guess of the card number \& suit notify the user if there is a match or not in one or more of your output statements use an escape sequence 11. Save, compile, execute! Code should be error free

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!