Question: Design a class called Student. Separate the declaration and methods definition file. The class should store the following student information: name: student's name, type is

Design a class called Student. Separate the declaration and methods definition file. The class
should store the following student information:
name: student's name, type is string
id: student ID, type is string
numTests: number of tests, type is int
scores: a pointer to an array of test scores, type is double
Define the following member functions:
Constructors:
Student(int): Parameterized constructor with number of tests as the parameter.
Student(string, string, int): Parameterized constructor with student name, student id,
and number of tests as parameters.
Destructor
~Student()
Mutator functions:
setName(string name), setId(string id), setScore(int testNum, double score)
Accessor functions:
string getName(): get student name
string getId(): get student ID
double getScore(int n): get score of test n
int getNumTests(): get number of tests

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!