Question: Question : Dictionary ImplementationIn this project, we will implement a simple dictionary of English - Turkish with orderedelements. This will be done via two arrays:

Question : Dictionary ImplementationIn this project, we will implement a simple dictionary of English-Turkish with orderedelements. This will be done via two arrays: one array with a struct elements storing twostrings, English and Turkish words, and another array storing the index of the next elementfor a given entry. This is shown in Fig. I when we have 6 words entered by a user. Notethat we keep two integers in addition to two arrays: one for the size of the elements in thearray, and another one for the starting index of the array.Adding an Element:Startndes =1:Siae -6;Array Index The Dictionary EntriesDeleting an Element:ColdSoukSyah, KaraFigure l: Entries after the addition of 6 words pairs,WhiteBeyaz,Startindex =1;In Fig. 1 the entries are added one by one, As an example, in Fig. 2, we show the casewhere we add a new element. The new element is added to the end of the array, the sizeis increa sed by l, and then we update array that stores the indices of the elements., Forexample, if we now add Dry = Kuru pair, we add this to the end of the array, and we thenincrease the size from 6 to 7. Since the Next Element array is needed for sorted values, weknow that Dry will come after Cold word. We then change the next element for Cold Indexfrom 0 to 6. Since after Dry word, Hot word comes, we change the Next elenent at index6 to 0, or just copy the next element of Cold for Dry, indicating the next word after Dry atindex 6 is Hot at index 0. The rest stays as is. Note that if the newly added word was Athen this would have been the first word and in addition to the procedure above, we wouhave to change the StartIndex to 6.Array Index The Dictionary EntriesStartincax =3Size-5;utumrSoguionbahasinh arssprinaWhiteStartindex =1>3:Figure 2: Entries when we add the pair Dry = KuruSonbahaIn Fig. 3, we show the case where we delete an element. Here, we want to remove An-tumn=Guz,Sonbahar pair. Here, we decrease the size from 7 to 6. Then, we want to replacethe entry for Autumn with the last entry in the array at index 6, since we want to add thenext elenent starting from the bottom of the array. When we rernove Autumn, we know thatthe next element after Autumn is Black, and Autumn is the first elerment. Since Autumnis removed, the Starting Index now should now be, the Next Element of Autumn, or Black,or StartIndex =3. Thus, we also change the StartingIndex. We make the other changes asshown in Fig. 3. The final status of the arrays is shown in Fig. 4. As you can notice, we canremove the data from the last index after it is moved.CoT Dtonary EntrlesG, Sonbahar KuruBlackSpri1BahaDryNext ElerSrakArray inde The Dietionary EntriesNext ElementSiyah, KarawhiteBeyaz,.Figure 3: Entries when deleting the Autumn-Guz,Sonbahar pairNext Element3>06->12Net ElementFigure 4: Entries after the Autumn=Guz,Sonbahar pair is deleted.
In addition to the above procedure, your project should have the following functionalities:
The array element storing the words must be an array of a struct, where in the struct
you will have two character arravs to store English-Turkish words. You can set the
character array size to 20.
The dictionary should have a size of 10 at most. If there are 10 elements already in the array and a user needs to add more elements, you should issue a message saying that the dictionary is full and hence no addition can be made. Similarly if a user needs to delete an element, issue an error if the element is not in the array or if the array is empty. To delete an element a user needs to enter an English word, not Turkish.
Make sure capitalization does not play a role. Thus, Autumn and autumn should be treated the same.
You should have a user screen menu with options telling a user: 1) To add an entry, delete an entry, 3) Print the entries in order, 4) To Quit.
To add an entry, ask the user English word first, then the meaning in Turkish.
To delete an entry ask the user to enter an English word only.
The array printing should look nice. We leave this to you but make sure they are ordered according to the English words.
Make other necessary assumptions.
Question : Dictionary ImplementationIn this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!