Question: taking computer science 002, first time coding, but my code isn't working. Your program will read in a text file one line at a time,

 taking computer science 002, first time coding, but my code isn't

taking computer science 002, first time coding, but my code isn't working.

Your program will read in a text file one line at a time, seramble each word on the line and write the line back out 1. Create a Prog project in NetBeans 2. Copy the text file that you want to scramble into the Prog6 folder. 3 Create a BufferedReader object for reading in the textfile. Use the args array perameter to get the file name. 4 Add the file name to the properties for the projeet 5. For each line in the file, after reading in the line, do the tollowing Use the String split method to break up the line into an array of words 1 Use String toChar Array to break up the String into an array of characters (called 2 Leaving the first and last letters oaf the word in pace da the follow ing length 2 5.2 For each word in the aray do the following: letters). times. t Generate a random number from 2 to length-2 fealled inde Us java util Random nextlnt for this 2 Swap letsers! !1 with leterst undes]. 5.3 Write out sach serumbled word in the urray on a singk lins with a spoce in between them 6. Test the pwgram on your ieau fie 7 Put the usual comment at the top of source code tile

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!