Question: For JAVA The Rochester Bank maintains customer records in a random access file. Write an application to perform the following tasks: Define a BankAccount class
For JAVA
The Rochester Bank maintains customer records in a random access file. Write an application to perform the following tasks:
- Define a BankAccount class that has account number, customer name, and balance as data fields. The class should also has necessary constructors, getter/setter methods
- Creates 100 BankAccount objects that include bank account number (an random integer 1000 or less. Do not accept duplicate account number), customer's name, and a balance (a random double value 99000 or less).
- Each time after a BankAccount object is created, insert the object into a data file so that all records in the file are sorted in ascending order of the account number. Force each name to eight characters, padding it with spaces or truncating it if needed.
- Allow the user to enter an account number to view the account balance for that account.
Requirements:
1. Program should handle exceptions properly
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
