Closed jwood36 closed 1 year ago
I've had a SaveToFile() method in my main method that calls the saveToFile() method in my vehicleStorage class. In the vehicleStorage class, there is a saveToFile() method as well. In this, saveToFile method, it prompts the user for the file name, if they have not provided the extension: ".csv" then the program adds it for them. It adds a header row to the file. The format for the data to be saved to the file is " String row = make + "|" + vehicleType + "|" + model + "|" + year + "|" + engineType + "|" + doorCount + "|" + color + "\n";" The "\n" at the end of each row ensure that each row will be terminated with a New Line Character. The pipelines provide the delimeter character.