Ask Computer Engineering Expert

User Request: "Create a simple system to read, merge, purge, sort, search, and write eclipse data with error checking and providing fast lookup by catalog number."

Objectives:

1. Use C++ file IO to read and write files, while using C++ standard I/O (cin and cout) for user interaction, using appropriate exception handling and giving appropriate error messages.

2. Encapsulate primitive arrays inside a templated class that provides controlled access to the array data, retains information on array capacity and use, and can be used to store data of any class or primitive type. Integrate appropriate exception handling into the templated array class.

3. Efficiently sort and search the data based on the field specified by the user. Integrate appropriate exception handling into classes that implement searching and sorting.

4. Store eclipse data in a linked list maintained in order, sorted by catalog number. Remove entries from the eclipse linked list while maintaining its order. Integrate appropriate exception handling into classes that implement linked lists.

5. Use a linked hash table with eclipse catalog numbers as keys for efficient retrieval of eclipse data based on catalog number.

6. Encapsulate linked hash tables inside a templated class that provides controlled access to the linked hash table data, retains information on linked hash table capacity and load factor, and can be used to store data of any class or primitive type.

7. Integrate appropriate exception handling into the templated linked hash table class.

8. Provide a design document explaining and justifying implementation choices for your linked hash table. 7 Use a sophisticated hash function and/or collision resolution method.

9. Develop and use an appropriate design.

10. Use proper documentation and formatting.

Description:

For this project, you will revise and improve project 2(included as an attachment) from Project 2 in one important way. You are encouraged to reuse and build on your code from Project 2.

Project 3 will have the same basic functionality as project 2 but it will have one major change "under the hood"- because it is believed that users will most often want to search for eclipse data by catalog number, the list of catalog numbers will be used as keys to a hash table that stores pointers to the associated data. This will allow for data to be looked up by catalog number in constant time, that is, in Θ(1) time. (Note that project 3 will still store the list of eclipse data using linked list data structures during merging and purging and will still store the list of eclipse data using a resizable array during sorting and searching using fields besides catalog number.)

Operational Issues:

From a user interface perspective, project 3 will behave as described for project 2, except that there will be two additional data printing/display option, as follows.

If the user enters 'H' for Hash display, project 3 will list the eclipse data, one eclipse per line, in the order they are stored in the hash table, each prepended with the bucket number (hash code) where it is stored. If a bucket is empty, the bucket number should still be displayed, followed by "NULL." If a bucket contains more than one item, each should be listed in its order within the bucket, one per line. If a bucket overflows somewhere besides another bucket, the overflow items should be prepended with "OVERFLOW:" and be displayed in their overflow order before proceeding to the next bucket. There should also be a blank line displayed between buckets. Note that this is thought of as a debug display as it is unlikely to be of use to an end user but may help you to debug your project. If the user enters 'L' for Linked display, project 3 will list the eclipse data, one eclipse per line, in the order they are stored in the linked list embedded in the hash table. Note that this should be the same order as seen with the 'C' (catalog number) option that runs through the linked list used for merging and purging.

Implementation Issues: In most areas, project 3 will be implemented just as was project 2. This includes how the project reads files and prints data, carries out user interaction via standard in and standard out, encapsulates C  primitive arrays, how exception handling is implemented for arrays and similar classes, and how the list of eclipse data is stored in a linked list when data is being merged and purged. The big implementation change will be the data structure used in the code to find eclipse data based on catalog number. For project 3, you are no longer allowed to sort and search by catalog number using the array, you need to use a hash table instead. For this reason, you should use a linked hash table where the linked list interwoven into the table is ordered by catalog number. Beyond these requirements, you have a lot of freedom to design your hash table implementation. For this reason, you should include an design document with your submission. Please make this a PDF file and name it "design.pdf" in your submission. In this document, you should describe the hash function you chose, the bucket size you chose for your hash table, the hash collision resolution strategy that you chose, and the load factor you chose, along with design justifications for each. You are free to use any hash function you wish, so long as it results in hash codes within the bounds for your hash table. If you choose to implement a hash function that distributes keys close to uniformly and randomly throughout the table, you should note this in your documentation for the TA, so that he can assign you bonus points (up to 5 points, depending on the sophistication of the hash function used and your explanation of why its distribution is close to uniform and random).  You are free to use any bucket size for your hash table and any hash collision resolution strategy you wish. You should justify both of these design choices, noting that some bucket sizes may be more appropriate for some collision resolution strategies and vice versa. If you choose to implement a particularly sophisticated collision resolution strategy, you should note this in your documentation.

(Explain why it is appropriate for your hash table).

Note that when you first create your hash table, you will know the amount of data it is to contain. This is because you can wait to create it until you have read in the first file of data. Similarly, when you merge or purge data, you can use your adjusted list to create a new hash table for the adjusted amount of data. However, you should not attempt to fill your hash table completely, because this will almost surely cause too many collisions and degrade its performance below that of a sorted array. Instead, you should choose an appropriate load factor for your table. If you choose to do so, you may use the linked list of the hash table for the merge/purge linked list. If you choose to do this, be sure to note it in the design document. You should implement the display/printing options as follows. C should be accomplished by traversing the linked list used for merging and purging. O should be accomplished by traversing the array used for searching and sorting. L should be accomplished by traversing the linked list embedded within the hash table. (Note that this might be the same linked list as for option C.) H should be accomplished by traversing the hash table in bucket order. If your buckets are larger than size one, each bucket should be traversed in order before proceeding to the next bucket. If your hash table overflows to anything besides other buckets, the overflow data structures should also be traversed in order before proceeding to the next bucket.

The only libraries you may use for this assignment are iostream, iomanip, string, and fstream(#include , #include , #include ,#include ).

Attachment:- Assignment Files.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92535299
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As