Question: Please only post solution code asap. no explanation needed thank u Define the Student class's SetName() mutator that sets data member name to studentName and

Please only post solution code asap. no explanation needed thank u

Define the Student class's SetName() mutator that sets data member name to studentName and the SetHeight() mutator that sets data member height to studentHeight.

Ex: If the input is Ina 5.0, then the output is:

Student: Ina Height: 5.0 feet
#include  #include  #include  using namespace std; class Student { public: void SetName(string studentName); void SetHeight(double studentHeight); void Print() const; private: string name; double height; }; /* Your code goes here */ void Student::Print() const { cout << "Student: " << name << endl; cout << "Height: " << fixed << setprecision(1) << height << " feet" << endl; } int main() { Student person; string inputName; double inputHeight; cin >> inputName; cin >> inputHeight; person.SetName(inputName); person.SetHeight(inputHeight); person.Print(); return 0; }

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!