package qwq;
import java.util.Scanner;
class Account{
int accountID;
int balance;
Account(int accountID) {
this.accountID=accountID;
}
Account(int accountID,int balance)
{
this.accountID=accountID;
this.balance=balance;
}
static int cunQian(){
System.out.println("请输入存钱数量:");
Scanner out=new Scanner(System.in);
return out.nextInt();
}
void quQian(int balance) {
if(this.balance>=balance) {
this.balance=this.balance-balance;
System.out.println("放心不差钱!");
}
else {
System.out.println("你这点钱我会很难做!");}
}
void getBalance() {
System.out.println("账户:" + accountID + "\n" + "余额:" + balance);
}
}
public class vov {
public static void main(String[] aga) {
Account a1=new Account(1);
Account a2=new Account(2,10);
int s=Account.cunQian();
a2.balance=s+a2.balance;
System.out.println("请输入取钱数量:");
Scanner out=new Scanner(System.in);
int ss= out.nextInt();
a2.quQian(ss);
a2.getBalance();
}
}