Question
Java Command Line Assistance Is this best written as a conditional statement combined with command args? Code assistance please. I have code that searches and
Java Command Line Assistance
Is this best written as a conditional statement combined with command args? Code assistance please. I have code that searches and responds correctly but uncertain of how to implement this portion of the code that relies on the command line. How it responds and what it does based on command input.
Instructions:
a) We will be taking an input file name from the command line.
b) Additionally a second command-line argument will be a command to run on the data from the input file.
c) The commands consist of IDENTIFY and CALCULATE.
d) If an unknown command is provided, the program should respond by printing the message: "Command Request Error"
Note using:
Scanner sc comms = new Scanner(args[0])
Applied arguments using run as config.
***** Examples *****
The .out files for the testCases/ have the command line arguments encoded in their naming conventions.
For the file
practice_example-IDENTIFY_row3.out
The command line arguments should be:
practice_example.csv IDENTIFY row3
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