Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

void Student: :update _ labs ( const strings grades ) : This mutator function is to update all the elements of the labs _ array

void Student: :update_labs (const strings grades):
This mutator function is to update all the elements of the labs_array for the invoking Student object. it takes a string grades that contains ten integers separated by commas. You may assume that each integer represents a lab grade from 0 to 10. The function parses the string grades using string stream and assigns the first integer to the first lab grade, the second integer to the second lab grade and so on. For example, given the following call to update_labs and to_string:
a. update labs )=(;
cout a.to.string () end?:
Your program shall generate the following output:
The student's name is Unknom; thetr lab grades are:
\table[[10,9,9,7,6],[5,4,3,2,1]]
Overall, they earned 56 out of 100 points.
yold Student: :update_labs (const unsigned grades []):
This mutator function is to update all the elements of the labs_afray for the invoking Student object. It takes an array of unsigned integers gxades as a parameter and coples the first ten elements of grades to the labs_array You may assume the array passed to this function contains only grades from 0 to 10.
In the "main.cpp", create at least two Students objects using different constructors, then test the different mutator and accessor methods. You are encouraged to call the to_string method after every function call to help test these functions.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions