Question: BACKGROUND INFORMATION The Bibliography Abstract Data Type stores references. References can be added to the bibliography or removed from the bibliography. No matter how references

BACKGROUND INFORMATION

The Bibliography Abstract Data Type stores references. References can be added to the bibliography or removed from the bibliography. No matter how references are represented, they are ordered. Duplicate references are not allowed. You can assume that each author has just one publication and that each publication has only one author.

The ADT for a Bibliography includes these operations:

  • new, which creates a new, empty bibliography
  • addReference, which adds a reference to the bibliography
  • removeReference, which removes a reference from the bibliography
  • outputBibliography, which generates an ordered list of references

BACKGROUND INFORMATION The Bibliography Abstract Data Type stores references. References can be

QUESTION

Suppose a reference is represented by a list of three strings: the author, the year and the title, e.g. ['Harris, R', '1995', 'Enigma']

--------------------

(1) Specify the problem of retrieving the author from a reference by completing the following template. You may write the specification in English and/or formally with mathematical notation.

added to the bibliography or removed from the bibliography. No matter how

--------------------

(2) Give your initial insight for an algorithm that creates a list of all the authors of references in a given bibliography. You must use at least one of the Bibliography ADTs operations. You may assume that you have a retrieveAuthor operation that solves the computational problem specified in part (i). You can also use any of the basic list operations: create an empty list, append an item, calculate the length, access an item by position (indexing), iterate over the items or over the indices, check if two lists are equal.

--------------------

Holden, G Cripps, s Xavier, 1 Brown, D Ferret, Hominid, P Krowley, J Name: retrieveAuthor Inputs: Preconditions: Outputs: Postconditions: Holden, G Cripps, s Xavier, 1 Brown, D Ferret, Hominid, P Krowley, J Name: retrieveAuthor Inputs: Preconditions: Outputs: Postconditions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!