Note AcademyNote Academy

Computer Science · May / June 2016 · Paper 21 · Question 1

2210

As printed in the paper

Show the answer and mark scheme
  • 1(a)(i)[3]

    Many correct answers, names must be meaningful. This is an example only. Length, real/integer, length of parcel Breadth, real/integer, breadth of parcel Height, real/integer, Height of parcel [3]

  • 1(a)(ii)[2]

    Several correct answers, they must be meaningful. These are examples only. Dimension, 80 TotalDimension 200 MaxWeight 10.00 [2]

  • 1(b)[5]

    Any 5 from:

    – input length, breadth, height and weight – check each dimension, not more than 80 – check total of dimensions, not more than 200 – check weight at least 1 – check weight not more than 10 – output parcel accepted (must be in appropriate position) – output parcel rejected (must be in appropriate position) – output all reasons for rejecting parcel (reason must follow test) [5]

    Max 5 marks Sample Answer. INPUT Length, Breadth, Height, Weight IF Length <= 80 AND Breadth <= 80 AND Height <= 80 AND Weight >= 1 AND Weight <=10 AND Length + Breadth + Height <= 200 THEN PRINT 'Parcel accepted' ELSE PRINT 'Parcel rejected' IF Length > 80 OR Breadth > 80 OR Height > 80 THEN PRINT 'At least one dimension too large' ENDIF IF Weight < 1 THEN PRINT 'Parcel too light' ENDIF IF Weight > 10 THEN PRINT 'Parcel too heavy' ENDIF ENDIF

  • 1(c)[6]

    1 mark for the data set and 1 mark for the matching reason all, data sets and reasons must be different. There are many possible correct answers these are examples only. Data set 30, 29, 28, 4 Reason – normal data;

    parcel should be accepted Data set 80, 60, 60, 10 Reason – boundary data;

    parcel should be accepted Data set – 85, 60, 60, 11 Reason – abnormal data;

    parcel should be rejected [6]

  • 1(d)[4]

    Maximum 4 marks in total, maximum 2 marks if only programming statements used. Explanation (may include reference to programming statements) – loop for number of parcels – parcels 5 kg or less use standard price – over 5 kg use weight to calculate price – Correct calculation of price – keep running total of consignment price [4]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.