Computer Science 252
Problem Solving with Java
Fall 2015, The College of Saint Rose
Agenda
Your task is to add some functionality to the Matrix2D example and write code to test it in the main method there. The functionality you are to add:
Please demonstrate your program or submit only the file Matrix2D.java by email before the start of our next class. Email submissions should use a meaningful subject line, clearly indicating the course number and assignment name.
Due at the start of class, Tuesday, December 8.
Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT strose.edu by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 252 Lecture 24 Assignment , Joe Student). We will discuss these questions at the start of class, so no late submissions are accepted.
(20 points) Write a Java application in a class WordStats that takes the name of a text file as its command-line parameter, then reads all of the words in that file. It should ignore any word that contains a non-alphabetic character, but consider all other words to compute the information below. Your program should report to standard output (the terminal window) the following information:
Include simple error checking to ensure that the command-line parameter exists, and that the file was successfully opened.
Terminology
Examples