Question: In C++ code only Suppose we want to build an animal shelter, which holds only dogs and cats. The shelter's web team has a featured
In C++ code only

Suppose we want to build an animal shelter, which holds only dogs and cats. The shelter's web team has a "featured pet" in the adoption websites for dogs and cats, as well as the main web page. The web team must follow this policy to promote an animal: 1. If featuring a pet in the main web page, the web team must promote the "newest" (based on the arrival time) of all animals at the shelter. 2. If featuring a dog in the dog adoption website, the web team must promote the "newest" dog (based on the arrival time) at the shelter. 3. If featuring a cat in the cat adoption website, the web team must promote the "newest" cat (based on the arrival time) at the shelter. 4. The web team cannot select which specific animal they would like to promote. Create an animal shelter promotion system to implement this process. The system should include the following functions: 1. Add an animal to the system - when adding an animal, the system needs to record animal's category (dog or cat) and animal's name (you can name the animal whatever you like). 2. Get an animal from the promotion system. The promotion policy is defined as above. When retrieving an animal from the system, the system needs to tell the web team the category and name. Once a pet is promoted, we don't want to promote them again, so they should be removed from the system
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
