Write a program in a class flower counter that computes the


Question: Write a program in a class Flower Counter that computes the cost of flowers sold at a flower stand. Five kinds of flowers-petunia, pansy, rose, violet, and carnation-are stocked and cost, respectively, 501, 751, $1.50, 501, and 801 per flower. Create an array of strings that holds the names of these flowers. Create another array that holds the cost of each corresponding flower. Your program should read the name of a flower and the quantity desired by a customer. Locate the flower in the name array and use that index to find the cost per stem in the cost array. Compute and print the total cost of the sale.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program in a class flower counter that computes the
Reference No:- TGS02457070

Now Priced at $15 (50% Discount)

Recommended (98%)

Rated (4.3/5)