Question: Create a java program with 2 arrays, product names and product prices Fill the 2 arrays of data from your own. Then let the user

Create a java 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!