processFile
Category: Line-Based File Processing
Author: Stuart Reges
Book Chapter: 6.3
Problem: processFile
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.
Write your solution to processFile below.