4. This task and those below all involve adding to class Node. For the Pass level, when a message is passed through the...
4. This task and those below all involve adding to class Node. For the Pass level, when a message is passed through the network it will have appended to the end a 3-character string that indicates the destination; we will call this combination of the original message and destination the AUGMENTED MESSAGE. A node will therefore know that it is the destination for a message from the final three characters of the augmented message. An augmented message that has the value hello006 is thus destined for node 6. Implement the following method in class Node: Hint modular-exponentiation-power-in-modular-arithmetic/. If you use this, cite the source in a comment There's somerelevant code youcanadaptttps://www.geeksforgeeks.org/ public Boolean isDestinationNode (String msg) /1 PRE: msg is an augmented message (i.e. containing 3 characters at the end indicating destination node) // POST: Returns true if this is the destination node, false otherwise E.g. For node 6, will return true for "hello006"
4. This task and those below all involve adding to class Node. For the Pass level, when a message is passed through the network it will have appended to the end a 3-character string that indicates the destination; we will call this combination of the original message and destination the AUGMENTED MESSAGE. A node will therefore know that it is the destination for a message from the final three characters of the augmented message. An augmented message that has the value hello006 is thus destined for node 6. Implement the following method in class Node: Hint modular-exponentiation-power-in-modular-arithmetic/. If you use this, cite the source in a comment There's somerelevant code youcanadaptttps://www.geeksforgeeks.org/ public Boolean isDestinationNode (String msg) /1 PRE: msg is an augmented message (i.e. containing 3 characters at the end indicating destination node) // POST: Returns true if this is the destination node, false otherwise E.g. For node 6, will return true for "hello006"