Code Monkey home page Code Monkey logo

project3's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.