• 大小: 84KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-22
  • 语言: Java
  • 标签:

资源简介

十字路口演示的程序 java做的 很简单 很好理解的

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */
package Traffic;

/**
 *
 * @author Administrator
 */
public class Car {

    private int x;
    private int y;

    public Car(int x int y) {
        this.x = x;
        this.y = y;
    }
    public Car(){
        x=0;
        y=0;
    }

    /**
     * @return the x
     */
    public int getX() {
        return x;
    }

    /**
     * @param x the x to set
     */
    public void setX(int i) {
        if (i == 0) {
            x = x + 25;
        }
        if (i == 1) {
            x = x + 0;
        }
    }

    /**
     * @return the y
     */
    public int getY() {
        return y;
    }

    /**
     * @param y the y to set
     */
    public void setY(int i) {
        if (i == 0) {
            y = y + 25;
        }
        if (i == 1) {
            y = y + 0;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-09-05 14:22  liubo\
     目录           0  2012-09-05 14:22  liubo\build\
     目录           0  2012-09-05 14:22  liubo\build\classes\
     文件           0  2011-06-17 00:19  liubo\build\classes\.netbeans_automatic_build
     目录           0  2012-09-05 14:22  liubo\build\classes\Traffic\
     文件         824  2010-11-27 13:59  liubo\build\classes\Traffic\Car.class
     文件        2297  2010-11-27 13:52  liubo\build\classes\Traffic\Cars.class
     文件        2401  2010-11-27 13:52  liubo\build\classes\Traffic\Crossroad.class
     文件        2743  2010-11-27 14:49  liubo\build\classes\Traffic\Main.class
     文件        2536  2010-11-27 13:52  liubo\build\classes\Traffic\Panel$Draw.class
     文件        1625  2010-11-27 13:52  liubo\build\classes\Traffic\Panel$Event1.class
     文件         645  2010-11-27 13:52  liubo\build\classes\Traffic\Panel$Event2.class
     文件        3145  2010-11-27 13:52  liubo\build\classes\Traffic\Panel.class
     文件        1115  2010-11-27 13:59  liubo\build\classes\Traffic\TrafficLight.class
     文件        3713  2011-06-13 22:19  liubo\build.xml
     目录           0  2012-09-05 14:22  liubo\dist\
     目录           0  2012-09-05 14:22  liubo\dist\javadoc\
     目录           0  2012-09-05 14:22  liubo\dist\javadoc\Traffic\
     文件       10948  2011-06-15 20:58  liubo\dist\javadoc\Traffic\Car.html
     文件       13063  2011-06-15 20:58  liubo\dist\javadoc\Traffic\Cars.html
     文件       11874  2011-06-15 20:58  liubo\dist\javadoc\Traffic\Crossroad.html
     文件        9395  2011-06-15 20:58  liubo\dist\javadoc\Traffic\Main.html
     文件       23454  2011-06-15 20:58  liubo\dist\javadoc\Traffic\Panel.html
     文件       10403  2011-06-15 20:58  liubo\dist\javadoc\Traffic\TrafficLight.html
     目录           0  2012-09-05 14:22  liubo\dist\javadoc\Traffic\class-use\
     文件        8881  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\Car.html
     文件        5473  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\Cars.html
     文件        5523  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\Crossroad.html
     文件        5473  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\Main.html
     文件        5483  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\Panel.html
     文件        5553  2011-06-15 20:58  liubo\dist\javadoc\Traffic\class-use\TrafficLight.html
............此处省略42个文件信息

评论

共有 条评论

相关资源