Question: C++ help. //----------------------------------------------------------------- // Lab 8 Test Driver Program //----------------------------------------------------------------- #include using namespace std; #include student.h int main() { student s; s.print(); cout Need help

C++ help.

C++ help. //----------------------------------------------------------------- // Lab 8 Test Driver Program //----------------------------------------------------------------- #include using

namespace std; #include "student.h" int main() { student s; s.print(); cout Need

//----------------------------------------------------------------- // Lab 8 Test Driver Program //----------------------------------------------------------------- #include  using namespace std; #include "student.h" int main() { student s; s.print(); cout   Need help with a simple C++ lab. The specifications are that you use a header file as well as two .cpp files. The main.cpp file is given (shown below) and the other cpp file is to be written. A sample of what the running program should look like is also shown below. Thanks Learning Objective Coding and unit testing of a simple class with a partial-array data member Specifications: Get and use the main() program provided on the class website. This will be used to test your class. Add two new source files to your VS Project: student.cpp and student.h. use these to code the interface and implementation of the following class. Create a class called student. It should have the following data members: Name of student A Partial Array of scores (array and number) [maximum of 10 scores Initialize the name to empty string, and the number of scores to 0 in the interface The class should have the following methods -setName: given a new name, sets the data member to the new name given. setScores:given an array of integers and number of scores, if the number of scores given is lower than 0 or greater than the maximum number, prints student::setScores(): invalid numScores given! Otherwise, it copies the given array into the scores data member, and sets the number of scores to the given value addScore: given a new score, adds the score to the list by copying it into the xt available slot, and incrementing number of scores. When the array is full, prints: student::addScores (): MAX SCORES exceeded simply returns the data member when the number of scores is 0, returns 0.0; otherwise, returns the average of - getName: getAvg: the scores in the list. getScores: givn an array of integers (which is already pass-by-reference), fill the array with the current contents of the score data member and return the current number of scores data member on one line, prints the name, average (by invoking getAvg)), number of scores, and scores as shown in the example below rint

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!