struct Module {string moduleName; string moduleCode; string lecturer; int nrStudents} Turn the Module struct into a class. The class should have member variables for all the values in the corresponding struct. Make all the member variables private. Include public member functions for each of the following: a default constructor that sets the string member variables to blank strings, and the int member variable 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; member functions to retrieve the data from each of the member variables; Test the class in a program that instantiates an object of class Module. The program should then input values for the object, and use the mutators to assign values to the member variables. Use the accessors to obtain the values of the object's member variables and display those values on the screen.
struct student
{
char IDNumber[10];
char Name[20];
int Age;
char Department[25];
float CGPA;
} ;
Choose your structure name. Include five member variables for your structure. Then do the following questions based on your structure declaration.
a) Define a function that declares array of student and registers 10 students.
b) Define a function that displays full information about those 10 students.
c) Define a function that can be used to update information about the first student.
1.Write C++ program to accept N number from the user and print the elements of the array in reverse order using a pointer.
2.Write C++ program that accepts N elements from the user and display the sum of array elements using pointers.enter the number of nights, per night rate room service charge, and telephone charge
calculate the room charge by multiplying the numbr of nights by the per-night rate
calculate the total bill by adding together the room charge, room service charge, and telephone charge
display the total bill
end if
end repeat
if (the student;s answer is not the same as the correct answer)
mark the student's answer incorrect
read the student's answer and the correct answer
repeat 25 times
Create a person class with name as data member provide four functions in getname() to get input from user and put name to display output write two virtual functions getdata() and outstanding() where both these functions takes no argument and getdata() returns no value but outstanding() returns Boolean value . Derive student and professor from person. student class should contain gpa as its float type and overrides the virtual functions appropriately . In professor class provide number of applications as data members and override the virtual functions appropriately . Write a main program to declare a array of pointers to person object and depending on the choice from user create either a student object or professor object and store it in person array for n persons and display the details along with whether the person is outstanding or not
Create a person class with name as data member provide four functions in getname() to get input from user and put name to display output write two virtual functions getdata() and outstanding() where both these functions takes no argument and getdata() returns no value but outstanding() returns Boolean value . Derive student and professor from person. student class should contain gpa as its float type and overrides the virtual functions appropriately . In professor class provide number of applications as data members and override the virtual functions appropriately . Write a main program to declare a array of pointers to person object and depending on the choice from user create either a student object or professor object and store it in person array for n persons and display the details along with whether the person is outstanding or not
Use the operator overloading technique to define the binary operator+ in the Square class of Q1 then overload the insertion operator << for the same class, and overload the decrements operator-- which decrease the side by one . Use the new + operator to add two squares such that the side of resulted square equal to the addition of the sides of the added squares and use the decrements operator-- to decrease the side of square by one, then use the overloaded insertion operator << to print the resulted square in the main program. After that add a new integer pointer variable called color that point to an integer array of three elements to the class square then write the copy constructor for the new class.