Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project subject: A tree application where student names are storedThe requirements and scoring are as follows . 1 - Inserting names into the tree (

Project subject: A tree application where student names are storedThe requirements and scoring are as follows.1- Inserting names into the tree (60 points)The names entered by the user must be inserted into a tree, starting with the first letter. Each letter is stored in a node. The same prefix shared betweendifferent names are represented by the same nodes. The number of names overlapped in a node must be kept in this node.For example, Figure I shows a tree which is initially empty. Figure 2, Figure 3, Figure 4, Figure 5 and Figure 6 represent the tree after the names "Ali"."Aye", "irfan","Alihan" and "Alican" were inserted, respectively.For example, considering the node (A:2) in Figure 3, it is understood that this node represents the letter "A" and it is associated with 2 names. Similarly.considering the node (:3) in Figure 6, it is understood that this node represents the letter " and it is associated with 3 names.2- Updating the names (40 points)The user may want to update a name at any stage. For example, a command such as Update("Alihan", Veli") means that the name "Alihan" is wanted tobe updated as the name "Veli". Figure 7 represents the tree after this update was made. If the name to be updated is not found in the tree, the user must beinformed.KOKFigure l:EmptyTreeKOHi:1Figure 2:Afterinserting"Ali" intothe treei:1E:1Figure 3: Afterinserting "Aye"into the treeA:2KokN:1E:1N:1Figure 4: After inserting"Irfan" into the treeY:1S:1H:1A:1N:1KokKokY:1N:1Figure 5: After inserting"Alihan" into the treeFigure 7:Tree after Update("Alihan", "Veli")A:1N:1N:1KokR:1N:11/3Figure 6: After inserting "Alican" intothe tree2/3
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

More Books

Students also viewed these Databases questions

Question

2. I try to be as logical as possible

Answered: 1 week ago