Answered step by step
Verified Expert Solution
Link Copied!

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 2-3 tree to handle the DVD database of a video store.
A 2-3 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 1 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 preOrder(TreeNode treeNode)- Traverse and print the tree
in preorder notation following the printing guidelines specified above. void inOrder(TreeNode
treeNode)- Traverse and print the tree in inorder notation following the printing guidelines specified
above. void postOrder(TreeNode treeNode)- Traverse and print the tree in postorder notation
following the printing guidelines specified above. TreeNode retrieveltem(TreeNode treeNode, T
searchKey)- Search for a specified item in the tree. TreeNode insertltem(TreeNode treeNode, T
insertKey)- Insert an item into the 2-3 tree. Be sure to maintain the 2-3 tree properties. TreeNode
removeltem(TreeNode treeNode, T deleteKey)- Remove a specified item from the tree. Be sure to
maintain the 2-3 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions