Question: Question 02 : Write a Java program that reads an input text-file it then prints in another text-file, a table of the number of uppercase

Question 02: Write a Java program that reads an input text-file it then prints in another text-file, a table of the number of uppercase letters in each line of the input text-file. Your program must display an appropriate error message if the input file is empty.

Sample input file:

1. JDK 8u 144 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2. Java SE 8 Documentation http://docs.oracle.com/javase/8/docs/

3. jGRASP 2.0.4_01 http://spider.eng.auburn.edu/user-cgi/grasp/grasp.pl?;dl=download_jgrasp.html

4. Eclipse (Oxygen) - IDE for Java Developers http://www.eclipse.org/downloads/eclipse-packages/

5. JCreatorV5LE

Sample output file:

Line# Number of Uppercase characters

1. 3

2. 0

3. 4

4. 0

5. 5

6. 0

7. 0

8. 7

9. 0

10. 5

Note: The header: Line# Number of Uppercase characters must be printed in the output file only if the input file is not empty.

Hint: Each line of a text-file, except the last line, is terminated by the new-line character: ' '.

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!