Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment, you will be implementing a 2 - 3 tree to handle the DVD database of a video store. A 2 - 3
In this assignment, you will be implementing a tree to handle the DVD database of a video store.
A tree is a tree satisfying the following requirements All internal nodes in the tree have either
two or three children. All leaves of the tree are at the same level. In this assignment, TreeNodes
will store the titles of the DVDs The title will be stored as a string and titles may consist of multiple
words. Please download the TwoThreeTreeAssignmentSample before start. Print the tree in the
following manners. When printing a value, print the string followed by a and space. You must
follow these guidelines exactly! For example: Aliens, The Lord of the Rings, Kill Bill.. Your task is to
implement the following methods: void preOrderTreeNode treeNode Traverse and print the tree
in preorder notation following the printing guidelines specified above. void inOrderTreeNode
treeNode Traverse and print the tree in inorder notation following the printing guidelines specified
above. void postOrderTreeNode treeNode Traverse and print the tree in postorder notation
following the printing guidelines specified above. TreeNode retrieveltemTreeNode treeNode, T
searchKey Search for a specified item in the tree. TreeNode insertltemTreeNode treeNode, T
insertKey Insert an item into the tree. Be sure to maintain the tree properties. TreeNode
removeltemTreeNode treeNode, T deleteKey Remove a specified item from the tree. Be sure to
maintain the tree properties. Please note some removes can be resolved in multiple ways. Your
main method should provide prompts to ask user to insert new DVD titles, search for one particular.
DVD and print out all the DVD you have in the database inorder preorder, and postorder please give me the right code by using TreeNode, TwoThreeTree and DriverTwoThreeTree class with all comments. so i can get right output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started