Write a Java application that allows the user to read, validate, store, display, sort and search…

Write a Java application that allows the user to read, validate, store, display, sort and search the account number and balance for N bank customers. N should be declared as a constant and it should be equal to the largest digit of your student id number (e.g. if your ID number is 50506 then N should be equal to 6 and you can declare it as final int N= 6 ;). The account number and balance must be stored in two separate single dimension 9 arrays/array, Lists (index 0 for customer 1 and index N-1 for customer N). The minimum and maximum account numbers, which can be stored, are 999 and 9999. The minimum and maximum account balances, which can be stored, are K1 and K100000. The account number and balance must be entered from the keyboard and a validation for minimum and maximum values must be done. Your application MC213 MAJOR PROJECT (PROGRAMMING)should display and execute a menu with the following options. A switch statement must be used to execute the following menu options. 1. Read, validate and store account number and balance for N customers. 2. Display account number and balance for all customers. 3. Display all account numbers, which have PGK1 balance. 4. Find and display the account balances, which have below the average balance. 5. Find and display the account number with the largest balance. 6. Sort and display the account balances in descending order. 7. Search and display the accounts, which have balance equal to the given balance. 8. Exit from application. Further discussions of the menus Read, validate and store account number and balance for N customers. This option reads account number and balance for all customers from the keyboard and stores them in two separate single dimension arrays/array Lists. If the account number is less than 999 and greater than 9999 then an appropriate message should be displayed and the user should be asked to enter a new account number. Similarly if the balance is less than PGK1 and greater than PGK 100000 then an appropriate message should be displayed and the user should be asked to enter a balance. 1. Display account number and balance for all customers 2. This option displays the account number and balance stored in Arrays/Array Lists for all customers. 3. Display all account numbers which have PGK1 balance 10 4. This option displays all account numbers stored in Array/Array List, which have PGK1 balance. 5. Find and display the account balances, which have below the average balance. 6. This option finds and displays the account balances stored in Array/Array List, which have balance below the average balance. 7. Find and display the account number with the largest balance 8. This option finds and displays the account number stored in Array/Array List, which has largest balance. If there is more than one account with the same balance (largest balance) then it displays all of them. 9. Sort and display the account balances in descending order 10. This option sorts and displays account balances stored in Array/Array List for all customers in descending order. You must use the Selection Sort algorithm. A built-in sort algorithm for sorting is not allowed in this assignment. 11. Search and display the accounts which have balance equal to the given balance 12. This option searches Array/Array List and displays the accounts, which have balance equal to the given balance. The application asks the user to enter a balance using the keyboard and searches for it. If the balance entered from the keyboard is found, then the application displays account number and balance otherwise it displays an appropriate message. A built-in search algorithm for searching can be used in this assignment. 13. Exit from application 14. The application should display the message “Thank you” and your student id number and then exit from application. The application should work in a loop to enable the user to read, validate and store account number and balance for N customers. It must display account number and balance for all customers, display all account numbers, which have K1 balance, find and display the account balances, which have below the average balance, find and display the account number with the largest balance. Finally, it must sort and display the account balances in descending order, search and display the 11 customers, which have balance equal to the given balance and exit from application.

Don't use plagiarized sources. Get Your Custom Essay on
Write a Java application that allows the user to read, validate, store, display, sort and search…
For as low as $13/Page
Order Essay