Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following are the steps that you should follow: (You will create 3 Parallel Arrays: Weekday, Drink & Price). (1) Create an array of String
The following are the steps that you should follow: (You will create 3 Parallel Arrays: Weekday, Drink & Price).
(1) Create an array of String objects and populate it with the days of the week (i.e., Monday - Sunday)
(2) Create another array of String objects parallel to the one created in (1) to store and the following drinks in this order: (Soda, Sweet Tea, Lemonade, Frozen Lemonade, Coffee-Hot, Coffee-Iced, Latte)
(3) Create a third array parallel to the one created in (2) to store the drink prices. However, you do not have this information, so you will need to write a loop that prompts the user to enter the different prices for each of the drinks in (2). This prompt should include the drink for which you are asking for the price (e.g., "What is the price of a Lemonade?")
(4) Then Prompt the user for a day of the week and then search the array and output the day on which the drink will have a 35% price discount along with the name of the drink, the original price and the discounted price.
(5) Search through the array for the highest price drink and output the name of this drink and the regular price for the user.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started