Abstract base class representing materials used in resource management. More...
#include <Resources.h>
Public Member Functions | |
| Materials () | |
| Default constructor for the Materials class. | |
| void | increase () |
| Increases the quantity of materials. | |
| virtual void | obtain ()=0 |
| Abstract method to obtain materials. | |
| virtual void | refine ()=0 |
| Abstract method to refine materials. | |
| int | getKilo () const |
| Gets the quantity of materials in kilograms. | |
| void | setKilo (int k) |
| Sets the quantity of materials in kilograms. | |
Public Member Functions inherited from Resources | |
| Resources () | |
| Default constructor for Resources. | |
Protected Attributes | |
| int | kilograms |
| The quantity of materials in kilograms. | |
Abstract base class representing materials used in resource management.
The Materials class serves as an abstract base for different types of materials that can be obtained and refined. It defines common functionality and properties related to materials used within the city management system.
| Materials::Materials | ( | ) |
Default constructor for the Materials class.
This constructor initializes the materials with default values.
|
inline |
Gets the quantity of materials in kilograms.
| void Materials::increase | ( | ) |
Increases the quantity of materials.
This method is responsible for calling the obtain and refine methods to manage the material acquisition and refinement processes.
|
pure virtual |
|
pure virtual |
|
inline |
Sets the quantity of materials in kilograms.
| k | The quantity of materials to set in kilograms. |