package com.mybank.test;

import java.io.IOException;

import com.mybank.data.DataSource;
import com.mybank.report.CustomerReport;

public class TestReport {

	public static void main(String[] args) {

		String dataFilePath = "data/test.dat";

		try {
			System.out.println("Reading data file: " + dataFilePath);
			// Create the data source and load the Bank data
			DataSource dataSource = new DataSource(dataFilePath);
			dataSource.loadData();

			// Run the customer report
			CustomerReport report = new CustomerReport();
			report.generateReport();

		} catch (IOException ioe) {
			System.out.println("Could not load the data file.");
			System.out.println(ioe.getMessage());
			ioe.printStackTrace(System.err);
		}
	}
}