Question: it's from my c++ class Q1: Implement a class called Word. a) A class named Word b) Two private data members: value (string), size (int).


Q1: Implement a class called Word. a) A class named Word b) Two private data members: value (string), size (int). c) Accessors and Mutators function for value. d) Accessors for size. Class template (fill in this template): class Word{ private: public: void setValue(string v){ } string getValue(){ } int getSize({ } Use following main() to test your class. int main() Word a; a.setValue("abc"); cout> to input Word objects. Class template (fill in this template): class Word{ - friend ostream& operator>(istream& is, Word& fX } } Use following main() to test your class. int main(){ Word a,b("abc"); cout>a; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
