Create five classes that extend a parent class

Assignment Help JAVA Programming
Reference no: EM132101299

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.

Reference no: EM132101299

Questions Cloud

European powers in the expansion of their empires : What were the various goals of the colonial European powers in the expansion of their empires?
Religion can be found in paleolithic and neolithic art : What evidence of religion can be found in Paleolithic and Neolithic art?
Future perceptions and relationships with indians : How do you think this proclamation influenced the future perceptions and relationships with Indians?
Denunciation of the importance of religion : Was there any danger in Europe's denunciation of the importance of religion?
Create five classes that extend a parent class : Create a file that contains information about each fighter - have at least 10 entries. Create 5 classes that extend a parent class.
Invention of steam power change industrialization : How did the invention of steam power change industrialization?
Violence of the french revolution : What warnings might the violence of the French Revolution be telling us about modern Western society?
Culmination of the age of reason : Why is the American Constitution viewed by historians as the culmination of the Age of Reason?
Write a program which asks you uo enter a name in the form : Write a program which asks you uo enter a name in the form of first middle initial last. So you might enter for example samuel p. clemens.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd