Question: C++ Ju Ppogramming II II Test 3 11 80 points Problem 1 | Student Class 1 40 points Create a class called student that contains
Ju Ppogramming II II Test 3 11 80 points Problem 1 | Student Class 1 40 points Create a class called student that contains the following two string member variables . name (holds name of student) e gender (holds gender of student it has the following two static integers males (holds the total number of male students) . females (holds the total number of female students) Next create the following four methods setdata-sets the name and gender of the student. It also updates the static varlable males and females with the total current number of males and females. . getname- returns the name of the student . getgender- returns the gender of the student . numofmales-a static method that returns the static variable males e numoffemales-a static method that returns the static variable females Finally create the following two regular functions (which are not methods of the student class) getdata - returns a student pointer of an array of student instances. Takes as input an int of how many student instances to create for the array. This method also sets the data for each instance in the array by asking the user for that information. . printdata-takes an input a student pointer and int of how student instances are in the array. Prints in separate lists the name of the male students and female students. In the main function Ask the user for how many student instances to create. Using the getdata function create an array of that many student instances. Using the static methods print out the total number of female and male students Using the printdata function print out two separate lists of all the names of the male and female e . . students 11page
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
