Arrays Java Programming Assignment Help
[ad_1]
Arrays Java Programming Assignment Help
Objective:
To apply what you have learned so far about the efficiency of algorithms, linear structures and your Java programming skills with respect to Arrays, Strings, command-line input, file I/O and text file processing.
UWhat to do: 1. Read section 3.1 from your textbook. Read it carefully to understand how arrays can be used as data containers in an application program. In this programming assignment, you may also use any kind of the linear structures that you studied so far as a container(s) of your data, the choice is up to you, plan carefully and justify your choices. 2. Write an application program that will read a large text file (the input file, must contain plain ordinary English text of at least 10000 words), count the number of occurrences of each word in the file and its percentage of the grand total of words count, and then write the results in the output file as (Word, Frequency, Percentage), sorted by the percentage in a descending order.
At its invocation, the program shall accept two command line parameters:
- The input filename: this file must be a .txt file, b. The output filename.
These parameters must appear in the command line in the same order as shown in the following example: Prompt>java ProgName Hamlet.txt HamletWordCount.txt
As you noticed from the above example, “ProgName” is the name of your program; followed by the input .txt file name; and then the output .txt filename. Arrays Java Programming Assignment Help
Your program shall read the command line and get all the parameters in the args string of the main method. These strings must be processed as follows:
- If the number of parameters is less than 2, it should print an error message and exit. 2. Read the first parameter and check if the input file name exists on disk. If the file does
not exist, print an error message and exit. 3. Read the second parameter and create this output file, checking for any errors. If errors
occur, close the input file, print an error message and exit. 4. If there were no input errors, proceed in processing the input file according to a plan (an algorithm) that you should have designed beforehand. Your algorithm must be well documented and submitted with your program, which should also be fully documented and commented. 5. When the end of the input file is reached, close it. 6. When you finish writing to the output file, close it; print a success message and exit. Important notes:
- Test your program thoroughly. 2. While designing your algorithm(s), make sure that it is most efficient, i.e. it requires
the least amount of resources (both time and space). 3. Explain in your processing plan documentation why you think your choices should
yield the most efficient algorithm
Arrays Java Programming Assignment Help
Need Help with a similar Assignment?
The post Arrays Java Programming Assignment Help appeared first on homeworkcrew.
[ad_2]
Source link
"96% of our customers have reported a 90% and above score. You might want to place an order with us."
