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

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Heat is added to a piston-cylinder device filled with 2 kg of air to raise its temperature 400 c from an initial temperature of t1 27 cand pressure of pi 1 mpa. the process is isobaric process. find a)-the final pressure p2 b)-the heat transfer to the air.
Answers: 1
question
Engineering, 04.07.2019 18:10
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
question
Engineering, 04.07.2019 18:20
For a gate width of 2 m into the paper, determine the force required to hold the gate abc at its location.
Answers: 1
question
Engineering, 04.07.2019 19:10
Starting wih an energy balance on a rectangular volume element, derive the one- dimensional transient heat conduction equation for a plane wall with constant thermal conductivity and no heat generation.
Answers: 1
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
question
Geography, 17.11.2020 03:30
question
Mathematics, 17.11.2020 03:30
question
Mathematics, 17.11.2020 03:30
question
Biology, 17.11.2020 03:30
question
Mathematics, 17.11.2020 03:30
question
Mathematics, 17.11.2020 03:30
Questions on the website: 13722363