Question: Bank Account Java Programming 5294360001 - account number 7848 - pin number John Smith - account name 100.00 - amount Account User Program Assume a

Bank Account Java Programming

Bank Account Java Programming 5294360001 - account number 7848 - pin number

5294360001 - account number

7848 - pin number

John Smith - account name

100.00 - amount

Account User Program Assume a program already exists which takes user input to create an account and store it in a file. Display the following menu for the user to choose. Select one of the following operations: 1. Get account balance 2. Make a deposit 3. Make a withdrawal 4. Exit the system The program should contain a function which shows this menu to the user, gets input from user and determines whether or no the input in valid. If it is not, output an error message and repeat the menu until valid input is entered. This function returns the valid input. It should sharea Scanner with the main method that calls the function, so a Scanner is needed as a parameter. Use nextLine to get rid of any unprocessed end of line characters. Necessary functions: getBalance: parameters are account number and pin. This function is used to print balance for accounts that have been validated. * deposit: parameters are account number, pin, and amount .withdraw: parameters are account number, pin, and amount All three of these functions require that the account number and pin be validated before anything else can happen to the account Use a separate function for validation. Validation can fail if the account number is not found, or the pin for the account does not match. If that does occur display error message. The deposit and withdraw functions both have the possibility of changing an existing account balance for accounts that have been validated. Create a separate function to update accounts. The withdraw function does not change the existing account if the amount being withdrawn exceeds the account balance. An appropriate error message is displayed in this case. Read existing accounts and write them to a temporary file. When the account being updated is read, the updated account information is written to the temporary file. Format for account example: 5294360001 7848 John Smith 100.00 May be helpful to use these string functions - split, starts With, and equals Account User Program Assume a program already exists which takes user input to create an account and store it in a file. Display the following menu for the user to choose. Select one of the following operations: 1. Get account balance 2. Make a deposit 3. Make a withdrawal 4. Exit the system The program should contain a function which shows this menu to the user, gets input from user and determines whether or no the input in valid. If it is not, output an error message and repeat the menu until valid input is entered. This function returns the valid input. It should sharea Scanner with the main method that calls the function, so a Scanner is needed as a parameter. Use nextLine to get rid of any unprocessed end of line characters. Necessary functions: getBalance: parameters are account number and pin. This function is used to print balance for accounts that have been validated. * deposit: parameters are account number, pin, and amount .withdraw: parameters are account number, pin, and amount All three of these functions require that the account number and pin be validated before anything else can happen to the account Use a separate function for validation. Validation can fail if the account number is not found, or the pin for the account does not match. If that does occur display error message. The deposit and withdraw functions both have the possibility of changing an existing account balance for accounts that have been validated. Create a separate function to update accounts. The withdraw function does not change the existing account if the amount being withdrawn exceeds the account balance. An appropriate error message is displayed in this case. Read existing accounts and write them to a temporary file. When the account being updated is read, the updated account information is written to the temporary file. Format for account example: 5294360001 7848 John Smith 100.00 May be helpful to use these string functions - split, starts With, and equals

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!