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

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

#include <Citizen.h>

Inheritance diagram for CommercialWorker:
Citizen

Public Member Functions

 CommercialWorker ()
 Default constructor for CommercialWorker.
 
 CommercialWorker (string workplace)
 Constructor for CommercialWorker with specified workplace.
 
virtual void displayInfo ()
 Displays information about the commercial 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 commercial worker, a type of citizen.

The CommercialWorker class inherits from Citizen and represents a worker in the commercial sector.

Constructor & Destructor Documentation

◆ CommercialWorker()

CommercialWorker::CommercialWorker ( string workplace)

Constructor for CommercialWorker with specified workplace.

Parameters
workplaceThe workplace of the commercial worker.

Member Function Documentation

◆ displayInfo()

void CommercialWorker::displayInfo ( )
virtual

Displays information about the commercial worker.

Implements Citizen.