Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your FIGHT SIMULATOR will have two opponents: an attacker(that only launches attacks) and a defender(that can only defend against the attacks). There're 3 types of

Your FIGHT SIMULATOR will have two opponents: an attacker(that only launches attacks) and a defender(that can only defend against the attacks). There're 3 types of attacks and defenses categorizedby height: high, medium and low .If the height of an attack and a defense match then the attack is 'Block' otherwise tge attack is counted as a 'Hit'. The simulator is between 1 - 100 rounds with input at the start of simualtion if input is noot 1 - 100 otherwise default number(ten rounds) will be executed. Attacker control:The simulator will allow user input to specify the probabilities: When the program first runs, the user can also determine the proportion of attacks that originate at the three different heights (e.g., high = 50%, medium = 30%, low = 20%)(EXAMPLE WILL BE POST AT THE END). These three proportions must sum to 100% otherwise use defaults (again there's an equal probability of each type of attack). Defender control: The defender will be entirely controlled by the computer.A program that implements an 'intelligent' defender will analyze the pattern of attacks and adjust the probability of each type of defense being employed over time. (For example if the attacker always throws high attacks then the defender will eventually extrapolate the pattern and use high defenses more frequently). It is up to you to decide how many rounds are needed before the defender begins to adjust to the pattern of attacks. And the value determining the adjustment period can be hard-coded (fixed) into the program (no user input needed at run-time).Prior to analyzing and determining the pattern of attacks the defender should have an equal probability of employing each type of defense. Exactly what constitutes 'intelligent' defender for this assignment?If for instance the attacker throws only medium attacks, after the learning period is over the defender should eventually employ only medium height defenses (or at least have an extremely high probability of employing this type of defense). The program will tally a number of statistics and display them during each round and at the end of the simulation. The program will consist of 3 Java source code files (Attacker, Defender, Manager). Each class definition must be in it's own file with the file name matching the class name. : 1) The 'Attacker' will be responsible for generating attacks so it should track all information associated with attacking (e.g., numbers of each attack type generated). 2) Likewise the 'Defender' will receive the attack generated by the attacker, generate a defense and determine the result of the attack-defense combination. Also the defender should track information associated with defense (e.g., the numbers of each type of defense used).Since the information for the attacks and defenses must be tracked by this class the methods for displaying the round-by-round report and the end of simulation report should be displayed here. image text in transcribed

image text in transcribed

Number of attack rounds: 180 Enter percentages for the number of attacks that will be directed: low, medium, high. The total of the three percentages must sum to 100% Percentage of attacks that will be aimed low: 1ee Percentage of attacks that will be aimed at medium height: @ Percentage of attacks that will be aimed high: @ Kombat Begins! Round 1. Round 2... Round 3... Round 4... Round 5. Round 6... Round 7... Round 8... Round 9... Round 10... Round 11... Round 12... Round 13... Round 14... Round 15.. Round 16... Round 17... Round 18... Round 19... Round 20... Round 21... Round 22. Round 23... Round 24... Round 25... Round 26... Round 27... Round 28... Round 29... Round 30... Round 31... Round 32... Round 33... Round 34. Round 35... Round 36. Round 37... Round 38... Round 39. Round 40... Round 41... Round 42. Round 43... Round 44... Round 45... Round 46... Round 47... Round 48.. Round 49... Round 5@... Round 51... Round 52... Round 53... Round 54... Round 55... Round 56. Round 57... Round 58... Round 59... Round 60... Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Defender: Low Block Defender: High Hit Defender: Medium Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: High Hit Defender: Medium Hit Defender: High Hit Defender: Low Block Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Round 60... Round 61. Round 62... Round 63. Round 64.. Round 65. Round 66. Round 67. Round 68... Round 69... Round 70... Round 71... Round 72.. Round 73... Round 74... Round 75... Round 76... Round 77... Round 78... Round 79... Round 80... Round 81.. Round 82... Round 83... Round 84... Round 85... Round 86 Round 87. Round 88... Round 89.. Round 90... Round 91... Round 92... Round 93... Round 94... Round 95... Round 96... Round 97... Round 98... Round 99... Round 100... Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Summary of kombat Total hits: 13 Total blocks: 87 Attacker proportions: Low 100.00% Defender proportions: Low 87.88 Medium: Medium: 0.00% 2.00% High: High: 0.00% 11.00% Number of attack rounds: 180 Enter percentages for the number of attacks that will be directed: low, medium, high. The total of the three percentages must sum to 100% Percentage of attacks that will be aimed low: 1ee Percentage of attacks that will be aimed at medium height: @ Percentage of attacks that will be aimed high: @ Kombat Begins! Round 1. Round 2... Round 3... Round 4... Round 5. Round 6... Round 7... Round 8... Round 9... Round 10... Round 11... Round 12... Round 13... Round 14... Round 15.. Round 16... Round 17... Round 18... Round 19... Round 20... Round 21... Round 22. Round 23... Round 24... Round 25... Round 26... Round 27... Round 28... Round 29... Round 30... Round 31... Round 32... Round 33... Round 34. Round 35... Round 36. Round 37... Round 38... Round 39. Round 40... Round 41... Round 42. Round 43... Round 44... Round 45... Round 46... Round 47... Round 48.. Round 49... Round 5@... Round 51... Round 52... Round 53... Round 54... Round 55... Round 56. Round 57... Round 58... Round 59... Round 60... Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Defender: Low Block Defender: High Hit Defender: Medium Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: High Hit Defender: High Hit Defender: High Hit Defender: Medium Hit Defender: High Hit Defender: Low Block Defender: Low Block Defender: High Hit Defender: High Hit Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: LOW Block Defender: Low Block Defender: Low Block Defender: Low Block Defender: Low Block Round 60... Round 61. Round 62... Round 63. Round 64.. Round 65. Round 66. Round 67. Round 68... Round 69... Round 70... Round 71... Round 72.. Round 73... Round 74... Round 75... Round 76... Round 77... Round 78... Round 79... Round 80... Round 81.. Round 82... Round 83... Round 84... Round 85... Round 86 Round 87. Round 88... Round 89.. Round 90... Round 91... Round 92... Round 93... Round 94... Round 95... Round 96... Round 97... Round 98... Round 99... Round 100... Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: LOW Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Attacker: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: Low Defender: LOW Defender: LOW Defender: LOW Defender: Low Defender: Low Defender: Low Defender: Low Defender: Low Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Block Summary of kombat Total hits: 13 Total blocks: 87 Attacker proportions: Low 100.00% Defender proportions: Low 87.88 Medium: Medium: 0.00% 2.00% High: High: 0.00% 11.00%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago