Part 1 Tom has recently started a plant-selling business, and he offers three different types of plants, namely Monstera, Philodendron, and Hoya. Each pot costs $11.50, $13.75, and $10.99, respectively, and there are 20 pots available for each plant. To minimize the workload of his employees, Tom requires a C++ program for online shopping. The program will exhibit a menu with all the available plant types. The customers can choose the plant type by entering the first letter of the plant's name (M or m for Monstera, P or p for Philodendron, and H or h for Hoya), followed by the quantity they want to buy. If the amount of pots requested exceeds the available pots, the program will display an apology message. The customers can select multiple plant types and quantities until they are ready to pay. Once they are done, the program will add a 12% tax to the total amount and display it with three decimal places. Finally, the program will print a thank you message. The program will not accept any invalid input. Sample Run 1 Welcome to Tom's Nursery Shop M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: M Enter how many pots would you like: 2   M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: P   Enter how many pots would you like: 21 Sorry, we do not have this amount   M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: H   Enter how many pots would you like: 2   M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: a   Units/Description/cost 2 Monstera pots cost $23.000 2 Hoya pots cost $21.980 Total amount before tax is $44.980 Total amount with tax is $50.378   Thank you! Please come again!   Sample Run 2 Welcome to Tom's Nursery Shop M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: H     Enter how many pots would you like: 2 M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: H   Enter how many pots would you like: 3 M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: H   Enter how many pots would you like: 2 M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: a   Units/Description/cost of Items 5 Hoya pots cost $54.950 Total amount before tax is $54.950 Total amount with tax is $61.544   Thank you! Please come again!

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 4GZ
icon
Related questions
Question
  •  
  •  

  1. Part 1

    Tom has recently started a plant-selling business, and he offers three different types of plants, namely Monstera, Philodendron, and Hoya. Each pot costs $11.50, $13.75, and $10.99, respectively, and there are 20 pots available for each plant. To minimize the workload of his employees, Tom requires a C++ program for online shopping. The program will exhibit a menu with all the available plant types. The customers can choose the plant type by entering the first letter of the plant's name (M or m for Monstera, P or p for Philodendron, and H or h for Hoya), followed by the quantity they want to buy. If the amount of pots requested exceeds the available pots, the program will display an apology message. The customers can select multiple plant types and quantities until they are ready to pay. Once they are done, the program will add a 12% tax to the total amount and display it with three decimal places. Finally, the program will print a thank you message. The program will not accept any invalid input.

    Sample Run 1

    Welcome to Tom's Nursery Shop M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: M
Enter how many pots would you like: 2
 
M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: P
 
Enter how many pots would you like: 21 Sorry, we do not have this amount
 
M or m for Monstera P or p for Philodendron H or h for Hoya A or a for payment Enter your choice: H
 
Enter how many pots would you like: 2
 
M or m for Monstera
P or p for Philodendron
H or h for Hoya
A or a for payment
Enter your choice: a
 
Units/Description/cost
2 Monstera pots cost $23.000
2 Hoya pots cost $21.980
Total amount before tax is $44.980
Total amount with tax is $50.378
 
Thank you! Please come again!
 

Sample Run 2

Welcome to Tom's Nursery Shop
M or m for Monstera
P or p for Philodendron
H or h for Hoya
A or a for payment
Enter your choice: H
 
 
Enter how many pots would you like: 2
M or m for Monstera
P or p for Philodendron
H or h for Hoya
A or a for payment
Enter your choice: H
 
Enter how many pots would you like: 3
M or m for Monstera
P or p for Philodendron
H or h for Hoya
A or a for payment
Enter your choice: H
 
Enter how many pots would you like: 2
M or m for Monstera
P or p for Philodendron
H or h for Hoya
A or a for payment
Enter your choice: a
 
Units/Description/cost of Items
5 Hoya pots cost $54.950
Total amount before tax is $54.950
Total amount with tax is $61.544
 
Thank you! Please come again!
 

 

 
 
Expert Solution
steps

Step by step

Solved in 5 steps with 5 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT