Skip to content

Commit

Permalink
refactor: 출력 메서드 Wrapping #1
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Apr 18, 2023
1 parent 7f81a89 commit d60463f
Showing 1 changed file with 35 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,116 +7,122 @@ public class OutputView {
// 고객 등록 메세지
public void printInputClientInfoMessage() {
printEnter();
System.out.println(REGISTER_CLIENT_MESSAGE);
println(REGISTER_CLIENT_MESSAGE);
}

public void printInputAccountNumberForRegisterMessage() {
System.out.println(INPUT_REGISTER_ACCOUNT_NUMBER_MESSAGE);
println(INPUT_REGISTER_ACCOUNT_NUMBER_MESSAGE);
}

public void printInputBirthForRegisterMessage() {
System.out.println(INPUT_REGISTER_CLIENT_BIRTH_MESSAGE);
println(INPUT_REGISTER_CLIENT_BIRTH_MESSAGE);
}

public void printInputTelNumberForRegisterMessage() {
System.out.println(INPUT_REGISTER_CLIENT_TEL_MESSAGE);
println(INPUT_REGISTER_CLIENT_TEL_MESSAGE);
}

public void printInputAddressForRegisterMessage() {
System.out.println(INPUT_REGISTER_CLIENT_ADDRESS_MESSAGE);
println(INPUT_REGISTER_CLIENT_ADDRESS_MESSAGE);
}

public void printInputPasswordForRegisterMessage() {
System.out.println(INPUT_REGISTER_CLIENT_PASSWORD_MESSAGE);
println(INPUT_REGISTER_CLIENT_PASSWORD_MESSAGE);
}


//잔액 조회 메세지
public void printCheckAccountBalanceMessage() {
printEnter();
System.out.println(CHECK_ACCOUNT_BALANCE_MESSAGE);
println(CHECK_ACCOUNT_BALANCE_MESSAGE);
}

public void printClientAmountBalance(int amount) { //! 메서드명 수정 필요
System.out.printf(CLIENT_ACCOUNT_BALANCE_AMOUNT_MESSAGE, amount);
printEnter();
printf(CLIENT_ACCOUNT_BALANCE_AMOUNT_MESSAGE, amount);
}

//출금 메세지
public void printWithdrawAccountBalanceMessage() {
printEnter();
System.out.println(CLIENT_WITHDRAW_MESSAGE);
println(CLIENT_WITHDRAW_MESSAGE);
}

public void printWithdrawAmountMessage() {
System.out.println(INPUT_WITHDRAW_AMOUNT_MESSAGE);
println(INPUT_WITHDRAW_AMOUNT_MESSAGE);
}

public void printRemainAmountAfterWithdrawMessage(int amount) {
System.out.printf(WITHDRAW_SUCCESS_MESSAGE, amount);
printf(WITHDRAW_SUCCESS_MESSAGE, amount);
}

//입금 메세지
public void printDepositIntoAccountMessage() {
printEnter();
System.out.println(CLIENT_DEPOSIT_MESSAGE);
println(CLIENT_DEPOSIT_MESSAGE);
}

public void printDepositMoneyAmountMessage() {
System.out.println(INPUT_DEPOSIT_AMOUNT_MESSAGE);
println(INPUT_DEPOSIT_AMOUNT_MESSAGE);
}

public void printAmountAfterDeposit(int amount) {
System.out.printf(DEPOSIT_SUCCESS_MESSAGE, amount);
printEnter();
printf(DEPOSIT_SUCCESS_MESSAGE, amount);
}

//송금 메세지
public void printAnotherAccountToTransferMoneyMessage() {
System.out.println(CLIENT_TRANSFER_MESSAGE);
println(CLIENT_TRANSFER_MESSAGE);
}

public void printTransferAmountMessage() {
System.out.println(INPUT_TRANSFER_AMOUNT_MESSAGE);
println(INPUT_TRANSFER_AMOUNT_MESSAGE);
}

public void printRemainAmountAfterTransferMessage(int amount) {
System.out.printf(TRANSFER_SUCCESS_MESSAGE,amount);
printEnter();
printf(TRANSFER_SUCCESS_MESSAGE,amount);
}


//기본 메세지
public void printInputClientNameMessage() {
System.out.println(INPUT_CLIENT_NAME_MESSAGE);
println(INPUT_CLIENT_NAME_MESSAGE);
}

public void printInputAccountNumberMessage() {
System.out.println(INPUT_ACCOUNT_NUMBER_MESSAGE);
println(INPUT_ACCOUNT_NUMBER_MESSAGE);
}

public void printInputPasswordMessage() {
System.out.println(INPUT_ACCOUNT_PASSWORD_MESSAGE);
println(INPUT_ACCOUNT_PASSWORD_MESSAGE);
}

public void printWelcomeMessage() {
System.out.println(WELCOME_MESSAGE);
println(WELCOME_MESSAGE);
}

public void printExitMessage() {
System.out.println(EXIT_MESSAGE);
println(EXIT_MESSAGE);
}

public void printInputBankingJobMessage() {
printEnter();
System.out.println(INPUT_BANKING_JOB_MESSAGE);
println(INPUT_BANKING_JOB_MESSAGE);
}

private void printEnter() {
System.out.println();
private static void printEnter() {
println("");
}

private static void println(String message) {
System.out.println(message);
}

private static void printf(String message, int param) {
System.out.printf(message,param);
printEnter();
}

public static void printError(Exception error) {
System.out.println(error.getMessage());
println(error.getMessage());
}
}

0 comments on commit d60463f

Please sign in to comment.