Package src

Class ReadCustomersFromCSVFile

java.lang.Object
src.ReadCustomersFromCSVFile
All Implemented Interfaces:
FileUsage

public class ReadCustomersFromCSVFile extends Object implements FileUsage
This class implements the FileUsage interface The class takes an input filePath and reads the CSV file given. It then populateds the customerList, accountList and IDList, which are used for quickly look up customers throughout the programs life span.
  • Constructor Details

    • ReadCustomersFromCSVFile

      public ReadCustomersFromCSVFile()
  • Method Details

    • Use

      public void Use(String filePath) throws CSVException
      In this method every input line read is converted into Customer with fully set attributes and Account attributes. They are then returned for use in the system The names list is used as a way of sorting the list when you update the CSV file. There are no returns since the varibales that would have been returned are static variables in the RunBank class taht are being refrenced in this method.
      Specified by:
      Use in interface FileUsage
      Parameters:
      filePath - String that shows the location of the file. Put as a parameter for flexibility if needed in a future project.
      Throws:
      CSVException