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

  Explain about how device works

Write down what first comes to mind as to what is good and bad about the way the device works. The range of tasks a typical user would want to do using it.

  Avl trees and unbalanced binary search trees

Write a program to perform random operations on splay trees. Count the total number of rotations performed over the sequence. How does the running time compare to AVL trees and unbalanced binary search trees?

  What window events can a program handle

Explain the difference between the WindowListener interface and the WindowAdapter.

  Terms of depictions of graphic interpersonal violence

Video games are a very big business these days, and ever more "realistic" (at least in terms of depictions of graphic interpersonal violence)-and also more accessible to more and more children of any age.

  Classify the following vulnerabilities using the risos model

Classify the following vulnerabilities using the RISOS model. Assume that the classification is for the implementation level. Justify your answer.

  Write a class called student that will keep track of student

Write a class called Student that will keep track of a student and a grade.

  Create a customer experience strategy

Include components of customer service model reognized within your text. How would you use them to create a customer experience strategy?

  Locate vendors of biometric products

Using the Web, locate vendors of biometric products. Find one vendor with a product designed to examine each characteristic mentioned in your textbook. What is the CER associated with each product? Which would be more acceptable to users? Which..

  Focus on the function and how it is secured by the use

Explain two or three uses for Microsoft Certificate Services. Focus on the function and how it is secured by the use of a PKI.

  Nodes of a binary tree in level-order

1. Write a routine to list out the nodes of a binary tree in level-order. List the root, then nodes at depth 1, followed by nodes at depth 2, and so on. You must do this in linear time. Prove your time bound.

  Case study - casey anthony trial

Determine whether the software issue, which caused inaccurate evidence in the trial, would've affected your perception of the prosecution's case if you were a juror in this trial.

  Write an assembly program in using your own simd extensions

For an 8-wide SIMD machine (i.e., 8 parallel SIMD functional units, write an assembly program in using your own SIMD extensions to MIPS to execute the loop. Compare the number of instructions executed on the SIMD machine to the MIMD machine.

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