Question

PLEASE INCLUDE SAW-PROMPTS FOR 2 PLAYERS NAMES(VALIDATE NAMES). SHOW MENU (PLAYER MUST SELECT FROM MENU B4...

PLEASE INCLUDE SAW-PROMPTS FOR 2 PLAYERS NAMES(VALIDATE NAMES). SHOW MENU (PLAYER MUST SELECT FROM MENU B4 THE GAME STARTS 1=PLAY GAME, 2=SHOW GAME RULES, 3=SHOW PLAYER STATISTICS, AND 4=EXIT GAME WITH A GOODBYE MESSAGE.) PLAYERS NEED OPTION TO SHOW STATS(IN A DIFFERNT WINDOW-FOR OPTION 3)-GAME SHOULD BE rock, paper, scissor and SAW!! PLEASE

USE A JAVA GRAPHICAL USER INTERFACE. MUST HAVE ROCK, PAPER, SCISSORS, AND SAW PLEASE This project requires students to create a design for a “Rock, Paper, Scissors, and Saw” game and then implement it in Java. This Software Requirements Specification (SRS) document will outline all the features required of the system. 1.1 Purpose The purpose of this simple SRS is to provide all the basic requirements necessary to complete Software Design Specification (SDS) for Project 4 and to implement the system. 1.2 Scope The software to be created will be a stand-alone PC representation of the hand game called “Rock, Paper, Scissors, and Saw”, implemented with OO approach using Java. It will have two human players and a computer acting as the third player. 2. General Description When user(s) starts the program, he will be prompted for the names of the two human players. These values will be used for all prompts and statistics in the program. Then there will be a menu with the following selections: “1. Play game”, “2. Show game rules”, “3. Show statistics”, and “4. Exit” in that order. Rules selection will provide rules of the game, statistics will show the accumulative wins, loses, and ties per each player (both rounds and games), and exit will close the program. When play game is selected, each player will be able to select his weapon (rock, paper, scissors, or saw) and computer will make its choice. Each of the players will be playing against the computer. A game will consist of 3 rounds. After each round either a player or computer will be the winner of the round and after 3 rounds, again either computer or player will be the winner of the game. User(s) will be able to run multiple games and their wins/loses/ties will be displayed in the statistics option along with the overall human winner. 2. 1 Product Functions/Requirements Flow Below are all the basic requirements the system must satisfy 2.1.1 Initial screen 2.1.1.1 Description When program starts, it needs to prompt user for the names of the two human players. 2.1.1.2 Stimulus/Response Sequences User starts the program, prompt is displayed and user has to respond before program goes on. 2.1.1.3 Functional Requirements [R1.1] User must be prompted with the following message “What is the name of the first player?” and then after correct response is supplies, “What is the name of the second player?” [R1.2] User must type a string no longer than 20 characters and no less than 5 characters. For invalid input, program must issue an error message and re-prompt. [R1.3] Second player name must be different from first player. For invalid input, program must issue an error message and re-prompt for the second player’s name. [R1.4] Program will use the saved input value for prompting players for their weapons, issue messages, and to display statistics for all players. [R1.5] Once correct response is given, program will display the menu. 2.1.2 Menu 2.1.2.1 Description Program needs to display a menu with 4 selections: “1. Play game”, “2. Show game rules”, “3. Show statistics”, and “4. Exit” in that order. 2.1.2.2 Stimulus/Response Sequences User correctly provides players’ names, menu is displayed, and user may select one of the 4 options. 2.1.2.3 Functional Requirements [R2.1] Menu must be displayed correctly with provided naming of menu choices and in correct order and user can select one of the options by typing the corresponding number and pressing return. [R2.2] Show rules selection must display all the rules for the game (see Rules requirement below for details) and how users can win. User will be able to return to the menu. [R2.3] Statistics selection will display the accumulative statistics per round and game for each player. User will be able to return to the menu. [R2.4] Exit selection must end the program with a “Goodbye” message. [R2.5] Play selection will allow the user to play the game. Once game is completed, user will be able to return to the menu. [R2.6] If user makes an invalid menu selection, error message will be displayed and user will be prompted again. 2.1.3 Statistics 2.1.3.1 Description Program needs to keep track of the statistics. 2.1.3.2 Stimulus/Response Sequences User selects “3. Show statistics” from the menu 2.1.3.3 Functional Requirements [R3.1] Statistics selection will display the number of rounds each player won, lost, or had a tie against the computer, each players stats on new line [R3.2] Statistics selection will display the number of games each player won, lost, or had a tie against the computer, each players stats on new line (winner of the game is one who won most rounds out of the 3 rounds and lost the least rounds) [R3.3] Stats for each player will have his name and rounds and games stats will be shown on same line [R3.4] Statistics selection will display the overall human winner based on the most won games and lost least games against the computer compared to other human players. If both players had same number of wins and losses for games, a tie will be announced for the overall winner [R3.5] The statistics are accumulative until users exit the program. [R3.6] On start of the program, all statistics are 0. 2.1.4 Play game 2.1.4.1 Description Players will be allowed to select their weapons and after 3 rounds, the winners will be shown. 2.1.4.2 Stimulus/Response Sequences Play game is selected from the menu. 2.1.4.3 Functional Requirements [R4.1] When game starts, each Player gets prompted for his selection of Rock, Paper, Scissors, and Saw. The prompt must use the player’s name. [R4.2] Computer makes its random selection to be used against each player (same selection will be used against both human players) [R4.3] For each player, program displays that player’s selection, computer’s selection and who won that round (computer or player) [R4.4] Next round repeats the prompting and announcement of the round winners. This is repeated for a total of 3 rounds. [R4.5] Once all 3 rounds are completed winners of the game are announced for each player. Just like rounds, each player is playing against the computer and so the winner of the game is either the player or the computer. [R4.6] The winner of the game is one who won most rounds. The program must account for ties. For example, if a player won 2 rounds and lost 1 round, then he won the game against the computer. If the player won 1 round, lost 1 round, and tied 1 round then he tied the game against the computer. [R4.7] After game winners are announced, user is able to go back to menu where they can again select one of the options. [R4.8] Users can play as many games as they want 2.1.5 Rules 2.1.5.1 Description Rules of the game will be displayed and used to determine the winner. 2.1.5.2 Stimulus/Response Sequences User selects ”2. Show game rules” and is given the rules or program need to determine a winner. 2.1.5.3 Functional Requirements [R5.1] Winner of the round will be determined as follow: Rock breaks scissors and Saw therefore rock wins over scissors and saw. Rock loses against paper. Scissors cut paper therefore scissors win over paper. Scissors lose against rock and Saw. Paper covers rock therefore paper wins over rock. Paper loses against scissors and saw Saw cuts through scissors and paper therefore saw wins over scissors and paper. Saw loses against rock. If player and computer make the same selection, there is a tie [R5.2] Winner of the game against the computer is one who won more rounds (must account for ties) [R5.3] Overall human winner is based on the greater number of won games against the computer and least games lost (must account for tie between human players) [R5.4] The above rules will be displayed to the user 2.2 Classes / Objects 2.2.1 The software must have four classes as follow: Player – stores all information related to a single player (whether human or computer) Must have an attribute of type Statistics to store statistics data for the player Must have attribute to store player’s name Statistics – stores and displays all stats information for a single player (rounds and games). Game – contains all the logic to play a game consisting of 3 rounds Must have a method to display rules for winning and basic instructions how game is played (based on the requirements given) Must have all the logic for playing automatically 3 rounds and announce winners of each round and winners of each game (based on the requirements given) GameDriver – includes main() method that creates instances of all the other classes, prompts the user and then calls Game’s class methods to run the game. Must prompt user for names of human players Must display the menu and allow users to select from the menu. Must create instances of the Players and initialize them Must store Players in a list or array Must create an instance of Game and start the game when user selects that option 2.2.2 Each class must be in a separate file. Files have to be named same as the class name (e.g. Player.java)

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
PLEASE INCLUDE SAW-PROMPTS FOR 2 PLAYERS NAMES(VALIDATE NAMES). SHOW MENU (PLAYER MUST SELECT FROM MENU B4...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ Part 2: Rock Paper Scissors Game Write a program that lets the user play this...

    C++ Part 2: Rock Paper Scissors Game Write a program that lets the user play this game against the computer. The program should work as follows: When the program begins, a random number between 1 and 3 is generated. If the number is 1, the computer has chosen rock. If the number is 2, the computer has chosen paper. If the number is 3, the computer has chosen scissors. Don't display the computer's choice yet. Use a menu to display...

  • IN JAVA. Write a program that lets the user play the game of Rock, Paper, Scissors...

    IN JAVA. Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Don’t display the computer’s choice yet....

  • (Java) Write a program that lets the user play the game of Rock, Paper, Scissors against...

    (Java) Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Don’t display the computer’s choice yet. The...

  • Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game...

    Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game in Python 3 that a user plays against the computer with the ability to save and load a game and its associated play statistics. Purpose: The purpose of this challenge is to assess the developer’s ability to create an interactive application with data persistence in Python 3. Requirements: Create a Rock, Paper, Scissors game in Python named rps.py according to the requirements specified in...

  • Python please. I have a working one that doesn't keep track of w/l ratio, it may...

    Python please. I have a working one that doesn't keep track of w/l ratio, it may be helpful to see how others did the entire program and inserted that module. Write a modular program that let the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 thru 3 is generated but do not display the computer choice immediately. Number 1...

  • It's writing a simple rock paper scissors game strictly following the instructions. INSTRUCTIONS: If the user...

    It's writing a simple rock paper scissors game strictly following the instructions. INSTRUCTIONS: If the user selects 'p': 1. First the program should call a function named getComputerChoice to get the computer's choice in the game. The getComputerChoice function should generate a random number between 1 and 3. If the random number is 1 the computer has chosen Rock, if the random number is 2 the user has chosen Paper, and if the random number is 3 the computer has...

  • In python language Write a program that lets the user play the game of Rock, Paper,...

    In python language Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows: 1. When the program begins, a random number in the range of 1 and 3 is generated. 1 = Computer has chosen Rock 2 = Computer has chosen Paper 3 = Computer has chosen Scissors (Dont display the computer's choice yet) 2. The user enters his or her choice of “Rock”, “Paper", “Scissors" at...

  • In JAVA Chapter 5Assignment(Rock, Paper, Scissors)–20pointsYour goal is towrite a program that lets the user play...

    In JAVA Chapter 5Assignment(Rock, Paper, Scissors)–20pointsYour goal is towrite a program that lets the user play the game of Rock, Paper, Scissors against the computer.Your program should have the following: •Make the name of the project RockPaperScissors•Write a method that generates a random number in the range of 1 through 3. The randomly generated number will determine if the computer chooses rock, paper, or scissors. If the number is 1, then the computer has chosen rock. If the number is...

  • Write a Python program (using python 3.7.2) that lets the user play the game of Rock,...

    Write a Python program (using python 3.7.2) that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’t display the...

  • Java CSC252   Programming II    Static Methods, Enums, Constants, Random Rock Paper Scissors Write a program that...

    Java CSC252   Programming II    Static Methods, Enums, Constants, Random Rock Paper Scissors Write a program that allows the user to play "Rock, Paper, Scissors". Write the RPS class. All code should be in one file. main() will be part of the RPS class, fairly small, and contain only a loop that asks the user if they want to play "Rock, Paper, Scissors". If they say yes, it calls the static method play() of the RPS class. If not, the program...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT