Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago