Skip to main content

Display number of guesses for each player in addition to average number of guesses for each play

  

Read chapters 6-7. Run the two argument files to understand different ways of using arguments and the use of subroutine with numerical values to bring the values from the subroutine to the main program or not. Run also GuessMyNumber game from the module.

Modify the Guessing game from chapters 6-7 to play with 2 players instead of 1 player by showing input and stats for player 1 and player 2.
- To end the game: You can ask for number of games to be played at the beginning of the game or you can ask the user whether to continue after each game.
- Display number of guesses for each player in addition to average number of guesses for each play.
- Show which player wins the whole match based on who has the least average number of guesses after the total number of games selected is over.
- When each game is played, change the output to display that the last guess is correct. Example: Congratulations! 53 is correct!
- When the players reach the total number of games chosen, or when the player chooses not to continue, display either: "Match over! Player 1 wins!" , OR "Match over! Player 2 wins!" , OR "Match over! It's a tie!"

Comments

Popular posts from this blog

Why was this movie important to hollywood? What was the feeling of it, the colors, techniques, theme, director, style, music, anything! What was special about Alfred Hitchcock and this film?

  Directions For this assignment, you will need to choose a topic or person from any of the various eras, movements or decades that we've discussed this semester and do a presentation on them using any media format you choose. (IM CHOOSING THE MOVIE PSYCHO-    Why was this movie important to hollywood? What was the feeling of it, the colors, techniques, theme, director, style, music, anything!  What was special about Alfred Hitchcock and this film? The subject matter doesn't have to be limited to an actor, director or filmmaker, but  the topic of your presentation could be on the inventions of any of the equipment, editing or filming techniques that you've learned about.  Basically, you can pick an area to cover and do your presentation on that.  The point is that you take a deeper dive into the subject by exploring information about it that may not have been  covered in this course.  It does have to...

Account Cost Systems and Cost Behaviors

  ACC501 Account Cost Systems and Cost Behaviors You are applying for a managerial position at an innovative and rapidly growing company. This is a dynamic company that wants an individual who adds value to the organization. Managers at this company wear many hats, so the position requires managing products, people, and financial aspects of running the company. As part of the interview process, you are required to make a presentation covering four different topics, one per module for this course. You choose the company and the new product that you want to showcase in your presentation. It can be real or fictitious (based on an industry). This is for background purposes only. The presentation is to showcase your abilities and what you can contribute to the organization. IBIS World (access on the Trident Portal through the Online Library > Additional Library Resources > IBISWorld link) and BizStats have estimates of cost of goods sold ...

Starting with this provided code, add the following functionality

1.Starting with this provided code, add the following functionality: Replace hardcoded strings “Zero”, “One”, “Two”, “Three” in the ArrayList based on user typed input (use Scanner or JOptionPane classes). The user will be prompted for the String to be stored in the ArrayList and then hit enter. The user will be able to continue to add items to the ArrayList until they just hit enter without typing anything. Once the user does this (hits enter without typing anything), the program will display all of the elements of the ArrayList, both the index and String values, in a table. It will do this via a single loop making use of an iterator method. 2. Starting with this provided code, add the following functionality: Use a Try/Catch block so that the exception is caught and the program exits a bit more gracefully. Save this file as TryCatch.java. (Be sure to rename the Public Class accordingly.) Starting with the provided code again (without the Try/Catch block), fix the code so that ...