Im writing a binary search tree. The user will use the program as follows:
Which tree would you like to test (BST, ST, RBT)?
BST How many items would you like to insert? 10000 Pattern (random or sorted)? sorted Next command (insert X, delete X, find X, height, quit)? find 111111 Item not present.
For the first three choices i figure i can just use strings to choose between BST, ST and RBT as wel as to choose between random or sorted, somthing like
String choice
if( choice == "random")
insert random numbers
what im having trouble with is the 4th choice. if the user enters insert 100 as a string, for example, would i just have to take the 100 off and make it an int. and if so, how would i go about doing that?