subject
Engineering, 21.02.2020 21:57 jones501324

The assignment asks you to to make a very simple RPG (role-playing game). There are three player classes: Tank, Healer, and Fighter. You must implement the doAction() method for all the classes. We've done the implementation of the Tank class for you (that was easy!). Complete Healer and Fighter. The Healer must restore 75 HP (Health Points) to the target up to the maxHP limit, and the Fighter must deal 75 damage to the target (here, you can go below 0). You also need to fix the doAction() declaration in player. h. Players also have an inventory of items. We want to store the name and amount of each item. Normally, we would use a map to do this (make sure you know why!), but to get some practice with vectors, we're going to use a vector to implement the map. Recall that, like arrays, vectors are lists of elements, but unlike arrays, they can dynamically change in size. C++ Reference is a great resource to use throughout 104, and especially in this lab for vector syntax and examples! As you can see in inventory. h, Inventory inherits from vector. Notice that this is private inheritance, so outside classes cannot call vector functions on our Inventory object. That is, if we have instance of Inventory, we can't call the vector function push_back — we can only call addItem(). Implement the inventory system given the header file we've provided. When you're done, the provided test should run using make tests. The Makefile is already written for you, and you don't need to modify it.

ansver
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, leomessifanboy678
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
image
Engineering, 04.07.2019 18:10, dval1146
You are making beer. the first step is filling the glass carboy with the liquid wort. the internal diameter of the carboy is 15 in., and you wish to fill it up to a depth of 2 ft. if your wort is drawn from the kettle using a siphon process that flows at 3 gpm, how long will it take to fill?
Answers: 1
image
Engineering, 04.07.2019 18:20, alexis9263
Have a greater impact on maintenance productivity than any other support group. (clo5) a)-the top management b)-inventory and purchasing c)-sub-contracting d)-cmms
Answers: 2
image
Engineering, 04.07.2019 18:20, mjcbs21
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
You know the right answer?
The assignment asks you to to make a very simple RPG (role-playing game). There are three player cla...

Questions in other subjects:

Konu
Mathematics, 19.05.2020 02:00