Package src

Class UpdateCSVFile

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

public class UpdateCSVFile extends Object implements FileUsage
this file implements the FileUsage interface this fille takes an filePath as input and writes down/ updates the file with the updated current information of each customer the format is dependent on the format of the input CSV file
  • Constructor Details

    • UpdateCSVFile

      public UpdateCSVFile()
  • Method Details

    • Use

      public void Use(String filePath) throws CSVException
      Update the CSV File with the new entries and any altered entry that happened throughout the life cycle of the program. We decided to create a seperate file path for the updated CSV file rather than overwriting the original. If needed the file path can be changed to the original file so that the updates end up there.
      Specified by:
      Use in interface FileUsage
      Parameters:
      filePath - to increase flexibility, filePath added incase needed again for future project
      List - invalid input: '<'Dictionaryinvalid input: '<'?,Customer>> list of Customers that are going to have there attributes and account attributes convereted into strings and updated in the CSV file
      Throws:
      CSVException - Exception thrown if Updating the file creates an error