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
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