Question: Using good coding practices, create a class Student and another called StudentClub. StudentClub should have the fields President, Vice-President, Secretary, and Treasurer, all of which

Using good coding practices, create a class Student and another called StudentClub. StudentClub should have the fields President, Vice-President, Secretary, and Treasurer, all of which should be pointers to a Student object. In this way, the same student could hold different offices. In addition, StudentClub should have a club members field, which should be a vector of pointers to Student objects. Your class definition should include the following constructor and member functions. StudentClub(Student* p, Student* v, Student* s, Student* t, vector m); Student* get_president() const; Student* get_vice_president() const; Student* get_secretary() const; Student* get_treasurer() const; vector get_members() const; void add_member(Student* s); int number_members() Finally, create a main function to test your classes such that it prompts the user for the name of the club officers and its members. Then, it prints out the club officers and the number of members. Compile your code and run your program to check for compile-time errors and logic errors. Submit your header file and source code in separate files. Figure ?? shows a sample output.Using good coding practices, create a class Student and another called StudentClub.

resident: Hellen Garcia vice-President: Daniel Fisher secretary: Daniel Fisher Treasurer: Hellen Garcia New Member CQ to quit): anet Dove New Member Co to quit): Maria wang New Member CQ to quit): Q MATHLETES 4 total members) President: Hellen Garcia vice President: Daniel Fisher Secretary: Daniel Fisher Treasurer: Hellen Garcia Figure 1: Sample output for Hmw2

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!