Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

type j thermocouple extension wire what color is it

Answered: 1 week ago