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 wait in a queue unti... show full transcript

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

Step 1

a) Identify the parameters of planeQueue function

96%

114 rated

Answer

The function planeQueue(pRunway, pFlight) has two parameters: pRunway, which indicates the runway number (1 or 2), and pFlight, which represents the flight ID.

Step 2

b) Explain the return value of the planeQueue function

99%

104 rated

Answer

The function returns a boolean value status. This indicates whether the plane was successfully added to the runway queue. If the addition is successful, status is set to true; otherwise, it remains false.

Step 3

c) Describe the invocation in line 35

96%

101 rated

Answer

In line 35, the function planeQueue(runway, flightID) is called, where runway represents the specific runway for which the plane is being queued, and flightID is the unique identifier assigned to the flight.

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

;