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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!