How the structure of the tree changes

Assignment Help Computer Engineering
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).

Reference no: EM13327076

Questions Cloud

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?

Reviews

Write a Review

Computer Engineering Questions & Answers

  How many ways a committee of 4 people can be choosen

The question of how various ways a committee of 4 people can be selected from a group of 10 is known as a combination. The notation in general for counting the number of ways of selecting r items from a group of n is C(n,r) = n! / r!(n-r)!

  Give most popular ways today to code a database application

Embedded SQL applications tend to lack interoperatiliby. Applications might have to modified to work with other RDBMS ODBC applications do not need the explicit declaration and use of host variables.

  Express developments in emerging technologies

Are you a optimistic or apprehensive about developments in emerging technologies that simulate human experience? Give examples of a business situation that would benefit from each of the following.

  What sort of code would you put into a function

What sort of code would you put into a function

  Write down a c++ program for little man''s computer

A text file containing machine code (not assembly code) for little man's computer following instruction set . Instructions are in different lines (no need for semicolon at the end of each instruction)

  Find a minimum from an array with size of 6

Write a COMPLETE program that will find a minimum from an array with size of 6. The program should ask for input from the keyboard for all the elements.

  Give declaration and definition of a structure

Write down a program to display the initial values held by the structure (you must use a structure) on the screen.give declaration and definition of a structure.

  Describe the use of web standards

What are web applications and how are they used? give two examples of web applications.

  Write a java application to display the following gui

Week 3 Programming Assignment Create Java programs for the following two problems. 1. Write a Java application to display the following GUI. At this point you are only implementing the display.

  Develop the finite difference approximation of fick second

Develop the finite difference approximation of Fick's second law of diffusion in polar coordinates. Write a MATLAB program that can be used to solve the following problem.

  A java based program to calculate the maximum heart rate

Write down a java based program to calculate the Maximum heart rate of person based on the person age and height. Notify for the low end of the target zone (65%) and high end of the target zone (90%).

  What factors in computer design would affect the decision

What factors in computer design would affect the decision.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd