Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 systemStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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