Question: C++ program Part 1 Simple Classes 1-1. Define and implement a class named meerkat that has the following constructors and behaviours meerkat ( void setName(string

 C++ program Part 1 Simple Classes 1-1. Define and implement a

C++ program

Part 1 Simple Classes 1-1. Define and implement a class named meerkat that has the following constructors and behaviours meerkat ( void setName(string meerName); string getName) void setAge (int meerAge); int getAge() // no name or age is required to create a meerkat // change the meerkat's name // change the meerkat's age Your main program should create four meerkat objects and set and display their details (note that this means the main program should use the object behaviours to get and output the object state. The object behaviours should return the appropriate values and should NOT use cout). Your main program should demonstrate that the name and age information is changed. This class will also be used in problem 2-1 1-2. Define and implement a class named person that has the following constructors and behaviours: person (string myName,int Salary); // a name and salary must be provided to create a person void setName (string myName); string getName); void setSalary(int mySalary) // change the person's name int getsalary ); // change the person's name Your main program should create four person objects and change and display their details. Your main program should demonstrate that the name and salary information is changed. This class will also be used in problem 2-2

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!