// This method starts from the ButtonListener class but ends up in the Ballot class, updating the // file of each Ballot public void updateBallots() { FileIO nullFile = new FileIO(); // need to create this just to gain access to the filename of the ballots file FileIO ballotFile = new FileIO(nullFile.getBallotsFileName()); ArrayList<Ballot> ballots = ballotFile.createBallots(); for (Ballot ballot : ballots) { ballot.updateFile(); } }