Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make sure its C++, please! thank you Problem 2. Comprehensive programming: (file I/O, if...else, for loop, output manipulators) Cheap Chirps is a pet store specializing

Make sure its C++, please! thank you image text in transcribed
Problem 2. Comprehensive programming: (file I/O, if...else, for loop, output manipulators) Cheap Chirps is a pet store specializing in pet birds. The store needs a new inventory program and has hired you to develop the program. Write a C++ program that will: 1. Read an inventory list of birds from a data file called BIRD txt. The file contains information on bird species in the store. There are four lines in the file. Each line of the file has type of bird (no larger than 20 characters), price of the bird, and the consumed food in pounds monthly. Use for loop to read the related information. BIRD txt MACAW 2,500.00 20 AMAZON 550.7515 COCKATIEL 123.502 PARAKEET 45.501 2. Your program will find if the bird is a large hookbill or a small hookbill (Large hookbills eat 15 or more pounds of food a month.) Use a character 'L' to represent a large hookbill and an ' S ' to represent a small hookbill. 3. Your program will also calculate the average price of a bird and the average amount of food eaten in one month. 4. Print the output so that it is organized as below. Note the values for the averages are printed to two decimal places. All printing is done in the main function

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions