person.java

来自「用Java实现的电梯模拟程序。某公司要建造一栋n层的办公楼并用“最先进“的电梯进」· Java 代码 · 共 24 行

JAVA
24
字号
//package wuxf;

public class Person {
  final int WAITING=0;
  final int INELEVATOR=1;
  final int GONE=-1;
  public int num=0;

  public int from=-1;
  public int to=-1;
  public int status=GONE;

  public Person(int from,int to,int status,int num){
       this.from=from;
       this.to=to;
       this.status=status;
       this.num=num;
  }
  public int  direction(){
        if(to>from) return 1;
        else return   2;
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?