Photo AI

The aquarium at Aqua Wonderland is setting up a new rectangular shark tank - NSC Information Technology - Question 1 - 2016 - Paper 1

Question icon

Question 1

The-aquarium-at-Aqua-Wonderland-is-setting-up-a-new-rectangular-shark-tank-NSC Information Technology-Question 1-2016-Paper 1.png

The aquarium at Aqua Wonderland is setting up a new rectangular shark tank. The administrators need a software program to manage the income from visitors and the dai... show full transcript

Worked Solution & Example Answer:The aquarium at Aqua Wonderland is setting up a new rectangular shark tank - NSC Information Technology - Question 1 - 2016 - Paper 1

Step 1

Button [Question 1_1]

96%

114 rated

Answer

To calculate the volume of the tank, we first need to obtain the dimensions from the user interface.

  1. Extract Length, Width, and Height from the text boxes and convert them to real values.

  2. Use the formula for volume:

    Volume=Length×Width×HeightVolume = \text{Length} \times \text{Width} \times \text{Height}

  3. Display the calculated volume in the text box.

Step 2

Button [Question 1_2]

99%

104 rated

Answer

To calculate the cost of filling the tank with water, follow these steps:

  1. Use the volume calculated in Question 1.1, and multiply it by 1000 to convert cubic metres to litres.
  2. Determine the cost based on the volume:
    • If volume <= 500, use the formula: Cost=Volume×0.25Cost = Volume \times 0.25
    • If 500 < volume <= 800, use: Cost=500×0.25+(Volume500)×0.35Cost = 500 \times 0.25 + (Volume - 500) \times 0.35
    • If volume > 800, use: Cost=500×0.25+300×0.35+(Volume800)×0.45Cost = 500 \times 0.25 + 300 \times 0.35 + (Volume - 800) \times 0.45
  3. Display the cost in the text box.

Step 3

Button [Question 1_3]

96%

101 rated

Answer

The lifespan of a shark will be calculated as follows:

  1. Extract the lifespan in months from the text box.
  2. Calculate years and months using:
    • Years = lifespan divided by 12
    • Months = lifespan mod 12
  3. Display the results in the format: x years and y months.

Step 4

Button [Question 1_4]

98%

120 rated

Answer

To calculate the financial information, perform these steps:

  1. Extract the setup cost and income from the text boxes.
  2. Display headings in the output area for clarity.
  3. Initialize yearNumber to 1 and use a loop:
    • Check if setupCost > 0. If true, display the current year, income, and setup cost.
    • Increase income by 10% for the next year.
    • Increment yearNumber.
  4. If the initial cost is paid off, display 'Paid off' in the Balance column.
  5. Format all monetary values to two decimal places.

Step 5

Button [Question 1_5_1]

97%

117 rated

Answer

This section simulates dice throwing:

  1. Generate two random numbers for the dice, ensuring they are within the correct range (1-6).
  2. Display the values labeled appropriately in the output area.
  3. Check if the numbers rolled are consecutive (i.e., difference of 1).
  4. If they are, enable the next question's button.

Step 6

Button [Question 1_5_2]

97%

121 rated

Answer

To create a reference number for a visitor:

  1. Use a dialog box to capture the visitor's four-digit ticket number.
  2. Extract the system date.
  3. Select a course from the radio buttons.
  4. Construct the reference number formatted as follows: TicketNumber<Date><FirstTwoLettersOfCourse>.
  5. Display the generated reference number in the output area.

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

;