Page 1 of 1

a. Define the class BankAccount to store a bank customer's account number, customer name and balance. Suppose that the a

Posted: Sat May 14, 2022 3:08 pm
by answerhappygod
A Define The Class Bankaccount To Store A Bank Customer S Account Number Customer Name And Balance Suppose That The A 1
A Define The Class Bankaccount To Store A Bank Customer S Account Number Customer Name And Balance Suppose That The A 1 (31.43 KiB) Viewed 61 times
a. Define the class BankAccount to store a bank customer's account number, customer name and balance. Suppose that the account number is of type int and balance is of the double. Your class should provide setter and retriever methods for all attributes, deposit method to deposit money (the method receives the deposit amount through a parameter and then adds the amount to balance), withdraw method to withdraw money (the method receives the withdraw amount through a parameter and then deducts the amount from balance) and print account information. Add default and normal constructors. b. Write a main program to do the following tasks: i. Declare and create an array of 50 BankAccount objects. ii. Create the BankAccount objects and set up the array. iii. Find and display the average account balance. iv. Find and display the customer information with the highest balance. V. Find a customer named "Nur Amina binti Yusuf and account number 1234. If the customer exists, withdraw 500 from her account. Then, display the current balance from her account.. vi. Find and display how many customers are males and how many are females. Use the appropriate String method. vii. Find and display the information of the customer with the longest customer name. Use the appropriate String method. viii. Deposit RM300 to account number 4567. Display the information of this account number.