|
|
| Citizen () |
| | Default constructor for Citizen.
|
| |
|
virtual | ~Citizen ()=default |
| | Virtual destructor for Citizen.
|
| |
| virtual void | setCitizen (string type, string residence, string workplace) |
| | Sets the properties of the citizen.
|
| |
| virtual std::string | getType () |
| | Gets the type of the citizen.
|
| |
| virtual string | getResidence () |
| | Gets the residence of the citizen.
|
| |
| virtual string | getWorkplace () |
| | Gets the workplace of the citizen.
|
| |
| virtual float | getSatisfaction () |
| | Gets the satisfaction level of the citizen.
|
| |
| virtual void | displayInfo ()=0 |
| | Pure virtual function to display citizen information. This function must be implemented by derived classes.
|
| |
| void | changeSatisfaction (float amt) |
| | Changes the satisfaction level of the citizen.
|
| |
Abstract base class representing a citizen.
The Citizen class serves as a base class for various types of citizens, encapsulating common properties such as residence, workplace, and satisfaction levels. This class defines the interface for all citizen types.