Question: Aim: Understanding structured program development using repetition structures (loops); understanding the fundamentals in object-oriented programming, understanding the methods In this project, you need to form

 Aim: Understanding structured program development using repetition structures (loops); understanding the

Aim: Understanding structured program development using repetition structures (loops); understanding the fundamentals in object-oriented programming, understanding the methods In this project, you need to form an alliance for a quest that consists of 6 people from 2 different races as Wizard and Elf. You will implement a Java class for each race and you will define a separate class Quest (driver class) that contains a main method to test the other classes. The class Wizard contains the following private instance variables and public methods: You need to store the wizard's name, the wizard's age and the wizard's staffHeight. The class should contain the corresponding public set/get methods. The class should contain a public display method to print out the information about the Wizard object (instance). The method returns no value. The class should contain another method called castSpell to calculate and print out the power of a spell casted by the wizard. The method returns no value. The the wizard's age formula of the power calculation is the following: e staff Height The class Elf contains the following private instance variables and public methods: You need to store the elf's name, the elf's age and the elfs bow Length The class should contain the corresponding public set get methods. The class should contain a public display method to print out the information about the Elf object (instance). The method returns no value. The class should contain another method called shootArrow to calculate and print out the power of an arrow shot by the elf. The method returns no value. The formula of the power calculation is the following: Vthe elf's age + bowLength In the driver class Quest, you need to use a loop to create an alliance of 6 people from different races. At least one person from each race must be selected for this alliance, the remaining people can be selected from any race by the user. (As you can understand, you need to use a decision structure (switch-case, if-else) in the loop to create the selection of races.) Create 6 people in total. For each person, set the corresponding data members, display the information and print out the power of the corresponding weapon of the person. At the end. the program must print out the number of people created from each race. NOTE: You must submit a sample output of your program with your source codes. The codes should be submitted as java" source files, the sample output should be submitted as a ".pdf" file

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!