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
Plz help me I will mark as the brainlest I only need long answer plz help me ​
xxTIMURxx [149]

Strategy 1

*Testing for timing, high reliability and performance.

Reasons.

Every device and system configuration must be tested including the software setup,definitions and rules must be tested with an attempt to force the system and its intergrals to fail. Every failure(if there are any) must be evaluated and errors corrected.

Strategy 2

*Measuring response levels at the lowest set point of the alarm.

Reasons.

This is to check the trigger points of the alarms in the system and the response must be recorded as well as changing the intervals of alarm triggers so as to evaluate the time taken for the alarm to respond at the lowest point of it to be triggered.

7 0
3 years ago
A column to be used in a database is called the
Temka [501]

it is called an attribute

8 0
3 years ago
i was playing a mobile game and I was a guild leader in there. one of the members were very disrespectful and they just left bec
Sonbull [250]

Answer:

which mobile game? Whatever the worst thing you can do is. If its slurs and harassment or bullying report them

Explanation:

3 0
3 years ago
Read 2 more answers
Write the code to compute and output how many times the value 99 is found in an array of integers named numbers
astraxan [27]
Thank you for being the rare question where you actually provide what language you want your answer in; I approve, and encourage this.

In Java, the following will work.
I made it a bit more versatile to work with others numbers, other than 99, if you so please (if not, just hardcode the 99 in yourself).

// Example list - fill this with numbers yourself.
ArrayList<Integer> nums = new ArrayList<>();
int n = 99;
int count = (int)nums.stream().filter(i -> i == n).count();
System.out.println(n + " occurences.");
8 0
4 years ago
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
Other questions:
  • A _____ is a digital media file distributed over the Internet using syndication feeds for playback on mobile devices and persona
    6·1 answer
  • PHOTOSHOP QUESTION:
    14·1 answer
  • What is the most happy job work? that can earn $1000 per day at homes? show company website links
    5·1 answer
  • Cpu coolers are typically made using what two different types of materials?
    6·1 answer
  • Why were american colonists unhappy with king george iii?
    6·2 answers
  • Janice usually works on a particular workbook. She decides to keep a backup of all the data in a separate workbook. She opens a
    6·2 answers
  • ____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
    9·1 answer
  • How do you navigate multiple computer screen at one time?
    5·1 answer
  • In a _______ format, the date line and the signature block are centered.
    6·1 answer
  • The challenge of preparing for ____________________ is in ensuring that employees do not feel that they are being prepared for t
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!