A software program is used by the airline to capture initial passenger registration information - NSC Information Technology - Question 1 - 2017 - Paper 1
Question 1
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To implement the functionality for capturing the passenger's age:
Extract the age from the text box input and convert it to an integer.
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'.
If the passport check box is not ticked, display 'Boarding not confirmed'.
Step 2
Button - [Question 1.2]
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
For handling luggage weight:
Extract the weight of luggage from the text box and convert it to a double.
Obtain the maximum weight allowed:
Extract this information from the appropriate line.
Compare the luggage weight with the maximum weight:
If the weight exceeds the maximum weight, calculate the excess weight.
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To manage vegetarian meal preparations:
Extract the number of passengers from the text box and convert it to an integer.
Calculate the number of vegetarian meals:
Implement logic based on the passenger count to determine numbers.
Display the number of vegetarian meals along with the number of non-vegetarian meals.
Step 4
Button - [Question 1.4]
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
For the departure time validation:
Check the length of the input string for departure time. It should be exactly 5 characters.
Verify if the third character is 'h'. If not, handle the error appropriately by displaying 'Invalid time entered'.
If valid:
Extract the hour and minute from the input string.
Adjust for late boarding if necessary, ensuring the time logic is applied correctly.
Display the finalized boarding time after adjustments.
Step 5
Button - [Question 1.5]
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To process the loyalty card and display points:
Extract the distance from the text box as a real value.
Check the selected loyalty card type:
Adjust the bonus points based on whether Silver, Gold, or Platinum cards are selected.
Calculate bonus points based on distance:
For Silver: set points to 0.
For Gold: calculate 15% of distance.
For Platinum: calculate 20% of distance.
Finally, display the calculated points on the panel.