Question: JAVA code and simple and easy to understand Create a program with 2 arrays, product names and product prices Fill the 2 arrays of data
JAVA code and simple and easy to understand
Create a program with 2 arrays, product names and product prices
Fill the 2 arrays of data from your own.
Then let the user enter a name of a product to buy.
Using a method search for the product name in the array of names and if its found then return its index. But if it's not found return -1.
Check if the product is not found print a message says that. But if found then print its price and ask the user to enter the required quantity.
After the user enters the quantity calculate the total and add 13% for the tax.
Then ask the user if wants to buy more products. If yes repeat by entering a product name again.
if not then stop and print out the final total.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
