Advanced level 2025 North West regional mock computer science 3
Advanced level 2025 North West regional mock computer science 3
(c)Implement a Procedure–LoanfAmy. loanAmount. PIN)“Itat »Hw» >‘*“* m*
st?–
balance is updated in the Balance Array. The message “You have been granted.loan of X an y <
new balance is Y” is then displayed. If the critcriw 1» not met, then the mcswtgc «ir> > o ‘
the loan criteria” is displayed. ^
iv) (a) Implement a main program using algorithm2 in
algorithm , include the .tppropriate function calls at the correct places.
variables.
in the
figure 2 above in other to run your program
Declare all variable* as global
( K mark*)
is working correctly
(b) Execute your program and carryout tests to confirm that your program PIN not found), print the output
– A sample run for a non–nuthentic member ( i.e name not in member list or
– A sample run for “ Bekog” with successful withdrawal ol 20000, print the output
– Print your entire code.
(3 mark* )
HINT: is used
Go through the main function to have an understanding o! how the Authentic ate function
For each function or Procedure call , be mindful of which array! Balance or Member) you are to pass
as argument.
(20 marks)
SECTION B: Database Design and Implementation
record details of books, book loans and borrowers
A lending library uses a relational database to igned to each book title such as “Easy
• A unique International Standard Book Number (ISBN ) is assi
Coding”.
• The library assigns a unique Access Code to each copy of a book in the library .
ThP library assigns a unique Borrower Code to each borrower.
•
The relational daubase uses four tables Book. BookCopy. Bookl–oan and Borrower wtth «mbours
underlined) as follows:
(primaty keys
BookflSBN, AuthorName, Title, NumberOfCopies)
BookCopy(AccessCode, ISBN, DateAcquired)
BookLoan(AccessCode, BorrowerCode, DateDueBack)
Borro\ver(Bprrpw£lCode, Surname, Address