Photo AI

A software program is used by the airline to capture initial passenger registration information - NSC Information Technology - Question 1 - 2017 - Paper 1

Question icon

Question 1

A-software-program-is-used-by-the-airline-to-capture-initial-passenger-registration-information-NSC Information Technology-Question 1-2017-Paper 1.png

A software program is used by the airline to capture initial passenger registration information. This information is used to update the passenger profile and to assi... show full transcript

Worked Solution & Example Answer:A software program is used by the airline to capture initial passenger registration information - NSC Information Technology - Question 1 - 2017 - Paper 1

Step 1

Button - [Question 1.1]

96%

114 rated

Answer

To implement the functionality for processing passenger age:

  1. Extract the age from the text box and convert it to an integer.
  2. Check if the passport check box is ticked.
  3. If the passport is ticked, check the user's age:
    • If the age is less than 16 and the adult check box is also ticked, display 'Boarding confirmed'.
    • Else display 'Boarding not confirmed'.
  4. If the passport check box is not ticked, simply display 'Boarding not confirmed'.

Step 2

Button - [Question 1.2]

99%

104 rated

Answer

For handling luggage weight input:

  1. Extract the weight of luggage from the text box and convert it to a double.
  2. Obtain the maximum weight limit from a predefined line/variable.
  3. Calculate any excess weight.
  4. If the weight exceeds the maximum, calculate the excess weight cost.
  5. Display the excess weight and the cost of the excess weight on the interface.

Step 3

Button - [Question 1.3]

96%

101 rated

Answer

To process the number of passengers and dietary needs:

  1. Extract the number of passengers from the text box and convert it to an integer.
  2. Calculate the number of vegetarian meals required by taking a defined proportion of total passengers.
  3. Display both the number of vegetarian and non-vegetarian meals being prepared.

Step 4

Button - [Question 1.4]

98%

120 rated

Answer

For checking departure time validity:

  1. Ensure the length of the input string is five characters, indicating a valid time format.
  2. Extract the hour and minute from the input.
  3. Apply rules for adjusting the boarding time based on various conditions:
    • If the conditions based on hour and minute are met, adjust the minute.
    • If invalid, display 'Invalid time entered' and clear the time text box.

Step 5

Button - [Question 1.5]

97%

117 rated

Answer

For bonus points calculation based on the distance:

  1. Extract the distance from the text box as a real value.
  2. Check for which fly card status is selected among Silver, Gold, and Platinum.
  3. Set bonus points according to the selection:
    • Silver gives a set amount of points.
    • Gold gives 15% of the distance.
    • Platinum gives 20% of the distance.
  4. Load the card's image and display the calculated points on the panel.

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;