|
|
@ -1,7 +1,6 @@
|
|
|
|
package bank.assessment.states;
|
|
|
|
package bank.assessment.states;
|
|
|
|
|
|
|
|
|
|
|
|
import bank.assessment.BankAccount;
|
|
|
|
import bank.assessment.BankAccount;
|
|
|
|
import bank.assessment.BasicAccount;
|
|
|
|
|
|
|
|
import bank.assessment.Console;
|
|
|
|
import bank.assessment.Console;
|
|
|
|
import bank.assessment.Person;
|
|
|
|
import bank.assessment.Person;
|
|
|
|
|
|
|
|
|
|
|
@ -41,12 +40,12 @@ public class LoggedOutState implements BankAccountStates {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void logOut() {
|
|
|
|
public void logOut() {
|
|
|
|
System.out.println("You Have Already Logged Out! Please Log in!");
|
|
|
|
System.out.println("You Have Already Logged Out!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void deposit() {
|
|
|
|
public void deposit() {
|
|
|
|
|
|
|
|
System.out.println("Sorry, Please Log In First Before Trying Deposit Cash!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -57,16 +56,12 @@ public class LoggedOutState implements BankAccountStates {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void viewDetails() {
|
|
|
|
public void viewDetails() {
|
|
|
|
|
|
|
|
System.out.println("There Are No Account Details To View, Please Log In!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void deleteAccount() {
|
|
|
|
public void deleteAccount() {
|
|
|
|
bankAccount = new BasicAccount();
|
|
|
|
bankAccount.changeBankAccountState(NotCreatedState.getInstance(bankAccount));
|
|
|
|
System.out.println("Account Deleted! We're Sad To See You Go :(");
|
|
|
|
System.out.println("Account Deleted! We're Sad To See You Go :(");
|
|
|
|
|
|
|
|
|
|
|
|
// Same as?
|
|
|
|
|
|
|
|
// bankAccount = new BasicAccount();
|
|
|
|
|
|
|
|
// System.out.println("Account Deleted! We're Sad To See You Go :(");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|