Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To be done in C++ Zoo Food Calculator The purpose of this program is to determine the amount of food eaten by a certain kind

To be done in C++

Zoo Food Calculator

The purpose of this program is to determine the amount of food eaten by a certain kind of animal. Rather than using one big pile of main( ), you need to use functions for these calculation that incorporate pass-by-value parameters. In addition, you need to include various int or double const declarations within your program. Finally, embed your program in a loop so that the calculation can be repeated as often as the user wishes.

IN ORDER TO RECEIVE FULL CREDIT, YOU MUST DEFINE AND CALL FUNCTIONS AND PASS ARGUMENTS.

You should base your calculations on the following table:

Mammals Amphibians Reptiles
1 lb for each 10 lbs in weight 2/3 lb for each 5 lbs in weight 1/5 lb for each 6 lbs in weight
1/3 lb for each foot in height 1/4 lb for each 6 inches in length 1/2 lb for each foot in length
1/10 lb for each 5 years of age 1/5 lb for each 4 years in age Deduct 10% of food during winter
Add an extra 15% of food if the animal can run faster than a human Add an extra 10% of food if the animal is pregnant

The following program dialogue should help you figure out what kind of program I am looking for.

image text in transcribed
image text in transcribed
Zoo Food Calculator: Whaddya want? [0]Mammal or [1] Amphibian or [2]Reptile: 0 Gimme its weight in lbs: 30.0 Gimme its height in feet: 3.2 Gimme its age 10 Can it run faster than a human [1 Yes/2-N ol: 2 For this animal, you'll need 4.26667 lbs o f food a week! Try again? [1 Yes/2 No]: 1 Zoo Food Calculator: Whaddya want? [0]Mammal or [1]Amphibian or [2]Reptile: 1 Gimme its weight in lbs: 30.0 Gimme its length in inches 6.0 Gimme its age: 10 Is it pregnant? 1 Yes/2 No] 1 For this animal, you'll need 5.225 lbs of food a week! Try again? 1 Yes 2 No]: 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago