User interface language: English | Español

Date November 2020 Marks available 5 Reference code 20N.2.SL.TZ0.4
Level SL Paper 2 Time zone no time zone
Command term Construct Question number 4 Adapted from N/A

Question

EnviroBuild is a construction company that recently purchased land. It has permission to build either small houses or large houses but not both types of house. The maximum number of small houses that can be built is 10. The maximum number of large houses that can be built is five.

The cost of building the houses is calculated using a model with the following three variables:

House_Type: The type of house (small or large).

House_Num: The number of houses to be built.

Profit: The total sales revenue minus the land costs, labour costs and material costs.

The decision whether to build small houses or large houses is a purely financial one and is based on the following information:

Identify the data types for the House_Type, House_Num and Profit variables.

[3]
a.

Construct a spreadsheet model that shows the total profit for the chosen type of house. The user must input the House_Type and House_Num to calculate the total profit.

[6]
b.

Outline two validation tests that should be included in the test plan for this spreadsheet model.

[4]
c.

To finance this project, EnviroBuild took out a bank loan of $400 000 and will be required to pay interest on this loan. The project starts on 1 January 2021.

The following steps are used to calculate the total profit:

Construct the pseudocode that will calculate the profit after these additional costs have been considered. You can introduce any new variables, if necessary.

[5]
d.

Markscheme

Award [3 max].
House_Type: char/string/Boolean;
House_Num: integer;
Profit: fixed-point decimal/currency/float/double;

a.

Award [6 max].
Award [1] for including HOUSE_TYPE and HOUSE_NUM as input
Award [1] for calculating total revenue;
Award [1] for calculating the number of days for each project
Award [1] for calculating the labour costs
Award [1] for calculating material costs
Award [1] for calculating the profit

REVENUE: Award [1] for Sales_price * House_Num based on the If statement
NUM_DAYS: Award [1] for the correct number of days * house_num.
LABOUR_COSTS: Award [1] for NUM_DAYS * 2500
MATERIAL_COSTS: Award [1] for checking the HOUSE_TYPE and then multiplying HOUSE_NUM by the correct material cost.
PROFIT: Award [1] for deducting all of the costs from the revenue.

Example answer:

Alternative solution:

Note: accept cell references such as B3 instead of variables

b.

Award [4 max].

Award [2 max] for each variable tested.
Award [1] for the type of test and [1] for example test data.

Type test for HOUSE_TYPE
Normal: s or l / small or large; Abnormal: m / medium.
If Boolean has been used Normal: True or False; Abnormal: “small”

Range test for NUM_HOUSES
Normal HOUSE_NUM = 5 / Abnormal HOUSE_NUM = 12 / Extreme HOUSE_NUM = 6 or HOUSE_NUM = 10

Accept any testing that relates to:

c.

Award [5 max].
Award [1] for reading the profit, number of days from csv file / cell range.
Award [1] for adding the number of days to the date.
Award [1] for extracting the month from the date.
Award [1] for calculating interest and rates.
Award [1] for deducting the costs from the profit and displaying result.

Example pseudocode:

import FILE.CSV As SS
read PROFIT, NUM_DAYS from SS
END_DATE = #01/01/2021 + NUM_DAYS
NUM_MONTHS = MONTH(END_DATE)
COSTS = (NUM_MONTHS * 500) + (NUM_MONTHS * (400000 * .01))
output (PROFIT – COSTS)

Alternative pseudocode:

input Profit, NumDays from spreadsheet
endDate = date(dateval("1/1/21") + NumDays)
monthsTaken = month(endDate)
interest = 400000 * 0.01 * monthsTaken
output "Net profit = $", (Profit – interest)
d.

Examiners report

[N/A]
a.
[N/A]
b.
[N/A]
c.
[N/A]
d.

Syllabus sections

Option B: Modelling and simulation » B.2 Simulations
Show 44 related questions
Option B: Modelling and simulation

View options