Question: In Java Please Create a 'capture the flag' program called redTeam. You represent the blueTeam, and you begin with 20 flags. You 'battle' the red

In Java Please

In Java Please Create a 'capture the flag' program called redTeam. You

represent the blueTeam, and you begin with 20 flags. You 'battle' the

Create a 'capture the flag' program called redTeam. You represent the blueTeam, and you begin with 20 flags. You 'battle' the red team in a 'game of wits,' attempting to guess their automatically generated number. jasonmyersejasons-MBP-2 \%s java redTeam Guess a number from o to 10 : 8 Red Team Guess: 3 Mr.Blue you lost!1 Your balance 1s: 18 tlags. Guess a number from o to 10: 3 Red Tearn Guess: 4 Mr.Blue you lost!! Your balance ist 16 flags. Guess a number from o to 10: Red Team Guess: 1 Mr.Blue you Lostl1 Your batance is: 14 Tlags. Guess a number from o to 16 : 9 Red Team Guess: 16 Mr.Blue you lost!1 Your balance is: 12 flags. Guess a number from o to 10: Red Team Guess: 4 Mr.Blue you lost!l Your balance ist 10 flags. Guess a number from o to 10: 4 Red Team Guess: 5 0 Suggested output (drawing 1a) The rules are simple but...deadly. If you guess CORRECT, you gain 2 flags; a WRONG guess means you lose 2 . The game ends when your balance of flags is zero, and the red team succeeds! Syntax Requirements: Two classes: blueTeam Class (blueprint) Instance variables: name (as string), flags (as int) Method: Battle - Generates redTeam's automated guess - Allows Blue Team to guess - Compares redTeam's and Blue Team's guess redTeam Class (execution class with main method) - Creates object called myBattle using blueTeam class - Creates while loop to execute until blue team's flags are 0 - Creates player name as Mr. Blue - Ensures print output is consistent with drawing 1a. Problem Two RE: 'capture the flag' program Now that you have the program working, make an improvement. Any improvement, such as counting the iterations before losing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!