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

ok

parent 29cb3a6c
No preview for this file type
public class SavingsAccount public class SavingsAccount
{ {
// bank account attributes // bank account attributes
...@@ -14,12 +13,6 @@ public class SavingsAccount ...@@ -14,12 +13,6 @@ public class SavingsAccount
balance = 4000; balance = 4000;
} }
// deposit method
public void deposit(double amount)
{
balance = balance + amount;
}
// withdraw method // withdraw method
public void withdraw(double amount) public void withdraw(double amount)
{ {
...@@ -33,6 +26,12 @@ public class SavingsAccount ...@@ -33,6 +26,12 @@ public class SavingsAccount
} }
} }
// deposit method
public void deposit(double amount)
{
balance = balance + amount;
}
// bank fee method // bank fee method
public double bankFee() public double bankFee()
{ {
...@@ -41,13 +40,6 @@ public class SavingsAccount ...@@ -41,13 +40,6 @@ public class SavingsAccount
return balance; return balance;
} }
// display method
public void displayAccountDetails()
{
System.out.println("Account Number: " + accountNumber + "\n");
System.out.println(name + ": $" + balance);
}
// interest method // interest method
public int accrueInterest() public int accrueInterest()
{ {
...@@ -55,6 +47,13 @@ public class SavingsAccount ...@@ -55,6 +47,13 @@ public class SavingsAccount
balance = balance + interest; balance = balance + interest;
return (int) balance; 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) 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