Question
Objectives: Reinforce your skills of using control flow statements (such as while loop, if-else, switch) and Scanner to interactively process a user's keyboard inputs. Description:
Objectives:
Reinforce your skills of using control flow statements (such as while loop, if-else, switch) and Scanner to interactively process a user's keyboard inputs.Description:
In this assignment, you are required to implement a simple command line app to convert different metrics. You can find a list of common conversions from Metric Conversion charts and calculators (metric-conversions.org).
Here are the requirements:
1. Your app (it is a quite simple command line app without GUI) must be able to do at least 4 different conversions (the more the better). For example, kg to lb, gram to ounces, km to mile, mm to inch, etc.
2. Your app should continue accepting user inputs until the user inputs something like "exit" or "-1" (you can decide which word to use as the cue to exit the program).
3. Your README.md file in your GitHub and your command line app should contain some basic instructions on how to use your app, for example, your app may print the following statement when starting the program:
"Welcome to metric converter!
Please input your query. For example, 1 km = m.
Enter 'exit' or '-1' to exit the program"
If a user input something that is not handled, you should print something to remind the user the valid input format, e.g.,
"Your input is not currently handled by this app, please input another query, for example, 1 kg = lb"
4. Export your project to a .jar file. So that users can directly use the .jar file to convert metrics.
Here is how you can export it to a JAR file from a VS code java project.
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