heaps the change button it' possible to change the priority of an existing node this procedure is useful in many situations for examplein our cruiser examplea threat such as an approaching airplane may reverse course away from the carrierits priority should be lowered to reflect this new developmentalthough the aircraft would remain in the priority queue until it was out of radar range to change the priority of noderepeatedly press the chng button when promptedclick on the node with the mouse this will position the red arrow on the node thenwhen promptedtype in the node' new priority if the node' priority is raisedit will trickle upward to new position if the priority is loweredthe node will trickle downward the remove button repeatedly pressing the rem button causes the node with the highest keylocated at the rootto be removed you'll see it disappearand then be replaced by the last (rightmostnode on the bottom row finallythis node will trickle down until it reaches the position that reestablishes the heap order the insert button new node is always inserted initially in the first available array celljust to the right of the last node on the bottom row of the heap from there it trickles up to the appropriate position pressing the ins button repeatedly carries out this operation java code for heaps the complete code for heap java is shown later in this section before we get to itwe'll focus on the individual operations of insertionremovaland change here are some points to remember from about representing tree as an array for node at index in the arrayits parent is ( - its left child is * its right child is * these relationships can be seen in figure note remember that the symbolwhen applied to integersperforms integer divisionin which the answer is rounded to the lowest integer