This is a programming assignment. You will develop a binary tree with some of its operations.
The following is an example run.
Sample Output: (the user enters the string shown in bold)
Choice Action
------ ------
A Inorder Print
B Preorder Print
C Postorder Print
D Tree Minimum
E Tree Maximum
F Tree Predecessor
G Tree Successor
H Tree Search
I Tree Insert
J Tree Delete
Q Quit
? Display Help
What action would you like to perform?
I
Please enter an IP address to insert:
403.28.113.134
The IP address 403.28.113.134 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
509.202.41.38
The IP address 509.202.41.38 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
110.322.167.104
The IP address 110.322.167.104 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
610.136.161.29
The IP address 610.136.161.29 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
110.322.176.145
The IP address 110.322.176.145 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
210.138.248.249
The IP address 210.138.248.249 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
110.138.194.176
The IP address 110.138.194.176 inserted
What action would you like to perform?
A
110.138.194.176
110.322.167.104
110.322.176.145
210.138.248.249
403.28.113.134
509.202.41.38
610.136.161.29
What action would you like to perform?
B
403.28.113.134
110.322.167.104
110.138.194.176
110.322.176.145
210.138.248.249
509.202.41.38
610.136.161.29
What action would you like to perform?
C
110.138.194.176
210.138.248.249
110.322.176.145
110.322.167.104
610.136.161.29
509.202.41.38
403.28.113.134
What action would you like to perform?
F
Please enter an IP address to find its predecessor:
509.202.41.38
The predecessor of 509.202.41.38 is 403.28.113.134
What action would you like to perform?
G
Please enter an IP address to find its successor:
110.322.176.145
The successor of 110.322.176.145 is 210.138.248.249
What action would you like to perform?
D
The minimum IP address is 110.138.194.176
What action would you like to perform?
E
The maximum IP address is 610.136.161.29
What action would you like to perform?
H
Please enter an IP address to search:
51.222.209.77
The IP address 51.222.209.77 not found
What action would you like to perform?
H
Please enter an IP address to search:
610.136.161.29
The IP address 610.136.161.29 found
What action would you like to perform?
I
Please enter an IP address to insert:
112.65.241.44
The IP address 112.65.241.44 inserted
What action would you like to perform?
I
Please enter an IP address to insert:
51.222.209.77
The IP address 51.222.209.77 inserted
What action would you like to perform?
H
Please enter an IP address to search:
110.136.161.30
The IP address 110.136.161.30 not found
What action would you like to perform?
J
Please enter an IP address to delete:
610.136.161.29
The IP address 610.136.161.29 deleted
What action would you like to perform?
J
Please enter an IP address to delete:
610.138.161.29
The IP address 610.138.161.29 not deleted
What action would you like to perform?
A
51.222.209.77
110.138.194.176
110.322.167.104
110.322.176.145
112.65.241.44
210.138.248.249
403.28.113.134
509.202.41.38
What action would you like to perform?
D
The minimum IP address is 51.222.209.77
What action would you like to perform?
E
The maximum IP address is 509.202.41.38
What action would you like to perform?
A
51.222.209.77
110.138.194.176
110.322.167.104
110.322.176.145
112.65.241.44
210.138.248.249
403.28.113.134
509.202.41.38
What action would you like to perform?
B
403.28.113.134
110.322.167.104
110.138.194.176
51.222.209.77
110.322.176.145
210.138.248.249
112.65.241.44
509.202.41.38
What action would you like to perform?
C
51.222.209.77
110.138.194.176
112.65.241.44
210.138.248.249
110.322.176.145
110.322.167.104
509.202.41.38
403.28.113.134
What action would you like to perform?
Q
The number nodes deleted: 8