Algorithm Design and Standard Methods: Question 6

Syllabus 7.1

Structured 5 marks

A school library is having a new system designed to manage book loans. During the analysis stage, the systems analyst uses both decomposition and abstraction before any algorithm is designed.

(a) State what is meant by abstraction, as used in the analysis stage of the program development life cycle. [2]

(b) The library's loan record for one book currently stores: the book's ISBN, its title, its author, the shelf it is kept on, the borrower's name, the borrower's library card number, the borrower's home address, and the date the book is due back. The analyst is designing the part of the system that checks whether a book is overdue. Identify two of these stored details that abstraction would remove from this part of the system, and explain why each is not needed for it. [3]

Show worked solution Hide worked solution

Worked solution

Part (a): Defining abstraction

Abstraction is a technique used, alongside decomposition, during the analysis stage of the program development life cycle:

Abstraction means removing or ignoring detail that is irrelevant to the problem being solved, keeping only the information and features that are actually needed. [1]

This makes the problem simpler to understand and work with, because unnecessary detail no longer gets in the way of designing the algorithm. [1]

Note the difference from decomposition: decomposition breaks a large problem into smaller sub-problems, whereas abstraction strips away detail that does not matter for the part of the problem currently being solved.

Part (b): Applying abstraction to the overdue-book check

The task here is narrow: decide whether a given book loan is overdue. That only requires the due date, compared against today’s date. Working through the stored details:

  • Borrower’s home address. Irrelevant, because where the borrower lives makes no difference to whether the loan is overdue.
  • Shelf location. Irrelevant, because the overdue check does not care where the physical book is kept; that detail only matters for a different part of the system, such as helping a member find the book on the shelves.

(Other correct alternatives include the book’s title or author, or the borrower’s name, since none of these affect whether the due date has passed.)

Mark scheme: [1] for each valid irrelevant detail correctly identified (maximum [2]), plus [1] for explaining that such details make no difference to whether the due date has passed, [3] total.

By contrast, details such as the due date itself and the borrower’s library card number (to identify whose loan it is) would be kept, since the overdue-checking part of the system cannot work without them.

Final answers

  • (a) Abstraction = removing/ignoring detail irrelevant to the problem, keeping only what is needed for the task.
  • (b) Any two of: home address, shelf location, title, author, borrower’s name. Each irrelevant to checking whether a loan is overdue, since that check only needs the due date and today’s date.