sudo apt-get marks
 
Loading...
Searching...
No Matches
GovernmentWorker Class Reference

Class representing a government worker, a type of citizen. More...

#include <Citizen.h>

Inheritance diagram for GovernmentWorker:
Citizen

Public Member Functions

 GovernmentWorker ()
 Default constructor for GovernmentWorker.
 
 GovernmentWorker (string workplace)
 Constructor for GovernmentWorker with specified workplace.
 
virtual void displayInfo ()
 Displays information about the government worker.
 
- Public Member Functions inherited from Citizen
 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.
 
void changeSatisfaction (float amt)
 Changes the satisfaction level of the citizen.
 

Detailed Description

Class representing a government worker, a type of citizen.

The GovernmentWorker class inherits from Citizen and represents a worker in the government sector.

Constructor & Destructor Documentation

◆ GovernmentWorker()

GovernmentWorker::GovernmentWorker ( string workplace)

Constructor for GovernmentWorker with specified workplace.

Parameters
workplaceThe workplace of the government worker.

Member Function Documentation

◆ displayInfo()

void GovernmentWorker::displayInfo ( )
virtual

Displays information about the government worker.

Implements Citizen.