Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Finance.Bank;
- public class BankAccount {
- private String name;
- private static double interestRate = 1.5;
- private int days;
- private double balance;
- private double interest;
- public BankAccount(String name, double amount) {
- this.name = name;
- this.balance = amount;
- }
- public double deposit(double amount) {
- balance = balance + amount;
- return balance;
- }
- public double Withdraw(double amount) {
- balance = balance - amount;
- return balance;
- }
- public void displayInfo() {
- // TODO Auto-generated method stub
- }
- public static void setInterestRate(double interestRate) {
- BankAccount.interestRate = interestRate;
- }
- public double getInterestRate() {
- return interestRate;
- }
- public double calculateInterest(int days1) {
- // TODO Auto-generated method stub
- return Math.pow(+1 * interestRate, days);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement