Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define the Member class's SetName() mutator that sets data member name to memberName and the SetHeight() mutator that sets data member height to memberHeight. Ex:

Define the Member class's SetName() mutator that sets data member name to memberName and the SetHeight() mutator that sets data member height to memberHeight.

Ex: If the input is Eve 3.0, then the output is:

Member: Eve Height: 3.0 feet

#include #include #include using namespace std;

class Member { public: void SetName(string memberName); void SetHeight(double memberHeight); void Print() const; private: string name; double height; };

/* Your code goes here */

void Member::Print() const { cout << "Member: " << name << endl; cout << "Height: " << fixed << setprecision(1) << height << " feet" << endl; }

int main() { Member person; string inputName; double inputHeight;

cin >> inputName; cin >> inputHeight; person.SetName(inputName); person.SetHeight(inputHeight);

person.Print();

return 0; }

c++ and please please make it correct

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

Step: 3

blur-text-image

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

e. What difficulties did they encounter?

Answered: 1 week ago