C++ Programming Gold Modification, computer science homework help

User Generated

Ybalqnyr

Programming

Description

Add an integer data member to the Player class that keeps track of the player’s amount of gold. After each battle, generate a random gold reward that the player receives, in addition to the experience point award. It would make sense for harder enemies (ogres, Orc lords) to provide a larger gold reward then orcs and goblins. Be sure to also modify the Player : : viewStats( ) method to display the current amount of gold the player owns.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Your code is done. You did not provide the class Player. So I test implemented in the following way:#include <iostream>#inclu...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags