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
Scale-based classification for networks allows us to differentiate PANs, LANs, MANs, and WANs. Moreover, the structure of a netw
Nana76 [90]

Answer:

1. PANs uses Star Topology.

2. LAN uses four topology (Bus, Ring, Star and Tree).

3. MAN uses Star Topology.

4. WAN uses Bus topology.

Explanation:

1. PAN is the personnel area network, in which different personnel devices of a person are connect to each other with the help of the central computer with the help of Bluetooth, WiFi or some other medium. The central computer will work like a hub and all the devices are directly connected to the central PC. It is same as the ring topology where all the devices are connected to the central PC. So we can say that, PANs use star topology.

2. LAN is the local area network that has been established with in the premises of the organization. In this type of network, four typologies involve to complete the network connection. First is star topology, that is used to connect all the devices with the switches. Then Bus topology is used to connect all the switches with the single main cable. Ring topology is involved to connect all the switches with each other. Tree topology is used to connect different block if the organization in the form of branch to connect the central router or switch.

3. MAN is the Metropolitan Area Network which is comprise of different LANs. All the LANs are connected to the Router in the form of Star topology.

4. WAN is the wide area network. In WAN different MANs are connected to the network through single cable. This type of network uses Bus topology.

6 0
3 years ago
A negative effect of computer technology's role in creating images is that:
otez555 [7]

Answer:

Personally would go with D.

Information being shared could be both good and bad but it all would be about the situation and if it was private information or not.

5 0
3 years ago
Read 2 more answers
What is the job title of someone who works with video and/or film?
boyakko [2]
Producer, videographer
4 0
3 years ago
Anyone got E-aqa login?​
pashok25 [27]

Answer:no

Explanation:

3 0
3 years ago
Can anyone help me with these assignments??? Hands On Assignments- Insertion of Symbols, Special Characters, and Images.... and
Alekssandra [29.7K]

Answer:

yes send me the worksheet

Explanation:

5 0
3 years ago
Other questions:
  • What is the opening page of a website called?
    9·2 answers
  • What takes information entered into a given system and sends it automatically to all upstream systems and processes?
    6·2 answers
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • Which is the last step in conducting a URL search?
    14·2 answers
  • PLEASE HELP WITH MY CODING!!!!!!!!!!!!!!
    7·2 answers
  • If we want to access files located in a directory on a remote server, which of these options would we use?
    9·2 answers
  • Kayla wants to know whether she should set her network up as a WAN or a LAN. What are the three questions you would ask her, and
    11·1 answer
  • Who likes sandshrew ​
    7·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • The output of a computer can be seen on ( monitor, keyboard or mouse )​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!