Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really dont know how to write this Java code, can someone help me? 1. Implement a Card class that represents a single playing card

I really dont know how to write this Java code, can someone help me? image text in transcribed
1. Implement a Card class that represents a single playing card from a standard 52 card deck. Each card has a rank and a suit. Al ranks and suits are public constants in the class (Card. SPADES, Card.ACE, etc). A Card object is created with a rank and suit and it cannot be modified after creation. For this design, two cards are equal if they contain the same rank., Full javadocs documentation required (@param, @return, eOverride). Write a driver class that has amain method that completely demonstrates the functionality of this class. Test all methods Card + SPADES int CLUBS int HEARTS int ACE: Int +JACK: int + QUEEN int - rank: int - suit :int +Card (suit:int, rank:int) +getSuit:int +getRank int +toStringString tequals (otherCard:Card) boolean Create a very simple game of hangman. You are given dict.txt which is a file of words (one per line). Load these words into an ArrayList. Allow the user 10 attempts to guess the word. After each guess, "reveal" all occurrences of the guessed letter in the displayed string or update the number of incorrect guesses. You are required to use at least 2 methods besides mainO, although more may be warranted. A few sample runs are provided. Your game should be entirely case 2. Randomly select one word. Display the word as all asterisks (one asterisk per letter). insensitive. Things you do not need to handle: Invalid input. If the user enters "6" as their guess, it will be counted as an incorrect guess. Duplicate letters. It's up to the user to not guess the same letter twice * You may use abbreviated documentation on this program. For each method, state a short description - no javadocs required. In line comments, as needed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

1. Describe what motivation means.

Answered: 1 week ago