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]
2 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]2 years ago
8 0

Answer:

Find the detailed code in attached file.

Explanation:

See the attached file.

Download txt
You might be interested in
Explain how touch-tone dialing sends digits to the switch and write the name given to define touch-tone dialing.
Sergeu [11.5K]

Answer: Please see below as the answer is self-explanatory

Explanation:

Digital phones, normally uses a keyboard, with the digits 0-9, and special characters like # and *.

When the caller presses any keyboard, an electronic circuit within the phone generates two pure sinusoids, of frequencies within the vocal bandwidth (between 300 Hz and 3 khz, roughly), which identifies uniquely (as decoded by the receiving switch) which was the key pressed.

In this way, the switch reconstructs the phone number called, separating country code, area code and the local number as it receives the tones.

This system is called DTMF (dual tone multi frequency).

4 0
3 years ago
Your health insurance company gives you a discount if you wear a fitness-tracking bracelet. After wearing it for a few months, y
marin [14]

Answer:

B

data correlation

Explanation:

if you wear the bracelet the insurance rate will go down

5 0
3 years ago
Every windows service has the 3 start types what are those service types?
spayn [35]

Answer:

You can stop, pause, start, delay start, or resume each service as appropriate. You can also modify the start mechanism (Manual or Automatic) or specify an account. Windows Services broadly fall into three categories depending on the actions and applications they control: Local Services, Network Services and System.

5 0
2 years ago
Aapke question about computer keyboard​
Lapatulllka [165]

Explanation:

A computer keyboard is an input device that allows a person to enter letters, numbers, and other symbols (these are called characters in a keyboard) into a computer. It is one of the most used input devices for computers. Using a keyboard to enter lots of data is called typing

8 0
2 years ago
ANSWER IN 5 MINUTES TO GET 50 POINTS!!!
Luba_88 [7]
The answer is d. Hope that helps.
7 0
2 years ago
Other questions:
  • Please look at picture
    10·2 answers
  • 10 facts about turbines
    11·2 answers
  • Almost all application programs are designed to run with a specific platform. Group of answer choices True False
    15·1 answer
  • Which is the best description of the difference between bound and unbound forms? O Bound forms are similar to hierarchical forms
    7·1 answer
  • What is the most common way for an attacker outside of the system to gain unauthorized access to the target system?
    15·1 answer
  • You are a developer for a company that is planning on using the AWS RDS service. Your Database administrator spins up a new MySQ
    7·1 answer
  • A 5-stage MIPS pipeline has a register file without forwarding mechanism. How many NOPs (or bubbles) will you need to add to mak
    9·1 answer
  • What is application software? A computer language for accessing data in a database. A character string used to identify the loca
    10·1 answer
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • Does anyone know this? Can someone please help me? I’ll give brainliest!!
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!