Question: C++ Problems: Any help is appriciated. Write an entire class called Toy that stores an instance variable named description for the description of the toy
C++ Problems:


Any help is appriciated.
Write an entire class called Toy that stores an instance variable named description for the description of the toy as a string. Write the corresponding getter and setter methods (getDescription, setDescription), and a constructor that takes a string parameter for the description of the toy Include both the class declaration and method definitionsI Be sure to use appropriate visibility modiniers Assume all includes and using namespace std are already in the file. Do not try to make header files. Answer: (penalty regime: 05.10, %) 1 class Toy string description; 4 6 Toy::ToyO0/ default constructor 7 Toy::Toy(string d) description d; 10 12 string Toy: :getDescription 14 return description; 16 void Toy: :setDescription(string description)t 17 toyDescription description; 18
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
