⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 entity0.java

📁 Network simulator developed using java programming.
💻 JAVA
字号:
public class Entity0 extends Entity{        // Perform any necessary initialization in the constructor    public Entity0()    {    }        // Handle updates when a packet is received.  Students will need to call    // NetworkSimulator.toLayer2() with new packets based upon what they    // send to update.  Be careful to construct the source and destination of    // the packet correctly.  Read the warning in NetworkSimulator.java for more    // details.    public void update(Packet p)    {            }        public void linkCostChangeHandler(int whichLink, int newCost)    {    }        public void printDT()    {        System.out.println();        System.out.println("           via");        System.out.println(" D0 |   1   2   3");        System.out.println("----+------------");        for (int i = 1; i < NetworkSimulator.NUMENTITIES; i++)        {            System.out.print("   " + i + "|");            for (int j = 1; j < NetworkSimulator.NUMENTITIES; j++)            {                if (distanceTable[i][j] < 10)                {                        System.out.print("   ");                }                else if (distanceTable[i][j] < 100)                {                    System.out.print("  ");                }                else                 {                    System.out.print(" ");                }                                System.out.print(distanceTable[i][j]);            }            System.out.println();        }    }}

⌨️ 快捷键说明

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