package Simulator; /* ** Encapsulates the router table information */ class RouterTable { // Fields public int numOfNode; private int TableID; private NetComponents [] road; // constractor public RouterTable(int ID, int NodeNum) { road = new NetComponents[NodeNum]; this.TableID = ID; this.numOfNode = NodeNum; } // Commands public void append(NetComponents t, int index) { road[index] = t; } //Queries public NetComponents Node (int NodeNum) { return (NetComponents) road[NodeNum]; } /*/ Destination Node public NetComponents DesNode () { return (NetComponents) road[numOfNode - 1]; } */ }