Please write this program in java.
1. In this program, you are going to simulate Clash of Clans battle. You need to create a class for each of the following fighter types:
a. Barbarian
b. Wizard
c. Archer
d. PEKKA
e. Dragon
You should also have a parent for each of these class types.
You are to read in a single file (that you create) containing the fighter type, the level, hit points, damage points, and how they fight. You should have at least 2 of each fighter type in the file.
The parent class should have at least one method called fight(). All children should override this method. In the fight method, the name, level, hit points and damage inflicted should appear along with how they fight.
Once the fighter objects are populated, you are to put them all into a single array or ArrayList using the parent's type. Then, randomly pick two from the list and "fight". Your program should display the information as well as keep track of how many hit points are left after the battle.
The program should repeat this process 200 times and then you should print out all the fighters with their corresponding values.
Specifics:
a. Create 5 classes that extend a parent class
b. Create a file that contains information about each fighter - have at least 10 entries
c. Read in the file and populate the correct fighter with the information given
d. Put all instances of the classes into a single array or ArrayList
e. Randomly choose two instances from the array (ArrayList) and print out the result of the battle
f. Repeat steps e-f 200 times.
g. Print out the final totals at the end.