Overview

This is a dataset about cars and how much fuel they use.

Downloads

Download all of the following files.

Usage

Begin by adding the above JAR file to your classpath. This library has 3 functions you can use.
import corgis.cars.CarsLibrary;
import corgis.cars.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        CarsLibrary carsLibrary = new CarsLibrary();
        // Access data inside the library
        ArrayList<Car> list_of_car = carsLibrary.getCars(false);ArrayList<Car> list_of_car = carsLibrary.getCarsByYear(2001, false);ArrayList<Car> list_of_car = carsLibrary.getCarsByMake("Pontiac", false);
    }
}
Additionally, some of the functions can optionally return Big Data using the last argument (setting it to true). If you use this Big Data, it may be much slower. Wait until you are sure your code is correct before using these examples.
import corgis.cars.CarsLibrary;
import corgis.cars.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        CarsLibrary carsLibrary = new CarsLibrary();
        // Access data inside the library
        ArrayList<Car> list_of_car = carsLibrary.getCars(true);ArrayList<Car> list_of_car = carsLibrary.getCarsByYear(2001, true);ArrayList<Car> list_of_car = carsLibrary.getCarsByMake("Pontiac", true);
    }
}

Documentation

We provide full JavaDoc for this library. Alternatively, you may refer to the below:

 carsLibrary.getCars(test)

Returns the complete list of cars.

 carsLibrary.getCarsByYear(year, test)

Returns all the cars for a given year.

 carsLibrary.getCarsByMake(make, test)

Returns all the cars of a certain make.