Commit e45581e2 authored by austin.blanke's avatar austin.blanke

all but overdraft

parents
public class SavingsAccount {
int accountNumber;
String Name;
double balance;
public SavingsAccount(){
accountNumber = 0;
Name = "noName";
balance = 0;
}
public void deposite(int inputAmount){
balance = balance + inputAmount;
}
public void withdrawal(int amountTaken){
if(balance > 0 || balance >= amountTaken || amountTaken <= 100){
balance = balance - amountTaken;
}
}
public void accrueIntrest(){
balance = balance * 1.05;
}
public void display(){
System.out.println("Account Number: " + accountNumber);
System.out.println("Name: " + Name);
System.out.println("Balance: $" + balance);
}
}
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