Skip to content

shawnjoseph/Project3

 
 

Repository files navigation

Project 3 Readme.txt

Program Includes:
main.cpp CommandProcessor.cpp Menu.cpp
TreeNode.h Heap.h GeneralTree.h AVLTree.h CommandProcessor.h Menu.h

The driver class main.cpp calls the CommandProcessor.cpp function 
Process_Commands(). The Process_Commands() function creates menus and 
prompts user input. The user is able the move through the initial 
menu with the options of creating a Tree, AVLTree, Heap, or 
exiting the program. When the user selects Tree, AVLTree, or Heap,
they are taken to another menu with functions allowing them to create 
and manipulate the data structures.

Example of Program
------------------
/home/randomguy/ClionProjects/Project3/Debug/Project3
Process commands starting
Which Tree do you want to create?
1: Tree
2: Heap
3: AVLTree

> 2
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 6
File Opened.
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 1
Max: Key[409] Value[Arcia]
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 2
Size: 20
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 3
Height: 4
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 5
Number of Leaves: 10
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 10
409:Arcia   322:Pearce   307:Forsythe   281:Longoria   269:Guyer   255:Souza   250:Moore   250:Odorizzi   248:Miller   236:Kiermaier   235:Morrison   217:Franklin   216:Dickerson   202:Jennings   196:Conger   188:Motter   177:Beckham   166:Casali   154:Mahtook   138:Decker   
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 9
Max 409 deleted.
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 1
Max: Key[322] Value[Pearce]
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 2
Size: 19
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 3
Height: 4
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 4
Heap is Not Empty.
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 10
322:Pearce   307:Forsythe   281:Longoria   269:Guyer   250:Odorizzi   255:Souza   250:Moore   248:Miller   138:Decker   236:Kiermaier   235:Morrison   217:Franklin   216:Dickerson   202:Jennings   196:Conger   188:Motter   177:Beckham   166:Casali   154:Mahtook   
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 7
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 1
Max: Key[0] Value[]
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 2
Size: 0
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 3
Height: -2147483648
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 4
Heap is empty.
Enter command number:

1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 10
Enter command number:

Heap is Empty.
1: Max
2: Size
3: Height
4: Empty
5: Leaves
6: Build Tree
7: Clear
8: Insert
9: Delete Max
10: Display
11: Exit

> 11

Process finished with exit code 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.4%
  • Other 0.6%