Write a client java program that will use a pre-implemented


You need to prepare a java program to create a bank account

Program: Write a client java program that will use a pre-implemented class BankAccount.java. BankAccount class provides template to create BankAccount objects that represent real world bank accounts. Each bank account object stores it's own balance. The class provides various operations (methods) that can be performed (called) on BankAccount objects including checking balance, deposit and withdraw operations.

Note: You don't need to have the knowledge of the code in the BankAccount class in order to use it in your client program. You should use this pre-implemented class using its API. It must compile with no errors and follow the directions.

For this program you will do the subsequent:

Part 1: Create a new Class named BankAccountTest which will be your client program by right clicking the Project folder and select New à Java class.

Part 2: Create a BankAccount object using the default constructor. Name the object reference as accont1.

Part 3: Print the current balance on the terminal window by calling appropriate method

Part 4: Deposit 1000 dollars into account1 by calling appropriate method

Part 5: Print the current balance on the terminal window by calling appropriate method

Part 6: Withdraw 250 dollars from account1 by calling appropriate method

Part 7: Print the current balance of account1 on the terminal window by calling appropriate method

Part 8: Create another BankAccount object using the other constructor with initial balance as 500. Name the object reference as account2.

Part 9: Print the current balance of the account2 on the terminal window by calling appropriate method.

Part 10: Withdraw 550 dollars from account2

Part 11: Assign account 1 to account 2 ( account2 = account1; )

Part 12: Deposit 50 dollars into account1.

Part 13: Print the current balance of both account1 and account2 on the output window.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a client java program that will use a pre-implemented
Reference No:- TGS0952719

Expected delivery within 24 Hours