Project 1
Spring 2012
Due: Wed, Feb 1 @ 8 PM
10 points
Make | Tires | Handle Bars | Water Bottle | Weight | Bike Type |
Trek | Knobby | Straight | y | 250.3 | Mountain |
Bridgestone | Treads | Straight | y | 200 | Hybrid |
Cannondale | Knobby | Curved | n | 222.9 | Mountain |
Nishiki | Treads | Curved | y | 190.3 | Hybrid |
Trek | Treads | Straight | y | 196.8 | Hybrid |
The file bikes.mff shows this data set in Mark's File Format. Files containing valid data sets begin with '@dataset' followed by an identifier. Attribute declarations appear next. The string '@attribute' precedes each declaration, which is for a symbolic attribute or a numeric attribute. The attribute's name appears next, followed by its domain. The domain for symbolic attributes is a list of values separated by whitespace. The domain for numeric attributes is not explicitly specified and is assumed to be the set of representable floating-point numbers.
The token '@examples' separates the attribute declarations from the examples, which are simply values separated by whitespace.
For simplicity, you can assume that all elements of the file are separated by at least one space character. Moreover, attribute declarations and examples will appear on single lines. I have defined a grammar for the file format.
I would recommend implementing two primary structures: one for the information about attributes, and one for the examples themselves. I have produced design document for the classes and their methods. You do not have to follow my design exactly, but I'm reasonably certain that my design contains all of the essential functionality for the subsequent projects.
% java p1 -t bikes.mff % java p1 -t bikes.train % java p1 -t bikes.train -T bikes.test % java p1 -t bikes-tr.mff -T bikes-te.mffThe program should perform light checks for proper formatting and data integrity. For this project, the program can simply read the input files, populate the appropriate objects, and output the examples to the console.
// // Name // E-mail Address // Platform: Windows, OS X, Linux, Solaris (daruma), etc. // Language/Environment: gcc, g++, java, g77, ruby, python, haskell, etc. // // In accordance with the class policies and Georgetown's Honor Code, // I certify that, with the exceptions of the class resources and those // items noted below, I have neither given nor received any assistance // on this project. //When you are ready to submit your program for grading, create an archive or a compressed archive of a directory containing only your project's source and build instructions, and upload it to Blackboard. The directory's name should be the same as your net ID.