Reference no: EM13327076
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.
The following link is useful to understand how 2-3 trees works: Java applet illustrating 3¬3 trees,1r( ipt ://www„cosc_canterbury_a.c_rizimukuridanidsa.11TwoThreeTree.html).. Practice adding nodes to the tree and see how the structure of the tree changes.
In this assignment, Nodes will store the titles of the DV Ids. The title will be stored as a string and titles may consist of multiple words_ Your application should Include AT LEAST the following functions for your 2-3 tree_
• Print the tree in the following manners.. When printing a value, print the string followed by a s and l space_ You must follow these guidelines exactly! For exampiel Aliens, The Lord of the Rings, Kill Bill,
• void preOrder ( ) - Traverse and print the tree in preorder notation following the printing guidelines specified above.
• void inOrder ( ) - Traverse and print the tree in inorder notation following the printing guidelines specified above.,
• void insert ( string ) - Insert an item into the 2-3 tree. Be sure to maintain the 2-3 tree properties_
• void remove ( string ) - Remove a specified item from the tree_ Be sure to maintain the 2-3 tree properties_ Some removes can be resolved in multiple ways_ (This is optional)
• search ( siring ) - Search for a specified item in the tree_ Return a pointer to the node containing the item if the time exists in the tree_ Return null if the item does not exist,
Your main method should provide prompts to ask user to insert new DVD search for one particular DVD, and print out all the DVD you have in the database (sorted - Inorder, or not sorted- pre-order).
What conclusions can be drawn from data to company
: Determine the rate earned on total assets, the rate earned on stockholders' equity, and the rate earned on common stockholders' equity for the years 2011 and 2012. When required, round to one decimal place.
|
Determine the electric field between the plates
: A parallel-plate air capacitor is made by using two plates 19 cm square, spaced 3.5 mm apart. It is connected to a 3-V battery. What is the electric field between the plates
|
The electric field strength to be the same in both wires
: Consider a piece of nichrome wire which is attached to a 1.2-mm-diameter aluminum wire, as diagrammed in the figure below. What diameter should the nichrome wire in the figure below be in order for the electric field strength to be the same in..
|
How many share must taussig sell to net after underwriting
: Underwriters have informed Taussig's management that it must price th enew issue to the public at $27.53 per share to ensure that all shares will be sold.
|
How the structure of the tree changes
: 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.
|
What is the minimum area the plates of capacitor may have
: The dielectric to be used in a parallel-plate capacitor has a dielectric constant of 2.40 and a dielectric strength of 1.60 107 V/m. What is the minimum area the plates of the capacitor may have
|
The coefficient of friction is unchanged
: A skier starts from rest at the top of a hill that is inclined at 10.5? with the horizontal. The hillside is 191 m long, and the coefficient of friction between snow and skis is 0.0677. At the bottom of the hill, the snow is level and the coef..
|
Determine what is the current share price in 10 years
: The company will pay a $10 per share dividend in 10 years and will increase the dividend by 6 percent per year thereafter. If the required return on this stock is 11 percent, what is the current share price
|
Why is a cash budget so vital to a company
: Why is a Cash Budget so vital to a company - what are the five basic principles of cash management that a company can follow in order to improve its chances of having adequate cash?
|