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