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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 59 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply