void f2() -There is a given Phone objects (named v) in this function. Suppose the list contains at least 3 elements. Write statements to insert v to the list such that v will be the 3rd node after insertion. The expected output in the file f2.txt should be the following:
(D,4,7) (E,9,2) (Q,7,6)
(D,4,7) (E,9,2) (New,8,9) (Q,7,6)
void f3() - Delete the node holding the heaviest Phone (maximum weight). If there are more than one node satisfying the requirement, delete the first of them. The expected output in the file f3.txt should be the following:
(B,9,2) (D,12,6) (E,9,4) (R,12,7)
(B,9,2) (E,9,4) (R,12,7)
Zoom
100%
Close