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()
{
......@@ -56,6 +48,13 @@ public class SavingsAccount
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)
{
SavingsAccount bensAccount = new SavingsAccount();
......
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