2024 Home

Question 9

Section 1: Software design and development, and Computer systems

A campsite booking system is being developed to calculate the cost of a stay at £35 per night, per person. The cost will be displayed to the user before they confirm the booking. The system will ask users for their name, number of people, arrival date and length of stay.

(a) Complete the analysis below.

Input
Process
OutputCost of stay

2 marks

(b) The code below calculates the cost of the stay.

…
Line 7  RECEIVE name FROM (STRING) KEYBOARD
Line 8  RECEIVE numberOfPeople FROM (INTEGER) KEYBOARD
Line 9  RECEIVE arrival FROM (STRING) KEYBOARD
Line 10 RECEIVE nightsStaying FROM (INTEGER) KEYBOARD
Line 11	<calculate cost of stay>

Line 12	 SEND "The cost of your stay is £" & cost TO DISPLAY
…

Using a programming language of your choice, write the code for Line 11.

3 marks

(c) To pay a deposit, users will have to provide bank account details.

State how this information could be transferred securely to the booking system.

1 mark

(d) The number of guests who stayed at the campsite each night in 2023 is stored in the array guests.

Index012364
Value27124015387

The campsite want to know the total number of guests who stayed at the site in 2023.

Using a programming language of your choice, write the code to calculate this total.

4 marks

(e) A map of the campsite is stored as a bit‑mapped graphic.

page8 img0

Describe how this map is represented in a computer system’s memory.

2 marks