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 capturing the passenger's age:

  1. Extract the age from the text box input and convert it to an integer.
  2. Check if the passport check box is ticked:
    • If true, then check the age:
      • If the age is less than 16 and the adult check box is ticked, display 'Boarding confirmed'.
      • Otherwise, display 'Boarding not confirmed'.
  3. If the passport check box is not ticked, display 'Boarding not confirmed'.

Step 2

Button - [Question 1.2]

99%

104 rated

Answer

For handling luggage weight:

  1. Extract the weight of luggage from the text box and convert it to a double.
  2. Obtain the maximum weight allowed:
    • Extract this information from the appropriate line.
  3. Compare the luggage weight with the maximum weight:
    • If the weight exceeds the maximum weight, calculate the excess weight.
  4. Display the excess weight and also calculate and display the cost of the excess weight using the specified rate.

Step 3

Button - [Question 1.3]

96%

101 rated

Answer

To manage vegetarian meal preparations:

  1. Extract the number of passengers from the text box and convert it to an integer.
  2. Calculate the number of vegetarian meals:
    • Implement logic based on the passenger count to determine numbers.
  3. Display the number of vegetarian meals along with the number of non-vegetarian meals.

Step 4

Button - [Question 1.4]

98%

120 rated

Answer

For the departure time validation:

  1. Check the length of the input string for departure time. It should be exactly 5 characters.
  2. Verify if the third character is 'h'. If not, handle the error appropriately by displaying 'Invalid time entered'.
  3. If valid:
    • Extract the hour and minute from the input string.
    • Adjust for late boarding if necessary, ensuring the time logic is applied correctly.
  4. Display the finalized boarding time after adjustments.

Step 5

Button - [Question 1.5]

97%

117 rated

Answer

To process the loyalty card and display points:

  1. Extract the distance from the text box as a real value.
  2. Check the selected loyalty card type:
    • Adjust the bonus points based on whether Silver, Gold, or Platinum cards are selected.
  3. Calculate bonus points based on distance:
    • For Silver: set points to 0.
    • For Gold: calculate 15% of distance.
    • For Platinum: calculate 20% of distance.
  4. Finally, 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

;