You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
514 B

package org.poopki.duckdns.user_db;
public class Account {
private int m_Balance;
public Account(int Balance){ // Account Balance 초기화
m_Balance = Balance;
}
public int getBalance(){ return m_Balance; } //잔액 return
public void credit(int Amount){ // 입금
m_Balance +=Amount;
}
public boolean withdraw(int Amount){ // 출금
if(m_Balance >= Amount){
m_Balance -= Amount;
return true;
}
return false;
}
}