Question: Modify the program from the case study by maintaining an order during insertion of new records into the data file. This requires overloading the operator

Modify the program from the case study by maintaining an order during insertion of new records into the data file. This requires overloading the operator < in Personal and in Student to be used in a modified function add() in Database. The function finds a proper position for a record d, moves all the records in the file to make room for d, and writes d into the file. With the new organization of the data file, find() and modify() can also be modified. For example, find() stops the sequential search when it encounters a record greater than the record looked for (or reaches the end of file). A more efficient strategy can use binary search, discussed in Section 2.7.

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!