Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Consider a standalone, single-user Java application which acts as a basic electronic English dictionary. A user of this application: typically searches for the meanings

image text in transcribedimage text in transcribed

5. Consider a standalone, single-user Java application which acts as a basic electronic English dictionary. A user of this application: typically searches for the meanings of an English word, and typically searches for the words that describe the component parts of the object described by an English word, i.e. meronyms. When this Java application starts up, it loads the data from three tab-separated-value text files into the computer's main memory: wn_mp.txt, wn_s.txt and wn_g.txt. Each line in wn_s.txt contains a 9 digit ID (e.g. 100053097), an English word and its part-of-speech (i.e. noun, verb, adjective or adverb). Each line in wn_g.txt contains a 9 digit ID and the meaning of the word, which the ID refers to. Each line in wn_mp.txt contains two 9 digit IDs: ID1 and ID2. The words with ID1 are component parts (i.e. meronyms) of the words with ID2. For example, a 'wheel is a component part of a 'car'. Note that the same English word can have more than one meaning. The same meaning can be applicable to more than one English word. Each line in the data files corresponds to one record. The 9 digit ID at the start of each record serves as a link between relevant records in the three data files. Extracts of these data files are shown in Listings 13. Listing 1: wn mp.txt: links a group of English words that are component parts of another group of English words 1 102670683 102958343 2 102685365 102958343 3 104563204 104561422 4 Listing 2: wn_s.txt: stores an English word with its part-of-speech information 1 102 670683 accelerator noun 2 102685365 air bag noun 3 102958343 car noun 102958343 automobile noun 5 104561422 water mill noun 6 104563204 waterwheel noun 7201930738 automobile verb 8 300005205 absolute adjective 9 400003483 basically adverb (question continues on next page...) (Question 5 continued...) Listing 3: wn-g.txt: stores the meaning of an English word 1100053097 the act of departing politely 2102670683 a pedal that controls the throttle valve 3 102685365 a safety restraint in an automobile 4102958343 a motor vehicle with four wheels 5 104561422 a mill powered by a water wheel 6 104563204 a wheel that rotates by direct action of water 7201930738 travel in an automobile 8300005205 perfect or complete or pure 9 400003483 in essence; by one's (or its) very nature a) Which TWO ADTs are the most suitable for modelling the data for this electronic English dictionary so as to support an efficient dictionary lookup? (2 marks) b) Which class of collection object defined in the Java Collections Framework (JCF) is the most suitable for modelling EACH of the ADTs you stated in part (a)? (2 marks) C) Making reference to your answers in parts (a) and (b), explain how you would use the identified types of collection objects to model the data in this electronic English dictionary, to facilitate the lookup of meronyms and their meanings of an English word. Include, in your solution, a set of partial Java classes showing how the data in the three data files (i.e. wn_mp.txt, wn_s.txt and wn_g.txt) can be modelled in order to fulfil the given requirement. Making reference to the time efficiency of each data structure used in your design, state the resulting time efficiency of the dictionary lookup operation. (11 marks)

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

What is the control environment ?

Answered: 1 week ago

Question

How could any of these nonverbal elements be made stronger?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago

Question

b. Will new members be welcomed?

Answered: 1 week ago