fix up line endings, improve code quality (issue #522)

This commit is contained in:
benfry
2011-04-16 19:26:16 +00:00
parent da7c72cc6d
commit 398519707f
4 changed files with 649 additions and 238 deletions
@@ -0,0 +1,23 @@
class Record {
String name;
float mpg;
int cylinders;
float displacement;
float horsepower;
float weight;
float acceleration;
int year;
float origin;
public Record(String[] pieces) {
name = pieces[0];
mpg = float(pieces[1]);
cylinders = int(pieces[2]);
displacement = float(pieces[3]);
horsepower = float(pieces[4]);
weight = float(pieces[5]);
acceleration = float(pieces[6]);
year = int(pieces[7]);
origin = float(pieces[8]);
}
}