Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is the the question: Consider the following structure used to keep module r

ID: 3628204 • Letter: H

Question

Here is the the question:
Consider the following structure used to keep module records:
struct Module
{
string moduleName;
string moduleCode;
string lecturer;
int nrStudents;
}
Turn the module record into a class type rather than a structure type. The module class should have private
member variables for all the data. Include public member functions for each of the following:
• a default constructor that sets the module‘s name and lecturer to a blank string, the module code to seven 0’s and
the number of students to 0;
• an overloaded constructor that sets the member variables to specified values;
• member functions to set each of the member variables to a value given as an argument to the function (i.e.
mutators);
• member functions to retrieve the data from each of the member variables (i.e accessors);
Embed your class definition in a test program. The program should input a value for each of the member variables,
use the overloaded constructor to instantiate a module object and then print all the available information for that
module. Use the keyboard to supply input and display the output on the screen.

Explanation / Answer

DEAR FRIEND here is the answer for your question PLEASE RATE #include #include using namespace std; class Module { private: string moduleName; string moduleCode; string lecturer; int nrStudents; public: Module() { moduleName=lecturer=" "; moduleCode="0000000"; nrStudents=0; } Module(string N ,string C,string L,int num) { moduleName=N; moduleCode=C; lecturer=L; nrStudents=num; } void setmoduleName(string N) { moduleName=N; } void setmoduleCode(string N) { moduleCode=N; } void setlecturer(string N) { lecturer=N; } void setnrStudents(int N) { nrStudents=N; } string printmoduleName() { return moduleName; } string printmoduleCode() { return moduleCode; } string printlecturer() { return lecturer; } int printnrStudents() { return nrStudents; } }; void main() { Module obj1,obj2("classes","9876","4 lectures",9); string name,code,lec; int num; cout