Determine the search-key descriptions that user interface

Assignment Help Basic Computer Science
Reference no: EM131076272

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: EM131076272

Questions Cloud

What was purpose of american recovery and reinvestment act : What was the intended purpose of the American Recovery and Reinvestment Act (ARRA) of 2009 and why was this legislation proposed?
Case studies on organizational learning : "Examine the various debates and case studies on organizational learning and the learning organization, and discuss whether the concept of the learning organization is based on firm foundations."
Understanding work and learning in canada : Write a short essay of 750-1000 words in response to the following question: "Why is consideration of the social and economic context necessary for understanding work and learning in Canada?"
Enjoy skin-based privileges : Also, feedback from the outline - Good job. Very thorough. My only suggestion is to avoid framing white privilege as an object of history. Demonstrated throughout the course, whites still enjoy skin-based privileges today.
Determine the search-key descriptions that user interface : determine the search-key descriptions that the user interface displays by requiring that they be in the text file.
Form of grades and feedback : Working as a student is the equivalent of a part-time or full-time job. The job's compensation is in the form of grades and feedback. As the supervisor of the student position, put the role as a student into the context of a job.
Allows individuals filing tax returns to itemize deductions : Suppose a particular state allows individuals filing tax returns to itemize deductions only if the total of all itemized deductions is at least $5000. Let X (in 1000s of dollars) be the total of itemized deductions on a randomly chosen form. Assum..
Diffusion of innovation model : Apply Moore's model of adoption or the diffusion of innovation model (crossing the chasm) to discuss ways to overcome the market entry challenges faced by icebreaker.
Statistical behavior modeling for driveradaptive precrash : The article "Statistical Behavior Modeling for DriverAdaptive Precrash Systems" (IEEE Trans. on Intelligent Transp. Systems, 2013: 1-9) proposed the following mixture of two exponential distributions for modeling the behavior of what the authors c..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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