1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
denis23 [38]
3 years ago
14

Derived Classes Warrior Stores the warrior's allegiance as a string. The warrior does not attack warriors that have the same all

egiance. The damage done by the warrior is the percentage of the warrior's health remaining (health / MAX_HEALTH) multiplied by the warrior's attack strength. Elf Stores the elf's family name as a string.The elf does not attack elf's from its own family.The damage done by the elf is the percentage of the elf's health remaining (health / MAX_HEALTH) multiplied by the elf's attack strength.WizardStores the wizard's rank as an int.When a wizard attacks another wizard, the damage done is the wizard's attack strength multiplied by the ratio of the attacking wizard's rank over the defending wizard's rank.The damage done to non-wizards is just the attack strength. The wizard's health is not taken into consideration.Dynamic casting type of Character in attack functionIn order to access the Warrior data field allegiance using the Character reference passed in to the attack function, you will need to dynamic cast the Character reference to a Warrior reference.Here's an example of dynamic casting a Character reference named opponent to a Warrior reference named opp:Warrior &opp = dynamic_cast(opponent);You will need to do the same for the Wizard and Elf attack functions, only dynamic casting to Wizard or Elf reference instead.HeroTypeNotice the enum declaration above the Character class declaration. This creates a special type called HeroType that has the values, WARRIOR, ELF, and WIZARD. Those are the values you store in a variable of type HeroType. For example, you can initialize a variable of type HeroType and set it to the value of WARRIOR like this:HeroType type = WARRIOR;You can compare a variable named t of type HeroType to one of the HeroType values like this:if (t == WARRIOR) { // do something based on t being a warrior}Example main function
Computers and Technology
1 answer:
olga_2 [115]3 years ago
8 0

Answer:

Find the detailed code in attached file.

Explanation:

See the attached file.

Download txt
You might be interested in
list the sixth external parts of a computer system and identify which are output and which are input devices
Marianna [84]
<em>Keyboard -----> Input device</em>
<em>Printer  --------> Output device</em>
<em>mouse ---------> Input device</em>
<em>Monitor --------> Output device</em>
<em>CD roam ------> Input device</em>
<em>Projector ------> Output device</em>
4 0
3 years ago
Read 2 more answers
Create a class called Minimum that provides a single class method min. min should take an array of any object that implements Co
kaheart [24]

Answer:

The required code is given below:

Explanation:

public class Minimum {

   public static Comparable min(Comparable[] values) {

       if (values == null || values.length == 0) {

           return null;

       } else {

           Comparable minValue = values[0];

           for (int i = 0; i < values.length; i++) {

               if (values[i].compareTo(minValue) < 0) {

                   minValue = values[i];

               }

           }

           return minValue;

       }

   }

}

7 0
4 years ago
As John develops the agenda, he wants to put the name of the appropriate person next to the agenda item. Whose name would he put
tresset_1 [31]

Answer:

d. His own

Explanation:

John is the JAD project leader

Joint Application Development (JAD) is a process that accelerates the design of information technology solutions. JAD uses customer involvement and group dynamics to accurately depict the user's view of the business need and to jointly develop a solution.

The executive sponsor is the person from the customer's organization who has the ultimate authority to make decisions about the project. The sponsor may be the customer's project leader, the CIO, or, in some cases, the CEO. The facilitator works with the sponsor to get the project started; it is essential, however, that the sponsor make key decisions, not the facilitator.

The executive sponsor has the following responsibilities:

. Accept ultimate authority and responsibility for the functional area to be addressed by the system.

· Resolve business policy conflicts by being the ultimate decision? maker.

· Honor the results of the JAD process.

· Set the vision for the project.

· Ensure the project team has access to and commitment from the right business user experts.

· Communicate customer support and cooperation.

6 0
3 years ago
What did Richard Maddox invent? Why was this important?
DerKrebs [107]

Answer:

richard maddox created the first 35mm camera

Explanation:

Grade 10

4 0
4 years ago
Read 2 more answers
Which protocol is often used to publish web pages to a web server?
zmey [24]
 File Transfer Protocol, also known as FTP
5 0
3 years ago
Other questions:
  • Speaker,printers, and monitors are all considered what?
    10·2 answers
  • Need Help ASAP!
    14·2 answers
  • Using the slice operator, print your first, then last name.2. Print the length of your first name.3. Assume you have two variabl
    6·1 answer
  • How do I turn of the noise canceling feature on my beats studio wireless?
    13·1 answer
  • Do most web queries have fully meets results
    11·1 answer
  • Dave has to create animations for a game. Which tool can Dave use?
    6·1 answer
  • Which administrative tool can you use to check your computer's health or troubleshoot problems with the operating system or soft
    11·2 answers
  • Pls answer this
    5·1 answer
  • Technician A says that a camshaft must open and close each valve at exactly the right time relative to piston position. Technici
    11·1 answer
  • Which of the expressions is false? when a = 10 and b = 4
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!