Questions from Starting Out With Java


Q: Design a Card class. The class holds fields that contain a

Design a Card class. The class holds fields that contain a Card’s value and a suit that is one of the four strings Spades, Hearts, Diamonds, or Clubs. Also, add a field to the class...

See Answer

Q: Create a Rock Paper Scissors game in which the user enters a

Create a Rock Paper Scissors game in which the user enters a string rock, paper, or scissors. Allow the choice to be valid whether the player enters a choice in uppercase letters, lowercase letters, o...

See Answer

Q: Create a simple guessing game, similar to Hangman, in which

Create a simple guessing game, similar to Hangman, in which the user guesses letters and then attempts to guess a partially hidden phrase. Display a phrase in which some of the letters are replaced by...

See Answer

Q: Eliza is a famous 1966 computer program written by Joseph Weizenbaum.

Eliza is a famous 1966 computer program written by Joseph Weizenbaum. It imitates a psychologist (more specifically, a Rogerian therapist) by rephrasing many of a patient’s statements as questions and...

See Answer

Q: Write an application that contains an array of 10 multiple-choice

Write an application that contains an array of 10 multiple-choice quiz questions related to your favorite hobby. Each question contains three answer choices. Also create an array that holds the correc...

See Answer

Q: Create a Die class whose constructor sets a value from 1 to

Create a Die class whose constructor sets a value from 1 to 6. Include a method to return the value. Save the file as Die.java. Create an application that randomly “throwsâ ...

See Answer

Q: Create a Card class so that each Card holds the name of

Create a Card class so that each Card holds the name of a suit (Spades, Hearts, Diamonds, or Clubs) as well as a value (Ace, King, Queen, Jack, or a number value). Save the file as Card.java. b. Creat...

See Answer

Q: Create a Secret Phrase game similar to Hangman, in which the

Create a Secret Phrase game similar to Hangman, in which the user guesses letters in a partially hidden phrase in an attempt to determine the complete phrase. Within the program: ❯❯ The phrase to be g...

See Answer

Q: Magic 8 Ball is a toy developed in the 1950s and used

Magic 8 Ball is a toy developed in the 1950s and used for fortune-telling or advice-seeking. A player asks or thinks of a yes-or-no question such as Will I be rich someday? The player then turns the b...

See Answer

Q: a. Sunshine Seashore Supplies rents beach equipment such as kayaks,

a. Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. In Chapter 4, you created a Rental class for the company. Now, make the following c...

See Answer