Question: JAVA in Eclipse IDE You need to create a program that reads in a string from the user in this format {id:[12345], description:iPhone 7, department:electronics,
JAVA in Eclipse IDE
You need to create a program that reads in a string from the user in this format {id:[12345], description:"iPhone 7", department:"electronics", price:499.99, location:[15-C]}. Then, you need to use string methods to process the string to extract the data, store the data in appropriate variables, and use the variables to display each item to the user.
Example Input: {id:[12345], description:"iPhone 7", department:"electronics", price:499.99, location:[15-C], in-stock: true}
Example Output:
Product ID > 12345
Description > iPhone 7
Department > electronics
Price > $499.99
Location > Aisle 15, Bay C
In-Stock > true
this does not have to be overly complicated, no if/else statements. this is a program for absolute beginners
MUST use the Scanner class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
