Question: Write a static method processFile that takes a Scanner containing an input file as a parameter and that prints the output file with certain lines

Write a static method processFile that takes a Scanner containing an input file as a parameter and that prints the output file with certain lines underlined. The lines to be underlined will all begin with a period. The period should not be printed. You should print the text that follows the period on a line by itself followed by a line of dashes that is equal in length to the text that follows the period.

For example, given the following input file:

.Statement of Purpose I didn't expect to major in computer science until I took cse142. I liked it more than I expected and that got me hooked on cs. .High School Performance I got very good grades in high school, graduating in the top 10% of my class. .College Performance I have done well in my college classes, with an overall gpa of 3.5. 

Your method should print the following output:

Statement of Purpose -------------------- I didn't expect to major in computer science until I took cse142. I liked it more than I expected and that got me hooked on cs. High School Performance ----------------------- I got very good grades in high school, graduating in the top 10% of my class. College Performance ------------------- I have done well in my college classes, with an overall gpa of 3.5. 

Notice that some of the input lines can be blank lines

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!