Photo AI

The airport has two runways - Edexcel - GCSE Computer Science - Question 8 - 2020 - Paper 1

Question icon

Question 8

The-airport-has-two-runways-Edexcel-GCSE Computer Science-Question 8-2020-Paper 1.png

The airport has two runways. Each runway has a queue of planes waiting to take off. Only five planes can be queued for each runway. Other planes remain at the gates ... show full transcript

Worked Solution & Example Answer:The airport has two runways - Edexcel - GCSE Computer Science - Question 8 - 2020 - Paper 1

Step 1

8(a) Identify the parameters in the function

96%

114 rated

Answer

The function planeQueue(pRunway, pFlight) has two parameters: pRunway and pFlight. The pRunway parameter refers to the designated runway for the plane, while the pFlight parameter is used to pass the flight details.

Step 2

8(b) Explain the call on line 35

99%

104 rated

Answer

The call on line 35, planeQueue(runway[], flightID), matches the earlier defined function parameters. Here, runway[] corresponds to pRunway and flightID corresponds to pFlight. This ensures that the flight information is assigned to the specified runway when the function is executed.

Step 3

8(c) Detail the return value of the function

96%

101 rated

Answer

The function is designed to return a Boolean value indicative of whether the plane was successfully added to the queue. This return value, status, signifies the success (True) or failure (False) of adding the flight to the designated runway.

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

Other GCSE Computer Science topics to explore

;