Chhetri AcademyGCSE & A level Paper Builder

3.2.3Robust software: audit trails and code reviews

Edexcel GCSE Computer Science (1CP2) · Computers › Software

Practise Robust software: audit trails and code reviews. 11 exam-style questions on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.

Build a paper on this topic

▶ Watch videos on Robust software: audit trails and code reviews (Craig 'n' Dave Edexcel on YouTube) · Practise all of Software

Quick recall

Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.

Define the term 'robust software'.
Software that keeps working correctly even with unexpected input or attacks.

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy3 marks
(a) Define the term 'robust software'.[1]
(b) Identify a method of identifying vulnerabilities in program code.[1]
  • Code review
  • Disk defragmentation
  • Data compression
  • Cable management
(c) State one piece of information recorded in an audit trail.[1]
Show the answer and mark scheme
(a) Answer: Software that keeps working correctly even with unexpected input or attacks.
  • software that keeps working correctly (does not crash), even when it receives unexpected or invalid input or is attacked
(b) Answer: Code review
(c) Answer: Who made each change (also what and when).
  • who made a change or accessed the system / what was changed or done / when it happened (date and time)
Question 2Medium4 marks
A bank is developing a new mobile banking app. Explain why it is important that the app is robust.[4]
Show the answer and mark scheme
Answer: Bugs could lose customers' money; vulnerabilities could let hackers steal from accounts; the bank risks fines and lost trust.
  • if the app crashes or has bugs, customers may be unable to access their money, or payments may be lost or made twice
  • vulnerabilities could be exploited by hackers to access customers' accounts or data
  • which could lead to money being stolen / fraud
  • the bank could be fined or face legal action (e.g. under the Data Protection Act) if personal data is exposed
  • customers would lose trust in the bank and move to a competitor
  • fixing problems after release costs far more than preventing them
Question 3Hard4 marks
A programmer has written this Python code. It is about to be checked in a code review.
01 password = "admin123"
02 attempt = input("Enter password: ")
03 if attempt == password:
04     print("Access granted")
05     total = float(input("Enter the total bill: "))
06     people = int(input("Enter number of people: "))
07     share = total / people
08     print("Each person pays", share)
Identify two problems that the code review should find in this code. For each problem, explain how it could be fixed.[4]
Show the answer and mark scheme
Answer: Hard-coded password (store it securely instead); unvalidated numeric input can crash the program, including division by zero (validate and range-check the input).
  • line 01: the password is written into the code (hard-coded), so anyone who can read the code knows it
  • fix: store the password securely outside the code, e.g. as an encrypted or hashed value in a protected file
  • lines 05–06: if the user enters something that is not a number, float() or int() causes a runtime error and the program crashes
  • fix: validate the input (check that it is numeric) before converting it, and ask again until valid data is entered
  • line 07: if the user enters 0 people, dividing by zero causes a runtime error
  • fix: check that the number of people is greater than 0 before dividing (a range check)

Related subtopics

Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.

Book a free trial