I am having problem with understanding the project's concept and what exactly we need to follow. I don't know if we have to create files and how many. This is my first programing experience and I am not sure what the steps are in developing this program. Please provide me with more details regarding the development steps. I appreciate any help .
Ali
Here is the project :
create a Java program called process.java that opens text files
and executes simple commands that are read from the files. Your program
should be able to read a variable number of command files and should
execute the commands from each in turn.
Your program should be invoked with the following syntax:
java process filename1 filename2 ... filenameN
where each filename# is a complete filename, which may or may not have
an extension. There can be one or more files specified, and if there are
none you should print an error. For example, the following is a valid
command line:
java process file1 file2.txt file3
After opening a file your program should print out a status message
like the following:
Processing commands from file (filename)
Each file will contain a sequence of commands, each on its own line.
The possible commands are as follows:
add Num1 Num2
sub Num1 Num2
mult Num1 Num2
The numbers (Num1,Num2) can be any valid decimal number, e.g.: (1,5,-4,6.07,-88.23)
The action of each command is as follows:
add: Num1+Num2
sub: Num1-Num2
mult: Num1*Num2
For each command you should print out a status message, which includes
the input numbers and the result of the command. Note that your program
should allow for any type of white space between the commands and the
numbers, i.e. spaces, tabs.
Ali
Here is the project :
create a Java program called process.java that opens text files
and executes simple commands that are read from the files. Your program
should be able to read a variable number of command files and should
execute the commands from each in turn.
Your program should be invoked with the following syntax:
java process filename1 filename2 ... filenameN
where each filename# is a complete filename, which may or may not have
an extension. There can be one or more files specified, and if there are
none you should print an error. For example, the following is a valid
command line:
java process file1 file2.txt file3
After opening a file your program should print out a status message
like the following:
Processing commands from file (filename)
Each file will contain a sequence of commands, each on its own line.
The possible commands are as follows:
add Num1 Num2
sub Num1 Num2
mult Num1 Num2
The numbers (Num1,Num2) can be any valid decimal number, e.g.: (1,5,-4,6.07,-88.23)
The action of each command is as follows:
add: Num1+Num2
sub: Num1-Num2
mult: Num1*Num2
For each command you should print out a status message, which includes
the input numbers and the result of the command. Note that your program
should allow for any type of white space between the commands and the
numbers, i.e. spaces, tabs.
Comment