A new class RemoveAccount has been added to handle the deletion of a bank account from the system using the account number as a reference. This class performs the following actions:
Reads current account data from the file using FileIO.Read().
Searches the BankAccount[] array for the matching account number.
Sets the matching account to null to effectively remove it.
Updates the bank's account list and writes the changes back using FileIO.Write().
Prints a confirmation message to the console based on the result.
This helps in managing and maintaining the integrity of stored accounts by allowing safe removal operations.
A new class RemoveAccount has been added to handle the deletion of a bank account from the system using the account number as a reference. This class performs the following actions:
Reads current account data from the file using FileIO.Read().
Searches the BankAccount[] array for the matching account number.
Sets the matching account to null to effectively remove it.
Updates the bank's account list and writes the changes back using FileIO.Write().
Prints a confirmation message to the console based on the result.
This helps in managing and maintaining the integrity of stored accounts by allowing safe removal operations.