Question: class Voter { friend ostream& operator ( ostream& outs, const voters thevoter ) ; public: Voter ( string ID ) ; / / initialise voter

class Voter
{
friend ostream& operator (ostream& outs, const voters thevoter);
public:
Voter(string ID);
// initialise voter to a new ID, set number of times
// voted to 0 and voted false.
Voter();
int getNrTimes_voted() const;
Qoid setID(string newID);
void increment ();
private:
string ID;
int nrTimesvoted;
bool voted;
};
In c++
Using separate compilation provide the implementation file for the class voter. Include all the necessary header files, and implement only the member functions in the given class
 class Voter { friend ostream& operator (ostream& outs, const voters thevoter);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!