Write a program in a class FlowerCounter 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, 50¢, 75¢, $1.50, 50¢, and 80¢ 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.
What will be an ideal response?
See the code in FlowerCounter.java.
Computer Science & Information Technology
You might also like to view...
When you add a Fluid Grid Layout div tag, Dreamweaver adds a copy of the div to all of the following EXCEPT the ____ layout media query.
A. laptop B. mobile C. desktop D. tablet
Computer Science & Information Technology
To trim a video refers to resizing the display of the video
Indicate whether the statement is true or false
Computer Science & Information Technology
When working with cell references, any change you make to the ____ cell also changes the value in the destination cell.
A. source B. primary C. main D. active
Computer Science & Information Technology
A whitespace character in an input format string must exactly match the next user input in the input stream.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology