11
Posted: Mon Jun 06, 2022 12:35 pm
11
Learning outcomes: 1. Construct and demonstrate Input/Output class in solving programming problems. (P4, A3) Questions: 1. (Count.java) Write a program that counts the number of words in a text file. The file name is entered by user. The words are separated by white space characters. Sample output as on the console: File loan.java has 1715 characters 211 words 69 lines 2. (CountAgain.java) Suppose that a text file contains an unspecified number of scores. Write a program that reads the scores from the file and display their total and average. Scores a separated by blanks. Due date: End of lab hours Note: 1. Choose a proper naming convention. 2. Copy or other forms of cheating is forbidden.
Learning outcomes: 1. Construct and demonstrate Input/Output class in solving programming problems. (P4, A3) Questions: 1. (Count.java) Write a program that counts the number of words in a text file. The file name is entered by user. The words are separated by white space characters. Sample output as on the console: File loan.java has 1715 characters 211 words 69 lines 2. (CountAgain.java) Suppose that a text file contains an unspecified number of scores. Write a program that reads the scores from the file and display their total and average. Scores a separated by blanks. Due date: End of lab hours Note: 1. Choose a proper naming convention. 2. Copy or other forms of cheating is forbidden.