vexnode.java

来自「主要功能:对五条道路的车辆进行控制」· Java 代码 · 共 40 行

JAVA
40
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package fivestarcross;import java.util.ArrayList;/** * * @author Dante */public class VexNode {    public int   vexnum;//顶点编号     public String  vexname;//顶点名,如AB、BC、ED    public float vextraffic; //该顶点的车流量    public int   vexcolor = 0;//顶点颜色编号,初始值为0表示未着色     public ArrayList<Integer> firstarc=new ArrayList<Integer>();//指向第一条边        public VexNode (int  num,String  name,float traffic){        //默认构造函数         vexnum   =  num;        vexname   =  name;        vextraffic = traffic;	}            public int getColor(){        return   vexcolor;    }        public void setColor(int color){        vexcolor = color;    }    }

⌨️ 快捷键说明

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