Difference: CSC121S2024Lab13a ( vs. 1)

Revision 12024-04-16 - CathyBareiss

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CSC121SylS2024"

Classes: Final version of Mastermind

At the end of this lab, you will have a complete mastermind game

Learning Objective(s)

  1. Finish the mastermind game
  2. End the semester programming on a good note.

Overview of the Program

Finish the mastermind game

Details

  1. Finish the mastermind game
  2. The main method should repeat playing a complete game until the user decides to quit.
  3. The method to play a game should be sent a scanner and continue to get guesses from the user until the user guesses the solution.
    1. It should use methods to:
      1. display a menu
      2. generate a computer "solution"
      3. get guess a guess from the user
      4. determine how many are perfect
      5. determine how many are good (which might use another method)
    2. It tracks the number of guesses

Sample dialogue

I have the solution.  What is your guess?
1 1 1 1 1
On guess 1:
You got 0 perfect.
You got 0 good.
What is your next guess?
2 2 2 2 2
On guess 2:
You got 2 perfect.
You got 0 good.
What is your next guess?
2 2 3 3 3
On guess 3:
You got 0 perfect.
You got 2 good.
What is your next guess?
4 4 2 2 4
On guess 4:
You got 3 perfect.
You got 0 good.
What is your next guess?
4 0 2 2 0
On guess 5:
You got 3 perfect.
You got 2 good.
What is your next guess?
0 4 2 2 0
You guessed it.
Do you want to play again (y or n)? n

Submission

  1. create an empty zip folder
  2. place your java file into it
  3. create a pdf document that contains your Software Development Report for this program and place the pdf file into the zip folder
  4. submit the zip folder on canvas
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback