Data types can be defined using pseudocode. The data type, LibraryRecord, is defined in pseudocode as: TYPE LibraryRecord DECLARE Title : STRING DECLARE Fiction : BOOLEAN DECLARE Author : STRING DECLARE NumberOfCopies : INTEGER ENDTYPE A variable, LibraryBook, is declared in pseudocode as: DECLARE LibraryBook : LibraryRecord The type definition for LibraryRecord is changed. (i) The value for NumberOfCopies must be between 1 and 10 inclusive. Write the updated line of pseudocode from the type definition of LibraryRecord to implement the change. ....................................................................................................................................... . ................................................................................................................................. (ii) Every copy of every book is now uniquely identified by an accession number, AccessionNumber, as it is added to the library. Each library record will include one or more accession numbers. Each accession number is an integer. Write the extra line of pseudocode needed in the type definition of LibraryRecord. ....................................................................................................................................... . ....................................................................................................................................... . ....................................................................................................................................... . .................................................................................................................................
Exam No:9618_s22_qp_31 Year:2022 Question No:1(b)
Answer:

Knowledge points:
13.1 User-defined data types
Solution:
Download APP for more features
1. Tons of answers.
2. Smarter Al tools enhance your learning journey.
IOS
Download
Download
Android
Download
Download
Google Play
Download
Download