Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 tileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started