📄 customer.java
字号:
public class Customer {
private String name;
private int age;
private float weight;
public static int j;
public Salors salor;
public Salors salor1;
public Customer()
{
this.j=Ticket.i-1;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public float getWeight() {
return weight;
}
public void setWeight(float weight) {
this.weight = weight;
}
public void buyTicket(Salors salor ,String from ,String to)
{
if(salor.isAnyTicket(from, to))
{
System.out.print("购买成功");
}
else {
System.out.print("没票了");
}
}
public void payMoney(Salors salor1,float money)
{
salor1.getMoney(money);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -