Task description

The aim of this task is to practise operations on files and collections in Java. Choose one of the following exercises.

Coding Conventions

Sun Microsystems Java Coding Conventions http://java.sun.com/docs/codeconv/index.html

Only english words can be used to name classes, field, methods etc. Fields and variables are nouns, where methods are verb phrases:

Bad smells

One should avoid the following improper code constructs:

Long Method (more information can be found here)
Data Class (more can be found here)

Technical documentation

Code should be documented with javadoc comments, so i could generate technical documentation from it. Documentation must be in english and follow the requirements:

Tasks

One should choose only one from the following:

Classifier

Use: Classifier <input file> <output file>

A record consists of the following attributes = { aura, temperature, humidity, wind }. Each attribute is of type String. Each record describes the weather state. Records are stored in a text file where one line represents one record. Attributes are separated by a colon(,).
Example of the input file:
sunny,warm,great,frail
overcast,warm,great,frail
overcast,warm,great,strong

The program should read records from file, store it in collection and then execute the classifier on the collection. The weather is great when aura is sunny. Otherwise the weather is ugly.

The classification result is stored in the output file which has the following format. Each line in the file represents a record. The line contains the record with the decision attribute at the end describing the decision class. Records are sorted by the attribute aura. Sorting should not be case sensitive (a and A are equal). One should preserve the case in the output file.
Example:
overcast,moderate,great,strong,ugly
overcast,warm,great,frail,ugly
sunny,warm,great,frail,great

Spreadsheet

Use: CalcSheet <input file> <output file>

The spreadsheet consists of columns and rows stored in the text file. Columns are divided by a colon (,) while the rows are separated by the new line. Attributes values are integers (type long). Number of attributes is unlimited but equal for every row in the file.
Example:
1,20,30,4,0
15,-30,1,-3,2
1,10,20,3,1

The program should calculate the minimum and maximum value for each column. First row should store the minimal values while the second the maximal values. For the example above the output file should have the following form:
1,-30,1,-3,0
15,20,30,4,2

Evaluation

Occurance of at least one bad smell lowers a grade by 1. Occurance of two smells lowers a grade by 2. Violations of Java Coding Conventions and/or faults in javadoc lower a grade by 0.5. Improper behavior of the program lowers a grade by 0.5. Program that has compilation errors will not be evaluated.