Question: Activity 2: Read a file using FileReader() (20 mins) // Read lines of a file name joke in Data folder // For every line of

Activity 2: Read a file using FileReader() (20 mins) // Read lines of a file name joke in Data folder // For every line of the file: // o Print out the line to the console // o Call textToSpeech(,voice) where line is a String // Answer question 1, Activity 2 // Demonstrate your program to your TA and get a signature // Hint: // You will need buffering to read line by line, you can either use Scanner // class or BufferedReader to wrap around a FileReader object. // BufferedReader has a convenience method named readLine() that makes it // easier to read text from input streams line by line. //TODO 1: CHECK if "Data/joke" is exist and readable, writable

//TODO 2: Read the file, //Print the content of the file to console //call textToSpeech(sentence,voice) to convert to speech line by line

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!