Question: Java Programming Please write a BankAccount class, which maintains a pair of account information (name, balance) of all the customers. You also need to build

Java Programming

Please write a BankAccount class, which maintains a pair of account information (name, balance) of all the customers. You also need to build the main class such as BankAccountMain, which contains main() method and sequence of statements for: (1) reading account information from file; (2) constructing an array of BankAccountobjects; and (3) calculating and printing the average balance, minimum, and maximum balance among the whole accounts.

The program is expected to read all the account information from account.txt, and assign the first integer number of the first line to the number of accounts variable (like a numAccount) and proceed to capture the accounts information from the successive name (String) and balance (double) pair in the file. Accounts information of the individual customers is kept in the array of BankAccount object.

account.txt

10

Helene 1000

Jordan 755

Eve 2500

Ken 80

Andrew 999

David 1743

Amy 12

Sean 98

Patrick 7

Joy 14

public class BankAccount {

} // end of BankAccount

public class BankAccountMain {

}

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!