Java program using Bank Class
1. Declare Bank class with below attributes:
a. Balance – float
Write below methods in this class.
DepositMoney(depostAmount) // adds amount to balance
WithdrawMoney(withdrawAmount) // subtracts amount from balance
CalculateInterest(interestPercentage) // calculates interest and adds to balance
DisplayDetails() //displays the balance details
Create object of Bank class and test above methods from main method in BankDemo class. Follow
Class outline diagram as given below. Ensure class attributes are private and other methods are
Public.
Define attributes with same name and data type as given in class outline.
Define constructors and getter setters as given in the class outline.
Ensure attributes are private and other methods which will be called from main method,
Getter-setter methods and constructor is public.
Use main method only for input and output and testing object creation and object methods