Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ programs, it should be in the format i provided with below (in 3 files cart.h cart.cpp cartMain.cpp) and it will use the meerkatkat file
C++ programs, it should be in the format i provided with below (in 3 files cart.h cart.cpp cartMain.cpp) and it will use the meerkatkat file i provided with below:
2-1. Define and implement a class named cart. A cart object represents a horse drawn cart that can seat up to four meerkats, after that meerkats have to walk. The meerkats must be represented by meerkat objects. The cart class has the following constructors and behaviours: cartO; bool addMeerkat (meerkat cat); void emptyCart(O; void printMeerkatsO /create an empty cart object 11 adds a meerkat to the cart, returns false if full // remove all meerkats from the cart // print the name, a space, the age, then a new line // for each meerkat in the order they were added Your main program should create a cart object and 5 meerkat objects. The cart object is initially empty. Your main program must then add all 5 meerkat objects to the cart object. An appropriate error message must be printed by your main program when the cart is fulStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started