Computer Science Homework Help

Computer Science Homework Help. COP3804 Intermediate Java Programming

Here is some pseudo code on an approach to solving this lab:

1.) Step 1: Read the word and store it in a variable.

Read the letter and store it in a variable.

2.) Step 2: Open the file that has the name stored in the variable.txt

3.) Step 3: Loop to read the entire file, which contains an
unknown number of words per line. Hint: Read entire line as 1 record,
and then apply the split method to break the line into an array.

4.) Step 4: For each word in the array, get the first letter of
the word, convert it to its numeric value, and subtract 97 (since ASCII
values of a-z start with 97). This will get you index values from 0 to
26.

5.) Step 5: Use that index as the row value in a 2-D array of
words, where the row determines the letter of the alphabet, and the
columns are the actual words that begin with that letter.

6.) Step 6: Create a loop that will put every word in the 1-D
array created from the record that was read in the file into a column in
the 2-D array.

7.) Once the entire file has been read and used to update the 2-D array, close the file.

8.) Take the letter that was input at the beginning of the
program, and subtract 97 from it, and use it as the index to the 2-D
array. Print that entire row, showing all the columns in that row.

9.) If there are no words that begin with that letter (i.e. there
are no words that begin with that letter in the 2-D array), then state
that message.

This tool was successfully loaded in a new browser window. Reload the page to access the tool again.

Computer Science Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"