Date | May 2018 | Marks available | 4 | Reference code | 18M.2.SL.TZ0.4 |
Level | SL | Paper | 2 | Time zone | no time zone |
Command term | Construct | Question number | 4 | Adapted from | N/A |
Question
Ralph owns a furniture store that trades in second-hand furniture, lamps and musical instruments. He buys these items, repairs them where necessary and then resells them.
He calculates the value of each item using the information below:
- type: furniture, lamp, musical instrument
- brand recognition: 1 (low), 2 (medium), 3 (high)
- condition: “very good”, “good”, “needs repair”
- estimated volume of item: maximum volume accepted is 2000 dm3
(note that 1 dm3 = 1 litre).
Ralph is going to use a spreadsheet to model this information.
The spreadsheet model will inform Ralph as to whether he should buy an item. The decision to buy is based on the following rules:
- the default values for the items are; furniture $100, lamp $30, musical instrument $80
- multipliers are applied to these default values depending on the volume of the item;
for volumes that are 500 dm3 or above it is 0.7, for volumes less than or equal to 30 dm3 it is 1.2, for any other volume it is 1.
Ralph will not buy any item with a value calculated to be over $90.
The model is also used to calculate his final selling price for each item. This price is calculated using the following rules:
- initial selling value is 5 times the original default value
- a multiplier of 1, 2 or 3 is applied to reflect the brand recognition (a “top brand” receives a multiplier of 3)
- another multiplier is applied to reflect the volume occupied. This multiplier is 5 when the volume is greater or equal to 500 dm3, 3 for volumes between 30 and 500 dm3 and 1 for other volumes
- a further multiplier is applied depending upon the item’s condition. This multiplier is 2 or 3 when conditions are good or very good, but is 0.8 if the item is damaged.
Copy and complete the following table showing the variables, each variable’s data type and range of values that would represent the information shown above.
Using the above rules, construct the pseudocode that will help Ralph in deciding whether to buy an item.
Describe two items that would have a calculated value of more than $90.
Calculate the selling price of a top brand guitar with a volume of 96 dm3 that was damaged. You should show your working.
With the help of a diagram, suggest an appropriate design for a spreadsheet used to calculate the final selling price, following this model.
Identify two tests that should be included in the test plan for this model.
Markscheme
Award [4 max]:
Award [1] for each fully correct row indicating variable name, type, and values (no marks for incomplete information, but do allow abbreviated strings)
e.g.
Note: If a full column is missing, then award [1] for each correct column (for a max of [2]).
Award [4 max]:
Award [1]: correct initialisation of Initvalue
.
Award [1]: correct calculation of Temp.
Award [1]: correct comparison of Temp with 90.
Award [1]: correct return/output.
proc Decide(Item, Vol)
Var Temp
if Item = f then Initvalue = 100
else if Item = l then Initvalue = 30
else if Item = m then Initvalue = 80;
endif
if Vol >= 500 then Temp = 0.7 * Initvalue // accept <,>
else if Vol =< 30 then Temp = 1.2 * Initvalue
else Temp = Initvalue;
endif
if Temp > 90 then
return "Reject" // accept any 2 reasonable outputs
else return "Accept";
endif
Any item of furniture with a volume 500 dm3;
Any musical instrument with a volume 30 dm3;
Example answers:
A piece of furniture with volume of 400 dm3;
A piece of furniture with volume 30 dm3;
A flute with volume of 1 dm3;
Award [2 max]:
Award [2] for completely correct answer (only the left or right-hand side needs to be shown).
Award [1] for correctly writing just 4 factors from the left-hand side.
5 * 80 * 3 * 3 * (80/100) = $2880
Alternative expression for the left-hand side:
5 * (Item.IType.Initvalue
) * (Item.IType.IBrand
) *
(Item.IVol.Percentage
) * (Item.ICond.Multiplier
)
Award up to [4 max].
Award [1] for some layout design.
Award [1] for each of the following elements:
- correct formula for
Itype
- correct formula for
Ivol
- correct formula for
Icond
- correct formula for Selling Price.
Example for [2]:
Award [1] for the general layout.
Award [1] for detail (Vlookup table, explanations).
Award [3 max]:
Type consistency, e.g. currency, integer, floating
Range consistency, depending on the decision procedure,
Value at the limits given by the specification (e.g. < or =<)
Accept any testing that relates to
- normal data // Note: an example will get this mark
- extreme data,
- abnormal data.
Note: Answers must be more specific than alpha/beta testing, dry-run, etc.