Commit 4b119eaf authored by jose.alencastro's avatar jose.alencastro

ok

parent 29cb3a6c
No preview for this file type
public class SavingsAccount
{
// bank account attributes
......@@ -14,12 +13,6 @@ public class SavingsAccount
balance = 4000;
}
// deposit method
public void deposit(double amount)
{
balance = balance + amount;
}
// withdraw method
public void withdraw(double amount)
{
......@@ -33,6 +26,12 @@ public class SavingsAccount
}
}
// deposit method
public void deposit(double amount)
{
balance = balance + amount;
}
// bank fee method
public double bankFee()
{
......@@ -41,13 +40,6 @@ public class SavingsAccount
return balance;
}
// display method
public void displayAccountDetails()
{
System.out.println("Account Number: " + accountNumber + "\n");
System.out.println(name + ": $" + balance);
}
// interest method
public int accrueInterest()
{
......@@ -55,6 +47,13 @@ public class SavingsAccount
balance = balance + interest;
return (int) balance;
}
// display method
public void displayAccountDetails()
{
System.out.println("Account Number: " + accountNumber + "\n");
System.out.println(name + ": $" + balance);
}
public static void main(String[] args)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment