Determine the search-key descriptions that user interface

Assignment Help Basic Computer Science
Reference no: EM131076075

Repeat Programming Problem 8 of Chapter 18 , using an external dictionary.

Chapter 18 Programming Problem 8:

Consider any collection of data that you can organize in at least two ways. For example, you can order employees by name or by Social Security number and books by title or by author. Note that other information about the employees or books is present in the database but is not used to organize these items. This program assumes that the search keys (for example, book title or book author) are unique and are strings. Thus, in the previous examples, the Social Security number must be a string instead of an integer, and only one book per author is permitted. Choose any set of data that conforms to these requirements, and create a text fi le. Program behavior .When your program begins execution, it should read your text fi le. It then should provide some typical database management operations, all under user control via an interface of your design. For example, you should be able to add an item, remove an item, display (that is, retrieve) an item, and display all of the items in search-key order. You should be able to use either of two search keys to designate the item to be removed or displayed. Implementation notes. The items in the database should be objects that contain two search keys and additional data, all of which appear in the text fi le. Thus, you need to design and implement a class of these objects. Although your program could create two dictionaries from these objects-one organized by one search key (such as the employee name) and the other organized by another search key (such as the Social Security number)-this approach could waste a substantial amount of memory due to the duplication of all of the data in both dictionaries. A better approach revises the ADT dictionary to provide operations according to two search keys. For example, you want to be able to remove by name and by Social Security number. The underlying data structure for the dictionary's implementation should be a binary search tree. Actually, you will want two binary search trees so that you can organize the data in two ways: by name and by Social Security number, for example. To avoid duplicated data, store the data in an ADT list and let each node in the binary search trees contain the position of the actual data item in the list, instead of the data item itself. Your program can be specific to the type of database (employees, books, and so on), or it can be more general. For example, you could determine the search-key descriptions that the user interface displays by requiring that they be in the text file.

Reference no: EM131076075

Questions Cloud

The mean value and standard deviation of lifetime : The authors of the article from which the data in Exercise 1.27 was extracted suggested that a reasonable probability model for drill lifetime was a lognormal distribution with µ = 4.5 an σ = .8. a.
Create the srv records : You recently discovered that a junior admin deleted some of the SRV records, which caused some users to have problems logging in. What is the best way to re-create the SRV records?
How did electric chicago blues differ from early rock n roll : How did electric Chicago blues of the mid-1950s differ from early rock 'n' roll from that same period? Describe the process by which gospel music morphed into "soul" in the 1950s and 1960s.
External share between the two domains : You have two domains (contoso.com and adatum.com) that have an external share between the two domains. You want to configure selective authentication. What should you do.
Determine the search-key descriptions that user interface : For example, you could determine the search-key descriptions that the user interface displays by requiring that they be in the text file.
Bacon writes that in investigating nature : 1. Bacon writes that in investigating nature, "our only hope lies in a true induction" (#14). In #19, he explains that this method "derives axioms from the senses and particulars, rising by a gradual and unbroken ascent, so that it arrives at the..
Identifies key physiological stages of development : To complete this Application Assignment, write a 1- to 2-page handout for new parents that identifies key physiological stages of development by age group from birth to three years
Role of it in maintaining corporate compliance : What is the intent of regulatory compliance, and what is the role of IT in maintaining corporate compliance? What can happen to organizations and their senior management if they ignore compliance mandates?
Which implementation of the adt dictionary : Which implementation of the ADT dictionary would be most efficient as a spell checker's dictionary?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Open systems interconnection model is inherently inefficient

The Open Systems Interconnection model is inherently inefficient. On the source host, each layer must take the work of higher layers, add some result, and pass the work to lower layers. On the destination host, each layer must process these re..

  Explain purpose or benefits of it steering committee

Explain the purpose of an IT steering committee, and identify the benefits of the committee.

  About home network

Develop an entire home network with a budget of $1,000.00. Your configuration must assume the purchase of associated hardware for access to both wireless and wired connections and a broadband connection.

  Verify that all required fields are complete

Use alerts to inform the user if information is missing and focus on the missing field for them to provide the needed data.

  Is problem solving easier and more effective in solving

Is problem solving easier and more effective in solving business problems without information systems or with? (justify your position)

  How you think fox lake should proceed

Using Figure 10-13 as a guide, develop a plan for implementing the process in Figure 10-9. Ignore the Collect Deposit activity. Assume that it has been developed and works.

  Write a pseudocode statement

Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. Don't use integer as decimal places will be needed.

  Converting between dbm and mw

Task 1: Converting between dBm and mW Apply 3's rule to estimate what 16 mWs is in dBm. _____ Apply 3's rule to estimate what 0.0625 mWs is in dBm. _____ Apply 10's rule to estimate what 10,000 mWs is in dBm. _____

  Application patch management

Application Patch Management Select three applications (not operating systems) that you frequently use. How does each of them address patch management? Visit their Web sites to determine facilities they have to alert users to new vulnerabilities.

  What is required to apply it into business

Does business need IT? Why IT is important for business survival? What is required to apply IT into business? (Cost, planning, designing, equipment, installation, training, etc) How does business use IT? (internally such as staff, employees, and exte..

  Class diagram for a book comprising chapters

Draw a class diagram representing a book defined by the following statement. "A book is composed of a number of parts, which in turn are composed of a number of chapters.

  Which detects even parity

Consider the subsequent circuit, which detects even parity. There are one output, even, and three inputs, a(2), a(l) and a(0), which are grouped as a vector or bus.

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