[ { "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.
\nHe calculates the value of each item using the information below:
\nRalph is going to use a spreadsheet to model this information.
\nThe spreadsheet model will inform Ralph as to whether he should buy an item. The decision to buy is based on the following rules:
\nRalph will not buy any item with a value calculated to be over $90.
\nThe model is also used to calculate his final selling price for each item. This price is calculated using the following rules:
\nCopy and complete the following table showing the variables, each variable’s data type and range of values that would represent the information shown above.
\nUsing the above rules, construct the pseudocode that will help Ralph in deciding whether to buy an item.
\nDescribe two items that would have a calculated value of more than $90.
\nCalculate the selling price of a top brand guitar with a volume of 96 dm3 that was damaged. You should show your working.
\nWith the help of a diagram, suggest an appropriate design for a spreadsheet used to calculate the final selling price, following this model.
\nIdentify two tests that should be included in the test plan for this model.
\nAward [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.
\nNote: If a full column is missing, then award [1] for each correct column (for a max of [2]).
\nAward [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)\n
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
\nAlternative expression for the left-hand side:
\n5 * (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:
Itype
\nIvol
\nIcond
\nExample 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
\nNote: Answers must be more specific than alpha/beta testing, dry-run, etc.
\nIn a small shop two people prepare and sell bread rolls. The space for preparing the bread rolls is small. This space includes a sink and a cash register. Each of the ingredients used to fill the bread rolls is kept in a separate bowl with its own fork or spoon. Sometimes the bowls need to be refilled.
\nPreparing a bread roll requires the following steps:
\nAfter that, the roll is ready for payment and collection.
\nEven when the shop is busy, each person only prepares one bread roll at a time.
\nA larger restaurant is already using simulation software for the preparation of their dishes.
\nThe restaurant has a menu with eight possible dishes. These dishes may require a number of steps such as cutting, mixing, boiling and grilling to prepare them, as well as different cooking times. The restaurant has a cook and an assistant who prepare one dish at the time.
\nOutline two problems with this method of preparation that could affect the time it takes the two people to prepare an order.
\nDescribe how the two people could improve the efficiency of their work, without compromising on the quality of service to the customers.
\nExplain the difference between a model and a simulation.
\nIdentify three elements that the simulation software might consider, in addition to the information already described above.
\nThe simulation program will group all orders received in an interval of 10 minutes. The program will then produce a sequence of all the cooking steps so that these orders can be completed as quickly as possible. Once the kitchen has completed the orders for one interval, it is ready to accept orders for the next interval.
\nCustomers are impressed by the rapidity of service, but not by the quality of prepared food.
\nSuggest two elements that the software simulation may have not considered that may lead to complaints from the customers.
\nAward [4 max]:
Award [1] for identifying a problem, [1] for an elaboration.
Mark as [2] and [2].
There is no evidence that there are two knives to slice the bread roll;
so one of them could already be delayed;
There could be need of the same fillings;
meaning that the two bread rolls will be prepared with a slight delay;
One fork/spoon falls down and will need to be washed;
there must be a policy on who will wash it;
One ingredient is finished and needs replenishment;
there must be a policy on who collects the new bowl;
There can be concurrent access to the cash register
there must be a policy on who goes first;
No evidence that both persons have space/paper to wrap simultaneously on the table;
There must be a policy on who goes first;
Accept other reasonable answers.
\nAward [3 max]:
\nSplit the job in two separate sections;
one guy handles all the food, the other guy takes order, wraps, handles money;
to minimize possible clashes on resources;
Grouping similar tasks together:
Slice several bread rolls / stockpile bread rolls;
To be filled on demand;
Note: Do not award marks for answers related to serving.
\nAward [3 max]:
A model is a / an accurate representation (either physical or digital) of a real-world entity;
A simulation is an algorithm/method of implementing a model;
By changing the various parameters/variables of the model;
In order to investigate its subsequent behaviour;
Award [3 max]:
The number of utensils;
Washing times;
Time spent arranging the food on a plate;
The amount / quantity of ingredients
The number of customers/orders waiting
The number of servings for the dish they are currently preparing;
Accept other reasonable answers.
Accept application answers – option to include/exclude ingredients.
Award [6 max].
Mark as [3] and [3].
The objective of reducing turn-around time,
May lead to hastily prepared dishes,
Which may be lacking in quality.
Trying to cook a batch of orders in 10 minutes,
May require the pans to be used for multiple dishes,
Impacting the unique taste of these dishes.
More appliances might need to be switched on, in case of large orders demand;
For example, an oven, which take time to heat up;
Causing some dishes to be undercooked;
The number of customers/orders;
May be too high;
To be dealt with in 10 minutes;
Being in charge of preparing a full dish, gives job satisfaction;
Lack of satisfaction may lead to loss of interest in the job;
affecting the quality of the cooking;
Jackson City University has a Music Department that provides music lessons to students in a number of high schools in the city.
\nThe Jackson City University Music Department teachers visit the different schools in the city to teach students a range of musical instruments.
\nThe following diagram shows an unnormalized table of student data.
\nExplain one benefit of normalizing a database.
\nIdentify three ways that incorrect data could be prevented from being added into the School_phone_no field.
\nOutline what would be necessary to make the above unnormalized table conform to 1st Normal Form (1NF).
\nConstruct the 3rd Normal Form (3NF) of the unnormalized relation shown above.
\nExplain the difference between 2nd Normal Form (2NF) and 3rd Normal Form (3NF).
\nAward up to [3 max].
Normalization leads to a reduction in the chance of data redundancy occurring;
Because each item of data only occurs on one location in the database;
Therefore this can reduce the possibility of update anomalies occurring;
More efficient use of memory;
Normalization reduces the likelihood of update anomalies occurring;
Because each item of data only occurs on one location in the database;
Therefore if the data is edited there is no chance that the data may exist in its original form anywhere else in the database;
Normalization leads to smaller tables with less information in each row;
This leads to a reduction of input/output transfers;
Which means that the likelihood of CPU activities being suspended are reduced/the CPU is able to work at full capacity;
Note: Do not award marks between clusters.
\nUse a text field for the School_phone_no with a length of 9 characters (Accept limit check);
Use an input mask such as 000000000 to ensure only numbers can be entered;
Use a validation rule to ensure the first three entries can only be “065”
Accept format check;
Award up to [2 max].
Some values are not atomic in the Student_Choice and School_phone_no fields/attributes;
Repeat rows for students with multiple choices / phone numbers with one choice per row;
Each record must have a unique key;
For Student_Choice have three columns, Stud_Choice1, Stud_Choice2 and Stud_Choice3, with null values (or default values set to “none”) as appropriate or two columns for School_phone_no;
\nAward up to [8 max].
\nAlternative 1
For a three table solution:
Student table
Award [1] for primary key: student_ID // Do not accept other suggestions for the primary key.
Award [1] for attributes relating to student e.g.
First_Name
Family_Name
Date_of_birth
Note: Do not penalize additional attributes such as Student_choice.
\nSchool table
Award [1] for primary key. Either school_Name or user defined key such as SchoolID // Do not accept a composite key.
Award [1] for attributes relating to school such as:
School(School_Name)
School_Post_code,
School_phone_no.
Note: Do not penalize additional attributes such as Student_choice.
\nStudent choice Table/Instrument table
Award [1] for primary key. Either user-defined or a composite key.
Award [1] for attributes relating to choice such as Student_choice/Instrument choice
Award [1] for each foreign key up to a maximum of [2 max].
\nExample of three table solution
STUDENT (Student ID, First_Name, Family_Name, Date_of_Birth)
SCHOOL (School_Name, School_PostCode, School_Phone_no)
STUDENT CHOICE (Choice ID, Student_ID*, School_Name*, Choice)
Alternative 2
For a four table solution
Student table
Award [1] for primary key: student_ID // Do not accept other primary keys
Award [1] for attributes relating to student e.g.
First_Name
Family_Name
Date_of_birth
Note: Do not penalize additional attributes such as Student_choice.
\nSchool table
Award [1] for primary key. Either school_Name or user defined key such as SchoolID // Do not accept a composite key
Award [1] for attributes relating to school such as:
School(School_Name)
School_Post_code
School_phone_no
Note: Do not penalize for additional second School_Phone_no field.
\nStudent choice Table/Instrument table
Award [1] for primary key. Either Lesson_ID or Instrument_ID // Do not accept a composite key.
Award [1] for attributes relating to choice such as Student_choice/Instrument choice.
Details Table/Lessons Table
Award [1] for primary key. Any ID or composite.
Award [1] for the correct foreign key in this table.
Note: This is the only table in which marks can be awarded for the use of a composite [primary] key.
\nExample of four table solution
STUDENT (Student_ID, First_Name, Family_Name, Date_of_Birth)
SCHOOL (School_Name, School_PostCode, School_Phone_no)
STUDENTCHOICE(Lesson_ID,Instrument)
DETAILS (Lesson_ID*, Student_ID*, School_Name*)
2NF allows non-prime attributes to be functionally dependent on non-prime attributes which means there are transitive dependencies at 2NF;
While 3NF allows non-prime attributes to be functionally dependent only on the primary / super key and is already in 2NF;
Therefore it is not possible for update anomalies to occur when a database is in 3NF;
Basking Coats is a business that sells textile products such as shirts, coats and trousers. The company was formed in 1970 and has numerous shops in Europe and South-East Asia. To ensure their marketing is targeted at appropriate customers, Basking Coats has asked Singalytics, a data analytics company, to assist them in improving their marketing strategy.
\nExtract, Transform, Loading (ETL) processes can be used to clean up data for use in a database warehouse. When ETL is carried out, certain precautions should be taken.
\nData in the Singalytics data warehouse is stored with a timestamp.
\nDescribe how deviation detection can be used to analyse this data.
\nOutline why data warehouses tend to use unnormalized data sets.
\nIdentify three precautions to be taken before extraction is carried out on the database.
\nOutline why data warehousing is time dependent.
\nExplain why Basking Coats could use association analysis to improve the marketing of its products.
\nBasking Coats has decided to use an object-oriented database rather than a relational database to store its data.
\nExplain why Basking Coats would use an object-oriented database rather than a relational database to store its data.
\nAward up to [2 max].
Deviation detection is a statistical technique;
Appropriate marketing of product;
Which is used to detect outlying data that does not fit the assumed model;
Therefore it can be used to predict the trends and patterns of demand for certain consumer goods in the future;
Award up to [3 max].
To speed query execution, which can be especially important in data warehouses used by Singalytics;
May effectively be used in data warehouses as they contain pre-joined tables that package data for common uses;
If the data is all present in a single table, there will be no need for joins, hence the selects can be done very quickly;
A single table with all the required data allows much more efficient index usage;
If there is heavy read load and when the application is read intensive;
If the columns are indexed properly, then results can be filtered and sorted by utilizing the same index;
Award up to [3 max].
To retrieve all the required data from the source system with as little resources as possible;
Designed in a way that it does not affect the source system;
In terms or performance/ response time/ locking;
Makes it accessible for processing on the data;
Ensuring that historical data being extracted can be read by the current systems;
Ensuring the different data formats being extracted can all be converted or scrubbed to become readable by the system and able to be formatted;
Ensuring that the data is relevant to what the user wishes to extract and utilise;
Award up to [2 max].
The content in the data warehouse is only valid for a time period;
Because the data undergoes changes dynamically;
A data warehouse's focus on change over time is time variant;
Award up to [4 max].
\nAward [2 max] for the explanation and [2 max] for the example(s).
\nAssociations:
Correlate the presence;
of a set of items with another range of values for another set of variables;
Breaks up data sets by variables such as gender, location, age;
It may be used to detect patterns independently from the geographic region,
females buy more dark colour trousers than males;
Examples:
when a female retail shopper buys a cotton shirt, she is likely to buy a stole.
Associations of the type Full arm formal shirts => Dark colour trousers; Full arm formal shirts => cufflinks may produce enough confidence and support to be valid association rules of interest;
If the application area has a natural classification of the item sets into hierarchies,
discovering associations within the hierarchies is of no particular interest;
Specifically its associations across hierarchies;
Note: For generic responses award [2 max].
\nAward up to [6 max].
\nAward [3 max] for the feature(s) and [3 max] for supporting explanation/examples.
\nFeatures:
Enhanced modelling capabilities;
Extensibility/support new data types;
Object DBMS stores more complex data and relationships;
Improved performance;
Reusability;
Eliminates need for user defined keys;
Eliminates need for Joins;
Examples:
Inheritance property, we can re-use the attributes (size, fabric) and functionalities;
It reduces the cost of maintaining the same data multiple times;
All this information is encapsulated and, there is no fear being misused by other objects. If we need any new feature we can easily add new class inherited from parent class and that adds new features;
Reduces the overhead and maintenance costs;
So it becomes more flexible if any changes and apparel business changes with fashion needs;
Codes are re-used because of the inheritance feature;
Neural networks are often used to model the complex behaviour of systems. These networks must first be trained in order to establish a reliable model. One such method of training makes use of supervized learning algorithms.
\nOutline the basic steps involved in supervized learning algorithms.
\nThe following block diagram illustrates a neural network used by a supervized learning algorithm to calculate a resulting value RES, for a given set of inputs.
\nThe neural network in the block diagram contains 60 nodes in the input layer (block I), 36 nodes in the hidden layer (block H) and 6 nodes in the outermost layer (block O). The solid black arrows indicate that all nodes in one layer are feeding all nodes in the successive layer. In particular, the value RES is calculated by using all nodes in O.
\nCalculate the number of weights that the above neural network uses in producing a value for RES. Show the details of your calculation.
\nAward [4 max]:
Uses a (training) set of input data and known response values;
To compare the model's output with actual values from the past which will give an error in the estimate;
The model is then changed in order to minimize this error;
This process is iterated until a sufficiently accurate model is produced;
Which can then be used to make predictions/classifications;
Award [2 max].
Award [1] for evidence of multiplication between layers.
Award [1] for fully correct expression / answer.
60 * 36 + 36 * 6 + 6 * 1 = 2382
\nThe electronic control unit (ECU) of a vehicle is an on-board computer that is constantly monitoring the performance of several components of a vehicle. For example, the ECU:
\nThe software embedded in an ECU receives input data from a variety of sources when it runs auto-diagnostic tests.
\nWith relation to the activities that the software of an ECU has to perform, identify two of the sources that provide input data to the ECU.
\nWith relation to the activities that the software of an ECU has to perform, suggest one reason why the auto-diagnostic program in the ECU depends upon the make and model of the vehicle.
\nVehicles are tested for their exhaust gas emissions using simulation software at specialist garages. During a period of 5 minutes, a vehicle with the engine switched on is monitored for emissions of carbon dioxide (CO2) and fine particulates. The software uses 3D visualization techniques to display these parameters on a screen for the whole duration of the test.
\nExplain how emissions of CO2 and fine particulates could be represented in 3D by the software.
\nAward [2 max].
Award [1] for each of the two requested elements that provide input.
Accept any ATD sensor explicitly stated by name.
Accept: speedometer, fuel gauge, brake pads, human pushing a button.
Do not accept: temp regulation unit (or any unit that is integrated in ECU).
Award [2 max].
May depend on the car maker and patents may be involved;
For example, internal communications protocols across different systems may not be revealed;
Different vehicles have different uses;
It doesn’t make sense to have the same firmware for different requirements;
Different models operate at different parameters,
Requiring different algorithms;
Different Countries may have different regulations;
Therefore country-specific ECUs for the same model/type of car;
Award [4 max] for one example with explanations.
\nExample answers:
The quantity and/or direction of diffusion of CO2 and fine particulates can be mapped using colour plots;
Over the whole duration of the test in a 3D space;
Choosing a colour in an intuitive way;
To show how the density evolves over time;
Examples:
Plotting 3D points for CO2 with vectors x,y,z ; // can be given BOD
Where x = time;
y = density of CO2;
z = temperature;
Note: Do not accept generic answers that describe the process of 'rendering'.
\nA school teacher decides to write a program to store class records and marks. Part of this program involves using a sort algorithm. The algorithm shown is a selection sort and to test it, the teacher has set up an array VALUES[]
with 5 elements of test data.
LIMIT = 4\n
loop COUNTER1 from 0 to LIMIT – 1
MINIMUM = COUNTER1
loop COUNTER2 from COUNTER1 + 1 to LIMIT
if VALUES[COUNTER2] < VALUES[MINIMUM] then
MINIMUM = COUNTER2
end if
end loop
if MINIMUM ≠ COUNTER1 then
TEMPORARY = VALUES[MINIMUM]
VALUES[MINIMUM] = VALUES[COUNTER1]
VALUES[COUNTER1] = TEMPORARY
end if
end loop
Copy and complete the table below to trace the algorithm using the data set:
20, 6, 38, 50, 40
With reference to the algorithm in the flow chart, construct this algorithm in pseudocode so that it performs the same function.
\nState the type of sort in the algorithm constructed in b(i).
\nConstruct an algorithm fragment to output the data in the array VALUES[]
Award [5 max].
Both COUNTER1
and COUNTER2
correct;MINIMUM
column correct;
Final VALUES[]
0, 1, 2 correct;
Final VALUES[]
3, 4 correct;TEMPORARY
column correct;
Note to examiners:
Allow follow through (FT).
In case of different representation of values in columns COUNTER1 and COUNTER2, then FT, award marks for the correct values of the variables MINIMUM and TEMPORARY.
Award [3 max].
Use of correct nested loops;
Correct use of flag;
Inner loop checking adjacent cells;
Values being swapped if necessary;
Example algorithm 1:
\nLIMIT = 4\n
FLAG = TRUE
loop while FLAG = TRUE
FLAG = FALSE
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
FLAG = TRUE
end if
end loop
end loop
A recursive solution is allowed at HL. SL candidates who submit an above level recursive solution should also receive credit.
\nVersion 1 – basic recursive solution
\nAward [3 max].
BUBBLESORT defined as a procedure with correct pass through parameters and end/return statement;
Correct loop with values swapped if necessary inside procedure;
Recursive call of BUBBLESORT with parameters passed;
Correct condition for recursive call;
Example algorithm 2
\nLIMIT = 4\n
BUBBLESORT(VALUES, LIMIT)
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
end if
end loop
if LIMIT – 1 > 1 then
call BUBBLESORT(VALUES, LIMIT - 1)
end if
end BUBBLESORT
Version 2 – more efficient recursive solution
\nAward [3 max].
BUBBLESORT defined as a procedure with correct pass through
parameters and end/return statement;
Correct loop with values swapped if necessary inside procedure;
Recursive call of BUBBLESORT with parameters passed;
Correct condition for recursive call;
Correct use of flag;
Example algorithm 2
\nLIMIT = 4\n
BUBBLESORT(VALUES, LIMIT)
FLAG = FALSE
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
FLAG = TRUE
end if
end loop
if LIMIT – 1 > 1 and FLAG = TRUE then
call BUBBLESORT(VALUES, LIMIT - 1)
end if
end BUBBLESORT
Bubblesort;
\nAward [2 max].
Use of (any type of) loop;
Correct output statement;
Example algorithm:
\nloop COUNTER from 0 to LIMIT\n
output VALUES[COUNTER]
end loop
Those candidates who are proficient in programming easily got full marks. The others did not complete the exercise or completed it incorrectly.
\nAn image processing system analyses colour images of architectural landscapes. The system compares any new images with existing ones stored in a knowledge base. The purpose of the system is to extend the knowledge base with images of the same scenes taken either from different perspectives or at different times of the year or with different weather conditions.
\nExplain how cluster analysis can be used to achieve the aims of the system that is described above.
\nDiscuss the appropriateness of using genetic algorithms to compare the processed images with those stored in the knowledge base.
\nAward [4 max].
Cluster analysis will attempt to group together images;
Into groups that have certain similarities;
This will be achieved by looking at characteristics;
Such as the presence of horizontal/vertical lines/windows/spires etc.
Award [6 max]:
Award [2] + [2] + [2].
Award [2] for a description of GA, such as:
GA uses a fitness function (based on stored data);
To validate/discard the “adequacy” of some detected features;
Award [2] for one reason for appropriateness with amplification.
The features in images have been extracted in previous processing;
And can be represented in a suitable way to be used with genetic algorithms;
Award [2] for one reason against appropriateness with amplification.
One has to decide which features shall drive the recognition process;
Choosing the wrong feature may lead to incorrect results;
If the GA merges similar features to build broad classes;
Then the recognition may not be precise enough;
If the GA focuses on several small details taken in isolation;
A limited number of features may be recognised;
A two-dimensional array is used to store customer details for a mail order company such that each row of the array represents a customer record and each column represents a specific field. The fields currently in use are: LASTNAME, FIRSTNAME, ADDRESS1, ADDRESS2, ADDRESS3, CITY, POSTCODE
.
The array currently holds 512 records.
\nThe company wishes to print a number of mailing labels, such as the one shown below, that will go to all customers called who live in .
\nA singly linked list has been created including the following surnames; Bale, Cousens, Davies, Pugh, Williams
.
Construct the pseudocode that will find how many customers live in the city of Cardiff
and display the results.
Construct an algorithm that will enable the company to print the mailing labels for all customers called Jones
who live in Cardiff
.
Explain the steps to insert “Jones”
into this singly linked list. You may draw a labelled diagram in your answer.
Outline one example of where a circular linked list would be used in preference to a linear linked list.
\nAward [5 max].
Initialization of TOTAL before loop and output of result after loop;
Use of any loop with correct limits;
Correct row and column subscripts of two-dimensional array;
Correct comparison in if statement;
Totalling within if statement, if statement inside loop;
Note to examiners: Do not accept flowcharts.
\nExample algorithm 1:
\nSEARCH = \"Cardiff\"\n
TOTAL = 0
loop COUNTER from 0 to 511
if SEARCH = CUSTOMERS[COUNTER][5] then
TOTAL = TOTAL + 1
end if
end loop
output \"The number of customers is \", TOTAL
Example algorithm 2
\nTOTAL = 0\n
loop COUNTER from 0 to CUSTOMERS.length()-1
if CUSTOMERS[COUNTER][5].equals( \"Cardiff\")
//accept CUSTOMERS[COUNTER][5]== \"Cardiff\"
then TOTAL = TOTAL + 1
end if
end loop
output TOTAL
Note to examiners:
The array structure is not given in the question.
If array subscripts begin with 1, then award 1 mark for loop COUNTER from 1 to 512
and 1 mark for CUSTOMERS[COUNTER][6]
Award [5 max].
Use of any loop with correct limits;
Correct row and column subscripts of two-dimensional array;
Correct comparison in if statement
Output of all row elements(fields)
Output correctly formatted
Note to examiners: Accept flowcharts.
\nExample algorithm 1:
\nSEARCH1 = \"Jones\"\n
SEARCH2 = \"Cardiff\"
loop COUNTER from 0 to 511
if CUSTOMERS[COUNTER][0] = SEARCH1 then
if CUSTOMERS[COUNTER][5] = SEARCH2 then
output CUSTOMERS[COUNTER][1] \" \" CUSTOMERS[COUNTER][0]
output CUSTOMERS[COUNTER][2]
output CUSTOMERS[COUNTER][3]
output CUSTOMERS[COUNTER][4]
output CUSTOMERS[COUNTER][5]
output CUSTOMERS[COUNTER][6]
end if
end if
end loop
Example algorithm 2:
\nR=0\n
loop while R <= 511
if CUSTOMERS[R][0]==\"Jones\" and CUSTOMERS[R][5]== \"Cardiff\"
then
output CUSTOMERS[R][1], CUSTOMERS[R][0]
loop K from 2 to 6
output CUSTOMERS[R][K]
end loop
end if
R=R+1
end loop
Note to examiners:
Since “Jones” can be either a first or last name, accept
CUSTOMERS[COUNT][1] == SEARCH1
and the first output line
output CUSTOMERS[COUNT][0], CUSTOMERS[COUNT][1]
Award [5 max].
Accept correct answers given as diagrams or written in text applying the following marking points:
Award [5 max] if candidate explained the steps to insert “Jones”
into sorted list at correct place.
Award [1] for each of the following steps, up to [5]
Create a new node with data field Jones
and pointer field;
Start searching from the beginning of the list;
Find the location/position where the new node is to be inserted (Jones
to be inserted after Davies
);
Set the pointer in the new node (containing Jones) to the pointer in the node containing Davies (to point to the node containing Pugh
);
Set the pointer in the node containing Davies
to point to the new node (Jones
);
Award [3 max] if candidate explained only the steps to insert “Jones”
at the end of the list.
Award [1] for each of the following steps
Create a new node with data field Jones
and pointer field NIL;
Start searching from the beginning of the list to find the last node (Williams
);
Set the pointer in the last node (containing Williams
) to point to the new node (Jones
);
Award [3 max] if candidate explained only the steps to insert “Jones” at the beginning of the list.
Award [1] for each of the following steps, up to [3]
Create a new node with data field Jones
and pointer field;
Set the pointer in the new node (containing Jones
) to the external pointer (which points to the beginning of the list/to the first node in the list (Bale
));
Set the external pointer to point to the new node (Jones
);
Award [2 max].
Award marks for the use of circular lists (rather than linked lists) in an application (accept examples);
in which any node can be a starting point / which traverses the whole list by starting from any point;
to repeatedly go around the list;
Used to allow multiple applications to run in a PC;
The operating system cycles through each one in time giving each a slice of time to execute;
Used for the implementation of a (circular) queue;
The end of the queue points to the beginning, eliminating the need to maintain both front and rear pointers;
Used in multiplayer gaming environment;
The OS cycles through one player at a time using time slicing;
A media playlist that repeats (endlessly);
The last song (node) points to the first song;
Those candidates who are proficient in programming easily got full marks. The others did not complete the exercise or completed it incorrectly.
\nPart (c) seems to have split the cohort; strong candidates often responded with full and correct answers, however there were many responses that were completely wrong.
\nNot many candidates were able to outline a good example of the use of a circular list in preference to a linear linked list in Part(d).
\nNeural networks.
\nGenetic algorithms and neural networks are being used in a variety of scenarios. For example, a genetic algorithm may be used to organize timetables for trains whereas a neural network may be used to predict fluctuations between the exchange rates of different currencies.
\nFigure 1 shows an example of a neural network. It includes inputs, a hidden layer and outputs.
\nFigure 1: A neural network
\nMany toy companies are considering the use of machine learning using either supervised learning or unsupervised learning. MAGS, a large IT software company, has recently developed A Doll Called Alicia that allows children to interact with it.
\nA Doll Called Alicia uses machine learning to ensure the child can have the best possible communication with the doll.
\nDescribe the difference between a genetic algorithm and a neural network.
\nIdentify two ways in which the neural network could be modified that may improve its performance.
\nDescribe the difference between supervised learning and unsupervised learning.
\nExplain why the machine learning capabilities of A Doll Called Alicia may lead to instances when the child and the doll cannot communicate effectively.
\nCompanies such as MAGS are considering products that use unsupervised learning rather than supervised learning.
\nExplain the benefits of unsupervised learning in developing products such as A Doll Called Alicia.
\nAward [4 max].
A genetic algorithm works in the same way as an evolutionary process whereby it starts with a large population;
And uses an iterative process where the fitter solutions are selected and input into the next cycle until the exit criteria are satisfied;
Whereas neural networks attempt to mimic the process of the brain;
And can be used/trained to recognize patterns;
Award [2 max].
Increase the number of inputs;
Increase the number of hidden layers;
Award [4 max].
Supervised learning is when the outcome related to a given input is already known;
And so, the “learner” can recognize objects and name them based on the labels already given;
Whereas unsupervised learning is when no examples of outcome are given to help with the learning;
And so, the “learner” must deduce its own solutions e.g. classifying similar objects by colour or shape;
Award [4 max].
The language of the child may not have been programmed into the doll;
The child may not speak clearly;
The child’s language may not be sufficiently developed to apply syntax correctly;
The child may refer to something not in Alicia’s “recorded” content, or that Alicia has not previously “learnt”;
Award [6 max].
Unsupervised learning can be used for bridging the causal gap between input and output observations;
Instead of finding the causal pathway from inputs to outputs;
By building the model upwards from both sets of observations;
In the hope that the gap is easier to bridge in the higher levels of abstraction;
Possible to learn larger and more complex models;
e.g. the connection between two sets of observations;
Most candidates were able to provide a reasonable description of differences between a genetic algorithm and neural network.
\nThe majority of the candidates answer this question correctly.
\nThe majority of the candidates were able to provide a reasonable description of supervised and unsupervised learning. However, a few of them were unable to develop the responses beyond the generic points.
\nThe majority of the candidates were unable to provide a reasonable response for this question. The responses were mostly limited to a few generic points.
\nMany candidates reasonably answered this question. However, the majority of the responses lacked variety in points specific to the question. The responses also lacked further explanation and were mostly limited to the identification of points and some description.
\nFigure 2 below shows a web graph that is a simplified representation of the World Wide Web.
\nFigure 2: a simplified representation of the World Wide Web
\nWeb crawlers move through the web, indexing pages to provide information for search engines. When a web crawler arrives at a page it uses several criteria to decide whether to index that page or not.
\nIdentify the nodes that represent web pages in the strongly connected core (SCC).
\nIdentify the nodes that represent web pages connected by a tube.
\nOutline why web page E would be given a higher ranking than web page C using the PageRank algorithm.
\nIdentify three criteria that may be used by a web crawler to decide whether to index a web page or not.
\nThe following information shows the number of active users (in millions) on different social media sites.
\nDiscuss whether the application of power laws is appropriate to predict the future number of active users on these social media sites.
\nAward [1 max].
D, E, F, G;
Award [1 max].
H & K;
Accept H & L & K;
Award [2 max].
Both pages have the same number of in-links (i.e. 2);
However, the links to page E come from pages that have a greater number of in-links than the pages that link to C / E is connected with SCC while C has two in-nodes / in-links;
The PageRank algorithm counts links to pages recursively;
A PageRank algorithm will give a greater weighting to the pages that link to E;
Therefore, the algorithm will place E higher up the ranking than C;
Award [3 max].
Whether there are any meta-tags present that restrict / guide indexing (e.g. a “robot exclusion protocol”);
Whether there is a robots.txt file linked to the page that gives instructions to the web crawler;
Whether the page has broken / dead links;
Whether the page content / meta information matches any specialism/type sought by the web crawler (e.g. some crawlers specifically target academic content);
There is no header with meta-tags;
Whether the page has ever been indexed before;
Whether the page has changed since it was last indexed;
How long ago / how frequently the page has been indexed (web-crawlers will tend not to index pages too frequently as this increases load on the web server);
Award [5 max].
\nReasons why power laws may be appropriate
The number of users shown for each site appears to follow the general pattern of a power law distribution / is consistent with the general principles of power laws (the “rich get richer”);
It's likely/reasonable to assume that sites with large numbers of users will tend to attract more new users than sites with fewer users;
This may be particularly true of social media sites where a high number of existing users may equate to a more diverse/engaging/attractive experience for new users;
Reasons why power laws may not be appropriate
However, correlation does not equal causation. / Just because the sites appear to exhibit a power law distribution, it doesn't mean that their growth is governed by a power law;
Other factors may be more significant (e.g. the demographic / region a social media site attracts, changing fashion, the policies of the sites themselves);
Sites that were very popular in the past but diminished/died-out may suggest that power laws are not the only / main factor influencing future development (e.g. MySpace);
Most candidates answered this correctly.
\nMost candidates answered this correctly.
\nMost candidates answered this correctly but some missed making clear reference to the actual links in the question.
\nMost candidates answered this correctly though a few missed covering all the specifics of the question.
\nMost candidates did not structure the answers so they could not meet the requirement of the specifics of this question.
\nA mobile phone has been developed with its own dedicated operating system and is to be used as part of a smart home system in Singapore. The smart home system includes a centralized air conditioning system, a burglar alarm and a surveillance system.
\nIdentify two functions of an operating system.
\nExplain one benefit of using a dedicated operating system on the mobile phone instead of a generic operating system.
\nExplain how sensors and microprocessors are used to ensure that the air conditioning system is able to maintain a constant temperature in the smart house.
\nThe developers of the smart home system are considering developing a smart home system that uses a distributed control system to manage the temperature.
\nContrast the use of a distributed air conditioning system with a centralized air conditioning system for maintaining a constant temperature in the smart home.
\nAward [2 max].
Managing memory;
Managing peripherals;
Processor management;
Scheduling;
Note to examiners: allow any valid feature of an operating system
\nAward [3 max].
\nExample 1
A dedicated operating system for a mobile phone will take up less storage space than a full-sized operating system;
This will allow the device to function more quickly;
Because it doesn’t contain features that aren’t needed;
Example 2
A dedicated operating system for a mobile phone can be customized;
Benefits the end users;
As they deal with a familiar interface;
Example 3
The dedicated OS is designed specifically for the mobile phone (hardware equipment);
This avoids compatibility issues;
While a generic operating system is designed for multiple types of hardware (which can lead to compatibility / various issues);
Award [5 max].
A desired temperature is input/pre-set by the user;
Sensors detect temperature;
And regularly/continuously send (temperature) readings to the microprocessor;
The microprocessor compares the actual readings with the pre-set (by the user) / input temperature;
If the temperature is too hot/too cold the microprocessor sends signal to actuator;
To adjust temperature (no need for complex details regarding actions of a heating/cooling system);
Note to examiners: Award [1] for evidence of the use of analogue-to-digital converter (sensors) and/or digital-to-analogue convertor(actuators).
\nAward [3 max].
Award [1] for each contrast/comparison, up to [3].
Centralized system allows control at a central point, which is then transmitted to the various rooms whilst distributed system allows individual control of settings at each unit / room so is more flexible // Centralized system will have same or constant temperature throughout the home whilst distributed system allows individual control of setting at each room;
\nEasier to control settings centrally whilst distributed system is more complicated to control remotely (due to limited / no connectivity of the control system);
\nCentralized system is more difficult to install due to the connectivity required between the various components whilst distributed system is easier to install due to fewer connection issues;
\nIf a computer system / or any connection fails in the centralized system, the whole system is not able to function correctly whilst the distributed system as whole would still function correctly;
\nCentralized system is cheaper / has lower operational cost whilst distributed system is expensive as it requires additional hardware / software;
\nCentralized systems are difficult to expand whilst distributed systems are easily expandable because self-sufficient systems can be added or removed at any point in time without affecting the overall system;
\nAll parts were mostly well answered although many candidates lost marks for repetition and using vague common-sense terminology, rather than technical and complete terminology.
\nMachine translators are regularly used to translate text from one language to another. In spite of the advances that have been made in this field, the output may still need to be proofread by a human.
\nDescribe two problems that these translators may encounter when translating from one language to another.
\nAward [4 max].
Mark as [2] and [2].
Not all text can be translated literally;
Humans can bend the rules to make produce sense in the target language;
Machine translators can only use the data that has been programmed into them;
Cannot translate anything outside their knowledge base, e.g. obscure/new words/phrases;
Knowing which tone/register to use depends upon experience;
That machine learning algorithms do not yet have;
There are several 1000 different languages;
Linking all of them all is too big a task;
Identify two roles that a computer can perform in a network.
\nAward [2 max]
Client;
Server/email server/DNS server/file server;
Router;
Firewall;
Candidates were generally able to identify roles that a computer can perform in a network. However, some candidates incorrectly described actions that a computer performs in a network rather than stating actual roles.
\nHome banking allows individuals to perform operations over the Internet on their own bank accounts.
\nAccess to a bank’s home banking services requires, as a first step, identification and authentication of the user. Individuals log on the bank web site, and enter their own personal space by providing their full account number and a personal code that the bank gave them. The processing of this information takes place on the server side.
\nOutline the relationship between the Internet and the world wide web (WWW).
\nExplain why the choice of browser should not affect a customer’s ability to access their bank account details.
\nState two features that make HTTPS more suitable than HTTP in the context of home banking.
\nExplain why server-side processing is used in this case.
\nThe 20 most recent account transactions can be displayed on screen in a webpage that uses XML. A print-out of all transactions of the past three months may be obtained by clicking an onscreen button on the webpage. The print-out is landscape oriented and shows many more columns than are displayed on the screen.
\nDescribe how this processing takes place with reference to the use of XML and XSLT.
\nAward up to [2 max].
\nAward [1 max] for Internet and [1 max] for WWW.
\nInternet is a network of (networks of) computers that can communicate one with each other;
To exchange/access information through the WWW;
The WWW is a way to access/share/exchange information using software applications;
Using the Internet as a physical medium;
Internet allows the transmission of data;
That constitute the information that applications on the WWW may want to share/access/exchange;
The WWW provides, through hyperlinks, a level of connectivity of resources (logical connectivity);
Which can be physically sparse, but connected in a network in the Internet;
Award up to [4 max]:
\nAward [1] for defining the term “standards” and award [1] for a development up to [2 max];
\nAward [1] for defining the term “protocol(s)” and award [1] for a development up to [2 max];
\nStandards are applied by the browser;
For interpreting the HTML (XML);
So that the all information will appear, and also (more or less) as expected;
Protocols are used;
To build up the communication at different levels of the architecture;
All browsers will rely upon the same internet protocols (TCP/IP);
That is essential for interoperability in transmission/communication;
So that the IP address is retrieved (via the DNS server);
Award [2 max] for a generic response.
\nAward up to [2 max]:
HTTPS authenticates the web site;
HTTPS encrypts the data that need to be transferred;
Award up to [3 max]:
The bank needs to store all passwords in its server, including the credentials given to the users;
So that the comparison with the individual’s entry happens in the bank with the local database;
To the purpose of guaranteeing security;
And to possibly perform other operations (tracking log-ins or transactions);
The bank cannot send out password to be processed on the client’s side;
This will not be a guarantee for security for the bank/it may introduce vulnerabilities/sensitive data cannot be sent out in the public domain;
Hence the comparison with the individual’s entry must happen in the bank with the local database;
Note: Do not award marks between clusters.
\nAward up to [3 max]:
XML is used to create/organize the data on the internal database;
By clicking the virtual button a script is run that transforms the information on the database into the print-out form;
Stylesheet in XSLT transforms XML into an output form;
The script contains instructions on how to access the database (which fields are relevant) and how to present the information for the final form for the printer;
By clicking the virtual button a script is run;
Which uses XML to retrieve/select the required data from the internal database/server;
Which is displayed using XSLT into an appropriate output form (on the screen);
The script also contains instructions for the correct printout of data;
Note: Do not award marks between clusters.
\nFull details of the customers are stored as objects of the Customer class. This class is partially shown below:
\npublic class Customer\n
{
private String memberId;
private String email; //email address (assume only 1 per customer)
public Customer(String a, String b)
{
memberId = a;
email = b;
}
public String getMemberId()
{
return memberId;
}
public String getEmail()
{
return email;
}
}
The objects can be accessed through the linked list allCustomers
which is declared in the main (driver) class as follows:
LinkedList<Customer> allCustomers = new LinkedList<Customer>()
Outline why a linked list structure has been chosen for allCustomers
.
Construct the method goldMails()
that will return an ArrayList
containing the email addresses of all current “Gold” members. You should make use of any previously defined methods.
Example 1:
The link list will enable space to be allocated dynamically/will only take up the space required;
Because the number of customers is unknown / customers may join or leave the loyalty scheme during the year;
Example 2:
Customers / objects / nodes can be easily added or deleted;
So customers may join or leave the loyalty scheme during the year;
public ArrayList goldMails()\n
{
ArrayList al = new ArrayList(); // Allow use of <String> identifier
int s = allCustomers.size();
int x = 0;
while(!(allPoints[x] == null)) // Allow(allPoints[x]!=null)
{
if (allPoints[x].isGold())
{
String a = allPoints[x].getMemberId();
for (int y = 0; y < s; y++)
{
String b = allCustomers.get(y).getMemberId();
if (a.equals(b)) // allow =
al.add(allCustomers.get(y).getEmail());
}
}
x = x + 1
}
return al;
}
Award marks as follows:
Declaring a new ArrayList
(with or without the String identifier);
Looping through the allPoints
array;
Testing for “Gold”;
Loping through the allCustomers
linked list (using the size or an iterator);
Correct check for identical ids;
Adding the email to the ArrayList
;
Returning the arraylist;
Note:
\nfor
(Customer currCust : allCustomers
).Describe one method of implementation for a new computer system.
\nAward [2 max]
\nParallel;
old system and new system are operated at the same time until the current system is proved to be successful;
Pilot;
the new (whole) system is operated in one branch/part of the organization before it is rolled out to the whole organization;
Direct;
the new system replaces the old system in an immediate switchover;
Phased;
the new system in phases / stages, gradually replaces parts of the old system until the current system is completely replaced by the new system;
The vast majority of candidates were able to name a method of implementation for a new computer system and then went on to describe it, to achieve both marks. Some candidates, however, successfully named a method, but the description given could have applied to any method of implementation, so it was not specific enough for the second mark.
\nDraw the logic circuit represented by the following truth table.
\nAward [2 max]
\nNote: There could be many answers that are correct.
\nExample 1
\nCorrect inputs and XOR gate;
NOT gate, correct final output and link from XOR gate;
Example 2
\nAward [2] max.
2 marks, 1 mark for each correct input in OR gate
Note: in this example the two inputs in OR gate are (NOT A AND NOT B )and (A AND B).
1 mark for drawing any 3 gates (complete with inputs and outputs)
A wide range of correct logic circuits were seen in answer to this question, including logic gates from the syllabus – the XOR and NOT gates, as well as above level responses, including the XNOR gate. Some candidates incorrectly used regular OR or NOR gates in their solutions.
\nMany city authorities have realised the opportunities that social media and collective intelligence can provide.
\nNarayan City is considering using data gathered from citizens using traffic apps on their GPS-enabled mobile devices to help plan future changes to the layout of the road network in and around the city.
\nOutline one advantage for Narayan City of using collective intelligence to solve complex problems such as changing the layout of roads.
\nMany social networking sites allow users to classify their posts and responses, for example by adding one or more “hashtags”.
\nTo what extent does the increasing number of social networking sites and the creation of folksonomies contribute to web users modifying their online behaviour?
\nAward [2 max].
Enables Narayan City to gather data from many more sources than would be possible through the use of traditional data-gathering methods;
This will enable far more information to be gathered far more quickly than using traditional methods;
Data is generated proactively by citizens' actions;
Therefore, data more likely to reflect what citizens actually do rather than what they might claim they do;
Improves the accuracy of the data;
Existing strategies used by citizens can be incorporated into future planning;
for example, using side-roads to optimize journey times/timing of journeys to avoid major congestion;
Thus, helping to ensure that future plans are optimized / tailored to citizens’ needs;
Data gathering and analysis can be automated;
Therefore, it is very cost effective;
Thus, it is able to be scaled / increased without major impacts on budget;
Data monitoring and collection is real-time;
Therefore, the effect of implementing plans will be reflected by visible changes in use patterns / journey times / routes taken;
Thus, the city council can get reliable feedback/evaluation of how effective their plans are;
Award [6 max].
\nPossible changes in user behaviour
\nAccept other reasonable answers that convey similar ideas.
\nMost candidates answered this correctly.
\nMost candidates answered this correctly.
\nIdentify two reasons why patches may be necessary for an operating system.
\nIdentify two methods that can be used to obtain these patches.
\nAward [2 max]
Allows bugs/error in operating system to be repaired;
Allows new features to be added to operating system (such as security updates, improving functionality, improving usability, etc.);
Allows compatibility issues to be improved;
Award [2 max]
Automatic patches/updates sent (via internet);
User requested updates (via internet);
Patches sent on CD/DVD/memory stick;
Most candidates were able to identify at least one reason why patches may be necessary for an operating system, with a large proportion correctly naming two reasons.
\nSome candidates correctly identified one or two methods of obtaining patches, for example, by downloading them or installing them from an external device. However, many candidates incorrectly gave the same method twice, for example, by suggesting two methods of downloading patches.
\nConsider the following recursive method.
\npublic void recursionEx(int x)
{
if(x != 0)
{
System.out.println(x);
recursionEx(x - 1);
System.out.println(x);
}
}
Identify two essential features of a recursive algorithm.
\nCopy and complete the following table to show the output when the method is called by: recursionEx(3)
;
Explain what would happen if the method was called by recursionEx(-3)
.
Identify three features which should be included in either program code or UML diagrams to help programmers understand and modify programs in the future.
\nThe method calls itself;
With a changing parameter;
There is a base (terminating) case;
Award marks as follows:
Outputting 6 values;
Correct parameter list
First 3 output numbers correct;
Last 3 output numbers correct;
An infinite loop / program will never end/terminate;
Will eventually cause the program to crash;
As it runs out of memory for the parameters stored / Stack overflow;
As the base case is never reached;
Comments can be added;
Use of meaningful names;
Correct indentation;
Relationships/dependencies shown between class (UML) diagrams;
The organizing school arranges for visiting students to stay with a host family. The information about each of the visiting students is stored in a file. The student records are sorted by name. Some of the other variables included are school, gender, age and host family name, as shown in the UML diagram below.
\nA program needs to be written to match visiting students with host families. The matching process requires data to be manipulated extensively (adding, editing, deleting). The file will be read into RAM.
\nThis program will be used for different events with different numbers of visitors. Therefore, it will be implemented using a dynamic data structure.
\nIt has been decided to use a single linked list named guests
to store and manipulate the Visitor
objects.
Consider the following diagram which represents the list guests
.
The following recursive method has been written to act on the list guests
.
public void recursive(int k, char a)\n
{
if (k == guests.size())
{
output (\"no such record\");
}
else
{
Visitor current = guests.get(k);
if ((current.getGender() == a) && (current.getAge() > 15))
{
output current.getName();
}
else
{
recursive(k + 1,a);
}
}
}
Define the term object reference.
\nOutline one reason why a linked list may be more suitable than a binary tree in this particular situation.
\nConstruct the code needed to instantiate an object guests
of the LinkedList
class.
Construct the code for the method penultimate()
that returns the second to last element in the linked list guests
. You may assume that guests
is locally accessible.
Using the data provided in the diagram, trace the call recursive(0,'F')
, clearly showing the levels of recursion.
Outline one reason why the use of a recursive method may be inappropriate for linked lists.
\nDue to unforeseen circumstances, schools may cancel their participation in an event at the last minute. Therefore, a method is needed to remove all the visiting students of one school from the linked list guests
.
Construct the method removeSchool
that takes the name of a school as parameter and removes all students of that school from the list guests
.
Award [1 max].
A reference is a variable whose value points to the location of an object (in memory);
Award [2 max].
The ease of which pointers or references can be manipulated in a linked list;
Allows easier addition/deletion of objects (compared to a binary tree);
It can be difficult to manipulate pointers or references in a binary tree;
Which makes it more difficult to add or delete objects in a binary tree;
Award [1 max]. Allow missing final parentheses.LinkedList<Visitor> guests = new LinkedList<Visitor>()
;
Award [4 max].
Award [1] for correct signature.
Award [1] for using size()
or finding the correct size of the linked list *
Award [1] for correctly returning the penultimate element.
Award [1] for correctly returning null if there is no penultimate element in the list.
public Visitor penultimate(LinkedList guests) // parameter\n
is optional
{
Visitor result = null;
if(guests.size() > 1) {
result = guests(guests.size()-2);
}
return result;
}
*Note to examiners – allow a method that will iterate through the class as long as a valid LinkedList class methods are used.
\nAward [4 max].
Award [1] for showing the second call to the method
Award [1] for showing the third call to the method (and no subsequent calls)
Award [1] for including the correct test outcome
Award [1] for correct output
recursive(0,'F')\n
k = 0
current is Ana
test incorrect
recursive(1,'F')
k = 1
current is Ben
test incorrect
recursive(2,'F')
k = 2
current is Defne
test correct
output Defne Tasci
Award [2 max].
For a large linked list, this would require a large number of recursive calls / become very memory intensive;
Which may cause stack overflow;
A linked list only allows for sequential access;
Therefore, using recursion would not lead to any gains in efficiency;
Award [6 max].
Award [1] for the correct initialisation of index.
Award [1] for correct loop/iterator declaration and initialisation
Award [1] for the correct assignment to current.
Award [1] for the correct comparison of school (allow use of =)
Award [1] for the correct remove (allow correct use of next pointer)
Award [1] for the decrementing index after remove.
Award [1] for correct increment of index / use of iterator.next()
. Within context.
Example answers:
\npublic void removeSchool(String school) {\n
int index = 0;
Visitor current;
while(index < guests.size()) {
current = guests.get(index);
if(current.getSchool().equals(school)) {
guests.remove(index);
index--;
}
index++;
}
}
public void removeSchool(String school) {
Visitor current;
for(int index = 0; index < guests.size();index++) {
current = guests.get(index);
if(current.getSchool().equals(school)) {
guests.remove(index);
index--;
}
}
}
public void removeSchool(String school) {
Iterator<Visitor> itr = guests.iterator();
Visitor current;
while(itr.hasNext()){
Visitor current = itr.next();
if(current.getSchool().equals(school)) {
itr.remove();
}
}
}
Not many candidates related this term to a location in the memory.
\nA binary tree may be ideal when searching for items, but when extensive editing is required then the ability of a linked list to easily manipulate its pointers makes this structure the preferred option.
\nReasonably well answered.
\nWhen answering questions regarding a library class then the use of the correct methods are expected. Not many candidates were familiar with the use of the size method.
\nThis was a quite straightforward trace of a recursive algorithm which most candidates completed well.
\nSome candidates alluded to the excessive use of memory if recursion was used.
\nMany candidates made a reasonable attempt but too many tried to use generic methods instead of ones specifically pertaining to this class.
\nA group of art students have taken three examinations in the school year. Each of the three examinations has a maximum mark of 100. Each student’s total mark for the year is the sum of the marks from the three examinations.
\nThe students have passed unless their marks meet one or both of the following failing conditions:
\nConsider the following relation created by the teacher of this group of students.
CLASS_TABLE
\nWith reference to the relation CLASS_TABLE distinguish between data and information.
\nDefine the term entity.
\nState the entity for this example relation.
\nIdentify an appropriate data type for Student_ID.
\nExplain the role of data validation and data verification.
\nExplain how Total could be validated.
\nDescribe the steps in a query that will output the names of all students who earned the maximum mark on Exam_Two.
\nDescribe the steps in a query that will output the Student_IDs of all candidates who passed.
\nAward [1] for stating what data is.
Award [1] for stating what information is.
Award [1] for stating the difference using an example.
Example answer 1
Data is a raw fact, for example, “Joe Skrin” is data/a string;
Whilst information is data which has meaning;
In this table “Joe Skrin” is the name of an art student/who had an examination/ who passed an examination;
Example answer 2
For example, number 99 is data;
In this database, total 99 is information;
Because it has meaning, it represents a student’s mark/it shows that the student failed;
An entity is some unit of data that can be classified and has stated relationships to other data units;
A real-world object with attributes that is represented as data in a database;
In relation to given example, the entity is a single student about whom data can be stored as a record in this relation;
\nString/varchar/char/alphanumeric;
\nAward up to [4 max]. Award [1] for stating the purpose of data verification and [1] for further explanation, up to [2 max]. Award [1] for stating the purpose of data verification and [1] for further explanation, up to [2 max].
\nData verification is a process that ensures the accuracy of data;
(Accurate data is important because strategies devised based on incorrect data lead to inconsistent decision making;)
Data verification is conducted using proofreading/double entry checks/new data cleansing software and technologies have been developed to automate the data verification process;
Data validation ensures the data is logical and reasonable;
Data validation is a computer-generated process using codes to validate a range of data;
Data verification and data validation (applied in combination) provide quality assurance/make sure that processes and strategies are not driven in the wrong direction;
\nAward up to [2 max].
\nExample answer 1 (assuming the value of the Total is calculated)
The calculated value for the total mark must be an integer;
In the range from 0 to 300;
(If it is not, an error message could be output;)
Example answer 2 (assuming the value of the Total is entered)
The entered value for the total mark must be an integer;
In the range from 0 to 300;
The sum of marks on the three exams can be calculated and should be equal to the entered value for Total;
(If it is not, an error message could be output;)
Example answer 3
Total is a validated field;
Therefore, if all the individual test fields are validated, the Total value will automatically be within the specified range;
Award [1] for selecting the correct field from the table and [1] for a correct comparison, up to [2 max].
\nSELECT Student_Name FROM Class_Table\n
WHERE Exam_Two == 100
Note: Accept logically equivalent answers.
\nAward marks as follows up to [4 max].
Award [1] for selecting the correct field from the table.
Award [1] for each of the correct comparisons, up to [4 max].
Award [1] for using logical operators correctly.
Example answer 1
\nSELECT Student_ID FROM Class_Table\n
WHERE Exam_One >= 30 and Exam_Two >= 30 and
Exam_Three >= 30 and Total >= 150
Example answer 2
\nSELECT Student_ID FROM Class_Table\n
WHERE not (Exam_One < 30 or Exam_Two < 30 or
Exam_Three < 30 or Total < 150)
Note: Accept logically equivalent answers.
\nCalculate the denary (base 10) equivalent of the hexadecimal number BF.
\nAward [2 max]
11 × 16 + 15;
191;
Allow solution via binary route 1 mark for working, 1 mark for answer.
Allow both marks if correct answer given.
Candidates were required to convert a hexadecimal number to its denary equivalent. A range of different correct methods for doing this was seen, with candidates receiving the appropriate credit. However, some candidates found this question difficult and were unable to provide a correct answer or demonstrate a method of solution.
\nRunAndBeyond is a sports knowledge website, offering expert knowledge and technical tips on sport disciplines. Official teams and associations are invited to include some of their own multimedia digital resources to RunAndBeyond.
\nA team of triathletes, finding their sport discipline under-represented in the website, wants to contribute content for RunAndBeyond. The team intends to use a wiki in collaborating online with other similar interested groups in triathlon when creating and updating their own resource.
\nThe triathlete’s online resource provides a variety of references through external links, and one of them points to:
\nftp://files.tri-events.cc/site/index.php/en/general-info
\nThere are also external links on the website to videos and some of these are transferred using lossy compression. When these videos are transferred, they can either be streamed or downloaded for future viewing.
\nDescribe how a wiki can support the ongoing collaboration in producing the triathletes’ resource.
\nState the reason why the above link is a URL.
\nOutline the processing that takes place when the line of code above is executed.
\nSuggest why lossy compression should be the compression technique used.
\nThe RunAndBeyond website continually automatically updates its content regarding a live sporting event.
\nSuggest how a dynamic web page would function in providing this service to the user.
\nAward up to [3 max].
\nNote: An expansion from the technical/computational perspective only (not sociological one) is expected about aspects of the chosen method of online interaction.
\nAspects that can gain credit:
Editing, permissions layer, ownership, tracking of updates, security (open to vandalism/non-monitored contributors), open source (interoperability).
Software for wikis provides collaborative editing sharing of information of content, directly from the browser;
Updates are usually tracked in wikis (also to be removed afterwards) as they come from different authors / usually non-moderated / added content can also be removed later on (also by others);
The evolution of a wiki is more immediate and spontaneous because updates are immediately visible;
The wiki can easily be vandalized with incorrect/unauthoritative information, but it can also be quickly amended/corrected if this is realized quickly;
Award up to [1 max].
It specifies how to access the resource/show the path/contains domain name, with the ftp protocol;
Award up to [3 max]:
It sends a GET/PHP request to the server tri-events.cc;
To execute en/general-info (index.php);
And the result of this execution is made available to the client /browser (with ftp);
(It specifies to use the ftp protocol to send the request and to return the resource;)
Note: Do not accept DNS.
\nAward up to [4 max].
Lossy compression results in files of smaller size;
It may be needed for video streaming because the server provides execution through scripting;
And guaranteeing streaming without interruptions is a priority;
It may be a choice for downloading video for local execution to manage outgoing traffic on popular servers/increases the speed (using smaller files);
Award up to [4 max].
\nAward [1 max] for identifying a technology that is needed award up to [3 max] for an extension describing how the technology is used and interacts with other components.
\nExample 1:
An interactive web page that has an auto-refresh/automatic update extension;
So that every N seconds a script is executed to reload the page;
The web page is linked to an underlined database/data source
OR interrogates specific databases/news databanks;
That are distributed and collectively provide regular updates;
And they can be displayed back using the script;
Example 2:
A dynamic web page equipped with a RSS feed;
That collects/aggregates news from sources that cover that live event;
The feed is in form of an update in XML;
Therefore, it can be used to feed an underlining (distributed) database or the web page/uses syndication/can be immediately interpreted by the browser;
And it can then be processed by some script to be displayed back in the original web page;
Identify two reasons why fibre optic cable would be preferred over wireless connectivity.
\nAward [2 max]
Fibre optics allow faster transmission speeds;
Fibre optic cables are more secure/harder to break into;
Fibre optic cable transmission is more reliable/less likely to suffer interference;
Fibre optics allow transmission over longer distance;
Fibre optics allow greater bandwidth;
This question was answered very well with the vast majority of candidates able to give two reasons why fibre optic cables would be preferred over a wireless connection.
\nArtificial neural networks (ANNs) are being used in a variety of applications, including pattern recognition, game playing, classification and data mining.
\nAn ANN is being trained to recognize handwritten numbers by identifying them as a digit from 0 to 9.
\nAssume that each digit to be identified is input as an image made up of 30 × 30 pixels.
\nA simplified version of an ANN is shown below.
\nExplain one reason why ANNs are suitable for solving the types of problems found in these areas.
\nDescribe an appropriate set of data that could be used to train the network.
\nState the number of neurons that would be in the input layer.
\nState the number of neurons that would be in the output layer.
\nExplain the way in which the output from neuron D will be determined.
\nThe network is set up with initial values. The outputs are compared with the desired outputs.
\nIdentify the steps that now take place to train the network.
\nThe functions/mathematical relationships in these types of problems;
Which are required for use with traditional algorithms/non-ANN algorithms;
And are difficult/impossible to define;
Award up to [2 max].
Many sets of digits;
Using different pens/colours/thicknesses etc.;
Written by different people;
900;
\n10;
\nAward up to [3 max].
The product of;
The weights and the input values;
Will be summed for neurons A, B and C;
From this will be subtracted a bias/constant / This will be compared to a bias/constant/ A function will be applied;
Award up to [5 max].
The difference between the actual and desired outputs;
Which is the value of the cost function;
Leads to adjustments in the weights;
Of the neurons in the hidden layer(s);
The process is repeated;
Until the cost function reaches an acceptable value;
Or a certain number of iterations are made;
Distinguish between a variable and a constant.
\nAward [2 max]
The value of a variable can change while value of a constant does not change;
During program execution/ during run-time / while stored in the memory;
Candidates generally achieved at least one mark for this question by recognising that a variable’s value would change but that the value of a constant would not. Those who were able to expand that point and say where this would happen, for example, during the execution of a program, also achieved the second mark.
\nDefine the term peripheral.
\nA piece of hardware / a hardware device that is externally connected or attached / remotely connected or attached (to the computer system);
\nExample answer
A peripheral is an external (computer) device that is connected to a computer, such as a keyboard;
Candidates were generally able to name a peripheral device, but were less able to provide a complete definition, often failing to mention that it is ‘externally’ connected, or similar.
\nList the output from the given algorithm for the following input.
\n2, 6, 8, 9, 12, 15, 18, 20
\nloop for Count from 0 to 7\n
input NUMBER
if NUMBER div 2 = NUMBER / 2 then
if NUMBER div 3 = NUMBER / 3 then
output NUMBER
end if
end if
end loop
Award [3 max]
6;
12;
18;
Candidates were generally able to dry run the given algorithm and give the values of the various calculations, but unfortunately, not everyone identified the values that would actually be output, namely those divisible by both 2 and 3, but instead listed all the numbers from the input. The full range of marks was seen for this question.
\nDefine the term data packet.
\nAward [1 max]
A unit of data made into a single unit (that travels along a given network path);
A data packet travels through a network as a unit i.e. with all parts kept together;
Candidates generally understood what is meant by data packet and gave a sufficient response to achieve the mark.
\nIdentify two features of a graphical user interface (GUI).
\nAward [2 max].
Menus;
Dialogue boxes;
Windows;
Icons;
Pointers;
Buttons;
Note to examiners: allow other correct user interface features
\nCandidates offered a wide range of responses giving many correct features of a graphical user interface, including, for example, menus, toolbars, pointers and icons.
\nConsider the following example relation. It holds data about a number of teachers and students from different schools who volunteer to support the local community on particular days.
\nSCHOOL_VOLUNTEERS_TABLE (School_Name, Code, Address, Date, Num_Volunteers)
\nThe key attributes are underlined.
\nState what is meant by redundant data in databases.
\nExplain one issue that can be caused by redundant data in a database.
\nIdentify three characteristics of the 1st Normal Form (1NF) which are evident in this relation.
\nExplain why a compound key is used for the SCHOOL_VOLUNTEERS_TABLE relation.
\nThe following shows the normalized SCHOOL_VOLUNTEERS_TABLE relation:
\nSCHOOLS_TABLE
Code, School_Name, Address
VOLUNTEERS_TABLE
Code, Date, Num_Volunteers
Discuss whether these relations are in third normal form (3NF).
\nAward [1 max].
Redundant data means data that is held in two different places within a database;
Award [1] for identifying an issue caused by data redundancy and [1] for a brief explanation up to [2 max].
\nIt could give the system unwanted/unexpected results;
due to the use of inaccurate data;
It may lead to additional storage requirements;
As data is used more times than necessary;
Award up to [3 max].
Each attribute has a single value/is atomic;
All values for a given attribute are of the same data type;
Each attribute is unique;
This is a unique key;
There are no repeating fields;
There are no two identical tuples in this relation;
Order of attributes/tuples is not significant for the relation;
Key (Date + Code) is unique for each tuple;
Award [1] for identifying why a compound key is used for the SCHOOL_VOLUNTEERS
relation and [1] for a brief explanation up to [2 max].
The alternative is to use an autonumber field;
But this would use additional storage space;
Are used because it is not possible to designate a primary key from a single field;
Neither the code nor the date field on their own uniquely identify a record;
Is based on two primary keys in other tables;
Award up to [5 max].
\nExample answer 1
2NF = 3NF if there are no transitive relationships/if any non-key attributes are more dependent on another non-key attribute than the key field;Schools_Table
could be the above if a school had more than 1 address;
Then the Address
would depend upon the School_Name
;
And the Schools_Table
code would be split as follows:
(Code, School_Name
)
(School_Name, Address
);
If the school had only 1 address then 2NF = 3NF;
The Volunteers_Table
has no transitive dependencies;
There is no redundant data;
Example answer 2
A relation is in 3NF if it is in 2NF and it contains no transitive dependencies;
Assuming that schools name is not unchangeable;
OR there are two schools with different names and same addresses;
OR two schools with same name and different addresses;
Then the school name cannot be treated as a key;
From the 2NF (two created relations above) the functional dependencies are not evident in the relation School_Table (School_Name, Code, Address)
:
The relation given above (in 2NF) is also in 3NF;School_Table (School_Name, Code, Address)
Volunteers_Table (Code, Date, Num_Volunteers)
Define the term database transaction.
\nExplain the importance of durability in a database transaction.
\nIdentify two different types of relationships within databases.
\nDescribe the nature of the data dictionary.
\nIdentify four responsibilities of a database administrator.
\nAward marks as follow up to [2 max].
Award [1] for:
a unit of work/logical action;
performed on a database;
independent of other transactions;
changes state of the database;
Example answer 1
A database transaction is a logical unit that is independently executed;
For data retrieval or updates;
Example answer 2
A database transaction is a unit of work;
That is either executed in full or not executed at all;
Example answer 3
A database transaction is a way of representing a state change;
And has four properties, known as ACID;
Example answer 4
A database transaction usually means a sequence of steps, treated as a unit;
For the purposes of satisfying a client’s request;
Example answer 5
A database transaction is a process carried out on a database;
Which may change its state, for example: moving money between bank accounts;
Award up to [2 max].
\nExample answer 1
Durability is important because transaction data changes must be available;
Even in the event of database failure;
Example answer 2
Durability means that if the system says the transaction has been committed;
The client does not need to worry about it because transactions that have been committed will survive permanently;
Example answer 3
Durability in databases is an important property because it ensures transactions are saved permanently;
And do not accidentally disappear or get erased;
Award up to [2 max].
One to one;
One to many;
Many to one;
Many to many;
Award [1] for stating what a data dictionary is and up to [3 max] for describing its contents.
\nIt is a set of tables/a database that provides information/meta-data about the database;
\nA data dictionary contains
The definitions of records/entities in the database;
How much space has been allocated for and is currently used;
Default values for columns/attributes;
Integrity constraint information;
Names of (database) users, their privileges and roles;
Auditing information such as who has accessed or updated data records;
etc. (any other general database information);
They do not contain any actual data from the database, it contains only information for managing it (without a data dictionary a DBMS cannot access data from the database);
Data dictionaries are usually hidden from users to prevent them from (accidentally) deleting/changing/destroying its contents;
Award up to [4 max].
To direct and perform all activities related to a database system;
Installing and configuring software;
Creating new databases;
Designing the database schema and creating any necessary database objects;
Ensure database security is implemented to safeguard the data;
Back up and recover the database;
Work closely with application developers and system administrators to ensure all database needs are being met;
Apply patches or upgrades to the database as needed;
Training employees who use the database;
Identify one common feature found in the user interface of application software to improve its usability.
\nAward [1 max]
Toolbars;
Menus;
Dialogue boxes;
Candidates seemed to misunderstand what was required as a feature of the user interface for application software, which would be, for example, a menu or a toolbar, and gave answers such as colour, or answers related to accessibility, such as large fonts.
\nOutline one method of collecting information from stakeholders concerning the requirements for a new system.
\nAward [2 max].
Surveys;
(General) questions distributed to many stakeholders as a written or online document;
Interviews;
(Specific) questions asked of nominated stakeholders in an individual setting;
Direct observations;
Observer watches stakeholders performing their current tasks;
Most candidates named one of the recognised methods of collecting information at the start of the system design phase, notably questionnaires, interviews or observation; but not all correct answers were given an appropriate expansion for the second mark.
\nConstruct the truth table for the following logic circuit:
\nAward [4 max]
1 mark: 1–2 correct rows;
2 marks: 3–4 correct rows;
3 marks: 5–6 correct rows;
4 marks: 7–8 correct rows;
Candidates were able to construct correct truth tables and populate them sufficiently well to achieve some or all of the marks. Some candidates populated the inputs in a random fashion, rather than the standard method. This sometimes led to repeated lines or missing lines, causing the candidate to lose marks.
\nA shop sells only fruits and vegetables. Data about the products sold is held in the relation Greengrocer as follows:
\nGREENGROCER
\nProd_ID is the primary key.
\nThe relation above would be represented using the following notation:
Greengrocer (Prod_ID, Prod_Name, Prod_Price, Supp_Name, Supp_Contact, Supp_Phone)
\nIdentify an appropriate data type for Prod_Price.
\nConstruct the steps in a query to output the names of all products supplied by Veggy Co. with prices in the range from 4.00 to 10.00 inclusive.
\nOutline the redundant data in this relation.
\nExplain the problems that may arise for the following function performed on the given relation. In your answer, you should give an appropriate example: Inserting a new tuple with an item that is supplied by existing supplier.
\nExplain the problems that may arise for the following function performed on the given relation. In your answer, you should give an appropriate example: Deleting a tuple from the relation.
\nExplain the problems that may arise for the following function performed on the given relation. In your answer, you should give an appropriate example: Modifying a specific attribute value in the tuple.
\nConstruct the database in the 3rd normal form (3NF) using the notation
\nGreengrocer (Prod_ID, Prod_Name, Prod_Price, Supp_Name, Supp_Contact, Supp_Phone)You must show all your workings.
\nYou must show all your workings.
\nAward up to [1 max].
Real number/float;
Accept currency.
Award up to [3 max].
Award [1] for selecting correct field from the relation.
Award [1] for correct supplier name comparison.
Award [1] for correct checking the price range.
Award [1] for correct logical operations.
Example answer 1:
\nSELECT Prod_Name FROM Greengrocer\n
WHERE Supp_Name == 'Veggy Co.' AND Prod_Price >= 4.00 AND
Prod_Price <= 10.00
Example answer 2:
\nSELECT Prod_Name FROM Greengrocer\n
WHERE NOT (Prod_Price <4.00 OR Prod_Price >10) AND
Supp_Name == 'Veggy Co.'
Example answer 3:
\nSELECT Prod_Name FROM Greengrocer
WHERE NOT (Prod_Price <4 OR Prod_Price >10 OR Supp_Name !=
'Veggy Co.' )
Accept logically equivalent answers.
\nAward up to [2 max].
Redundant data unnecessarily repeats in a relation;
Supplier data (name, phone, contact) are repeated;
For every item that is supplied by the same supplier;
For example,
Items P118, P122 and P220 have the same supplier (Veggy Co)
Items P219, P111, P121 and P211 have the same supplier (Fruit and Veggie)
Note: Accept any correct example from the table given, such is the following:
\nAward up to [2 max].
Award [1] for explaining a problem that may arise (such as inconsistency, inaccuracy / unnecessary additional/repeated work needed when updating).
Award [1] for including example with reference to the relation given.
Example answer:
When inserting a tuple supplied by the existing supplier, for example, inserting:
All data about supplier should be accurately entered;
And consistent with the data about this supplier in all other tuples;
Award up to [2 max].
Award [1] for explaining a problem that may arise (such as inconsistency, inaccuracy).
Award [1] for including example with reference to the relation given.
Example answer:
Deleting a tuple could remove data which is not intended to be lost;
For example; deleting the following tuple.
Which is the only tuple in the relation which holds data about New Fruits suppliers (all data about this supplier will be lost);
\nAward up to [2 max].
Award [1] for explaining a problem that may arise (such as inconsistency, inaccuracy/unnecessary additional/repeated work needed when updating.
Award [1] for including example with reference to the relation given.
Example answer:
Modifying/changing the phone number for Fruit and Veggie. would require that each and every tuple containing item supplied by Fruit and Veggie should be modified (unnecessary work);
Otherwise the data in the relation would be inaccurate (for example, would contain different/incorrect phone numbers for the same supplier);
\nAward up to [8 max].
Award [1] for explaining/clearly showing each of the steps.
Award [1] for identifying two entities (Product and Supplier) in Greengrocer.
Award [1] for choosing/identifying a primary key in relation Supplier.
Award [1] for clearly showing that the relation must be in 1NF and then could be put to 2NF.
Award [1] for showing that each tuple in 2NF has a primary key.
Award [1] for showing that in 2NF all attributes are on the whole dependent of the primary key.
Award [1] for introducing new relations or using a foreign key.
Award [1] for showing that the relation must be in 2NF and then could be put to 3NF.
Award [1] stating that there are no transitive dependencies in 3NF.
Note: Because there is significant inconsistency in textbooks’ accounts of precisely what constitutes 1NF and 2NF, award marks depending on the explanation. Please see the two different example answers.
\nExample answer 1:
Given relation
Greengrocer(Prod_ID, Prod_Name, Prod_Price, Supp_Name, Supp_Phone,Supp_Contact)
There are two entities in this relation (Product and Supplier).
\nProduct(Prod_ID, Prod_Name, Prod_Price)
Supplier(Supp_ID, Supp_Name, Supp_Phone, Supp_Contact)
Primary key (Supp_ID) in relation Supplier is added to make sure that it is unique because it might be that two suppliers have the same name.
\nProduct(Prod_ID, Prod_Name, Prod_Price, Supp_ID)
Supplier(Supp_ID, Supp_Name, Supp_Phone, Supp_Contact)
To construct to 2NF relation must be in 1NF;
Each tuple in 2NF must have a primary key;
And all attributes in the 2NF must be dependent on the whole of the primary key.
New relation is introduced.
\nProduct(Prod_ID, Prod_Name, Prod_Price)
Supplier(Supp_ID,Supp_Name,Supp_Phone,Supp_Contact)
ProdSupp(Prod_ID, Supp_ID)
There are two different contacts with the same name (Mia Abiss) at the two different companies.
Assuming that each contact has a unique phone number, a new relation could be introduced in which Supp_Phone is a key.
Supplier(Supp_ID, Supp_Name)
SupplierContact(Supp_Phone, Supp_Contact)
Product(Prod_ID, Prod_Name, Prod_Price)
ProdSupp (Prod_ID, Supp_ID)
The relation is in the 2NF and there are no attributes which are not dependent on the key.
There are no transitive dependences so it is in the 3NF.
Example answer 2:
The table is already in 1NF because all values are atomic. There are no “fake” attributes/columns, like Supp_Phone1, Supp_Phone2;
So there are no repeating groups, either obvious or created by repeating columns for what is really the same attribute;
To be in 2NF, in addition to being in 1NF;
Every non-prime attribute must be dependent on the whole of every key;
To be in 3NF, in addition to being in 2NF;
All the attributes in a relation must be determined only by the key(s);
And there should not be any transitive dependences;
There are two entities (Supplier and Product);
Supp_ID should be introduced;
Supplier(Supp_ID, Supp_Name, Supp_Phone, Supp_Contact)
Product(Prod_ID, Prod_Name, Prod_Price, Supp_ID*)
Where underlining marks primary key(s) and *foreign key(s);
\nThere are two different contacts with the same name(Mia Abiss)at the two different companies.
\nA new relation introduced in which Supp_Phone is a key;
\nSupplierContact(Supp_Phone, Supp_Contact, Supp_ID*)
Supplier(Supp_ID, Supp_Name)
Product(Prod_ID, Prod_Name, Prod_Price, Supp_ID*)
A school currently has a cabled network but wants to add wireless networking across the whole campus.
\nThere are concerns that unauthorized people could access the data on the wireless network.
\nThe school has decided to implement a virtual private network (VPN) to provide access to its network.
\nDescribe two hardware components the school will need to implement the wireless network.
\nIdentify two advantages to the students of the new wireless network.
\nOutline two methods the school could employ to prevent network data from being accessed over their wireless system.
\nIdentify two technologies the school would require to provide a VPN.
\nExplain one benefit to the staff of using a VPN to remotely access the school network.
\nAward [4 max]
\n(Wireless) router;
A central hub for all the computers to connect to;
Enables wireless network packet forwarding and routing;
Wireless Network Interface Card (NIC);
To allow the computer to ‘talk to’ the (wireless) router;
Wireless access points;
allow Wi-Fi devices to connect to a wired network;
Wireless repeaters;
To expand the reach of the network;
Mark as 2 and 2.
\nAward [2 max]
The ability to use their own devices at school;
The ability to access the school network from anywhere in the school;
No cables laid, so reduces the risk of tripping over cables;
Numbers of connections are not limited to cable ports, so greater numbers of students can connect at any given time;
Award [4 max]
\nUse of encryption;
So that data cannot be understood if it is intercepted;
Use of user authentication/usernames and passwords;
To prevent unauthorized access to the system;
Setting up a file of accepted MAC addresses;
To only allow access to the network by registered mobile devices;
Hide network ID;
So that the wireless network is not publicly seen;
Mark as 2 and 2.
\nAward [2 max]
Client VPN software (to make a secure remote connection);
VPN-aware routers and firewalls (to permit VPN traffic to pass);
VPN appliance/server (to handle incoming VPN traffic);
Encryption protocol IPSec or SSL;
Award [3 max]
Enhanced security of data;
for example, using encryption;
This prevents unauthorised access;
Remote access to data and resources (from any location);
Normal access of materials on the network;
as though the user was using the network on site;
Candidates mostly only gained half of the available marks for this question. This was achieved by either naming two appropriate hardware components, but not describing them sufficiently for the expansion marks, or by only naming one correct component with a good description. It is important to note that for this question, candidates needed to identify additional components needed to implement the wireless network within the already existing school network. Therefore, equipment already in place, such as servers, would not gain credit.
\nCandidates mostly identified one or two advantages to students of the new wireless network. Occasionally, candidates gave the same answer twice, mostly in relation to accessing the network from anywhere.
\nCandidates were able to identify and expand at least one method of preventing network data from being accessed over the wireless system. Some responses were not sufficiently detailed for both marks.
\nCandidates found it difficult to identify two technologies that would be required by the school to provide a Virtual Private Network; however, a significant number did name one.
\nCandidates answered this question well with responses related to one of the two suggested answers of enhanced security or remote access to network resources, or in some cases, a combination of the two.
\nOutline why a prototype would be used to demonstrate the proposed system to the client.
\nAward [2 max].
To provide feedback on the efficiency or design of the product;
To give an idea or feel of the final product;
To encourage dialogue between the developers and the client;
Clients can identify errors or omissions in the design;
Most candidates were able to achieve at least one mark, generally for ‘providing feedback’ or for ‘clients to identify errors in the system’, but not all responses had sufficient detail to achieve both marks.
\nA web application (app) runs on mobile devices such as smartphones and tablets. It allows users to locate their position in real time on a map, as they walk around a city, as well as the surrounding attractions. The app uses icons to represent tourist attractions such as art galleries and museums. When the user clicks on the icon, further details are shown, such as opening times. The app includes some use of client-side scripting.
\nMany art galleries have websites that can be found by search engines. White hat techniques and practices allow website developers to optimize the search process. It is good practice to maintain the source code of websites up-to-date with actual information.
\nOutline the functioning of this app. Include specific references to the technology and software involved.
\nWith reference to the use on mobile devices, outline a feature of this application that may rely on client-side scripting.
\nState two metrics used by search engines.
\nExplain why maintaining a clean HTML source code of a website by removing old information optimizes the search process.
\nThe evolution of the web, architectures, protocols and their uses has led to increasingly sophisticated services that run on peer-2-peer (P2P) architectures.
\nExplain how a P2P network can provide more reliability than a client-server model.
\nAward up to [3 max].
\nAward [1] for showing understanding of the need of each of the following: GPS, mapping software, underlying distributed information.
\nThe GPS of the device gives its current location (coordinates);
\nCoordinates sent out through the Internet (with 3G/4G/5G/Wifi/using the specific features of the mobile device OS);
\nCoordinates are linked to map software (e.g. Googlemaps) to retrieve current’s device position and neighbourhood information (using thematic databases);
\nAnd integrated with further annotations (relative to museums) that can be provided by third-party services;
OR by information incrementally gathered from users;
OR by further databases (GIS services);
OR by interrogating an (incremental) database accessible from the server where the app has been downloaded from, for its first installation;
Award up to [2 max].
\nAward [1] for identifying a feature and award [1] for reasonable expansion of the feature up to [2 max].
\nExample 1:
The design of the front-end (the user interface) with the specific mobile device;
So that the commands are specific (and built-in) within the device, to support interactive use;
(With the effect that the app can be used across a range of devices and mobile operating systems;)
Example 2:
To personalize the app with a “history” on the client’s side, after the first use of the application;
So that only the new information added in the database (underlying sources used by the app) can be fetched by the client’s script;
Award up to [2 max].
Number of hits;
Popularity of linking pages;
Amount of links to the same page departing from the source page;
Trustworthiness of the linking domain;
Relevance of content between source and target page;
Time to download;
…(there are others).
Award up to [5 max].
Old information is more likely to be retrieved by web crawlers;
But this requires time to crawl;
But this interferes with the response time for the current search;
And it may even be penalised by policies in search engines;
Without returning currently relevant information;
Example of old information are old or broken links/orphan pages/old text masked by comments in the HTML code, and it can be revised from time to time;
Cleanly written code allows for a more efficient search process;
Which facilitates correct indexing;
Note: Award [2 max] for a generic response.
\nAward up to [4 max].
In P2P all machines can interchangeably be client as well as server (no division of client-server);
Data and services can be replicated across sites, and be retrieved from them;
Services are virtualized/reside on virtual machines;
Therefore, if one node is unavailable the service can still be provided by resorting to other nodes;
OR
System updates can be made while not interrupting the provision of the service
OR
The failure of a node does not imply the failure of the entire network
A water authority supplies water to its customers. The amount of water supplied to each customer is measured by a meter. There are two types of meter; an old meter and a new meter.
\nThe water authority also provides sewage services. This is when waste water is returned from the customers’ houses to a central processing plant. Only the new meter is able to estimate the amount of waste water returned.
\nThe authority reads the meters annually and the charges for these services are sent to the customers.
\nThe annual charges to customers are calculated using a model that takes into account the following variables:
\nMETER_TYPE
The type of meter which can be either old or new.
WATER_IN
The reading displayed on both meters (the reading is a 6-digit display in litres) which is used to measure the volume of water supplied.
WATER_OUT
The reading displayed on the new meter only (the reading gives a 6-digit integer display in litres) which is used in estimating the volume of waste water returned to the sewage system.
INFRA_CHARGE
The cost of maintaining the infrastructure for supplying water and providing the sewage service. This is an annual charge of $204.80. This amount is reduced by 10 % if a new meter is used.
The digital displays on each meter function as follows:
\nThe rules for calculating the annual bill for each household are as follows:
\nIdentify the possible range of values and their data type for each of the above variables.
\nOutline how the yearly supply of water is calculated.
\nConstruct the pseudocode that will calculate the annual bill for a household based on the information given above. You should introduce any new variables where necessary.
\nIdentify three possible measures that customers could take to reduce their infrastructure charge.
\nAward up to [3 max].
Award [1] for correctly indicating type, and values expected, for each variable up to [3 max];
“MeterType
”, String/char; “old”,”new”;
“WaterVol
”, Integer; 0–999999;
“InfraCharges
”, Currency/Float /Double; 184.32–204.80;
Making use of both the previous and new readings;
Calculating the difference between them;
Award up to [7 max] as follows:
Involving previous readings;
Calculation of water supplied [2] – allow [1] if correct apart from the reset;
Separate code for use of new meter;
Correct reduction of infrastructure charge [2] – allow [1] for an attempt to calculate this;
Calculation of final bill;
Example:
\nhouseholdBill(OLD_WATER_IN, OLD_WATER_OUT) // the previous\n
// meter readings
INFRACHARGE = 204.80
if WATER_IN > OLD_WATER_IN // allows for possible
// resetting of meter
//reading to 0
WATER_SUPPLIED = WATER_IN – OLD_WATER_IN
else
WATER_SUPPLIED = 1000000 – OLD_WATER_IN + WATER_IN
end if
if METER_TYPE = \"new\" // possible reduction in sewage charges
// if new meter is used
if WATER_OUT > OLD_WATER_OUT
WATER_RETURNED = WATER_OUT – OLD_WATER_OUT
else
WATER_RETURNED = 1000000 – OLD_WATER_OUT + WATER_OUT
end if
if WATER_RETURNED > 0.95 * WATER_SUPPLIED
INFRACHARGE = INFRACHARGE * 0.9
end if
end if
BILL = WATER_SUPPLIED * 1.9 + INFRACHARGE
Changing to a new meter (if they have an old one);
Not using the supplied water for watering the garden etc.;
Diverting rain water into the waste/sewage system;
State the hexadecimal equivalent of the following binary number:
\n11011111
\nDF;
\nGenerally, well answered, but a significant number of candidates gave their answers in decimal rather than hexadecimal.
\nComputer simulations are often used in situations where practical experimentation is, for some reason, not possible. One of these reasons could be an ethical issue.
\nDistinguish between a computer model and a computer simulation.
\nIdentify two reasons why some systems are difficult to model successfully.
\nWith clear reference to the ethical issue, describe one example where practical experimentation would not be possible for ethical reasons.
\nState three other advantages, apart from ethical reasons, of simulating a computer model rather than constructing a physical one.
\nAward up to [4 max].
A computer model is a representation of a system;
Made up of variables and formulae/mathematical representation;
Whereas a computer simulation is a process that uses the model;
In order to see the outcome(s) when different values are used for the variables (in the model);
Either all of the variables are not known/difficult to define;
Or the relationships between them cannot be expressed accurately/mathematically;
Example
Experiments on living animals in a high school science class;
Such as effects of altering diet;
It is not ethically acceptable to harm animals (for such purposes);
Note: Accept reasonable examples, provided they are sufficiently explained.
Award up to [3 max].
Computer models/simulations allow the designers to:
Make alterations and quickly see the outcomes;
Repeat tests several times over;
Model dangerous situations safely;
Learn from “what if?” scenarios;
Saves costs if several different models have to be built;
Medical students require extensive training in preparation before they qualify as a surgeon. Part of this training involves the use of simulation software.
\nThe simulation software projects the surgery scenario onto a touchscreen display. Students wear “smart” gloves to hold tools for performing the virtual operation on the touchscreen monitor. The touchscreen display shows realistic surgical tools.
\nOutline one advantage and one disadvantage of training medical students with simulation software.
\nIdentify three technical aspects that the gloves have to address so that they can be used in this way for the simulation of operations.
\nDefine the term visualization.
\nThe medical school is considering updating its simulation software, which currently displays the simulation in 2D, to one that displays it in 3D.
\nDiscuss whether this change to a 3D display would improve the quality of the training.
\nAward up to [4 max] as follows:
Award [1 max] for identifying an advantage and [1 max] for an expansion.
Award [1 max] for identifying a disadvantage and [1 max] for an expansion.
Advantages (requires an expansion):
They may see a complex situation numerous times / gain confidence in using the surgical tools;
Without putting patients at risk / or keep practicing until they feel confident that they will be able to get it right in reality;
Disadvantages (requires an expansion):
They don’t have real-life experience;
Therefore, we don’t know whether they will faint at the sight of blood;
They may be trained just on the software (a unique body shape);
But body shapes are different and students might find themselves at odds;
They do not get an idea of how hectic the theatre can be/space available/interferences among people;
And this training alone will be useless;
Award up to [3 max]:
It needs sensors to assess the pressure of the hand on the instrument;
Its positioning with respect to the touchscreen needs to be tracked (for example by an external camera);
Its inclination with respect to the touchscreen needs to be tracked;
The change of tools held should be quickly reflected in the image that is displayed (affects communication);
The specific tool needs to be recognized;
The representation of (abstract) data;
In a way that is understandable by humans;
Award up to [6 max].
Award [1 max] for identifying an advantage of the use of 3D and [1 max] for an expansion up to [3 max] for discussing the advantages of the use of 3D;
Award [1 max] for identifying a disadvantage of the use of 3D and [1 max] for an expansion up to [3 max] for discussing the advantages of the use of 3D;
Award [1 max] for a considered conclusion;
Note to examiners: To achieve [6] a conclusion must be provided.
If there is no conclusion the maximum mark is 5.
A 3D simulation will be more realistic;
As depth can be shown;
Patient’s body can be rotated; // allow up to [2] for example;
But, a 3D simulation takes more time to render / more calculations have to be made;
So, may not be displayed in real time;
It is more demanding on memory / may exceed available memory;
For an application, as serious as medical training, adequate hardware and software should be made available so that 3D simulations can be carried out;
\nConstruct the truth table from the following logic circuit.
\nAward [3 max].
Award [3] for all 8 correct rows.
Award [2] for 7 correct rows.
Award [1] for 5,6 correct rows.
Candidates demonstrated that they were able to represent a logic circuit as a truth table, but a common error was to provide a truth table with insufficient rows, so not all combinations of input were covered, thereby losing marks.
\nA hotel chain has a loyalty scheme in which customers are awarded 1000 points for each day they stay in one of their hotels. With these points, customers can achieve one of three status levels: Gold, Silver or Bronze. The level will determine the extra services to which they are entitled.
\nThe total number of points collected during the current year will determine which of the three status levels they are assigned for the following year: For example only the points collected in 2018 will determine the status level for 2019.
\nOccasionally, new customers receive additional bonus points as part of a promotion.
\nThe Points
class keeps details of the points and status levels of each customer.
public class Points\n
{
private String memberId; // id of the hotel customer
private int totalPoints; // this year's points
private int bonusPoints; // any bonus points given to this year's new member
private String statusNow; // current(this year's)status
private String statusNextYear; // following year's status
private Visits[] allVisits = new Visits[366];//details of each visit
// during this year
int y; // number of visits this year
public Points(String id) // constructor for new member
{
memberId = id;
bonusPoints = 0;
y = 0;
statusNow = \"Bronze\";
}
//constructor for new member given bonus points (valid for current year only)
public Points(String id, int bp)
{
memberId = id;
bonusPoints = bp; // multiples of 1000 - maximum number is 5000
y = 0;
statusNow = \"Bronze\";
}
// all the accessor and mutator methods are present but not shown
public Visits getAllVisits(int v)
{
return allVisits[v];
}
public void addVisit(Visits v) // adds a new Visit object to the array
{
allVisits[y] = v;
y = y + 1;
}
isGold() {code missing}
calculateTotalPoints(){code missing}
daysMissing(){code missing}
}
The instance variables in the Points
class are preceded by the modifier private
. The choice of modifier affects the way in which these variables are accessed or used.
The customers will be assigned one of three levels for the following year (Gold, Silver or Bronze) depending upon the current year’s total points as follows.
\nIn 2018, Tim became a member for the first time and was awarded a bonus of 1000 points. So far, in 2018, Tim has stayed three times at one of these hotels. The first visit lasted 2 days, the second visit lasted 1 day and the third visit lasted 6 days.
\nThe different Points
objects are stored in an array which is declared globally in the main (driver) class as follows: Points[] allPoints = new Points[10000]
;
With the use of two examples other than private
, outline how the choice of this modifier affects the way in which these variables are accessed or used.
With reference to the two methods with the same name in the Points
class, explain the OOP feature that makes it possible to successfully implement either of these methods.
State the status level that Tim has been assigned, for 2019, following these visits.
\nState how an individual object can be identified using this array.
\nThe attribute statusNow
is assigned its correct value at the beginning of every year for existing members. It cannot be changed during the year.
Construct the method isGold()
in the Points
class, which will return whether the current status is “Gold”.
public
;
Allows access to variables from outside of the class/unlimited access;
protected
;
Allows access to variable from within the package (project) in which they are created/subclasses;
final
;
Prevents variables from being modified;
static
;
Refers to variables that act on the class as a whole (and not on individual objects);
Note:
\nThe OOP feature shown in the constructors (accept the 2 signatures) is overloading (accept polymorphism);
The constructor methods have a different number / type of parameters / different parameters;
The method calling the constructor / compiler will determine which of these methods is selected;
By matching up with the parameters;
Silver;
\nThrough the use of the (appropriate) array index / appropriate code description;
\nExample:
\nIndividual object = allVisits[individual object’s location]
public boolean isGold()\n
{
return (statusNow.equals(\"Gold\"); // allows =
}
Award marks as follows:
Signature;
Correct comparison (allow use of getStatusNow()
);
Return (that matches the signature – allow FT);
Note:
\ntotalPoints
.\nGoogle Translate is an algorithm whose function is to translate text from one language to another. One of the resources that it uses is the body of documents produced by the United Nations which are routinely translated by humans into various languages.
\nDiscuss the reasons why Google Translate takes a probabilistic approach in preference to a cognitive rule-based approach.
\nAward marks as follows up to [5 max].
Award [2 max] for an outline of how the statistical/probabilistic approach works (award [1] for a less complete response).
Award [2] for an outline of how the rule-based/cognitive approach works (award [1] for a less complete response).
Award [1] for a reasonable conclusion that explains why the former approach is chosen.
Example answer
The statistical model involves comparing the text to be translated against previously stored sets of text pairs (e.g. English and its French equivalent) and then selecting the most probable translation;
The cognitive model involves establishing all the rules of each of the languages and then breaking down each section of text to establish its grammatical structure and then replacing the text with text that has an equivalent structure from the other language;
The second approach has not proved particularly successful for two reasons. The first is that the process of establishing a clear set of rules is extremely labour intensive.
The second is that the process can be ruined by the problems of context, double meanings and non-standard language;
The first approach was taken because the company has stored an enormous set of validated text in different languages and the increase in processing power which allows this corpus to be searched and processed;
Outline the purpose of the memory address register (MAR) in the central processing unit (CPU).
\nAward [2 max].
The MAR holds the memory location of data/instructions;
…that need to be accessed (read/write) (fetch/store);
Candidates mostly achieved at least one mark here, but a common error noted was some candidates wrote that the ‘MAR stored data’ rather than the address of the data.
\nWith reference to the bowtie model of the web, consider the following graph. It represents a snapshot of popular sites about a specific topic.
\nAfter two months, the graph has evolved into the one shown below.
\nWe can interpret the graph as follows:
Each node represents a document and each outgoing arrow represents a hyperlink in the document.
Identify the nodes in the strongly connected core.
\nIdentify the set of OUT nodes.
\nOutline why the edge between node 2 and node 1 is a tendril.
\nIdentify two reasons why an edge may disappear in the new graph, for example the edge between node 5 and node 4.
\nState how many hyperlinks are in the document corresponding to node 6.
\nPower laws are often used to model phenomena occurring in very large networks and predict their evolution. Power laws may be suitably applied in different cases, in the context of the World Wide Web.
\nWith reference to the relation between the number of documents in the web and the number of hyperlinks in each of them, suggest how power laws may help to explain the shape of the World Wide Web.
\nAward [1] for all three correct.
3, 5, 6
Award [1] for both correct.
4, 8
No;
Because 2 reaches the node 3 that is in the SCC;
Award [2 max]
There is no longer a link between 5 and 4;
because
5 has deleted its link / 5 no longer finds 4 interesting/relevant;
4 has changed its URL;
4 has removed itself from the internet;
4
\nAward marks as follows up to [5 max].
Award up to [1] for showing understanding of what a power law is, [2] for addressing both ideas of incremental web and preferential connectivity (award only [1] if one is addressed), and [2] for discussing them in context AND mentioning some element of the web graph.
(Incrementality of web): Number of nodes in the web increases (nodes are not deleted) / New nodes (documents) have hyperlinks that connect to existing nodes in the web;
\n(preferential connectivity): This connectivity happens following some preferential element/affinity/alikeness (e.g. common theme) and over time it induces an aggregation of nodes;
\n(Incrementality and preferential connectivity): Have the consequence that the SCC grows;
\n(Nodes are not deleted, but) some of the hyperlinks in documents may be changed/deleted/break over time, this may produce isolated nodes;
\n(Power law – proportionality): Relates two quantities, x and y, when y is proportional to x^c, for some constant c;
\nThe probability for a new document N to be connected to some document M (with a certain out-degree) is proportional/depends on the probability that the hyperlinks in N to connect to M (i.e. the sum of the out-degrees of the nodes reached from N, recursively);
\nTherefore, a few nodes receive many in-links (because many nodes link to them directly or indirectly based on preference), whereas nodes that have a few in-links are probably new;
\nNiche themes/new themes with new language/obsolete themes (when theme is a preference) typically bypass the SCC, making tendrils and tubes;
\nThe online edition of a newspaper includes a collection of audio podcasts. These podcasts are interviews with artists and scientists and last for up to 10 minutes. They may have been provided by other broadcasters and agencies.
\nAt any time, no more than eight podcasts are available on the online edition of the newspaper.
\nThe podcasts can either be downloaded or streamed.
\nThe podcast can be stored online using either lossy or lossless compression.
\nA person is streaming one of these podcasts at home. However, he is experiencing buffering problems, where the podcast keeps stopping and starting.
\nIdentify two actions relating to the source of these podcasts that should be taken by the newspaper before publishing them.
\nOutline one technical reason for restricting the number of podcasts to eight.
\nState one format for an audio file.
\nCompare these two approaches for a person who downloads or streams these podcasts.
\nOutline one reason for this problem.
\nThese podcasts are normally displayed on the website in the chronological order in which they were added, with the most recent on top. However, users who regularly access the site for science podcasts, may see them presented in a different order, with all the scientific ones on top.
\nWith reference to the technology involved, explain how this is made possible.
\nAward up to [2 max].
Provide a reference to the source/provider;
Obtain permission from the interviewee;
Award up to [2 max].
To better control access to their servers;
Because it could be cause of bottleneck on the server / to reduce/minimize risks of DDoS;
To better manage the UI;
So that the offer of podcasts is well visible also from small devices;
To have a smaller system that is easier to maintain;
That can be maintained more effectively also remotely by one person;
Award up to [1 max].
(accept for general sound format:) MP3, FLAC, WAV, WMA;
Award up to [5 max].
Award up to [4 max] for comparing lossless and lossy.
Award [1] for a conclusion with reference to the scenario.
In terms of audio quality for spoken language there is not much difference in using lossy or lossless compression/ lossless compression does not really bring benefit to the spoken audio;
\nA minor benefit could be in using lossy compression in relation to transmission while downloading (and also in streaming);
\nAnd it is relevant, in general, in a situation with low bandwidth;
\nHowever, these files are small in size anyway, because their duration is limited to 10 minutes;
\nAnd this suggests that for the specific nature and size of the files (spoken and 10 minutes duration) lossy might be slightly preferable for some users for downloading without compromising on quality of audio.
\nAward up to [2 max].
Award [1] for identifying a reason why buffering may occur and [1] expansion/example up to [2 max].
Too many people are using their own Internet access point at home simultaneously;
Possibly on different devices, including tablets, smartphones on WiFi;
There is low bandwidth because it is peak time;
Possibly too many people are downloading simultaneously;
Old router/modem/computer / outdated software may slow performance;
Computer that is not protected by antivirus may have performance affected by malware;
Performance;
There are too many applications running simultaneously on the computer;
So, memory is insufficient and one should close some applications;
Award up to [4 max].
Award up to [2 max] for the use of dynamic scripting.
Award up to [2 max] for the means of tracking a person’s preferences.
Dynamic web pages / scripting
Podcasts are associated to XML objects;
So, that the list of podcasts can be processed by scripts that can re-arrange the order of the XML objects;
To present them in a way that takes into account the previous uses from the user;
By monitoring their preferences, over time;
Tracking a person’s preferences
For example, counting the clicks and themes to extract regularities / support data analytics;
That can be identified for example by the IP of their device when this is not anonymised;
And also stored in the history of the browser/by use of cookies;
State the part of the central processing unit (CPU) that is responsible for carrying out calculations.
\nArithmetic and Logic Unit/ALU;
\nA well answered question.
\nA company has 600 employees whose names are currently stored using a collection called NAMES
. The names are stored as surname, first name. For example: Smith, Jane, Uysal, Rafael, Ahmed, Ishmael, Jonsonn, Sara, …
The names in the collection are kept in a random order. However, it would be more useful if they were kept in alphabetical order.
\nThe company’s staff list is now organized in the arrays in alphabetical order.
\nA binary search was used to find a specific name in the array.
\nConstruct a pseudocode algorithm that will store the surnames in one array and first names in another.
\nConstruct a pseudocode algorithm that will sort the surnames into alphabetical order using the bubble sort method. The order of the first names must also be changed so that they keep the same index as their corresponding surname.
\nDescribe the process a binary search would follow to find a record in the surname array.
\nOutline one benefit of using sub-programmes to implement your algorithms from parts (a) and (b).
\nAward [4 max]
Collection method NAMES.getNext() / NAMES.getData()
correctly used;
Correct loop;
Correct use of index (in both arrays);
Correct assignment in array for surnames;
Correct assignment in array for first names;
Note:
Award 1 mark in case that string methods are used to separate ‘name’ and ‘surname’ in the data item.
Example answer 1:
\nNAMES.resetNext() // reset and\n
SURNAME[600] //initialization of arrays
FIRSTNAME[600] //may not appear in candidates’ responses
COUNTER = 0
loop while NAMES.hasNext()
SURNAME[COUNTER] = NAMES.getNext()
FIRSTNAME[COUNTER] = NAMES.getNext()
COUNTER = COUNTER + 1
end loop
Example answer 2
\nNAMES.resetNext()\n
loop COUNTER from 0 to 599
SURNAME[COUNTER] = NAMES.getNext()
FIRSTNAME[COUNTER] = NAMES.getNext()
end loop
Example answer 3 (assumes that items in the collection are objects- two attributes: surname and first name)
\nI = 0\n
loop while NAMES.hasNext()
X= NAMES.getData()
SURNAME[I] = X.surname
FIRSTNAME[I] = X.firstname
I = I + 1
end loop
Award [5 max]
Correct outer loop;
Correct inner loop;
Checking of surname order;
Swapping surnames if necessary;
Swapping corresponding names;
Correct use of flag;
Example 1:
\nloop I from 0 to 599\n
loop C from 0 to 598-I //accept 598
if SURNAME[C] > SURNAME[C + 1] then
TEMP1 = SURNAME[C]
TEMP2 = FIRSTNAME[C]
SURNAME[C] = SURNAME[C + 1]
FIRSTNAME[C] = FIRSTNAME[C + 1]
SURNAME[C + 1] = TEMP1
FIRSTNAME[C + 1] = TEMP2
end if
end loop
end loop
Example 2:
\nFLAG = TRUE\n
loop while FLAG = TRUE
FLAG = FALSE
loop COUNTER from 0 to 598
if SURNAME[COUNTER] > SURNAME[COUNTER + 1] then
TEMP1 = SURNAME[COUNTER]
TEMP2 = FIRSTNAME[COUNTER]
SURNAME[COUNTER] = SURNAME[COUNTER + 1]
FIRSTNAME[COUNTER] = FIRSTNAME[COUNTER + 1]
SURNAME[COUNTER + 1] = TEMP1
FIRSTNAME[COUNTER + 1] = TEMP2
FLAG = TRUE
end if
end loop
end loop
Award [4 max]
\nExample 1:
Calculate the index of the middle point in the array SURNAME: (first + last)/2;
Compare surname found with the one stored at middle point;
If greater than the value at the middle point, search the upper half of the array (right side) by calling the binary search method again with a new first index (first = middle + 1);
If smaller than the value at the middle point, search the lower half of the array (left side) by calling the binary search method with a new last (last = middle −1);
if found algorithm terminates;
Example 2:
Find the centre point of the array SURNAME[ ];
Compare surname to be found with the current name in SURNAME[ ];
If correct surname found => STOP;
Else if surname to be found is greater than the current name in SURNAME[ ]eliminate lower half of array from search and repeat algorithm;
Else if surname to be found is less than the name in SURNAME[ ] eliminate upper half of array from search and repeat algorithm;
Note: Allow a mark for provision for name not found;
\nAward [4 max]
\n1 mark for a benefit (such as reusability, modularity, maintainability, readability)
1 mark for an expansion.
Example answer:
These sub-programs (sorting/searching) could be used in (many) other programs;
Which saves programmer’s time/ effort;
\n
Candidates who realised that the data from the collection was to be accessed sequentially with the first item stored in one of two arrays, the second item in the second array, the third item in the first array, and so on, until the collection was empty, scored high marks for this question. Some candidates did not correctly apply standard collection methods so lost marks.
\nCandidates who scored highly in part a. also scored highly for this part. However, this question did see the full range of possible marks awarded. Candidates who were unable to complete the whole algorithm correctly generally achieved some of the marks, typically for performing correct swaps during the sort, or for correctly initialising and implementing one or both of the loops.
\nThis question required a description for the binary search algorithm and was generally well answered with a high proportion of candidates achieving full marks. A small number of candidates incorrectly described a sorting algorithm, while others incorrectly described a linear search.
\nMost candidates achieved at least one of the marks for this question, with many acquiring both marks. Candidates most frequently recognised that the sub-programs could be re-used in other programs, therefore saving programming time.
\nCompilers translate source code into object code. Identify two other operations performed by a compiler.
\nAward [2 max].
Pre-processing;
Lexical analysis;
Parsing;
Semantic analysis;
Syntax analysis;
Linking;
Optimisation;
A good range of the possible correct answers for this question was seen, but the most common correct answer was ‘syntax analysis’. However, a high proportion of the answers for this question were too general, or they repeated the example given in the question.
\nThe average weekly consumption for a family of four is 2700 litres of water. This includes the water needed for domestic cleaning, personal hygiene, cooking and drinking.
\nAn online software tool is available to help families calculate how much water they are using for regular activities that require the supply of water. The software tool includes a model which estimates the water usage. A simulation can be run using this model.
\nThe data given below estimates the amount of water (in litres) needed for different household activities:
\nBy using the data in the table, a family uses a spreadsheet to run some simulations of how to distribute the use of water.
\nWith reference to the scenario described above, explain the difference between a model and a simulation.
\nExplain how the choice of data in the table may affect the quality of the simulation.
\nOutline how a simulation in a spreadsheet can be organized so that the family can ensure a consumption of no more than 2700 litres per week.
\nThe same spreadsheet is used by a group of four young people who share a house. The simulation, however, does not reflect their actual situation and the weekly target is often exceeded.
\nIdentify two reasons why the simulation may not reflect the actual situation in this case.
\nThe model is a static description of some rules;
In this case a list of appliances and their water consumption (min or max);
Whereas the simulation is the use of that model;
With input from real parameters (such as those that families may input);
Award up to [4 max].
There may be missing data:
For example, watering plants (allow any suitable example);
The consequences, e.g. the totals will be underestimated;
The data may be inaccurate;
For example, the shower times may exceed the stated;
The consequence, e.g. the results of the simulation may not be valid;
The answer shows the use of columns and rows;
The data from part (b) is included together with the addition of a TimesPerWeek
variable;
Weekly total formula for each variable is included;
Overall weekly total has correct formula;TimesPerWeek
is adjusted until target is met;
Award up to [2 max].
Individual and individualistic use:
They don’t know each other, and they do their laundry separately, not full load;
They don’t cook together and consume more water consequently;
Somebody washes the car every week without telling the others;
Special occasions:
Some of them may be athletes and need to wash the sport gear separately;
Somebody invites friends over night/for dinner and the water consumption increases;
Technical reasons:
There are water leaks in the house and they are not aware about them;
The counter was manipulated by the landlord years ago;
Identify two ways that user documentation may be provided.
\nAward [2 max].
On a CD/DVD/Blu-ray disc;
Through embedded help files;
Online/website;
Physical/printed media;
Note to examiners: accept answers relating to methods of supplying or media used to present user documentation. Do not accept answers related to training.
\nCandidates were able to name at least one and often two methods for the provision of user documentation.
\nThe details of hotel stays during the current year are stored in the variable allVisits
which is an array of the Visits class. allVisits
is used in determining the total points awarded in the current year.
The Visits
class is outlined below:
public class Visits\n
{
private String hotelCode; // id of the hotel
private int days; // number of days of the visit
public Visits(String h, int d)
{
hotelCode = h;
days = d;
}
public int getDays()
{
return days;
}
}
The main (driver) class manages the Points
and Visits
classes. It contains the following code:
Points[] allPoints = new Points[10000]; // declared globally\n
allPoints[0] = new Points(\"m100\");
allPoints[1] = new Points(\"m101\",5000);
allPoints[2] = new Points(\"m102\",2000);
Visits v1 = new Visits(\"h003\", 3);
Visits v2 = new Visits(\"h013\", 1);
Visits v3 = new Visits(\"h013\", 2);
Visits v4 = new Visits(\"h005\", 6);
allPoints[0].addVisit(v1);
allPoints[0].addVisit(v2);
allPoints[0].addVisit(v3);
allPoints[0].addVisit(v4);
allPoints[1].addVisit(v1);
allPoints[1].addVisit(new Visits(\"h004\",6));
Construct a UML diagram for the Visits
class.
State the output given by the following statement:
\nSystem.out.println(allPoints[2].getMemberId())
;
State the output given by the following statement:
\nSystem.out.println(allPoints[0].getBonusPoints())
;
State the output given by the following statement:
\nSystem.out.println(allPoints[1].getAllVisits(1).getDays())
;
Construct the method calculateTotalPoints()
, in the Points
class, which will calculate and return the total number of points awarded so far in the current year.
Award [1] for three compartments, [1] for correct + and −, and [1] for correct contents.
\nNote:
\nm102;
\n0;
\n6;
\nExample 1:
\npublic int calculateTotalPoints()\n
{
int totalPoints = 0;
for (int x = 0; x < y; x++)
{
totalPoints = totalPoints + allVisits[x].getDays();
}
totalPoints = totalPoints * 1000 + bonusPoints;
return totalPoints;
}
Award marks for correctly including the following:
Signature + matching return;
Loop through the number of visits (y); // do not allow length statements;
Any use of allVisits
array;
Correct update of totalPoints
(with or without bonusPoints);
Inclusion of bonus points outside of the loop (or if the loop is absent);
Example 2:
\npublic int calculateTotalPoints()\n
{
int totalDays = 0;
for (int x = 0; x < y; x++)
{
totalDays = totalDays + allVisits[x].getDays();
}
totalPoints = totalDays * 1000 + bonusPoints;
return totalPoints;
}
A manufacturing company that produces several products is using spreadsheet software to model its finances. This includes calculations that will estimate different quantities including the profit that the company will make in future years.
\nThe model involves the use of spreadsheet software which will be organized using different sheets for different areas of the company’s finances. Previously less sophisticated methods were used to keep track of costs and sales.
\nBy including examples where appropriate, describe a basic structure for this model.
\nSuggest how the reliability of the model could be tested.
\nThe company has established certain profit targets that it wishes to achieve over the next three years.
\nExplain how this model can be used to investigate different strategies that will reach these targets.
\nAward up to [6 max].
Different sheets will be dedicated to different categories, e.g. salaries, running
expenses, sales, different products, different months etc.;
Note: Award [2 max] for identifying at least two categories.
Each sheet will contain a list of items for that category including associated values;
Formulas will be included as necessary;
Each sheet/category will include a formula that totals the values in that category;
Intermediate values will be calculated, e.g. tax to be paid;
The final profit will be determined from the previous totals;
Figures from previous years can be entered into the model;
With the results checked against the previously calculated results;
Award up to [4 max].
Different (“what-if”) scenarios can be run;
In which the values of different variables are changed;
For example, the number of items sold / the increase in the level of salaries;
Note: Award [2 max] for identifying at least two items.
Selling prices/other (acceptable) parameters can be adjusted to achieve the desired profit;
\nOutline one reason why protocols are used in communications between computers.
\nAward [2 max].
To provide a set of rules/procedures;
To enable two or more different electronic devices/computers/entities to understand each other during data transfer / enable successful communication;
Candidates were generally able to state that protocols are needed to provide rules and many candidates went on to give an appropriate expansion for the second mark.
\nIdentify two characteristics of a personal area network (PAN).
\nAward [2 max].
Smallest type of network;
Consists of connected devices in close proximity to the individual using them;
Connected via Bluetooth/wireless;
Suitable example: smartphone to car connection;
Candidates generally recognised that a PAN made use of Bluetooth or wireless, or that it covered a very small area. Unfortunately, answers with more than one marking point being covered were rare.
\nExplain how data is transmitted by packet switching.
\nAward [3 max].
A message/the data is broken into a number of parts;
Which are sent independently;
…over the optimum route for each packet;
The individual parts are reassembled at the destination;
Each packet contains the (IP) address of both the sender and recipient;
Candidates demonstrated that they understood what packet switching was but didn’t always provide sufficient distinct information to achieve full marks. However, the vast majority of candidates achieved at least two marks.
\nA large mail order company is concerned about the security of its stored data.
\nThe company decides to improve its service by introducing a new user interface for its customers and has developed this interface to the point that it needs to be tested by users who are outside of the company.
\nDescribe two possible causes of data loss.
\nOutline two backup strategies that may be used to limit data loss.
\nExplain why beta testing is used to gather feedback for the new user interface.
\nOutline one consequence of not involving end-users in the design and testing stages.
\nIdentify two features that could be used to improve the accessibility of the new user interface.
\nAward [4 max].
Mark as [2] and [2].
Malicious activities;
An unauthorized user gaining access to data and deleting/altering it;
Natural disasters / earthquake / storm / power loss;
Causing the system to crash and destroy data;
Malware/viruses/spyware/worms;
Which infiltrate and damage the data;
Human error;
Accidental deletion/overwriting of files;
Award [4 max].
Mark as [2] and [2].
Copies of backup could be kept off-site/cloud backup;
Unlikely that the other site would be affected by the natural disaster/can be reloaded/reinstalled if needed;
Incremental backup only backs up data that has changed;
Therefore, requiring less storage capacity / can be completed more quickly than a complete backup;
Failover system/mirrored system/disk mirroring;
A duplicate copy to be used in the event the main system fails;
Award [3 max].
Testers outside the organization use the operating system in a “real world” setting;
Enables feedback to be given to the developers;
So that the software can be improved/corrected/debugged;
Before it is finally released;
“Real world” testers may find more bugs as the system is used in ways not originally intended / tested;
Award [2 max].
The software may not work as expected / may not be better than the existing software / may not meet user requirements / expectations;
The software may be missing some key features;
The software may not be user friendly;
Award [2 max].
Touch screens;
Voice recognition;
Text-to-speech;
Braille keyboard
A colour-blind option
Large font option;
Note to examiners: allow other correct accessibility features
\nCandidates were usually able to name two causes of data loss, however, their expansions were not always as specific or relevant as they could be, to achieve full marks. For example, the question was about data loss and the minimisation of this through the use of backup. Therefore, responses involving data being stolen would not be appropriate.
\nCandidates were able to name and correctly expand at least one appropriate backup strategy, however, candidates should be careful in this type of question that their responses are appropriate to the scenario and that both methods quoted are different, for example, an organisation in which data was constantly changing, such as the case here, would not be relying on hard copy as a method of backup. In addition, storing backup data offsite, or storing data on a cloud-based system are really the same marking point.
\nCandidates generally demonstrated their understanding of what beta testing is and where it fits in the development process, they should, however, be careful to not give generic responses and make sure that their answers match the scenario. Some candidates lost out by simply restating aspects given in the question.
\nCandidates generally recognised that not involving end-users in design and testing may mean that the final product did not meet user requirements, but not many were able to expand on this sufficiently to gain the extra mark by saying, for example, it may have missing features.
\nThere are many correct possible answers to this question, including touch screens, braille keyboards and text-to-speech systems. A surprisingly large number of candidates failed to recognise that this was being asked, and gave incorrect answers, such as GUI, or left it blank.
\nBesTea is a company that sells tea and tea-related accessories online. Users browsing the website encounter the following URL:
\nhttps://www.BesTea.com/customer/pages/delivery
\nA person enters the URL for BesTea into their browser.
\nThe logos of the credit and debit cards accepted by BesTea are displayed as images in the footer of all of its web pages.
\nThe BesTea website includes a shopping basket facility that enables users to make purchases.
\nThe following fragment of PHP code is present in the script that allows users to place a completed order:
\n<?php\n
…
$_SESSION['sessionUserID'] = new_random_number();
$query = $db -> query (\"SELECT * FROM users_db WHERE id = \"
.$_SESSION['sessionUserID']);
$userRecord = $query -> fetch_record();
…
>
Describe how this URL provides security in communication over the Internet.
\nIdentify the steps that the Domain Name System (DNS) server will take in order to locate the correct IP address for this request from the browser.
\nOutline how the footer of a web page can be made identical across all pages of a website.
\nSuggest the function of this fragment of code.
\nUsers may perform several actions on their shopping baskets. These actions require interaction with a central database of products. Each record in this database includes the identifier, the name and the price of one of these products.
\nConsider the following fragment of code:
\n<\n
$basket = new Basket
…
If $_REQUEST['action'] == 'removeBasketItem' && !empty($_REQUEST['id']){
remove($basket, $_REQUEST['id']);
header(\"view_basket.php\");
}
>
From the code, identify the information that the user has provided.
\nAward up to [2 max].
HTTPS authenticates the identity of the website;
And encrypts data that are transmitted between web browser and web server/between two parties;
Award up to [4 max].
Award [1] for step that the Domain Name System (DNS) server will take in order to locate the correct IP address for this request from the browser up to [4 max].
The DNS server configured to the browser’s computer / the ISP (Internet Service Provider) checks through its own database to see if the (domain) name is there;
If it is, it will return the corresponding IP address to the browser;
If it isn’t the request is passed onto the next DNS server (in the hierarchy);
This continues until the (domain) name is found;
Or the top level / authoritative DNS server if reached;
When IP address is found, it is sent back to the original DNS server;
Award up to [2 max].
The required layout style for the footer is saves as a CSS file;
Each time the footer section/element appears it calls this CCS file;
Award up to [4 max].
Award [1] for each comment that indicates the function of the code up to [4 max].
Award [1] realising the modelling centred on a session (intuition of what $_SESSION[]
is)
Award [1] realising that session user identifier shall be unique.
Award [1] realising the existence of users_db.
Award [1] realising that this database is interrogated with this session identifier to retrieve all fields of the record;
Award [1] to instantiate a variable $userRecord
.
The shopping basket is modelled centred on the “session”;
A global array $_SESSION
exists, holding a session identifier associated with any user;
And a new sessionUserID
is added to the array and instantiated by a unique value for identifier;
That is generated by the function new random_number()
;
This element of the array $_SESSION[]
is used to retrieve in the user db (users database) the entire record for the user;
Relative to the user and specific to that particular session;
And used to instantiate the variable $userRecord
for further processing;
For example the final billing or confirmation of payment/dispatch.
Award up to [2 max].\n
The identifier “id” that is passed in the variable $_REQUEST['id'];
And the specific action that uses the value “removeBasketItem
”;
An airport uses an object-oriented program to keep track of arrivals and departures of planes. There are many objects in this system and some are listed below.
\nThe code below outlines the Arrival
class used in this program.
public class Flight\n
{ private String id;
public String getId() {return this.id;}
// ... more variables, accessor and mutator methods
}
public class Arrival
{ private Flight myFlight;
private String sta; // Scheduled Time of Arrival (\"hh:mm\")
private int runway;
private String gate;
private int delay;
private boolean landed;
public Arrival(Flight myFlight, String sta)
{ this.myFlight = myFlight;
this.sta = sta;
this.runway = 0;
this.gate = null;
this.delay = 0;
this.landed = false;
}
public void addDelay(int newDelay)
{ this.delay = newDelay;
}
public String getETA()
{ // calculates the Estimated Time of Arrival (ETA) of the flight
// by adding the delay to the sta and returning the result as a
// String (\"hh:mm\")
}
public int compareWith(String flightID)
{ if (myFlight.getID().equals(flightID)) { return 0; }
else { return 1; }
}
public int compareWith(Arrival anotherArrival)
{ // missing code
}
// ... plus accessor and mutator methods
}
The code below outlines part of the FlightManagement
class used in this program.
For the purposes of this exam only arriving flights are being considered.
\npublic class FlightManagement\n
{
private Arrival[] inbound; // array of inbound airplanes
private int last = -1; // index of last used entry
public FlightManagement()
{ inbound = new Arrival[200];
}
public void add(Arrival newArrival)
{ // missing code that adds the newArrival to the array inbound
// sorted by ETA, and updates last
}
private int search (String flightID)
{ // missing code that searches the array inbound and
// returns the index of the Arrival object with flightID
}
public Arrival remove(String flightID)
{ Arrival result;
int index = search(flightID);
result = inbound[index];
while (index < last)
{ inbound[index] = inbound[index + 1];
index++;
}
last--;
return result;
}
// ... many more methods
}
The method search
in the FlightManagement
class searches the array inbound
and returns the index of the Arrival
object with the given flightID
.
Outline the general nature of an object.
\nDescribe two disadvantages of using Object Oriented Programming (OOP).
\nOutline one advantage of using modularity in program development.
\nState the relationship between the Flight
object and the Arrival
object.
Construct a UML diagram to represent the Arrival
object.
Construct the method search
implementing a linear search. Use the first compareWith()
method in the Arrival
object.
You may assume that an Arrival
object with the given flightID
exists in the array inbound
.
Outline one advantage of using a binary search.
\nOutline one disadvantage of using a binary search.
\nAward up to [1] for each part of a suitable definition up to [2 max].
An object is an abstract entity;
and its components are data and/or actions;
Award up to [1] for identifying each disadvantage and [1] for an elaboration of this disadvantage, up to [2 max].
Mark as [2] and [2].
Unsuitable for minor projects;
since OOP increases complexity for little gain;
OOP programs are larger than other programs;
and therefore slower;
OOP programs take more effort to construct;
because of the decomposition needed to achieve abstraction;
Award [1] for identifying an advantage and [1] for an elaboration of this advantage up to [2 max].
\nExample answers:
Faster development;
Because different programming teams can work on different modules;
Easier to debug;
Because the smaller modules will have fewer mistakes than one big program;
Easier to update (in the future);
Because it is easier to update a module than the full program;
Re-usability;
Modules can be stored in libraries and reused for different programs;
Award up to [1] for any indication of aggregation.
\nExample answer:
The Arrival
object has/stores a Flight
object;
Award up to [4 max].
Award [1] for including 3 distinct sections.
Award [1] for including a component with all variables.
Award [1] for including a component with all listed methods.
Award [1] for indicating private/public using + / −.
Don't penalize the absence of accessor and mutator methods.
Example answer:
\nAward up to [4 max].
Award [1] for a while loop.
Award [1] for correctly testing the flightID
using compareWith()
.
Award [1] for incrementing the loop counter.
Award [1] for a return statement.
Example answer:
\nprivate int search(String flightID)\n
{ int i = 0;
while (inbound[i].compareWith(flightID) != 0)
{ i++; }
return i;
}
Award up to [2 max].
Award [1] for identifying an advantage of using a binary search and [1] for an elaboration of the advantage up to [2 max].
Binary search is much faster than sequential search;
Because it halves the search range for every comparison;
Award up to [2 max].
Award [1] for identifying a disadvantage of using a binary search and [1] for an elaboration of the disadvantage up to [2 max].
However, it is not applicable to unsorted data sets;
Because the data must be sorted first which adds to computational cost;
Weather forecasters use computer models which are able to simulate future weather patterns. These forecasts were originally limited to the near future. However, modern systems can now produce long range forecasts.
\nThe simulation of the weather forecasting models produces specific data which can be output in a variety of ways.
\nSuggest two reasons why these simulations have improved both in their accuracy and their range.
\nSuggest why forecasts become less accurate the more long range they become.
\nDiscuss whether historical data can be accurately used to forecast future weather.
\nDefine the term visualization.
\nWith the help of examples, discuss how the development in the way such data is visualized has made the results of these simulations more accessible to the general public.
\nAward up to [4 max].
Modern computer systems have become increasingly more powerful;
Which allows more complicated systems to be simulated;
In a short/acceptable period;
The understanding of (the science of) weather has steadily improved/more historic weather patterns can be accessed;
Allowing more accurate modelling to take place;
More data can now be retrieved;
Through satellites, ground stations etc.;
Only the major/known variables can be input into the model;
Approximations have to be made to represent complex processes;
These or other minor/unknown variables will not have a significant effect in the short term;
But will have (unknown) effects in the long-term/small errors have a cumulative effect over the long-term/butterfly effect;
Award [1] for each valid point discussed, and a further [1] up to [5 max] for a good expansion of this point.
\nInvestigate past weather patterns in order to see if past forecasts were correct or not and make adjustments to your model appropriately;
Look at specific events in the past (e.g. appearance of El Nino) to see how they affected future weather patterns in different areas, and then apply this to new occurrences of these events;
However, historical data does not take into account new factors, such as how carbon emissions are contributing to global warming;
The representation of (abstract) data;
In a way that is understandable by humans;
Standard simulations produce numerical values (which are not easily understood by the general public);
Modern simulations include
Graphics that are related to the data output;
e.g. rain drops/a smiling sun;
CGI/animation can produce motion;
e.g. showing a belt of rain crossing the country;
Which are more easily understood by the general public;
The following flowchart represents a standard algorithm:
\nCopy and complete the table that traces the algorithm in the flowchart using an input value of 19.
\nState the purpose of the algorithm.
\nConstruct the algorithm from the flowchart using pseudocode. Add additional pseudocode to ensure that input is validated to only allow positive integers to be entered.
\nEfficiency is an important consideration when designing algorithms to ensure they don’t waste computer resources such as memory or processing time.
\nSuggest two design considerations that could be made to an algorithm that would make it more efficient.
\nAward [4 max]
\nAward up to [4 max]:
Correct table with correct first row;
Rest of NUMBER column correct;
Rest of DIGIT column correct;
Rest of OUTPUT column correct;
\n
Award [1 max]
Converts denary number to (reverse) binary.
Award [6 max]
Validation to check for positive numbers;
Validation to check for integers;
Loop for validation rules;
Loop structure to continue while NUMBER > 1;
Correct calculations/outputs inside loop;
Correct output of last digit outside loop;
Example answer:
\ninput NUMBER\n
loop while NUMBER <= 0 OR NUMBER ≠ NUMBER div 1
output \"Please input another number, your entry is invalid \"
input number
end loop
loop while NUMBER > 1
DIGIT = NUMBER mod 2
output DIGIT
NUMBER = NUMBER div 2
end loop
output NUMBER
Award [4 max]
The algorithm could use loops;
To remove the necessity to process extra lines of code;
Use of arrays/data structures;
So data can be stored/re-used/re-entered;
Use of flags;
To stop a search routine when an item has been found so that all elements don’t have to be searched;
Mark as 2 and 2
\nA mixed set of responses was seen for this question, which was a trace table for a given algorithm presented as a flowchart. Most candidates achieved at least one mark, but many marks were lost through incomplete trace tables, or candidates not writing the complete output that the algorithm would produce.
\nA significant minority of candidates recognised that the algorithm was converting a denary number to binary. Other candidates described the process, almost line by line, that the algorithm followed, which is not the purpose of the algorithm.
\nA mixed set of results was seen for this question with most candidates achieving some of the marks. Many of these candidates provided a working loop with the correct calculations and outputs inside and outside of the loop. Some of these candidates also demonstrated some of the validation that was required, either to only allow positive numbers into the algorithm or making sure the number was an integer. Very few candidates checked for both of these things, and even fewer allowed for the number to be re-input if it wasn’t a positive integer, but simply stopped the algorithm.
\nCandidates performed less well on this question which required candidates to describe aspects of program design that would make an algorithm more efficient, such as use of loops to avoid repeated lines of code, or use of flags to stop a loop, to prevent unnecessary iterations.
\nSmart technologies can be used to illuminate the night. Street light intensity and coverage can both be controlled, depending on physical parameters, such as the time of the day, or weather conditions.
\nThe amount of pedestrians in the street or their activities could be further parameters used by algorithms for these type of applications.
\nDiscuss the technologies that ambient intelligence uses in this specific scenario.
\nWith a focus on privacy, discuss how traffic data from WiFi communication through smartphones can be used in this scenario.
\nAward up to [4 max].
Sensors;
Used to receive input for a physical parameter, such as daylight;
Transceivers/microcontrollers;
Directly on the lamppost, to be controlled remotely;
Wireless network/remote control antenna/RFID;
Position in each lamp along a street (or just the first), to communicate with both the central service centre (or all neighbouring lamps having a RF and communicate pairwise);
Internet/servers;
To connect the monitoring centre to the lamps;
Note: Do not accept: LED light and permanent supply of power, as they are not directly related to CS/IT.
\nAward marks as follows up to [4 max].
Award up to [2 max] for describing how the smartphones/WiFi could be used for street illumination.
Award up to [2 max] for a discussion on privacy/monitoring based on the data/algorithms used.
For example
\nHow smartphones/WiFi is used in the scenario
Hot-spot traffic may provide an indication of how large the crowd moving in the street/zone is;
Hopping from one connection to another may provide an indication of how and where the crowd may move;
Therefore, this data may contribute to optimize the algorithm, which in turn could impact on the cost of public illumination, so it is an advantage for the collectivity;
Discussion on privacy/monitoring
Data on hotspots are provided by telecom companies;
These data should already be the result of some analysis and be stripped of any private (personal) information;
However, the company that controls the illumination would still have information on where the crowd is (in addition to the telecom) and this poses an issue of crowd monitoring;
\nWorse, hotspots integrated directly on lampposts would provide a very fine-grained anchoring net, and presence/movement of individuals rather than crowds could be monitored (not their private information, necessarily);
\nIn both cases, private data shall not be made available and authorities and protocols should be used to guarantee which level of service these ubiquitous solutions provide;
\nGovernments may obtain this information to track the whereabouts of individuals;
\nWineForAll is a retailer that sells wine in its stores. Each store sells wine from a number of vineyards.
\nThe following extract from the Wine file contains unnormalized data.
\nDefine the term record.
\nIdentify the steps to create a query to find the vineyards and names of fruity wines where the quantity in stock is between 25 and 35 bottles.
\nIdentify the steps to create a non-persistent derived field called TotalPrice
, which would hold the total value of wine stored for each record.
Outline why the inclusion of a derived field will not affect the normalization of a database.
\nConstruct the 3rd Normal Form (3NF) of the unnormalized Wine file.
\nOutline why a single-field primary key is not always an appropriate solution for normalized databases.
\nAward [1 max].
A record is one row in a table;
All of the fields relating to item of information;
Award [3 max].
Fields and Table: Vineyard and NameOfWine FROM Wine;
Criteria: StockQty >= 25 AND StockQty <= 35; note: allow >25, <35
Description: Fruit is extracted from the field.
(Do not award the mark if Description = Fruity)
SELECT Vineyard, NameOfWine FROM Wine
WHERE (StockQty >= 25 AND StockQty <= 35)
AND Description LIKE ‘*Fruity*’;
Accept other versions including:
\nSELECT Vineyard, NameOfWine FROM Wine
WHERE (StockQty BETWEEN 25 AND 35)
AND Description LIKE ‘*Fruity*’;
Award [2 max].
All three points needed for [2]. Two points needed for [1].
UnitPrice * StockQty;
Totalprice named;
WINE table named;
Accept versions similar to the one shown below:
\nSELECT UnitPrice * StockQty AS totalprice
FROM Wine;
Award [2 max].
A derived field is created / does not exist in the table/ is temporary;
So the rules of normalization do not apply / is not affected by duplication / redundancy;
No new dependencies are created;
Award [6 max].
\nExample of solution (accept different names for tables)
\nVineyard (Vineyard, Region)
Wine (WineID, Wine, Vineyard(fk), Year, Flavour, APV, UnitPrice)
Stock (StoreID, WineID(fk), StockQty)
Vineyard table e.g. Vineyard (Vineyard, Region)
Award [1] for primary key. Either Vineyard or VineyardID.
Wine table e.g. Wine (WineID, Wine, Vineyard(fk), Year, Flavour, APV, UnitPrice)
Award [1] for primary key WineID or composite Wine/Vineyard
Award [1] for identifying the foreign key (Vineyard)
Award [1] for splitting the three description fields
Stock table e.g. Stock (StoreID, WineID(fk), StockQty)
Award [1] for composite key StoreID/WineID or Store/Wine/Vineyard
Award [1] for WineID or equivalent key shown as foreign key
Note: Should candidates provide other reasonable solutions, please contact your team leader.
\nAward [2 max].
Relationship 1-1 might not exist;
Which means a single-field PK might not uniquely identify a record;
So a composite key is needed made up of 2 or more fields;
Allow any suitable example;
This was a very straight-forward question.
\nCandidates were well-prepared with many providing actual queries. However, many did not achieve full marks for incorrectly identifying the adequate step to filter fruity wines.
\nThis question was generally well-answered as many candidates were able to identify the steps for creating the derived field.
\nIn the second part of this question, many students failed to relate derived fields to normalization.
\nMost students were able to split the tables but only a few identified the foreign keys and correctly relate the tables to each other. Many students also identified that data needed to be atomic and were able to include this in the response. Candidates were not required to re-write the table.
\nSome responses were reasonable, but many candidates were not aware of the use of composite keys/limitations of primary keys in normalized databases.
\nA charitable organisation, Harvest, which operates in a less economically developed country (LEDC), uses old computers that have been donated to them. The organization relies on WiFi and satellite-based transmission for access to the Internet.
\nHarvest is considering using a cloud-based service provided by a large IT company based in one of the more economically developed countries (MEDC).
\nOutline one technical challenge that Harvest may encounter in setting up its own website with the technologies that it has available.
\nExplain how the use of cloud-based services may help Harvest to overcome the limitations of the available technologies.
\nDescribe two problems this may cause for an organizsation such as Harvest.
\nHarvest wishes to improve its ranking in the major search engines.
Discuss whether Harvest should use black hat search engine optimization techniques in order to improve its ranking.
Award up to [2 max].
Award [1] for describing the challenge resulting from some limitation and [1] expansion, possibly with example up to [2 max].
Old computers impose memory and processing constraints;
It is likely that they cannot make sophisticated web pages;
For example, they may need to reduce the number of interactions/transmissions;
By deciding not to have dynamic web pages;
To the purpose of not generating loss of processing power on their side;
The software might not be up-to-date/the OS is old;
This poses a threat for viruses or deliberate attacks (attack the weakest nodes);
To the point that not even the charities will link to their website, rather just listing the name of the association;
To limit the risk of propagating malware;
Award up to [4 max].
Award [1] for each reason how the use of cloud-based services may help Harvest to overcome the limitations of the available technologies up to [4 max].
They can host the website on the cloud;
Enabling a sophisticated site to be created / bypassing their own limitations;
The cloud could store all of their data;
As they will have limited storage on their own equipment;
Award up to [4 max].
Award [1] for identifying how the use of cloud-based services may cause problems and [1] for an expansion / development up to [2 max].
Mark as [2] and [2].
The costs are likely to be high;
And Harvest is clearly a company with limited funds;
The cloud company will be bound by rules and regulations in the country in which it is registered;
These may cause conflicts with regard to the type of information that Harvest deals with;
Award up to [5 max].
Award [1] for identifying an advantage of using black hat techniques and an additional [1] for each development of that advantage up to [2 max].
Award [1] for identifying a disadvantage of using black hat techniques and an additional [1] for each development of that disadvantage up to [2 max].
Award [1] for a valid conclusion.
\nAdvantages:
The use of black hat techniques + an example (e.g. hidden links, or reciprocal links, keyword stuffing, hidden content, content theft, etc.);
May temporarily improve its ranking;
Disadvantages:
However, this is unethical;
This may not sit well with its image as a charity;
Conclusion:
Search engines will eventually discover that these techniques are being used;
This may lead to the site being banned;
BuildYourWebSite is an online company that provides a number of common templates for building your own website. Each template includes one HTML file, one CSS file, a folder of web images, and a folder of special sound effects.
\nEach template can be downloaded as a single compressed file, using a web browser.
\nIdentify two characteristics of HTML.
\nDiscuss the benefits and disadvantages of the template including a CSS file in addition to the HTML page.
\nExplain why TCP/IP is a reliable protocol in relation to downloading operations.
\nEvaluate lossy compression and lossless compression when used to download files.
\nAward up to [2 max].
Mark-up language;
Can contain scripting commands/code;
Can imbed objects;
Uses tags to structure page;
Provides constructs to build hyperlinks;
Can be integrated with CSS and JavaScript;
Note: Accept other reasonable characteristics.
Award marks as follows up to [6 max].
Award [1] for identifying an advantage, [1] for identifying a disadvantage, and a further [4 max] for expanding on these advantages/disadvantages.
Advantages
It saves time (in web development);
Because modification of style needs to only be made to the CSS;
It saves space;
Because the code (of the style) is not repeated in each HTML file;
Quicker load of many pages / Quicker download of many pages from the same site;
HTML files are smaller;
It gives a uniform appearance to the entire website;
Which makes it more attractive/appealing/easy to navigate;
It can be integrated with outside sources (e.g. RSS feeds);
Which makes the website more interactive/dynamic for the user;
Quicker to make changes to layout/formatting/page positioning;
Therefore, it helps separating the jobs/tasks of illustrators (designer) from those that produce content;
Increases accessibility of authoring to non-experts;
Supported by most browsers;
Increasing the number of users;
Disadvantages:
Downloading pages from different sites can be slow (general browsing);
Because each page may have its own CSS;
(However, downloading many pages from the same site is instead faster;)
CSS syntax is different from HTML and can be slightly ambiguous;
Not a user-friendly language (but available as IDE) that the developer needs to learn;
(e.g. the same cascade style name may have slightly different effects when used by different browsers;)
An HTML page saved without CSS, and seen offline, will not display nicely;
Because it would require access to external files, including CSS (including images, video, sound);
Anybody with read/write permission to the CSS can easily override just the CSS;
Showing unwanted information to an entire web-site (risk of hacking in just one point/internal threat with high risk);
Some browsers do not support exactly the same CSS (some styles/fonts for example);
The view can be slightly different using different browsers/risk of slight incompatibility;
(For large, corporate sites) Integration of HTML + CSS with other content management systems (CMS) may be tricky;
Because CMS also use their own CSS, and there can be collisions, and it requires technical competence;
Award up to [3 max].
(When a request of download is received at the Application level (e.g. HTTP with a browser), appropriate data packets are generated and sent to the transport layer/TCP;)
TCP uses the header of the data packets to order them and to check their contents;
And sends an acknowledgement signal to the transmitter upon correct reception, before preparing a new data packet with a further header for the IP/Internet level;
If the transmitter does not receive the acknowledgement from the TCP, the transmitter re-sends the packet;
Therefore, all correct packets will be available to the TCP at some point to be made available to the IP and specifically to the IP destination/receiver (in the header);
IP ensures that the package reaches the correct address;
Award marks as follows up to [4 max].
Award [1 max] each for outlining the two techniques (lossy and lossless).
Award [up to 2 max] for relating both to actual applications ([1] if related to file types instead).
Images and audio can be compressed using lossy techniques;
This will create a smaller file/faster transmission time;
But the data loss will not seriously affect quality;
However, CSS and HTML files might lose possible scripting;
As you need to recover the original data;
Lossless compression is more suitable;
The programming team have decided to replace the array of Item
objects (pl)
and the array of Payment
objects (tables)
with either a linked list or an ArrayList.
The array of Item
objects (pl)
is replaced by priceLL
, an object of the LinkedList library class. The Item
objects can be created, deleted or amended.
The method changePrice()
allows an item, identified by its item code, to have its price changed. All data required by this method are passed as parameters. If the item is not found then an appropriate message is displayed.
Outline one benefit that the use of either of these choices will have over the original array structures.
\nConstruct the method changePrice()
.
Explain how a binary tree structure would allow a more efficient search for the Item
object.
Memory space for the exact number of objects can be assigned;
Whereas the array will (inevitably) waste space/allot more memory than is needed/may run out of allotted memory/there is no need to determine array size;
Award marks as follows, up to [6 max].
Award [1] for correct signature.
Award [1] for correct initialization of the length of the loop/size of the linked list/ Boolean/Iterator object as appropriate to the solution and appropriate message displayed at end;
Award [1] for correct loop.
Award [1] for correct comparison, with or without get
methods.
Award [1] for correct updating, with or without get
methods.
Award [1] for early exit if found.
Award [1] for answer completely correct.
Example 1
\npublic void changePrice(LinkedList<Item> pll, String c,\n
double newPrice)
{
int i = 0;
boolean found = false;
int size = pll.size();
while (i < size && !found)
{
if (pll.get(i).getCode().equals(c)) // allow “=”
{
pll.get(i).setPrice(newPrice);
found = true;
}
i = i + 1;
}
}
Example 2
\npublic void changePrice(LinkedList<Item> pll, String c,\n
double newPrice)
{
Iterator<Item> iter = pll.iterator();
boolean found = false;
while (iter.hasNext() && !found)
{
Item current = iter.next();
if (current.getCode().equals(c)) // allow “=”
{
current.setPrice(newPrice);
found = true;
}
}
}
The pl
array/Item
objects could be read into a binary tree;
And placed in order of the Item
code;
(Successive) comparisons between the search item and tree item will reduce the search space by a half (each time);
Which results in a faster search than a linear search/Olog(n)
is better than O(n)
;
As a linear search might have to loop through the whole list;
Identify one advantage of using a dedicated operating system on a mobile phone.
\nAward [1 max]
Makes maximum use of the available (limited) memory to provide the features needed for the phone;
Does not waste memory space with unwanted/inappropriate features;
Ensures a higher level of security;
Makes efficient use of hardware equipment;
Suited to available hardware equipment;
Note: Accept examples, GUI will fit right with the screen resolution /can make running the device easier to use / better suited to their audience/ it is faster than universal OS's, etc.
\nMany candidates correctly answered this question.
\nOutline the use of data-hiding as a security feature in OOP.
\nThe Arrival
object has two methods named compareWith
.
Outline why calling the compareWith
method does not cause a conflict.
State the name of this OOP property.
\nAward up to [2 max].
Award [1] for stating encapsulation as an OOP property.
Award [1] for an elaboration.
Example answer:
Encapsulation allows to make instance variables (and methods) of a class private to that class;
So that the main program / other classes can't accidentally access / change the data in an object;
Award up to [2 max].
The two methods have different parameters;
allowing the compiler to choose the correct one.
Polymorphism
\nA company that provides training for teachers plans to set up a training room in its offices with a network of 15 computers. Each computer has 1 TB of storage and 16 GB of random access memory (RAM).
\nIn order to minimize costs, the company decided only to install general application software on the training computers.
\nThe company has decided to allow the teachers to use their own devices in its training room by adding wireless networking.
\nIdentify two characteristics of RAM.
\nState the purpose of persistent storage on the computers.
\nIdentify two types of general application software that would be installed on the training computers.
\nOutline one advantage to the company of implementing this change.
\nOutline one disadvantage to the company of implementing this change.
\nDescribe one method of security that may be used on this wireless network.
\nExplain why the speed of data transmission on the wireless network in the training room may vary.
\nAward [2 max].
RAM is volatile / contents erased when power is switched off;
Access speed is fast / faster than hard drive;
Data / instructions can be read from and written to it / /RAM can be overwritten;
Size is limited;
To store programs / files / data in a non-volatile device so it isn’t lost;
Stores more data as it has a larger capacity;
Award [2 max].
Word processor;
Spreadsheet;
Database management system;
Email;
Web browser;
Allow any general purpose application that is appropriate for a ‘training room computer’
\nAward [2 max].
May save money;
Due to not having to supply all the training computers;
May be able to increase the size of the training group;
Which may generate more income;
Trainees / teachers likely to be more familiar with software on own machine (and how new training software interacts with OS / user interface);
Making training sessions more efficient / allowing trainer to concentrate on the training rather than using generic applications;
Award [2 max]
May cause security issues;
Due to multiple users having network access from their “unsecured” devices;
May interfere with running of training sessions;
As some machines may not be compatible;
Award [2 max]
Encryption;
Scrambles the contents of the network transmissions so that if they are intercepted they can’t be understood (without the decryption key);
User ID (and password);
Only allows authorized users to access the network;
Media Access Control (MAC) addresses;
Unique identification codes embedded in networkable equipment so that only authorized equipment may access the network;
Firewall;
Checks traffic coming into the network and leaving the network, and can block suspicious data;
Award [4 max].
Mark as [2] and [2].
The speed of data transmission (on a wireless network) slows down;
The further the receiver is from the transmitter;
Passing through obstructions such as solid walls;
Can slow down transmissions (on a wireless network);
The bandwidth available for transmission on a wireless network is finite;
So, transmission speeds can be affected if the number of users on the network increases;
Note to examiners: Answers must relate to wireless networks and not be a comparison between cabled and wireless networks.
\nCandidates often named uses of RAM, but the question asked for characteristics of RAM, so therefore lost out as a consequence. However, many recognised it is volatile and can be overwritten.
\nMost candidates were able to state the purpose of persistent storage, but a significant number mistook this for ROM, so gave the purpose of that instead.
\nThis part was not answered as well as it could have been. Candidates were asked to name two types of general-purpose applications software suitable for a training room, with the most likely answers being word processor and spreadsheet. However, candidates provided a wide range of incorrect answers that were, for example, utilities, system software or translation software.
\nSome candidates recognised that if the teachers could bring their own devices to the training room it would save the training company money, as they wouldn’t need to provide so many training computers. Or, that their training sessions may be more efficient, as the teachers were already familiar with their own machines, so they could get straight into the training session rather than learning how to use the machine. Unfortunately, many candidates gave responses that were benefits to the teacher and generally within their teaching environment rather than in the training room, such as being able to connect anywhere in their classroom.
\nCandidates often gave responses that were generic disadvantages of wireless networks, and sometimes, when compared to cabled networks, rather than relating their answers to the given scenario. Some candidates did, however, state that one of the teacher’s devices may be infected with malware which could be uploaded, or they may be incompatible with the training software.
\nWell answered, with the full range of possible answers seen.
\nGenerally well answered, with the full range of possible answers seen.
\nIdentify two characteristics of a dynamic data structure.
\nAward [2 max]
Dynamic data structure does not have predetermined size/ allows memory use to change as needed (no fixed size) / if more space is required to store more data, it can therefore increase;
Can be expanded until all the available RAM is used;
There is no unused/wasted memory;
Memory is allocated to the data structure as the program executes (run-time);
Elements of a dynamic data structure are stored in memory locations that are chained together but not necessarily physically contiguous;
Elements of a dynamic data structure are sequentially accessed;
Most candidates were able to identify two characteristics of a dynamic data structure.
\nMost candidates were able to identify two characteristics of a dynamic data structure.
\nSketch a balanced binary tree that would allow the following output when traversed using in order traversal:
\nZebra, Tango, Hotel, Foxtrot, Delta, Bravo, Alpha.
\nAward [3 max]
Correct root;
Correct left sub-tree;
Correct right sub-tree;
Note: Award 1 mark for any binary tree with the same number of nodes in the left and right subtree;
A balanced binary tree was not always familiar to candidates.
\nEnviroBuild 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.
\nThe cost of building the houses is calculated using a model with the following three variables:
\nHouse_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:
\nIdentify the data types for the House_Type
, House_Num
and Profit
variables.
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.
Outline two validation tests that should be included in the test plan for this spreadsheet model.
\nTo 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.
\nThe following steps are used to calculate the total profit:
\nProfit
variable and the No_of_Days
variable from the spreadsheet model in (b).Construct the pseudocode that will calculate the profit after these additional costs have been considered. You can introduce any new variables, if necessary.
\nAward [3 max]. House_Type
: char/string/Boolean;House_Num
: integer;Profit
: fixed-point decimal/currency/float/double;
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 statementNUM_DAYS
: Award [1] for the correct number of days * house_num.LABOUR_COSTS
: Award [1] for NUM_DAYS * 2500MATERIAL_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:
\nAlternative solution:
\nNote: accept cell references such as B3 instead of variables
\nAward [4 max].
\nAward [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:
\nAward [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:
\nimport FILE.CSV As SS\n
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:
\ninput Profit, NumDays from spreadsheet\n
endDate = date(dateval(\"1/1/21\") + NumDays)
monthsTaken = month(endDate)
interest = 400000 * 0.01 * monthsTaken
output \"Net profit = $\", (Profit – interest)
A company provides car parking services in large cities and needs a computer system to keep track of the number of vehicles using its parking areas.
\nWhen a vehicle arrives, its registration plate is recorded on the system and it is allocated a number that identifies where it should park. When the vehicle leaves, that space is made available for other vehicles to use.
\nVehicles are identified by their unique registration plate, which is an alphanumeric code of eight characters (e.g. X1234567
). This is clearly displayed on the vehicle.
A programmer created the classes ParkingArea
and Vehicle
to model the above situation.
public class ParkingArea {\n
private Vehicle vehicles[];
private String name;
ParkingArea(String name, int capacity) {
this.name = name;
if (capacity > 300) capacity = 300;
this.vehicles = new Vehicle[capacity];
}
String getName() {
return name;
}
public int getCapacity() {
return vehicles.length;
}
public int findVehicle(String reg) {
//find where the vehicle is located in the array and
//return the index not yet written
}
}
public class Vehicle {\n
private String registration;
private byte colour;
private boolean broken;
public final static byte BLACK=1;
public final static byte WHITE=2;
public final static byte BLUE=3;
public final static byte RED=4;
public final static byte GREEN=5;
private final static double ADMIN_FEE = 3;
public Vehicle() {}
public Vehicle(String registration) {
this.registration = registration;
}
public Vehicle(String registration, byte colour) {
this.registration = registration;
this.colour=colour;
}
public void setBroken(boolean broken) {
this.broken=broken;
}
public void setColour(byte colour) {
this.colour=colour;
}
public boolean getBroken() {
return broken;
}
public String getRegistration() {
return registration;
}
public double pay(int hours) {
// code to return admin fee - only if applicable
}
}
Outline one effect of using the modifier static
when declaring a variable.
Describe the relationship between the classes Vehicle
and ParkingArea
.
Outline why it is necessary to use the keyword this
in the setBroken
method of the Vehicle
class.
Construct code to create an instance of the Vehicle
class that has a registration of X1234567
.
Construct code that sets the colour of the object created in part (i) as black.
\nAward [2 max].
Static means it is the same for all instances of the class;
because it is contained in the class rather than in an instance of the class/object / it is defined at the class level;
Static means that less memory is taken up;
as only 1 memory allocation it created for all instances rather than 1 per instance;
Award [3 max].
Award [1] for aggregation (accept Composition also);
Award [1] for An instance of ParkingArea can contain Vehicles;
Award [1] for A single ParkingArea can contain between 0 and 300 instances of Vehicle;
Award [2 max].
To distinguish between 2 variables with the same name;
Allows the local/instance variable to be set to the parameter/class variable;
Note: Award [1] if the incorrect technical terms for variables are given but the idea of distinguishing between 2 types of variables with the same name is expressed.
\nAward [2 max].
\nAward [1] for correctly declaring the variable as type Vehicle;
Award [1] for using the correct constructor;
e.g.
\nVehicle v=new Vehicle(\"X1234567\")
;
Award [2 max].
Award [1] for calling the correct method on the correct instance variable name;
Award [1] for using the constant correctly, i.e. Vehicle.BLACK;
v.setColour(Vehicle.BLACK)
;
Note: accept the constant prefixed by the name of the instance instead of the class
\nMost students associated the modifier static with the idea of permanence in some form, but not all clearly understood the difference between class variables and instance variables.
\nThis was well-answered.
\nThe this modifier clearly causes confusion. Students realized that it in some way clarified the difference between the two occurrences of the variable broken.
\nMany full marks for part (i), although some failed to put the String data in speech marks.
\nPart (ii) showed a lack of experience with the byte type.
\nA palindrome is a word that spells the same backwards. For example, the words “kayak” and “rotor” are palindromes.
\nA word can be checked to see if it is a palindrome by comparing the first letter with the last letter and then the second letter with the next-to-last letter and so on.
\nExplain why recursion is a suitable tool to use when performing this check.
\nThe method palindrome()
is called by boolean t = palindrome(word)
;
where word
is a String variable.
Without writing code, describe the recursive method palindrome()
that returns whether or not a word is a palindrome.
The solution repeats the same algorithm/series of steps/code;
With a changing/different parameter set;
Until a base/terminating case is reached;
Note: Do not award marks for “the method calls itself”.
\nThe base case will return true if the length of word = 0 or 1 (must have both values) / The index of last character <= index of the first character;
Otherwise the first and last letters will be compared;
Returns false if they are not equal;
If they are equal, calls the method again;
With, as its parameter, the word stripped of its first and last letters (can use indices);
Open source code is made available by a community of developers and is frequently updated. The code can be downloaded for free, but users must register with the website and have their access authenticated.
\nAuthentication is based on signing in to an established third-party company, for example a user’s existing email or a social network account. The third-party company then verifies the user, granting them access to the open source code website.
\nThe URL of this website is www.OpenSourceDev.org. Any new pieces of code that the developers make available become new resources on the website. A script generates weekly automatic notifications of new code available on the site, and sends this notification to users as an email.
\nEvaluate the use of server-side scripting to provide the mechanism for registration.
\nExplain how the user’s privacy can be maintained whilst using this method of authentication.
\nOutline, with an example, how the URL for these new pieces of code will be generated.
\nOutline the steps that the script could perform for sending out these notifications.
\nA fragment of a script and a web form are provided below.
In the script some functions are not implemented, and only their specification is provided.
<?php\n
//include a database of urls
include('url_db.php');
$url = $short = \"\";
if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\")
{ $url = $_POST['url'];
$short = make_short($url);
function make_short($u)
{ $x = make_alpha_string($u);
$y = first4_last4($x);
$z = limits($x);
$v = $y. \".\".$z; //string concatenation
return $v;
}
function make_alpha_string($u)
{ // It removes, in this order: substrings corresponding to
// protocol names, the substring www, and all characters
// except for letters
}
function first4_last4($u)
{ // It returns the string made of the first 4 characters
// followed by the last 4 characters of $u
}
function limits($u)
{ // It returns the string made of the first character and
// last character of $u
}
mysql_query(\"
INSERT INTO url_db(orig_url, short_url, url_ip) VALUES
( '\".$_POST['url'].\"',
'\".$short.\"',
'\".$_SERVER['REMOTE_ADDR'].\"'
)
\");
}
?>
<form method=\"post\" action=\"\">
URL:
<input type=\"text\" name=\"url\" />
<br><br>
<input type=\"submit\" name=\"Submit\" value=\"Submit\" />
</form>
Describe the processing that occurs when the form is filled with the URL https://www.the2nd.org/bin.php?id=70 that the server discovers is associated with the IP address 172.16.254.1.
\nAward up to [4].
Server-side scripting does not require the installation of extra resources on a computer, for example the latest plug-in to run the script;
The log-in process will generally be slower as a round trip has to be made;
However, for regular visitors of the site, it speeds up the login, as the server script might be linked to data storage and recognize their access for further reference;
The server script is independent from the version of the browsers that is used, the user just sees the HTML interface (this is the typical problem with client-side scripting);
A security breach on the server could lead to all log-ins being compromised;
However, server-side is more secure as client-side is more easily hacked into;
There can be occasional downgrade in performance if too many users are running simultaneously their scripts on the server;
However, for the nature of the files, this should not generate bottlenecks in the network (small files, not intensive streaming);
Award up to [4 max].
Your email address and associated password are private;
Both are needed to register with the initial website, but at most only the email address is stored there;
They are forwarded to the third-party website for identification;
The third-party identifies/confirms whether or not the person is who they say they are, based on their email/social network services that the third party provides;
This yes–no answer/confirmation provides the authentication for the open-source developers;
Award [1] for stating how the URL is generated, and [1] for giving an example, up to [2 max].
It is generated by taking the path of the website extended with the path for the code;
e.g. www.OpenSourceDev.org/newcode/json/fakecode007;
The script accesses the file of new URLs (in a file);
And adds the URLs to an email template;
Then accesses the file of email addresses of subscribers (and sends email);
Award marks as follows, up to [3 max]. (Note: there are [5] marking points)
Award [1] for the value passing from the form to php via POST
.
Award [1] for the operation of the code to generate the short URL with final $v
.
Award [1] for access to update database.
Award [1] for a new correct triple in database.
Award [1] for remote access operated by server through the database to retrieve the URL.
Note: Competent use of terminology is needed to award full marks. Generic answers that show general good understanding of the process, but lack use of competent language should not be awarded full marks.
\nExample
The value of the URL that is inputted (and submitted) via the form is stored in the variable URL which Interacts with the php code, because the method POST
is specified in the form, therefore starting a communication process;
The process generates a different value for the name for the URL that is used to update a database of URLs together with the IP address;
\nThe IP address is retrieved by the server through a remote call requested from the insertion in database;
\nThe new value for the URL that is generated, given the one in input, is\nthenhpid.td
and is stored in$v
;
(detail of intermediate operations:
$x = thendorgbinphpid
$y = thenhpid
$z = td
$v = thenhpid.td)
The new record inserted in the database url_db will be the following triple www.the2nd.org/bin.php?id=70, thenhpid.td, 172.16.254.1;
The array inbound
in the FlightManagement
class is sorted by Estimated Time of Arrival (ETA).
Define the term method signature.
\nConstruct a method showDelayed()
that outputs the IDs of all delayed flights in the array inbound
that have not yet landed and that have an ETA before a given time t
. The time t
is passed as a String
parameter.
Without using a sorting algorithm, construct the method add(Arrival newArrival)
that inserts a newArrival
in the sorted array inbound
. You may assume that newArrival
has been instantiated and that the array inbound
is not full.
When a flight is delayed, a method in FlightManagement
is used to find and update the flight with the delay and to reorganize the array so that it remains sorted for the ETA.
Describe how this method would be implemented using the methods provided.
Award up to [2 max].
[1 max] for any two out of three underlined key components.
[2 max] for all three key components.
Note: the return type is not part of the method signature.
Example answers:
The method name and all of its parameters and the type of these parameters.
The method name and the type of all of its parameters.
Award up to [4 max].
Award [1] for a correct loop until last Arrival.
Award [1] for including correct test for ETA.
Award [1] for including correct test landed.
Award [1] for correctly using double dot notation in output statement.
Do not penalize incorrect use of accessor methods.
Example answers:
\npublic void showDelayed(String t)\n
{ int i = 0;
while (i <= last)
{ if (inbound[i].getETA().compareTo(t) < 0)
{ if (!inbound[i].getLanded())
{ output(inbound[i].getMyFlight().getID());
}
i = i + 1
}
}
}
public void showDelayed(String t)
{ int i = 0;
while ((i <= last) && (inbound[i].getETA().compareTo(t) < 0))
{ if (!inbound[i].landed)
{ output(inbound[i].myFlight.id);
}
i = i + 1
}
}
public void showDelayed(String t)
{ for (int i = 0; i <= last; i++)
{ if ((inbound[i].getETA().compareTo(t) < 0) &&
(!inbound[i].landed))
{ output(inbound[i].myFlight.id);
}
}
}
Award up to [6 max].
Award [1] for a loop comparing newArrival
to entries in inbound.
Award [1] for testing for the last entry.
Award [1] for good attempt a for loop in reverse order.
Award [1] for a fully correct for loop in reverse order.
Award [1] for correctly shifting elements in the array.
Award [1] for assigning newArrival
.
Award [1] for incrementing last.
Example answer:
\npublic void add(Arrival newArrival)\n
{ int i = 0;
while ((i <= last)&&(inbound[i].compareWith(newArrival) < 0))
{ i++;
}
for (int j = last + 1; j>i; j--)
{ inbound[j] = inbound[j - 1];
}
inbound[i] = newArrival;
last++;
}
Alternative answer:
\npublic void add(Arrival newArrival)\n
{
int i = 0;
while (i <= last)&&
(inbound[i].getETA().compareTo(newArrival.getETA()) < 0)
{ i++;
}
for (int j = last; j >= i; j--)
{ inbound[j + 1] = inbound[j];
}
inbound[i] = newArrival;
last++;
}
Award up to [4 max].
Award [1] for declaring a variable of type Arrival
.
Award [1] for calling remove (flightID
).
Award [1] for calling addDelay(minutes)
.
Award [1] for adding the updated Arrival
object to array inbound.
Award [1] for adding the update to the array inbound by calling add(update)
.
public void delay(String flightID, int minutes)\n
{
Arrival update = remove(flightID);
update.addDelay(minutes);
add(update);
}
Two further classes, Car
and Motorbike
, are created.
public class Car extends Vehicle{\n
public static double hourlyFee=3.5;
public double pay(int hours) {
//code to calculate and return the complete price
}
}
public class Motorbike extends Vehicle{
public static double hourlyFee=2.5;
public double pay(int hours) {
//code to calculate and return the complete price
}
}
The method pay
in the Vehicle
class returns the administration fee (which is only part of the total price), while the method pay
of the Car
class calculates the total price for a car staying in the parking area.
Outline two differences between inheritance and aggregation.
\nConstruct a UML diagram that shows the relationships between the ParkingArea
, Vehicle
, Motorbike
and Car
classes. There is no need to include the attributes or methods of each class.
Construct the method pay
in the Vehicle
class that returns the admin fee stored in the variable AdminFee
if the vehicle has stayed for five hours or less; otherwise, it returns 0.
Construct the method pay
in the Car
class, where it uses the vehicle
method pay
but adds the charge for the amount of time spent in the parking area.
The array vehicles[]
in the ParkingArea
class is used to store instances of the Car
or Motorbike
class.
Outline why Vehicle
is a valid type for this array.
Award [4 max].
Inheritance is when the behaviour of a class is transferred to another class;
whereas aggregation is when a class is contained inside another and used;
Aggregation is useful for modelling a real life situation of containment aka. “has a” (e.g. contents of a box);
whereas Inheritance is useful for modelling real life situation that one entity is a particular (more specific) type of another entity, aka. “is a”;
While both can achieve the same result, Aggregation (composition) can lead to more robust and safer code;
whereas inheritance is a more flexible solution but prone to errors due to the behaviour of subclasses being changed;
Inheritance allows for code reuse / lowers maintenance cost;
whereas aggregation does neither of the above;
Can have more than 1 aggregation;
but only 1 superclass (in Java);
Inheritance allows for code reuse as in the creation of sub-classes;
whereas with aggregation each class must be written out in full;
Mark as [2] + [2].
\nAward [4 max].
Award [1] for all four classes shown;
Award [1] for showing the links in the correct place (any arrow or line is acceptable);
Award [1] for distinguishing the relationship ParkingArea - Vehicle;
Award [1] for distinguishing the relationships Car/Motorbike -Vehicle;
Award [1] for returning admin fee if <=5 hours;
Award [1] for returning 0 if >5 hours;
public double pay(int hours) {\n
if (hours <= 5) {
return ADMIN_FEE;
} else return 0;
}
Award [2 max].
Award [1] for for super.pay(hours);
Award [1] for returning result of correct formula (i.e. adding on hourlyFee*hours);
Example:
\npublic double pay(int hours) {\n
return super.pay(hours)+hourlyFee*hours;
}
Award [2 max].
Cars and Motorbikes are also Vehicles as they extend the Vehicle class / Vehicle is the superclass and Car/Motorbike are subclasses;
The subclasses can be cast as/considered to be/referred to as Vehicle which is its superclass;
As Cars and Motorbikes inherit from Vehicles they are also Vehicles and can therefore be stored in an array of type Vehicle;
Arrays must be declared as 1 type, and the state and behaviour of Vehicle is what both Car and Motorbike have in common. Therefore they can be referenced as Vehicles and stored in an array of Vehicles, even though they are subclasses;
This tested the level of understanding of OOP principles. Not many could clearly put into words the specific differences and tended to provide more in the line of definitions. The better students clarified the dependency levels between the different classes.
\nThis was well-answered. Most students either used the correct type of arrows or indicated the relationships with the correct expressions (has a etc.).
\nPart (i) was well-answered, but few students understood the use of the super modifier in part (ii). All aspects of the OOP course (including inheritance) should be subject to comprehensive practical work in order to promote full understanding.
\nPart (i) was well-answered, but few students understood the use of the super modifier in part (ii). All aspects of the OOP course (including inheritance) should be subject to comprehensive practical work in order to promote full understanding.
\nThe comments for part (d) are also appropriate here.
\nOutline the difference between an information system and a database.
\nA bank maintains a database that stores details of clients and their accounts.
\nA client wants to transfer money between two accounts held at the same bank.
\nExplain how the ACID (Atomicity, Consistency, Isolation, Durability) properties would apply in the context of this database transaction.
\nA bank holds large volumes of financial and personal information about its clients in its database.
Discuss whether this database should be open to interrogation by the police or the Government.
Award up to [3 max].
Award [1] for a definition of an information system, [1] for a definition of a database and [1] for the relationship between the two.
An information system is the collection of software, hardware, networking infrastructure, human resources and databases that provide the storage, processing and communication/distribution of information;
A database is an organized collection of data (organized so that its contents can easily be accessed, processed, and updated);
A database is a subset of the information system;
Award up to [8 max].
Award up to [2 max] for each of the four properties,
Award [1] for an explanation of the property and [1] in relation to the money transfer transaction.
Example answers:
\nAtomicity:
Ensures that either all changes to data are performed as if they are a single operation or none of them are performed;
In moving money from one account to another, it ensures that if a debit is made successfully from one account then the corresponding credit is made to the other account;
Consistency:
Ensures that data is in a consistent state when a transaction begins and when it ends / ensures that only valid data is written in the database;
In transferring money from one account to another, it ensures that the total value of money in both the accounts is the same at the beginning and at the end of each transaction;
Isolation:
Ensures that intermediate state of a transaction is invisible to other transactions;
In moving money from one account to another the isolation property ensures that another transaction might see one account or the other but cannot see both accounts;
Durability:
Ensures that after a transaction successfully completes, changes to data persist and are not undone even in the event of a system failure;
In moving money from one account to another durability property ensures that the changes made to each account are permanent;
Award up to [6 max].
Award [1] for identifying an advantage of these databases being open to interrogation and an additional [1] for each development of that advantage up to [3 max].
Award [1] for identifying a disadvantage of these databases being open to interrogation and an additional [1] for each development of that disadvantage up to [3 max].
Award [1] for a valid conclusion.
If there is no conclusion, award [5 max].
Advantages:
Sharing the information may enable it to be made accessible to organizations such as the Police or the Government that may not have access to it;
This means that it could be used to detect fraudulent financial activities;
Leading to reduced insurance or health insurance premiums as monies are not lost from the system that create artificially high premiums;
Disadvantages:
Misuse of information / security issues;
Information from this database may enable the account details of the clients to be shared with third parties;
Who may use this information to take money from their accounts;
Conclusion:
Although the information may be shared, the overall benefits from a reduction in fraudulent crime or inflated insurance premiums is greater than the potential for this information to get into the wrong hands;
Global warming is a term used to describe the increase in mean global temperatures.
\nThere have been numerous computer simulations developed to predict the effects of global warming. One simulation is NASA’s Virtual Earth System Laboratory (VESL), which allows users to see how climate change affects glacier size, global sea level and changes to the coastline.
\nThe VESL runs simulations in real time and is an abstraction of reality.
\nA recent study reported that previous simulations of predicted global sea levels for 2100 were highly inaccurate.
\nOutline what is meant by a real-time simulation in the context of a glacier size simulation.
\nOutline what is meant by the statement “the VESL simulation is an abstraction of reality”.
\nOutline two reasons why predictions of global sea levels from simulations may not be accurate.
\nNASA has decided to make its simulation software available for other scientists as well as members of the public.
\nEvaluate the social and ethical implications of this decision.
\nAward [2 max].
A real-time simulation runs at the same rate as the actual physical system;
The change in the glacier size occurs at the same rate as the real change / a virtual glacier will be the same size as the real glacier after the same period of time;
A real time simulation operations it can mean that it happens without a delay/action carried out before the next input;
Changes to the simulation inputs will be displayed immediately;
Award [2 max].
Abstraction removes specific detail that will not the accuracy of the simulation / climate change variables that have little influence;
Abstractions helps create the model / reduces the complexity of the model so that it works effectively;
Symbols may be used to represent patterns (e.g. temperature change);
Award [4 max].
Sea levels are based on so many factors (e.g. CO2 emissions, cattle); that it is difficult to accurate predict all of these variables;
Global events (eg nuclear war, volcanic eruptions);
may cause for an under-prediction;
Unknown variables (confounding factors) may be affecting rising sea levels;
Population growth may increase or decrease and this may impact upon emissions;
Accept any reasonable argument
\nAward [6 max].
Award [3 max] for positive reasons.
Award [3 max] for negative reasons.
Award [1 max] for a reasonable conclusion.
Positive
Making it free means more people may use it;
Educating the public may encourage more people to be environmental friendly (e.g. boycott plastics);
This may lead to pressure on governments to reduce emissions;
May provide valuable data for scientists who don’t have access to NASA resources;
Negative
Users may not fully understand the simulation results and may misinterpret findings;
May change the perception of the accuracy of the simulation software / Users may not value predictions when the simulator seems so simple;
Predictions that don’t reflect the real change may do damage to public perception of climate change;
The management of the company will launch a new scheme to give every 50th car driver and every 60th motorcyclist a free coffee voucher. The code for printing this voucher has already been created and is activated by calling the static method Vouchers.printCoffeeVoucher()
.
A getKind()
method has already been added to the Vehicle
class, which returns a char
value indicating whether it is a car (c
) or a motorbike (m
).
One test performed on the finished code was defined as follows:
\nDescribe, without writing code, any changes required to the addVehicle
method and the ParkingArea
class to make the new voucher scheme work.
Identify three other tests you might perform on the completed code to prove that it functions correctly.
\nThe removeVehicle
method of the ParkingArea
class searches in the array for a Vehicle
object with a specified registration plate, then removes it by setting that array index to null
.
The method returns a reference to the Vehicle
object that has been removed from the array, or null
if no matching registration plate was found.
Construct the removeVehicle
method.
Award [5 max].
Award [1] for declaring both the variable for total cars and the variable for total motorbikes at class level (private);
Award [1] for initializing the variables, either by calling a mutator method, while declaring, or in the constructor;
Award [1] for deciding whether the car or motorbike is 50th or 60th in the daily additions;
Award [1] for printing the message if so;
Award [1] for incrementing the appropriate counter for the total cars / motorbikes added based on the value returned by getKind()
;
Note: Do not award marks for simply adding mutator or accessor methods for the motorbike / car totals.
\nAward [3 max].
\nCar:
Award [1] for Car count mod 50 is 0, coffee voucher
;
Award [1] for Car count mod 50 is n, n coffee vouchers
;
Motorbike:
Award [1] for Motorbike count mod 60 is not 0, No coffee vouchers
;
Award [1] for Motorbike count mod 60 is n, n coffee voucher
;
Non Car/Motorbike
Award [1] for Any amount of instances of the Vehicle class which are neither Car nor Motorbike, No coffee voucher
Note: do not award a mark for first test case above which is already give in question stem
\n\n
Examples:
\nAward [6 max].
Award [1] for correct loop;
Award [1] for checking if not null;
Award [1] for checking registration using the getRegistration().equals() method;
Award [1] for setting vehicles[i] to null;
Award [1] for returning the reference (not the null element of the array), by making another variable;
Award [1] for returning null if it is not found;
Example 1:
\npublic Vehicle removeVehicle(String registration) {\n
for (int i = 0; i < vehicles.length; i++) {
if (vehicles[i] != null &&vehicles[i].getRegistration().equals(registration)) { //question - why
do it in this order?
Vehicle leaving = vehicles[i];
vehicles[i] = null;
return leaving;
}
}
return null;
}
Example 2:
\npublic Vehicle removeVehicle(String registration)\n
{ Vehicle v = null;
boolean found = false;
int i = 0;
while (!found && i < Vehicles.length)
{ found = Vehicles[i] != null &&
registration.equals(Vehicles[i].getRegistration());
if (found)
{ v = Vehicles[i];
Vehicles[i] = null;
}
else i = i + 1;
}
return v;
}
This was a good test of logical thinking. Students need to be precise: \"Include two new integer variables in the ParkingArea class to hold the total number of cars and motorcycles\" is clearly better than \"keep count of the different vehicles\".
\nThis was poorly answered, with many answers being too vague. Similar to the requirements in the IA-section B, the tests need to give both specific test data and the expected results.
\nThis was similar to 11(a) and students who answered the first one successfully also tended to answer this one well. Care needs to be taken when methods return something that types match with the return type indicated in the method signature.
\nA museum has an online catalogue of its pieces. No new pieces have been acquired over the past 20 years, and the museum has already been at risk of closure for lack of funding. Its website consists only of static web pages.
\nIt is suggested that the museum’s static web pages may be contributing to the museum’s lack of success.
\nIdentify three differences between a static web page and dynamic web page.
\nSuggest two services, and the benefits that they would provide, if the museum were to redesign its website to be dynamic.
\nExplain how the provision of services on the museum’s website can increase its rankings in search engines.
\nIt is also suggested that the museum’s basic catalogue be revised and upgraded with all of the museum’s pieces being catalogued using meta-tags.
\nSuggest how the use of meta-tags can be relevant for search engine optimization.
\nAward [3 max] for three differences stated.
Dynamic allows user interaction;
Allows parts of the content to be changed without uploading the complete page;
Can connect with server-side databases;
Gives different views for different users;
Includes the use of scripts / server side scripting, examples of;
Dynamic makes use of templates;
Static webpages are changed only by administrator;
It gives the same view to all users;
It displays exactly the information that is stored in the html file (and it may still include multimedia);
Simpler to develop/maintain, because it does not require major design/knowledge of web applications;
Source code edited directly in HTML generally shorter/less cumbersome than the one developed with web applications;
Award [1] for identifying a service and [1] for stating a benefit, for two services up to [4 max].
\nBook/pre-pay online for tickets;
More convenient for visitors (avoids closures/queues etc.);
Add a virtual tour of the museum online;
Increases the visibility of the museum / It becomes better known;
Add an audio-guide for smartphone to be downloaded from the portal;
So that users are already equipped before they visit;
(Targeted) pop up adverts/links;
Can increase revenue to the museum;
Award up to [4 max].
More possibility for the users to interact will make the website more popular;
More services online provides more ways for the museum to be linked from/to other external organizations/institutions (e.g. bank/tourist office);
The two combined would generate more traffic and more authoritative in-links;
This increases the possibility for the site to be found in a variety of ways when searched;
And this increases the website’s ranking;
Award marks as follows up to [3 max].
Award [1] for an example/idea of a meta-tag and its purpose.
Award [1] for understanding the link between meta-tags and indexing via the search operation by crawlers.
Award [1] for understanding the link between indexing and ranking via optimization/better classification by SEO.
Use of correct keywords allows the search engine to search and find those terms;
\nFor Example
Title tags / keywords associated to the title of the page;
A description with tags may induce more visitors to visit the page;
Other keywords that appropriately refer to the content of the web;
(Even irrelevant keywords or hidden content however keyword stuffing might actually be punished by more recent algorithms for ranking);
Meta attributes for robots (such as follow/nofollow, index/noindex) that give indication about whether or not to index the page;
Meta language descriptors (for example to recognize in some language rather than English) to appropriately index content based on the dictionary of that language;
This is related to indexing, because web crawlers visit pages and inspect their content based on the terms that they have to search;
The ranking algorithms give value to the pages once that they are indexed, based on parameters that depend also on the ease of retrieving the pages/number of authoritative in-links/number of hits (or visitors);
The Search Engine can be optimized so that the best use of meta-tags can be made with the objective of indexing and ultimately ranking;
The machine instruction cycle is a sequence of actions that a central processing unit (CPU) performs to execute each machine code instruction in a program.
\nState where the program is held.
\nState the part of the central processing unit (CPU) that performs the decoding.
\nOutline the function of the memory address register (MAR).
\nAward [1 max].
RAM;
Award [1 max].
CU/Control Unit;
Award [2 max].
MAR (is a register in the CPU that) stores the address of the (next) instruction/data;
to be read from/written to RAM;
A small number of candidates recognised that a program is held in random access memory (RAM) when it is being run. However, a large number of candidates gave less precise or incorrect answers, such as 'in the computer' or 'on the drive'.
\nMany candidates correctly identified the control unit as the part of the central processing unit (CPU) that decodes instructions. Some candidates incorrectly stated the ALU or the CPU, the latter being taken from the question.
\nA good range of answers was seen for this question with candidates recognising that the memory address register stores the address of the data to be read from or written to the RAM. Candidates who gave a correct answer either achieved one or both marks, depending on whether they covered part or all of the answer.
\nDefine the term database management system (DBMS).
\nIdentify three characteristics of logical schema.
\nOutline the purpose of a data definition language (DDL).
\nIdentify two tasks that a database administrator carries out to ensure the security of the database.
\nAward up to [1 max].
A database management system (DBMS) is a set of programs that allows to read, store, change /extract data in a database;
Award up to [3 max].
Award [1] for each characteristic of logical schema identified up to [3 max].
All attributes for each entity in database are specified;
The primary key for each entity is identified;
Includes all entities and relationships among them;
Keys identifying the relationship between different entities (foreign keys) are specified;
Normalization occurs at logical level;
Award up to [2 max].
Award [1] for each identifying the role of Data Definition Language (DDL) and [1] for an expansion or explains how it may be used up to [2 max].
The Data Definition Language (DDL) are commands which define the different structures/objects in a database;
Database administrators use these commands during the setup and/or removal of a database and database objects (such as tables, indexes, and users);
Award up to [2 max].
Award [1] for each task that a database administrator carries out to ensure the security of the database up to [2 max].
DBA sets access levels and passwords;
DBA manages back-up procedures (allow examples of this);
DBA establishes a recovery plan for the database in disaster case;
A school teacher decides to write a program to store class records and marks. Part of this program involves using a sort algorithm. The algorithm shown is a selection sort and to test it, the teacher has set up an array VALUES[]
with 5 elements of test data.
LIMIT = 4\n
loop COUNTER1 from 0 to LIMIT – 1
MINIMUM = COUNTER1
loop COUNTER2 from COUNTER1 + 1 to LIMIT
if VALUES[COUNTER2] < VALUES[MINIMUM] then
MINIMUM = COUNTER2
end if
end loop
if MINIMUM ≠ COUNTER1 then
TEMPORARY = VALUES[MINIMUM]
VALUES[MINIMUM] = VALUES[COUNTER1]
VALUES[COUNTER1] = TEMPORARY
end if
end loop
Identify two variables that have been used in the algorithm.
\nCopy and complete the table below to trace the algorithm using the data set:
\n20, 6, 38, 50, 40
\nWith reference to the algorithm in the flow chart, construct this algorithm in pseudocode so that it performs the same function.
\nState the type of sort in the algorithm constructed in c(i).
\nConstruct an algorithm fragment to output the data in the array VALUES[].
The sorting algorithm could be part of a sub-program within a larger program.
Explain the benefits of using sub-programs when constructing a larger program.
Award [1] for any two from:
\nLIMIT;\n
MINIMUM;
COUNTER1;
COUNTER2;
TEMPORARY.
Award [5 max].
Both COUNTER1
and COUNTER2
correct;MINIMUM
column correct;
Final VALUES[]
0, 1, 2 correct;
Final VALUES[]
3, 4 correct;TEMPORARY
column correct;
Note to examiners:
Allow follow through (FT).
In case of different representation of values in columns COUNTER1 and COUNTER2, then FT, award marks for the correct values of the variables MINIMUM and TEMPORARY.
Award [3 max].
Use of correct nested loops;
Correct use of flag;
Inner loop checking adjacent cells;
Values being swapped if necessary;
Example algorithm 1:
\nLIMIT = 4\n
FLAG = TRUE
loop while FLAG = TRUE
FLAG = FALSE
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
FLAG = TRUE
end if
end loop
end loop
A recursive solution is allowed at HL. SL candidates who submit an above level recursive solution should also receive credit.
\nVersion 1 – basic recursive solution
\nAward [3 max].
BUBBLESORT defined as a procedure with correct pass through parameters and end/return statement;
Correct loop with values swapped if necessary inside procedure;
Recursive call of BUBBLESORT with parameters passed;
Correct condition for recursive call;
Example algorithm 2
\nLIMIT = 4\n
BUBBLESORT(VALUES, LIMIT)
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
end if
end loop
if LIMIT – 1 > 1 then
call BUBBLESORT(VALUES, LIMIT - 1)
end if
end BUBBLESORT
Version 2 – more efficient recursive solution
\nAward [3 max].
BUBBLESORT defined as a procedure with correct pass through
parameters and end/return statement;
Correct loop with values swapped if necessary inside procedure;
Recursive call of BUBBLESORT with parameters passed;
Correct condition for recursive call;
Correct use of flag;
Example algorithm 2
\nLIMIT = 4\n
BUBBLESORT(VALUES, LIMIT)
FLAG = FALSE
loop COUNTER from 0 to LIMIT - 1
if VALUES[COUNTER] > VALUES[COUNTER + 1] then
TEMPORARY = VALUES[COUNTER]
VALUES[COUNTER] = VALUES[COUNTER + 1]
VALUES[COUNTER + 1] = TEMPORARY
FLAG = TRUE
end if
end loop
if LIMIT – 1 > 1 and FLAG = TRUE then
call BUBBLESORT(VALUES, LIMIT - 1)
end if
end BUBBLESORT
Bubblesort;
\nAward [2 max].
Use of (any type of) loop;
Correct output statement;
Example algorithm:
\nloop COUNTER from 0 to LIMIT\n
output VALUES[COUNTER]
end loop
Award [3 max].
Sub-programs contain reusable code (for use in other programs);
A large programming project can be divided into sub-programs;
Different sub-programs can be constructed by different programmers;
Future maintenance is easier due to the organisation of the large program (into sub-programs);
No real problems noted with this question other than a few candidates did not accurately copying the variable names as provided in the algorithm.
\nMany fully correct or partially correct responses to this question were seen, however, a significant number of candidates did not fully trace the algorithm to its conclusion, therefore limiting their mark for the question.
\nMost candidates attempted to construct this algorithm and the vast majority made use of pseudocode, rather than a programming language, unfortunately, very few achieved full marks. The usual reason was that candidates did not give a nested loop, which made the awarding of full marks difficult, as the outer loop also makes use of a flag as its terminal condition, therefore also affecting one of the other marking points. Many candidates incorrectly made use of the conditional IF statement as though it was a loop, thereby creating an ‘IF loop’.
\nMany candidates recognised that the algorithm was a sorting routine, but not all specified the correct type. Other candidates thought it was a search routine.
\nA number of versions of correctly operating responses were seen for this question, some of which were given in pseudocode, others were in programming code. However, a small number of responses were not given inside a loop, so therefore would only print one of the values.
\nMany responses seen were quite brief making it difficult to award all the marks, as the responses did not cover sufficient distinct marking points. However, the responses seen demonstrated that candidates understood the benefits of using sub-programs when constructing a larger program, and with a bit more detail in their answer, could have achieved full marks.
\nThe Ministry of Tourism intends to include data from a number of sources in a data warehouse in an attempt to improve the services the tourism companies offer to their customers.
\nThe Ministry of Tourism will use data mining to provide the Government with information that it can use to promote and support tourism in the country.
\nIdentify four sources of information that could be incorporated in the data warehouse.
\nOutline two differences between a data warehouse and database.
\nExplain how the Extract, Transform, Load (ETL) processes can be used to address the problems related to data migration.
\nOutline one ethical problem that may result from data mining.
\nExplain how cluster analysis can be used to improve the advertising strategy of the tourism companies.
\nExplain the importance of link analysis in exploring patterns in data mining.
\nAward up to [4 max].
Award [1] for each source of information up to [4 max].
For example,
Sources of travel information such as airports, ports, bus/train;
Sources of personal data about tourists (such as age, gender, etc.);
Sources of social data about tourists (such as family status, occupation, economic circumstances, etc.);
Sources of information about the tourism products and services these tourists booked such as:
Award up to [4 max].
Award [1] for each identifying a difference between a data warehouse and a database and [1] for an expansion up to [2 max].
Mark as [2] and [2].
Database is based on operational processing;
Whilst data warehouse is based on informational processing;
The operations on databases consist of transactions;
Whilst operations on data warehouse consist of queries;
Database is used for everyday transactions;
Whilst data warehouse is used for decision support;
Database mainly stores current data;
Whilst data warehouse stores historical data;
Data in the database is always up to date/accurate;
Whilst the data in data warehouse is maintained over time;
Data in the database is simple/primitive/detailed;
Whilst data warehouse holds summarized/consolidated data;
The type of access to data in database is read/write;
Whilst mostly read only access for the data stored in data warehouse;
Database size is smaller (for example in up to 10GB);
Than the size of data warehouse (for example 100GB to TB);
View of data in database is flat/relational;
Whilst the view of data in data warehouse is multidimensional;
Users (end-users) of the database are common users (for example customers, tourists, clerks, etc.);
Whilst end-users of data warehouse are knowledge users (for example, analysts, managers, executives);
The number of database users is greater;
Whilst the data in data warehouse is used by smaller number of people;
Award up to [3 max].
Extract data
Award [1 max] for an explanation of how the extraction process can be used to address the problems related to data migration.
Pulling data from different source databases/ from various source systems (e.g. MS Access, SQL Server, Oracle, etc.);
\n(Cleanse and) transform data (so that data is clean and useful for a purpose)
Award [1 max] for an explanation of how the transformation process can be used to address the problems related to data migration.
Trimming for white space/ proper data type/do some validation, etc.;
\nLoad data
Award [1 max] for an explanation of how the load process can be used to address the problems related to data migration.
Transfer data into data warehouse/ data mart/operational data store so it can be used for the mining processes within the data warehouse;
\nAward up to [2 max].
Award [1] for each identifying an ethical problem that may result from data mining and [1] for an expansion up to [2 max].
Data mining raises privacy concerns when people are traced;
Their actions are analyzed without their knowledge;
Data mining creates people/tourist/customer files with a tendency of judging and treating people on the basis of group characteristics;
Instead of on their own individual characteristics;
Data mining can provide information that could be used unethically;
For example, increasing profits by selling this information to others / or by targeting return tourists with information obtained on their previous visits;
Award up to [4 max].
Award [2 max] for evidence that candidates understand how cluster analysis is used and [2 max] for an explanation related to tourism products/services.
Cluster analysis:
Subdivide tourists into distinct subsets;
Where any subset may be selected as a market target;
Explanation related to tourism products/services:
Subsets could be “young tourists with limited budget”;
For this subset music festivals, sport could be advertised to ensure the hotel can maximize its revenue;
Subset of tourists traveling with young children;
Children activities / sports / games available / “kids hotels” could be advertised to ensure the hotel can maximize its revenue;
Subset of older tourists influenced by cost–value considerations and/or secure/or quiet environment;
So these hotels can be configured to specifically meet their needs and promoted only to these tourists such as advertise “stay 7 days and pay only 6 days” / advertise hotel located in the quiet place/secure place / at some distance from the center;
Award up to [3 max].
Award [1] for each identifying the importance of link analysis in exploring patterns in data mining and [1] for each subsequent expansion up to [3 max].
Link analysis technique is used to analyse connections/links between small instances of relational databases / only on required datasets of database/;
(But) it can also be applied on large number of databases to show the relationships between these databases;
Link analysis is important because it discovers new relations in relational databases / new patterns of interest / checks the similarity between the datasets / finds anomalies where old/known patterns are violated;
Simulation software can be used to produce a 3D visualization of rising sea levels that change as the user alters the percentage of ice that has melted.
\nFigure 3: 3D visualization of rising sea levels
\n[Source: Courtesy NASA/JPL-Caltech.]
\nDefine the term visualization.
\nIdentify how a 2D visualization could be used in this scenario.
\nExplain the benefits of using visualization when simulating rising sea levels.
\nOnce the 3D visualization has been rendered, when the user drags a slider bar to simulate the amount of ice that has melted, the visualization is re-rendered without any delay.
\nFigure 4: Slider bar to simulate different percentages of sea ice
\n[Source: Courtesy NASA/JPL-Caltech.]
\nAward [1 max].
A visualisation is graphical software technique that creates an image / diagram / graph to communicate data;
Award [1 max].
2D map of a coastline;
standard flat map;
cross-section of the land;
Award [5 max].
Visualizations provides a quick way of seeing where the sea levels are now and where they will be if the glaciers melt;
People can understand a visual image more easily than raw data;
No need to interpret figures so time is saved;
A visual of land being claimed by the water has greater emotional impact that raw data;
Public / politicians are more likely to be influenced by a visualization than raw data;
Accept other reasonable reasons.
\nAward [6 max].
Wireframe model is created with polygons;
The 3D rendering process automatically converts a 3D wireframe model into 2D images on a computer;
2D images are combined to create a 3D image;
3D renders may, or may not, use photorealistic effects;
It is likely that scanline rendering would be used because it uses less processing / system resources than ray tracing;
it is unlikely that ray tracing would be used because of the time taken for rendering;
Genetic algorithms are used to influence the behaviour of non-playing characters (NPCs) in role-playing games (RPGs). NPCs are computer-controlled characters that the player interacts with but does not control.
\nA series of generic NPCs are being developed for use in any multi-player RPG. The environmental and social interactions of these NPCs are being developed using supervised learning and will continue to develop as the game is played.
\nOnce NPCs have completed their supervised training, they are placed in a dynamic game environment. Each NPC learns to adapt its behaviour to its environment.
\nAt this stage of the training, NPCs will not be verbally communicating with other characters in their environment.
\nOutline two advantages of developing NPCs using genetic algorithms.
\nExplain how supervised learning of a genetic algorithm could be used to support the way NPCs learn.
\nDescribe the way an NPC in a game could adapt its behaviour when moving and interacting with its environment.
\nThe last stage of NPC development is verbal communication with player characters and other NPCs. To assist with this process, it was decided to explore research related to chatbots.
\nExplain the benefits of giving NPCs the functionality of chatbots.
\nAward [4 max].
No need to anticipate and code in advance the reactions that NPCs need to display;
since the supervised training will ensure the characters can adapt their responses;
Save programmers development time;
because NPCs can be used in similar RPG games;
Provides greater game realism;
NPC characters would evolve to behave more like real people;
NPCs would remember previous encounters with players;
thus, altering their gameplay rather than running through a loop;
Mark as 2 + 2
\nAward [6 max].
Start with a set of “units” (here, NPCs) with some predetermined code/behaviour with added randomness / genetic algorithms work successively towards a solution from a starting point;
Apply a process of selection to the units, so that the probability of survival depends on their success against some predetermined criteria;
Supervised learning has training data with a known set of responses to a known set of problems;
The fitness function (defined by the programmers) limits the adaptability of a given population of NPCs to the skills or tasks defined by the fitness function;
A (fitness) function is used to measure the effectiveness of a solution / offspring (respawned NPCs) are evaluated using a fitness function;
The best solutions are retained / worse solutions are discarded / the most adaptive NPCs will remain in the population and others removed (die);
The retained solutions are mutated (randomness) to generate another set of solutions / retained NPCs are mutated and respawned / recloned;
This process is repeated until the best solution is identified / repeated until the most adaptable NPC model is identified;
Accept other reasonable reasons or examples.
\nAward [6 max].
The NPC makes a random set of moves;
Records the location/identity of objects relative to its current position;
Building up a map of identifyable surrounding objects;
This is repeated until all objects in the space have been placed in distance and direction from a starting point;
The NPC would learn how to react to the object (e.g. swim in a river / walk on a path);
NPC would learn where it could walk and where it could not (e.g. river would need to be avoided);
NPCs that die could be regenerated from ones that had avoided dying up to that point in the game;
NPC would adapt to a changing environment e.g. a house built in a game;
Award [4 max].
Chatbots are designed to output language in response to human language;
Most NPC conversations are scriptive speeches / repetitive…
so using chabots will add more realism to the game;
NPCs could verbally communicate in script or sound form;
There would still need to be some hardcoded responses that relate to the game storyline;
Natural language processing (NLP) could be applied to chatbot conversations;
Describe the steps involved in using the bubble sort algorithm to sort an array.
\nAward [4 max].
Award [1] for looping through array;
Award [1] for comparing each pair of adjacent items (in the array);
Award [1] for swapping them if they are in the wrong order;
Award [1] for repeating this until no swaps is required (which indicates that the array is sorted);
Candidates were required to write the main steps involved in a bubble sort algorithm. Candidates who wrote their answer in algorithmic form achieved better results than those who simply described the process. The full range of marks, from zero to four were achieved for this question. Some candidates lost out because they described a different sort routine than the bubble sort required in the question. Other candidates were able to demonstrate well how the bubble sort operated for one pass of the algorithm but forgot to mention that it would repeat until no swaps had been required.
\nA restaurant uses an object-oriented program to manage the cost of the food and drink consumed by customers. Everytime a table is occupied a Payment
object is instantiated which will contain details of the items ordered. As each item is ordered, a FoodItem
or a DrinkItem
object is added to the Payment
object as appropriate.
public class Payment\n
{
private FoodItem[] fi = new FoodItem[100];
private int fiCount;
private static double foodTax = 0.2; // 20 % sales tax added to
// all food prices
private DrinkItem[] di = new DrinkItem[100];
private int diCount;
private static double drinkTax = 0.1; // 10 % sales tax added to
// all drink prices
public Payment()
{
fiCount = 0;
diCount = 0;
}
public DrinkItem getDi(int x)
{
return di[x];
}
// all other accessor and mutator methods are included
// addFoodItem() – this method adds a new FoodItem object
// addDrinkItem() – this method adds a new DrinkItem object
public static double findPrice(Item[] pl, String c)
{ //code missing }
// calculateBill() – This method returns the bill (the total value of
// the items consumed for a particular table)
}
public class FoodItem
{
private String itemCode;
private int quantity;
public FoodItem(String x, int y)
{
itemCode = x;
quantity = y;
}
// all accessor and mutator methods are included
}
The DrinkItem class is defined in a similar way.\n
Whenever a object is instantiated, the variables and are initialized to 0 through the code in the constructor.
\nOutline an alternative method of initializing these variables that would not require the use of the code in the constructor.
\nState the implication of the use of the term static
in the Payment
class.
With reference to two examples from the classes in the resource, explain the benefits gained by the use of different data types.
\nDescribe the purpose of the following statement:private FoodItem[] fi = new FoodItem[100]
The Payment
class method addFoodItem()
is passed a FoodItem
object as a parameter.
Construct the method addFoodItem()
.
Award [1] for identifying the code and [1] for identifying the new position.private int fiCount = 0
and private int diCount = 0
;
In the variable/attribute section of the class and not in the constructor);
EITHER
The values of these (static) variables;
Are the same for all objects;
They belong to the class (not to the objects);
And are only created/declared once;
Note: Do not accept “cannot be changed”.
OR
The static methods;
Are class methods (not object methods);
Are independent of the objects in the class;
Award [2 × 2] for each clear example. Only award [2] for an example if the benefit is clearly shown;
\nHaving different data types allow different operations to be carried out depending upon the type;
e.g.
Calculations in the integer “quantity” variable;
which are not possible for a String;
Double instead of integer allows the use of decimals;
which mirrors real-life scenarios/allows more precise calculations;
Using an array (of objects);
Allows individual items to be accessed/processed more easily;
Memory usage can be reduced;
e.g. “fiCount
” takes up less space as an integer than it would as a double (assuming it’s just a number);
The variable fi
is declared as an array of FoodItem
objects / of type FoodItem
;
With (a maximum of) 100 values;
It cannot be directly accessed/it is encapsulated within the Payment class;
Award [1] for each correct line of code.
\npublic void addFoodItem(FoodItem f)\n
{
fi[fiCount] = f;
fiCount++;
}
Pugh University has a website that allows computer science students to enter their name and customize the web pages.
\nConsider the section of HTML and CSS code shown below.
\nFile name: index.html
\n<!DOCTYPE html>\n
<html>
<body>
<script>
function setVar(){
var subject=document.getElementById(\"kippers\").value;
document.getElementById(\"subj\").innerHTML = subject;
}
</script>
<h2>My First Page</h2>
<p>Welcome to the <span id=\"subj\"></span> Faculty</p>
<input type=\"text\" id=\"kippers\"/>
<button onclick=\"setVar();\"/>clickme</button>
</body>
</html>
When a student enrolls, they must enter their name on a web page. Before being added to the database, the system should check that the name typed is not blank and that it has not already been added to the database.
\nConsider the following URL:
\nhttps://www.follettibstore.com
\nThe common gateway interface (CGI) offers a standard protocol for web servers.
\nState the output of the index.html
file in the web browser.
Describe the processing that takes place when the user inputs “Pugh” into the text box and then uses the clickme
button.
Explain why these two validation checks occur on different computer systems.
\nExplain how website certificates are used to authenticate a user’s browser through secure protocol communications like HTTPS.
\nDescribe the working of the common gateway interface (CGI).
\nPugh University uses cloud computing services, such as Google Docs or Office 365.
\nDescribe how cloud computing is different to a client–server architecture.
\nAward [2 max].
Award [1] for the text within the <p> tags (My First Page large font/Welcome to the Faculty in a smaller font;
Award [1] for the text box and correctly labelled button;
OR
Award [2 max ].
Initially it displays:
My First Page – in large font;
Welcome to the Faculty – in normal font;
A text box + a button labelled “clickme”;
A Then if you type in the text box and then press the button, it displays what is typed between “Welcome to the” and “Faculty” – e.g. type “Science” and it will display; “Welcome to the Science Faculty”;
Note: Students either show the output on the web-browser or describe what would be displayed on the web-browser.
\nAward [3 max].
The button’s onclick method is called, i.e. setVar();
This first sets the variable subject to the value of the HTML element with id kippers, i.e. the text box;
and then sets the inner text of the element with id subj, i.e. the span, to “Pugh”, so that the display is “Welcome to the Pugh Faculty”;
Award [4 max].
Award [1] for identifying correct validation check.
Award [1] for describing the validation check.
Presence check:
It happens in JavaScript in the web page on the client;
because this will save the server handling many transactions/to avoid sending a null value that will need to be handled by the server;
Lookup check
It happens on the server;
because the database is stored on the server rather than on the client’s computer;
Mark as [2] + [2]
\nAward [3 max].
The website certificate is used to initiate sessions between the user’s browser and the server;
The web server sends the browser a copy of its SSL certificate;
If the browser trusts the certificate, it sends a message to the web server;
The web server sends back a digitally signed acknowledgement to start an SSL encrypted session;
Award [4 max].
The Common Gateway Interface (CGI) is used to provide interactivity to web applications/enable forms to be submitted;
It uses a standard protocol that acts as an intermediary between the CGI program and the web server;
The CGI allows the web server to pass a user’s request to an application program;
And then the forwarded data is received to the user’s browser;
Award [4 max].
Cloud computing is based on sharing computing resources over the internet;
Cloud computing can be offered as a service to individuals and companies (SaaS) which means they do not have to maintain the infrastructure;
Cloud computing and applications are more scalable than client-server architectures;
Client-server architecture does not need to be operating over the internet, but instead can be limited to a local network;
Client-server architectures may require more maintenance of the infrastructure by the organization who are using it;
cloud computing is typically more resilient than client server, because the services offered are more widely distributed, rather than being concentrated on one server or on a small number of alternative servers;
Not all students were familiar with the processing of web scripts. The processing of such scripts is fundamental to the functioning of the web commercially and is an important part of the Web Science course.
\nNot all students were familiar with the processing of web scripts. The processing of such scripts is fundamental to the functioning of the web commercially and is an important part of the Web Science course.
\nThe question was testing the students' knowledge of client-side and server-side processing. Not many brought this aspect into their answers. As with part (a) more practical experience is recommended.
\nPoorly answered. Not many understood what these certificates were and even fewer could correctly explain the process involved.
\nStudents were more comfortable with this concept and were aware of its role as an intermediary between application and server.
\nThis was a comparison question which required relating different aspects to both paradigms. It was not answered particularly well.
\nThe World Wide Web can be represented as a web graph.
\nThe World Wide Web has expanded significantly over the last 10 years. In June 2018, there were an estimated 1600 million websites and 4100 million users. This is approximately twice the figures of January 2014.
\nThe World Wide Web can be divided into the text web and the semantic web.
\nThe development of technologies that underpin the World Wide Web has led to the growth of ambient intelligence and collective intelligence.
\nDescribe how a web graph can be used to represent the connectivity of the World Wide Web.
\nExplain why a user can still navigate from one web page to another web page in the same amount of time as previously, even though the number of web pages is significantly larger.
\nOutline two reasons why there needs to be a balance between expressivity and usability on the semantic web.
\nIdentify two features of ambient intelligence.
\nEvaluate the role of collective intelligence in the advancement of human knowledge.
\nAward [4 max].
In graph theory, a graph is a set of nodes (also called vertices) that can be connected through edges;
In a web graph each web page is represented by a vertex;
In a web graph each hyperlink is represented by a directed edge;
Therefore, the web graph provides a representation / model of the connectivity of the World Wide Web;
The direction of the edge is from the page with the hyperlink to the page that is the target of the hyperlink;
Award [4 max].
Although the growth in the number of web-pages on the World Wide Web has increased exponentially, the diameter of the World Wide Web increases linearly;
The increase in routing hubs may lead to a more efficient routing algorithm being used;
And in combination with the increasing speed of web-pages loading;
Means that despite the significant increase in the number of web-pages, despite there being an increase in the number of hops required to navigate from one web-page, there may be no discernable increase in time for this process to occur;
Award [4 max].
The semantic web is based on data and enables computer systems to understand the meaning of information and its relation to other pieces of information;
this increased usability is dependent on the ability of the different computers to process the intended meaning of content better;
however, giving information more expressive power may come at an expense of usability;
for example, a language such as RDF can be highly expressive power, but requires the user to specify relations of information to other information;
in some cases, it may be beneficial to create shared databases (i.e. increase the usability);
but, there may be other cases where the increased expressivity leads to a decrease in usability;
Award [2 max].
embedded, devices are integrated into their environment;
context aware, these technologies can adapt to the needs of the user;
machine learning, these technologies can learn from previous behaviors;
Award [6 max].
Collective intelligence is the intellectual by product of a group of people working together;
This ability to harness the benefits of collective intelligence have been made possible by the development of the internet;
Collective intelligence can be used for a variety of purposes, for example linked to social media (Facebook and Twitter), gaming sites (Online Multi-player games), Scientific research (Large hadron Collider and Wikipedia;
Collective intelligence benefits from the open sharing of resources and may allow for a more rapid evolution of ideas than ‘traditional’ methods;
Collective intelligence may not have a central authority, so the user created information may be considered to be factual when it is not;
Collective intelligence may lead to a disruption in the way that knowledge is stored or classified, i.e. the development of folksonomies in place of ontologies;
The lack of a formal organizational structure may lead to the acquisition of the collective intelligence being potentially piecemeal or haphazard;
There may be no owner of this additional knowledge, so it may not be stored or maintained in the most efficient manner;
Many answers identified the fundamental elements nodes, vertices, edges, and some also made references to the identification of the SCC.
\nTwo reasons, the advance in technology leading to increase in the speed of operations and the linear increase of the web's diameter showed that some schools had investigated this aspect of the developing web.
\nThere were few full marks with most students failing to make reference to the ability of devices to adapt.
\nThis was reasonable well-answered, with references both to positive and negative aspects.
\nOutline why single processor computers may not be able to render 3D graphics effectively.
\nAward [2 max].
Single processor is mainly occupied with the OS jobs / might not be able to handle multiple jobs/;
Rendering 3D graphics requires a great deal of processing (which a single processor may not be able to give);
If attempting rendering on a single processor, a (very) high clock speed is required;
which may not be available;
3D graphics processing is (inherently) parallel;
A single processor is not able to handle parallel processing;
Not an easy question for many candidates.
\nThe global variable tables
is declared as follows:
Payment[] tables = new Payment[50]
;
The indices in this array represent the table number, so tables[1]
is a Payment
object for the customers occupying table number 1.
The driver (main) class contains the following code. Note: You can assume that all appropriate accessor and mutator methods have been included in their respective classes.
\ntables[1] = new Payment();\n
tables[2] = new Payment();
FoodItem a = new FoodItem(\"f102\", 2);
FoodItem b = new FoodItem(\"f100\", 1);
DrinkItem c = new DrinkItem(\"d102\", 3);
tables[1].addFoodItem(a);
tables[1].addFoodItem(b);
tables[2].addDrinkItem(c);
tables[2].addDrinkItem(new DrinkItem(\"d103\",1));
System.out.println(tables[1].getFiCount());
System.out.println(Payment.getFoodTax());
System.out.println(tables[2].getDi(1).getItemCode());
The price of each item is stored in an object of the Item
class.
The class is outlined below:
public class Item\n
{
private String code; // item code
private String name; // item name
private double price; // unit price before tax
// all accessor, mutator and constructor methods are included
}
All of the objects in this class are held in the global array pl
according to the following declaration:
Item[] pl = new Item[200]
;
Note: The number of objects held in this array will change from week to week.
\nThe method findPrice(Item[] pl, String c)
in the Payment
class looks up and returns the price of the item with code c
.
State the output after this code is executed.
\nConstruct statements, in code, that will print out the following: The number of drink items ordered by table 40.
\nConstruct statements, in code, that will print out the following: The item code of the third food item ordered by table 2.
\nConstruct the method findPrice()
. You may assume that the item exists in the array.
When a customer wishes to pay the bill, the method is called. If the bill was for table 10 then the following call would be made:
\ndouble finalBill = tables[10].calculateBill(Item[] pl)
;
Construct the calculateBill()
method. You should make use of any previously defined methods.
Award [1] for each correct value.
2;
0.2;
d103;
System.out.println(tables[40].getDiCount())
;
Allow variations of the get
method name
Note: Ignore minor syntax errors.
\nSystem.out.println(tables[2].getFi(2).getItemCode());
Allow variations of the get
method name
Note: Ignore minor syntax errors.
\nAward marks as follows up to [6 max].
Award [1] for correct initialization.
Award [2] for loop that checks entries, but has early exit.
Award [1] for a loop that checks all 200 entries with no early exit.
Award [1] for correct assignment.
Award [1] for correct comparison.
Award [1] for correct return value.
Award [1] for both the assignment and comparison IF get
methods are not used.
public static double findPrice(Item[] pl, String c)\n
{
int x = 0;
double price = 0.0;
boolean found = false;
while(!found)
{
if ((pl[x].getCode()) == c)
{
price = pl[x].getPrice();
found = true;
}
x++;
}
return price;
}
Award marks as follows up to [7 max].
Award [1] for correct method header.
Award [1] for correct initialization.
Award [1] for correct loop.
Award [1] for finding item code.
Award [1] for use of findPrice
method.
Award [2] for the calculation if completely correct, award only [1] if taxes are wrong and/or no use of accessor.
Award [1] for consideration of both food and drink objects (whether correct or not);
public double calculateBill(Item[] pl)\n
{
double total = 0.0;
for(int x = 0; x < fiCount; x++)
{
String c = fi[x].getItemCode();
double price = findPrice(pl,c);
total = total + fi[x].getQuantity()*price*(1 + foodTax);
}
for(int y = 0; y < diCount; y++)
{
String c = di[y].getItemCode();
double price = findPrice(pl,c);
total = total + di[y].getQuantity()*price*(1 + drinkTax);
}
return total;
}
Construct a truth table for the following logical expression.
\n(A XOR B) AND NOT C
\nAward [4 max].
Award [1] for a truth table with all 8 inputs and up to 3 correct outputs.
Award [2] for 4 or 5 correct rows in the truth table.
Award [3] for 6 or 7 correct rows in the truth table.
Award [4] for all 8 correct rows in the truth table.
Candidates demonstrated that they could create a truth table for a given logical expression, and as a result, achieved full, or near full, marks. A small number of candidates lost marks for errors such as an incorrect number of rows in the truth table or applying AND C to the final result, rather than AND NOT C, as required in the question. Inputs were mostly laid out in an organised manner, making it easy to check that all combinations of 0 or 1 had been included. A small number of tables were less organised, and this may have contributed to some errors.
\nOutline one advantage of using virtual memory.
\nOutline one disadvantage of using virtual memory.
\nAward [2 max].
Award [1] for an advantage and [1] mark for an outline.
Allows more applications to run than there is available physical memory;
By the use of page/swap files/part of hard disk as primary memory;
Larger application can run with less real RAM;
\nAward [2 max].
Award [1] for a disadvantage and [1] mark for an outline.
Applications run more slowly;
Uses hard drive memory as primary memory / takes more time to switch between applications;
When a computer's virtual memory resources are overused /Reduced amount of hard drive space available for your use;
programs lock-up/do not run/disk thrashing;
Poorly answered by majority of the candidates: virtual memory was confused with cloud storage.
\nPoorly answered by majority of the candidates: virtual memory was confused with cloud storage.
\nA school has a local area network (LAN) connecting its computers and peripheral devices. The LAN also provides access to the internet.
\nUsers have been troubled by slow speeds when accessing the internet.
\nDescribe the role of a router in this network.
\nOutline two reasons why there might be a reduction in data transmission speed at certain times.
\nOutline two measures that the school could take to safeguard its data from unlawful access via the internet.
\nThe inventory of office supplies used in the school is stored on the computer as a single file.
\nEach of the office supplies in the inventory (such as paper, ink, toner, printers, pens, staplers, pencils and scissors) has a unique ID number, name, maximum quantity, minimum quantity and remaining quantity.
\nOutline the steps in an algorithm that would output a list of supplies with the quantity to be ordered.
\nAward [3 max].
controls the flow of data in the network;
inspects address of data packets;
directs to the appropriate network path/ selects a path between networks (by inspecting address of data packets);
securely transmits data packets (across that path toward the intended destination);
Award [4 max].
malicious software/spyware/malware / viruses;
attacking the system;
the type of connection;
valid outline for the slow down (depending on the type of connection);
Note: There are many types of internet connection: wireless connections, wireless hotspots, mobile internet, broadband connections, fixed wireless and satellite connection, cable, DSL;
\nhardware malfunction;
internet speed can considerably slow down if modem-router configuration is not correct / updated;
external factors;
during the peak hours of daytime the most visited websites encounter more network traffic than what has been anticipated;
NOTE: Accept examples. For example, too many students try to connect to an e-learning site at the same time.
\nMark as 2 and 2
\nAward [4 max].
Preventing unauthorized access/No access without user names/passwords;
which should be regularly changed/made difficult to guess;
Data should be encrypted;
Allowing only those with decrypting code access;
Teachers/students should be trained for safe practices;
to create a risk-conscious /security-aware culture within the school;
Installation of virus checkers/spyware software;
to prevent damage to data files or the system / to prevent data being extracted from the files/system;
Mark as 2 and 2
\nNote: Accept appropriate measures such as physical security measures / access control / data security / network and communication security / user awareness and education, etc.
\nAward [4 max].
Award [1] for looping through the inventory file;
Award [1] for reading the supply data record (ID number, name, maximum quantity, minimum quantity and remaining quantity);
Award [1] for checking if the quantity remaining is less than minimum quantity;
Award [1] If so, calculate the quantity to be ordered (number to buy) / as the maximum quantity minus the quantity remaining;
Award [1] for outputting the name/ID number of the office supply and the number to buy;
Example 1:
\nwhile not end of inventory file\n
read supply data record from file
if remaining quantity < minimum quantity
then
numbertobuy = maximum quantity – remaining quantity
output (\"Reorder \", ID, name, numbertobuy)
end if
end loop
Example 2:
\nfor each item in the inventory loop\n
with item do
if remaining quantity < minimum quantity then
output \"Reorder \", ID, name, (maximum quantity – remaining quantity)
end if
end do
end loop
Candidates generally recognised that a router directs data between networks and gained a mark for this. However, most answers didn't really go beyond that point and concentrated more on access to the internet. Some candidates did recognise the role of addresses in data packets to ensure they arrived at the correct destination.
\nThe vast majority of candidates who achieved marks in this question, which asked for two reasons why there may be a reduction in data transmission speed at certain times, gave answers that may fit into category 'external factors'. An example of this was high demands on bandwidth due to many students accessing the network at the same time. Sometimes, candidates gave more than one answer related to this same category. Other categories, such as malicious software, type of connection and hardware malfunction, were largely overlooked by candidates.
\nCandidates recognised at least one measure that a school could take to safeguard its data from unlawful access via the internet, with correct answers based on authentication of users or encryption. A small number of candidates recognised the benefits of anti-virus software. However, candidates could also have discussed the benefits or training staff or users in safe practices.
\nCandidates were required to write the main steps in an algorithm to output a list of office supplies with the quantity to be ordered. Candidates who gave a list of logical steps written in the style of an algorithm, rather than as a purely descriptive answer, achieved higher marks. Marks were generally lost when candidates failed to recognise the need for a loop to check the whole file, or if they were not specific enough about either what was being ordered, or the quantity of the order. Sometimes, candidates would output the office supply item and its order quantity but failed to show how the order quantity was determined.
\nA single parking space that holds one car can be used to hold two motorbikes. The programmer has decided to use a two-dimensional array to create a map of the parking area.
\nVehicle parkingSpaces[][] = new Vehicle[2][200]
;
Note: m
and c
have been used to show where motorbikes and cars are parked.
Police have requested a way of searching the parking area for vehicles with a specified registration plate, and a binary tree has been suggested.
\nIdentify one advantage of using a two-dimensional array for this purpose.
\nIdentify one disadvantage of using a two-dimensional array for this purpose.
\nOutline why searching for the registration plate in a binary tree would be faster than looking for it in the two-dimensional array.
\nIdentify the steps that would be involved in taking the data from this two-dimensional array and creating a binary search tree.
\nAward [1 max].
Faster to access (i.e. O1 instead of On);
Arrays take less memory than lists (as they do not store pointers);
Mirrors real life situation;
Award [1 max].
Static, therefore memory wasted when not being fully utilised;
Inability to grow, should further spaces be added, i.e. If Parking area grows;
Award [3 max].
The array would need to be searched using a linear search which is inefficient O(n) whereas a binary search is much more efficient O(log n);
A linear search for a car in this parking area could require a maximum of 200 comparisons (i.e. it would look at the first row of every column) whereas a binary search would only require 8 (i.e. log 200 base 2);
A linear search for a motorbike in this parking area would require a maximum of 400 comparisons (i.e. it would need to look at both rows of every column) whereas a binary search would only require 7 (log 100 base 2);
In a binary search, each comparison would eliminate half of the remaining possible matches, whereas in a linear search it only eliminates 1;
A binary search has the registration plate as its key and therefore it doesn’t require accessing the field of the vehicle object for each comparison, whereas in a linear search, each comparison would be slower because it would require getting the vehicle object’s registration field using an accessor method;
A binary search is always faster than a linear search on a large data set. As the police may be searching for many cars and in many parking areas, their searches will be on large set of data;
Award [5 max].
Create a binary tree to store vehicle objects;
Loop around all of the elements in the 2 dimensional array (e.g. using inner and outer loop);
Skip empty locations;
Take the first vehicle found and add as the head of the binary tree;
Take all subsequent vehicles found and do the following;
Get the node’s vehicle registration;
Find the appropriate insertion point in the binary tree by navigating from the root and comparing the registration to the key of the current node;
When a leaf node is reached compare the registration with the vehicle to be inserted and insert it as the left or right child node, using its registration as the key;
Continue until the end of the vehicle array has been reached;
Both parts were well-answered.
\nBoth parts were well-answered.
\nMost students identified the tree property that effectively eliminates half of the tree when searching but answers were not always detailed enough to gain full marks.
\nA large number of students were unclear as to how a binary search tree is created. Full marks were only reached by those students who clearly identified the different stages of the process.
\nWebsite developers need to consider a range of usability factors when designing a website.
\nA company promotes its products online. To make a purchase, customers are required to register with the company and provide data like their name, date of birth, age, gender and email address. Once registered, more than one customer is able to access the server to retrieve and modify their data at the same time.
\nIdentify two usability factors that need to be considered in the design of a website.
\nOutline one reason why visual displays on a computer screen can create difficulties for some people.
\nState where the customer data is held during the process of modifying their data.
\nExplain how the operating system ensures that each customer’s data is secure when multiple users are accessing the data at the same time.
\nThe company is considering sharing its customers’ data with marketing organizations.
\nExplain why there could be ethical issues for the company when sharing its customers’ data.
\nAward [2 max].
complexity / simplicity / amount of effort to get a result / number of errors with the time taken to move past them;
readability / comprehensibility / reading or writing speed;
learnability / time to accomplish tasks on the first use;
effectiveness ( user performance);
efficiency (time needed to complete a task);
Award [2 max].
Award marks for the reason/accessibility issue arising from visual / hearing impairments / cognitive disabilities, and not only for users with disabilities but also for those using mobile devices (alternative browsing devices such as TVs, watches, etc.), or those with slow network connections.
Visual display design is not logical;
workflows are not simple, and do not require as few interactions as possible to complete;
Visual display design is not consistent;
navigation, header, footer, and main content are not always in the same places;
Visual display design is not usable as possible;
tools are not easy to use, processes are not broken down into logical steps;
People with poor eye-sight/color blind can have difficulties to distinguish;
because of the way graphics, words and directions are used / combinations of some colours (e.g., red and green);
Award [1 max].
RAM/primary memory;
It's held by the process/thread handling the customer access, which may be in RAM or in other storage if the process is swapped out while handling the access;
Award [4 max].
OS (memory management function) allocates / deallocates memory to each process/customer task, and guarantee each customer task the resources it needs to run correctly;
moves processes back and forth between main memory and secondary memory during execution to prevent overwriting / accidental interchange;
OS (hardware memory protection- part of an OS) isolates/protects customer’s data/applications;
and control access rights to the specified memory area (for example, prevents write access to the memory which is not allocated to the process/ customer task);
and protects data / applications when in memory / RAM from malicious code (prevents attempts to execute the contents of the partition/ allocated memory);
Award [6 max].
privacy of customer/ person data;
company needs to gain permission from customer;
customer would need to be able to view all data details;
customer must be informed about all uses that will be made of data;
customer must be informed to whom data will be disclosed.
legal issues to do with unauthorized disclosure of customer data;
Answers that simply identified usability factors related to website design, such as: complexity, readability, learnability, effectiveness and efficiency, were rare. The vast majority of candidates opted for a more descriptive approach, which generally did not reflect the required answers.
\nCandidates in general offered responses to this question related to visually impaired users, and some gained marks here, particularly if their response related to poor choice of colours making it hard to read, for example. However, candidates could have also given answers related to screen layout not being logical, consistent screen layout design, or the fact that consideration needs to be given to the size of the screen being used, such as on mobile devices.
\nSome candidates recognised that customer data is held in RAM while it is being modified. However, other candidates incorrectly stated that it would be held in the computer or the server, which is not specific enough to achieve the mark.
\nThe majority of candidates did not recognise that this question related to how an operating system functions and keeps data secure in multiuser environments. Candidates offered answers related to security, but often in relation to authentication when logging in. Some marks were achieved for statements related to the operating system's role in preventing one user's data overwriting that of another, or for the operating system controlling access rights to different parts of the memory. However, high marks on this question were rare.
\nCandidates had the opportunity to discuss ethical issues related to a company considering sharing customers' data without permission. Many candidates described one or more of the points: privacy of its customer data, the need to obtain permission from customers in order to share their data, and the legal issues that may arise due to the unauthorised disclosure of customer data. However, candidates could also have discussed the need for customers to be aware of how their data may be used, the actual data that may be being shared and to whom it would be disclosed. Most candidates achieved some marks here, but mostly in the centre of the mark range.
\nState the output from the binary tree using postorder traversal.
\nAward [2] for completely correct answer and [1] for any 3 numbers in correct order.
\nPostorder traversal: 76 75 79 70 68 72 83
\nMost candidates answered this question reasonably well.
\nOutline why a binary tree would be a good choice of data structure for maintaining an address book.
\nAward [2 max].
Time efficient searching / traversing for a contact in an address book;
Each iteration / comparison allows the size of the search to be reduced (by skipping about half of the remaining contacts);
Fast/easy addition / removal of contacts in an address book;
Quick search for the leaf node / empty node where a new contact can be placed / for the node containing the contact to be deleted;
Contacts can be listed / output in alphabetical order/ fast sorting;
using inorder traversal;
A few candidates provided too vague, out-of-context answers.
\nThe internet and World Wide Web are often considered to be the same, or the terms are used in the wrong context.
\nMany organizations produce computer-based solutions that implement open standards.
\nA search engine is software that allows a user to search for information. The most commonly used search algorithms are the PageRank and HITS algorithms.
\nDistinguish between the internet and the World Wide Web.
\nOutline two advantages of using open standards.
\nOutline why a search engine using the HITS algorithm might produce different page ranking from one using the PageRank algorithm.
\nWeb crawlers browse the World Wide Web.
\nExplain how data stored in a meta-tag is used by a web crawler.
\nAward [2 max].
The internet is a global network of interconnected computers / a network of networks;
The World Wide Web is software / a service that runs on the hardware of the internet and provides access to content / a collection of pages that can be accessed through hyperlinks / a way of accessing and sharing the information that is held on the internet in webpages;
\nThe World Wide Web uses the http protocol. This is only one of the many protocols used by the internet;
\nE-mail, File Transfer Protocol (FTP), and instant messaging services are part of the internet but not of the web;
\nAward [4 max].
Open standards provide a publicly available specification for a specified task;
This is an agreed set of parameters that enable interoperability and/or compatibility to occur;
Using Open standards means that you are not subject to a governing body with its own agenda/self-interest;
Thus, you can be confident that you won’t be subject to fees/bias;
Open standards promote interoperability;
This enables the various devices to communicate with each other;
Open standards advocates also argue that openness encourages better and more secure systems;
this is because more people are able to analyse the standards and resulting software and no-one has a proprietary interest in suppressing knowledge of problems to keep sales up.
Mark as [2] + [2].
\nAward [2 max].
The HITS Algorithm ranks the page based on a combination of its importance as a hub and an authority;
The PageRank Algorithm ranks the page by counting the number and quality of links to a page to determine the relative importance of the website;
Award [3 max].
Meta tags are included in the header of a web-page which are available to a web-crawler and give information about the page that it could make use of;
When the web-page is crawled, a copy of the HTML is replicated in the search engine database;
When a user enters text into a search the search engine retrieves the data indexed from the web-page;
And the search engine ranks and displays the content (in order of relevance);
Standard question and well answered.
\nMost students referred to the idea of interoperability.
\nMany answers talked generally about popularity and some did mention the idea of hubs and authorities and others referred to the quality of connections, but few put the two ideas together correctly.
\nMany answers identified the content of the tags and some were able to relate this content to subsequent decisions taken by the web crawler.
\nConstruct a diagram showing the relationships between the Payment
, FoodItem
, DrinkItem
, and Item
classes. You do not need to include the names of attributes or methods.
By making reference to any of the classes from 12(a), describe two benefits that a programming team would gain from the use of encapsulation.
\nThe company that owns this restaurant also owns hotels, shops, and a car hire business. The programs that manage the finances of these different businesses include classes similar to the ones shown in this paper.
\nExplain how inheritance could be used as a tool to both improve the clarity of the design and to reduce the amount of code that needs to be written.
\nAward marks as follows, up to [3 max].
Award [1] for 4 classes connected with arrows/lines.
Award [1] for “has a” label or correct arrow from Payment
to FoodItem
and “has a” label or correct arrow from Payment
to DrinkItem
(with no additional arrows).
Award [1] for “uses” label or correct arrow going from Payment to Item (with no additional arrows).
Award [1] for identifying a feature, [1] for an example in the given context, and [1] for an elaboration, for two features up to [6 max].
Encapsulation places all attributes and methods that relate to a particular object/entity together;
For example, Payment
class includes attributes such as the food and drink arrays and methods such as calculateBill()
;
This provides a clearer view/understanding of each section of the problem;
Which can lead to more efficient programming (faster, less errors etc.);
Encapsulation protects the values of the data stored within the object;
From (accidental) changes made by other classes;
For example, quantity in the FoodItem
class cannot be altered through another variable called quantity in another class;
This allows programmers to select any variable names they wish/no restriction on choice of variable names;
Award up to [4 max].
A generic Payment
class can be created;
This would contain data/variables/methods required by all units of the company;
Each of the different operations could then inherit this class;
Adding new variables/methods that relate only to them;
Overriding the superclass methods as necessary;
Note: Allow a similar answer that deals with the different items (FoodItem
, DrinkItem
etc.).
A new parking service has been introduced: staff will park the car for the driver and then return it later when the driver wants to leave. This service will use a narrow parking area surrounded on three sides by walls, where any cars behind the required car must be reversed out. For example, car X00000011
was the first vehicle to be parked, so to remove it from the parking area, the other five cars, starting with X00000123
, will need to be removed. The cars are then returned starting with car X00000010
.
Figure 5: Cars parked in the parking area
\nThe class Stack
, which contains the Vehicle
objects, has the following methods:
The method staffRemoveCar
will remove a vehicle with a specified registration plate from the parking area (you can assume the vehicle is in the parking area):
public static void staffRemoveCar(Stack stack, String reg){\n
Stack temp = new Stack();
//add code here
}
Construct the staffRemoveCar
method.
A stack can be implemented using an array or a singly linked list.
Compare the use of these two data structures for creating a stack.
Award [6 max].
Award [1] for looping around the main stack using isEmpty() method;
Award [1] for using \"while\" loop in both loops (note: not a \"do while\"!);
Award [1] for breaking out of outer loop when car is removed and other cars are replaced;
Award [1] for correctly removing cars before target car is found;
Award [2] for replacing cars in same order by popping off temporary stack;
Example 1:
\npublic void staffRemoveCar(Stack stack, String reg) {\n
Stack temp = new Stack();
while (!stack.isEmpty()) {
Vehicle v = (Vehicle) stack.pop();
if (v.getRegistration().equals(reg)) {
// correct car is now removed
// return others
while (!temp.isEmpty()) {
stack.push(temp.pop());
}
break; // don't keep repeating
}
temp.push(v);
}
}
Example 2:
\npublic static void staffRemoveCar(Stack<Vehicle> stack, String reg)\n
{ Stack<Vehicle> temp = new Stack<Vehicle>();
boolean found = false;
while (!found && !stack.isEmpty())
{ Vehicle curr = stack.pop();
found = curr.getRegistration().equals(reg);
if (!found) temp.push(curr);
}
while (!temp.isEmpty()) stack.push(temp.pop());
}
Award [4 max].
Award [1] for an initial valid comparison and [1] for a valid expansion.
Memory
Linked lists can deal with memory issues more efficiently than arrays;
Arrays are static so will have a maximum size and cannot grow beyond that;
Memory will be allocated for maximum size at instantiation so while it is not full memory is wasted Links are dynamic and can add/remove memory as required- no memory is wasted;
Implementation
No particular advantage is gained by the use of either structure;
As additions and removals (push and pop) work on one end of the stack, navigation speed (i.e. O1) is not very helpful; Linked lists can adjust the pointer at the end of the list (can use a tail pointer) so slow navigation is not an issue;
Errors
The use of arrays is more likely to lead to run-time errors;
As arrays can reach their maximum limit whilst linked lists are only limited in size by the specifications of the CPU;
There were many full marks gained for this algorithm with students making correct use of the various stack methods.
\nMost alluded to the memory issues regarding the two data structures, but too many dealt incorrectly with issues dealing with traversing the structures, which were largely irrelevant as access was only needed for the top of the stack.
\nOutline one feature of a word processor that could reduce the amount of typing required when writing letters.
\nState the purpose of technical documentation provided with software.
\nAward [2 max].
Auto-correct/short sequences/codes;
can be used to represent longer phrases;
Mail merge;
allows production of many letters by only typing the (body of a) letter once;
Voice recognition;
allows easy entry of text;
Award [1 max].
Technical documentation explains how to install software;
Technical documentation describes the hardware configuration/operating system needed(to install this software);
Candidates were generally able to name or describe a feature of a word processor that could reduce the amount of typing required when writing letters. Candidates who named a feature and described it achieved both marks.
\nA small number of candidates recognised the role of technical documentation in the installation of software or in identifying the hardware requirements of a program. However, many answers were seen in which candidates described user documentation.
\nA school has 100 students. All student names (strings) and student ID numbers (five-digit integers) are held in two separate one-dimensional arrays named SID
and SNAMES
.
For example, student Pia Baranger has ID number 11876.
\nA binary search algorithm is not used to find a particular name in array SNAMES
.
The school offers its sporting program to students and has a basketball team, a tennis team and a football team. Each student must choose at least one of these three sports.
\nThree collections, BASKETBALL, TENNIS
and FOOTBALL
, are created. When a student chooses a sporting activity, their ID number is added to the appropriate collection.
For example:
\nBASKETBALL={10011, 11876, 10122}\n
TENNIS={10011, 11876, 10002}
FOOTBALL={10011, 10002, 22103, 32000}
The method isIn(X, COL)
is available, where:
X
is a five-digit integer representing an ID numberCOL
is a collection that holds student ID numbers.The method isIn(X, COL)
returns True
if the ID number X
is in the collection COL; False
otherwise.
For example:
\nisIn(11876, BASKETBALL)
returns True
isIn(11876, FOOTBALL)
returns False
The football and tennis training sessions are held at the same time. The football coach would like to know how many students will not be able to attend the football training session because they will be attending the tennis training session.
\nState the reason for not using a binary search.
\nConstruct an algorithm in pseudocode for the method isIn(X, COL)
.
Construct an algorithm in pseudocode that will output the number of students who have chosen both tennis and football. The method isIn()
should be used in your answer.
The school coordinator would like to check whether there are students who have not yet chosen any one of the three sports.
Construct an algorithm in pseudocode that will output the names of students who have not yet chosen any one of the three sports. An appropriate message should be displayed if every student has chosen a sport.
Award [1 max].
\nBecause the array SNAMES is not sorted/ordered;
\nAward [4 max].
Award [1] for initializing and returning/outputting flag;
Award [1] for a while loop;
Award [1] for correct comparison and updating flag;
Award [1] for the correct use of collection methods (resetNext(), hasNext() and getNext());
Example 1:
\nisIn(X,COL)
PRESENT=False
COL.resetNext()
loop while COL.hasNext()and not PRESENT
Y= COL.getNext()
if X== Y
then PRESENT=True
end if
end loop
return PRESENT
end isIn
Example 2:
\nisIn(X,COL)
P=0
COL.resetNext()
loop while COL.hasNext()
if X== COL.getNext()
then P=1
end if
end loop
if P==1 // NOTE: instead of if statement only
then return True // the statement : return P==1
else return False // may be written
end if
end isIn
Award [3 max].
Award [1] for initializing, updating and returning/outputting COUNT;
Award [1] for a while loop;
Award [1] for calling method isIn()
;
Award [1] for correct use of collection methods (resetNext(), hasNext()
and getNext()
;
Example 1 (loop through collection FOOTBALL):
\nCOUNT=0\n
FOOTBALL.resetNext()
loop while FOOTBALL.hasNext()
X== FOOTBALL.getNext()
if isIn(X,TENNIS)
then COUNT=COUNT+1
end if
end loop
output COUNT
Example 2 (loop through collection TENNIS):
\nCOUNT=0\n
TENNIS.resetNext()
loop while TENNIS.hasNext()
if isIn(TENNIS.getNext(),FOOTBALL)
then COUNT=COUNT+1
end if
end loop
output COUNT
Award [7 max].
\nAward [1] for the use of flag;
Award [1] for looping through the array SID;
Award [2] for correct use of logical operators not/and/or in if statement, 1 mark for minor error;
Award [1] for the correct call of method isIn()
;
Award [1] for outputting the name from the array SNAMES within the loop;
Award [1] for outputting message(if needed) after the loop;
Example 1:
\nFLAG=True\n
loop for K=0 to 99
if not( isIn(SID[K],FOOTBALL)or isIn(SID[K],BASKETBALL) or isIn(SID[K],TENNIS))
then
output SNAME[K]
FLAG=False
end if
end loop
if FLAG
output 'Each of the students is on at least one of the three teams'
end if
Note: the condition in if statement could be written as
not(isIn(SID[K],FOOTBALL))and not(isIn(SID[K],BASKETBALL))and not(isIn(SID[K],TENNIS))
Example 2:
\nAward [1] for the use of flag
Award [1] for looping through the array SID
Award [1] for nested if statements
Award [1] for correct logical expressions in each of these ifs
Award [1] for the correct call of method isIn()
Award [1] for outputting the name from the array SNAMES within the loop
Award [1] for outputting message(if needed) after the loop
X=1\n
loop for K=0 to 99
if not(isIn(SID[K],FOOTBALL))
then if not (isIn(SID[K],BASKETBALL))
then if not(isIn(SID[K],TENNIS))
then
output SNAME[K]
X=0
end if
end if
end if
end loop
if X==1
output 'Every student has chosen a sport'
end if
Most candidates recognised that a binary search would only work with sorted data.
\nCandidates were required to produce an algorithm for the method described in the question. Most candidates achieved some marks for this algorithm, but full marks were rare. The scenario involved the use of a collection, so collection methods were expected within the algorithm. Many candidates failed to demonstrate the use of collection methods.
\nCandidates were required to construct a second algorithm involving the use of the method defined in part b. As with part b, the use of collection methods was also expected, but was often missing. Candidates who attempted the question, however, generally achieved some marks.
\nA final algorithm was required based on the question scenario. Some candidates did not attempt this question. A small number of candidates achieved high marks by demonstrating good programming skills. However, a large number of candidates scored low marks for the construction of a partial solution or a solution that was partially correct.
\nThe World Wide Web can be divided into three categories: the surface web, the dark web and the deep web.
\nThe dark web is only accessible by using specialist software, such as TOR and I2P. Many users of the dark web use it to protect their anonymity.
\nMany users of the dark web use peer-2-peer (P2P) networks for activities like torrent streaming. This opens up ports on the computer to upload and download data.
\nDistinguish between the surface web and the deep web.
\nExplain how a user’s anonymity can be maintained while accessing the dark web.
\nExplain why users have concerns about opening up ports to upload and download data.
\nThe founders of the World Wide Web intended it to be a decentralized and democratic environment.
\nTo what extent have the aspirations of the founders of the World Wide Web been met?
\nAward [2 max].
The surface web is the part of the web that can be reached by a search engine whereas the deep web cannot;
The deep web may consist of dynamic content such as the result of database queries or may be protected proprietary content;
Award [3 max].
The dark web uses a layered encryption system;
Data is routed through a large number of intermediate servers;
Which means it is almost impossible to decrypt the information layer by layer;
With the result that the user’s details are practically untraceable, and their anonymity can be maintained;
Award [3 max].
A port is used to facilitate the communication between a computer and an application;
Certain ports such as Port 21 (FTP), 23 (Telnet) and 80 (HTTP) are reserved;
Every time a port is opened on a computer it provides access to that computer;
This means that the security of that computer may be potentially compromised every time a new port is opened;
Or port conflicts may occur when more than one application tries to use a specified port;
Award [6 max].
World Wide Web has enabled citizens to communicate easily and for ‘ordinary’ citizens to express their opinions;
Therefore, the ability to publish is not confined to certain ‘privileged’ groups such as broadcasters and journalists;
The World Wide Web has to a large degree given access to common resources to all citizens globally who have access to the Internet;
However, it can be argued that the evolution of the World Wide Web has led to a greater centralization of power, for example the digital oligarchs (Microsoft, Google, Amazon, Apple, Facebook);
This centralization has led to a reduction in democracy as the digital oligarchs have an increasing stranglehold over the lives of their ‘digital subjects’ through the aggregation, analysis and monetarization of their data;
There are still issues with a lack of digital democracy, for example, many citizens may not have access to the World Wide Web, either through income, geography or necessary skills;
Dark web and deep web are clearly concepts that engage the interest of our students. Search engines were correctly brought into the answers to part (a) whilst various ruses, some of which were correct, were present in the answers to part (b).
\nBeing an \"explain\" question the answers required knowledge of \"how\" or \"why\". Not that many explained the importance of the translation feature of a browser.
\nMost students identified the dangers of opening these ports to potential hackers with the consequent dangers.
\nIn a 6-mark discussion question, the examiner will look for six different ideas that are both relevant to the question and reasonably well-explained. Students need to bear this in mind when planning the way in which they are going to answer. Short phrases or bullet points are not appropriate.
\nA telecommunication company stores a large amount of data in three databases.
\nThe database segmentation is carried out on the CUSTOMERS database.
\nData mining is used to extract knowledge hidden in this large amount of data. Before using data mining processes the existing data should be cleaned up.
\nCustomers committing fraud is a risk to the company.
\nEvaluate the use of an object-oriented database as opposed to a relational database.
\nDefine a spatial database.
\nState what is meant by database segmentation.
\nExplain one benefit of database segmentation to the telecommunication company.
\nExplain how ETL processes could be used in data preparation.
\nDistinguish between the use of association and sequential patterns as data mining techniques.
\nDescribe how deviation detection could be used to detect fraud at the telecommunications company.
\nCustomers who decide to leave the telecommunication company for a competitor may result in huge losses for the telecommunications company.
\nExplain with the use of an example, how predictive modelling could be used to optimize information sent to existing customers.
\nAward up to [4 max].
Object-oriented databases store objects rather than data such as integers, strings or real numbers;
Objects are used in object-oriented languages such as C++, Java, and others;
Objects consist of attributes (data which defines the characteristics of an object) and methods (procedures or functions which define the behaviour of an object) / the data is closely related to the programs that process them;
Which may be a more accurate representation of the real-world objects they represent;
Relational databases store data such as integers, strings or real numbers in tables / uses tables with rows and columns);
Relational database is normalized so data is not repeated more often than necessary;
All columns depend on a primary key (a unique value in the column) to identify the column;
Once the specific column is identified, data from one or more rows associated with that column may be obtained or changed;
There is a distinct separation between the storage of data and any application using them;
Disadvantages of object-oriented database over relational database
Lower efficiency when data is simple and relationships are simple;
Relational tables are simpler;
More user tools exist for relational databases;
Standards and support for relational databases are more stable so changes in database are less likely to be required;
Award [2 max].
A spatial database stores:
Spatial data / locational data / geometric data types;
Such as point, polygons, lines, 3D shapes, coordinates etc.; // allow any one of these;
That model the structure of geometric/3D objects;
And make use of spatial indexes to access data;
And supports geometric functions;
Database segmentation means dividing entities into groups with similar characteristics/common attributes;
\nAward [1] for identifying a benefit and [1] for a further explanation, up to [2 max].
\nBenefit
Increased profit;
Better reputation;
Increased number of customers;
Better opportunities for growth;
To gain a larger share of the market;
Explanation
By studying the groups and behaviour of the customers in the group (for example, average call time of customers younger than 30 or which services are purchased by customers older than 60, etc.);
The company will better understand customers and serve them better;
Can better decide which marketing actions should be taken;
Can better predict which group of customers new products/services should be offered to;
Can better decide which new products/services are needed;
Award up to [3 max].
Useful data should be discovered then extracted from various sources;
Transformations performed;
Repair inaccuracy between data formats;
Remove mistakes/spelling mistakes;
Delete unnecessary data/data fields / clean up the data;
(accept other examples)
Load data into data warehouse;
Award up to [3 max].
Association is a (rule based) data mining technique which searches for relationships between data items;
In the same transaction;
Sequential patterns is a technique that seeks to discover/identify similar patterns in transaction data;
Over a period of time;
Note: Accept examples in given situation.
Association could find out that customers who buy a new mobile phone also change the subscription type;
Sequential patterns could discover that twice a year number and duration of calls increase (e.g., customers’ birthday and New Year’s Eve);
Award [1] for creating a model and [1] for detecting changes/differences in the data/model from previously measured values, up to [2 max].
\nExample answer
The customer call records and calling behaviour (other activities) could be summarized to obtain their calling pattern;
The (previous) calling pattern could be compared with the customers’ recent call/activity;
In case of significant changes/differences the activity is suspicious/fraud detected;
Award [1] for creating a statistical model, [1] for analysing the model and forecasting probabilities/trends and [1] for an appropriate example in the given situation.
\nExample answer 1
Customer’s online behaviour pattern could be created and considered;
Customers who spend less time logged on may be less likely to renew their annual subscription;
In this case, the ability to keep the customer can be increased by offering new/better/cheaper services and products;
Example answer 2
Customer’s calling pattern could be created and analysed;
If, for example, the customer has high monthly usage of services then the customer will probably renew his annual subscription;
(No actions made by the company needed);
If a customer is younger than 20, may spend more time exploring new service features, and the customer is at a greater risk to cancel the contract/the customer will probably not renew annual subscription;
(Actions made by the company might be needed, for example: offering new/better services and products;)
An airline has a server that holds the flight database. Passengers can check in using a number of self-service client kiosks located in the airport.
\nDefine the term client.
\nDefine the term server.
\nExplain the functions performed by the server in this situation.
\nAward [1 max].
A client is a simple application or a whole system that accesses services being provided by a (remote) computer/server;
Award [1 max].
A server is a computer / software which manages access to a centralized resource or service in a network.
A server is a computer/software that provides data to other computers/clients in a network;
Award [4 max].
\nthe central computer receives requests from the kiosks/terminals at the check-in desks/mobile phones;
can manage several clients simultaneously (in order, each providing a different set of services);
makes sure that the request is valid by accessing its database;
processes the request;
sends information to the kiosk;
all requests/information are sent over the network connection;
A large number of candidates recognised a client as a system that accesses the services of a server.
\nA large number of candidates recognised a server as a computer that provides data to a client.
\nMany candidates failed to understand that answers were required to explain the functions of the server in an airline's system that holds its flight database. Some candidates recognised that the server receives requests from clients, processes requests, accesses the database, or works over the network. However, most candidates only described one or two of these points and rarely stated where the requests came from i.e. the kiosks, check-in desks, or mobile phones.
\nConsider the following binary tree.
\nState the result of inorder traversal of this binary tree.
\nState the result of preorder traversal of this binary tree.
\nAward [1 max]
B, A, D, C;
Award [1 max]
A, B, C, D;
Straightforward question which caused few problems. Some candidates confused in-order with pre-order traversal.
\nStraightforward question which caused few problems. Some candidates confused in-order with pre-order traversal.
\nCompare direct changeover with parallel running as a method of implementation.
\nAward [4 max].
there is no extra cost;
for running two systems/for extra salaries (no need to increase the number of employees);
benefits can be gained immediately;
because new system is better than the old;
if there is a bug in the new system;
there is not a second system to fall back on/could be disastrous for the company;
employees will need to be capable of using the new system immediately;
without training/with training in advance but not on the system;
Mark as 2 and 2
\nA large number of candidates scored full or nearly full marks for this question because they were able to describe the different benefits and drawbacks of the direct changeover and parallel running methods of implementation. If marks were lost, it was most often because candidates gave a description to show why one method may be better than the other, but then gave the reverse argument, as to why the other system may not be as good as the first, rather than offering two distinct arguments. However, many good and comprehensive answers were seen.
\nDescribe how an operating system uses paging when running a program.
\nAward [3 max]
\nmemory management method that uses secondary memory to increase the amount of primary memory;
transfers data blocks of the same size (“pages”);
from secondary storage to main storage when they are required;
and returns them to secondary storage when they are not;
Not all candidates answered this question correctly, but most of those who did, scored good marks.
\nOutline one feature of autonomous agents.
\nAward [2 max]
Reactive behavior;
autonomous agent senses the environment and reacts;
Autonomy;
autonomous agent activates alone for a task / is not invoked for a task / selects the task itself / operates without human supervision;
Persistence;
autonomous agent is a programmed device and the software describing an agent runs continuously;
Sociality;
autonomous agent can interact with other agents through communication / it can work in coordination and cooperation with other agents;
Most candidates were able to outline one feature of autonomous agents. Only a few candidates did not attempt this question.
\nA company produces and sells domestic floor-cleaning robots.
\nThe floor-cleaning robots can clean different surfaces like wood and carpet. The floor‑cleaning robots can also avoid obstacles or stairs.
\nSensors are used by the processor that controls the floor-cleaning robot so that it can move safely.
\nA computerized security system for the company’s headquarters protects against unauthorized access using a swipe-card system. Each door has a swipe-card reader that is connected to the central computer. A database stores the IDs of all employees and the rooms they are allowed to access.
\nDescribe two types of sensors used in the floor-cleaning robots.
\nExplain the function of an output transducer in this situation.
\nIdentify one alternative computerized method that could be used in place of the swipe-card readers.
\nDescribe how the method identified in (c)(i) functions.
\nCompare polling and interrupts as mechanisms for the swipe-card readers to interact with the central computer.
\nAward [4 max]
Proximity sensors/ range sensors;
Which are used to determine how close an object is to the sensor;
Optical sensors /Photocells and other photometric devices (often used in conjunction to proximity sensors);
which are used to detect the presence or absence of objects;
Tactile sensors / Contact sensors / Bumpers;
which are used to determine whether contact is made between sensor and another object;
Touch sensors;
which indicate when contact is made;
Force sensors;
which indicate the magnitude of the force with the object;
Machine vision;
which is used in robotics for inspection / parts identification / guidance (accept other uses);
Mark as 2 and 2
\nAward marks for other miscellaneous category of sensors which also are used in robots. For example, devices for detecting / measuring temperature / fluid pressure / fluid flow / electrical voltage / other physical properties/.
\nAward [3 max]
Output transducer is a device that accepts a (digital) signal from processor;
and turns it into a physical movement;
to make the floor cleaning robot move in different direction;
Award [1 max]
Any biometric device (finger print, eye scanner);
pin pads/Key pads on doors;
smartphone access(cloud-based) / mobile access control;
Award [3 max]
The answer to partc (ii) should match the candidate’s answer to part (i). For example:
a camera is used to scan the iris / finger print is scanned;
a database stores images (scanned iris/finger print of each employee) and the rooms they are allowed access to;
computer compares the scanned image to images stored in the database;
if found, the employee is allowed to enter;
Award [4 max]
Polling requires the computer to actively interact with each swipe device;
the computer periodically checks each swipe device whether it has requested service, if it does not require servicing, the computer examines the next one, etc. If one of them requires servicing, the computer switches to running the serving program;
polling will waste processing time whilst the device is idle;
whilst:
interrupt requires the device to flag the computer;
processor receives interruption signal and services the interrupt by calling the appropriate system subroutine for interrupt processing/interrupt handler;
and hence the computer’s time is not wasted whilst the swipe device is idle;
Mostly a well answered question.
\nCandidates mostly gave good responses for this question. Some candidates confused output transducers with sensors.
\nAlmost all were able to identify one alternative method and to give a good description.
\nAlmost all were able to identify one alternative method and to give a good description.
\nIt is evident that students generally have problems with compare questions, describing the issues individually without performing any comparison, as was the case here.
\nDescribe one difference between stack and queue data structures.
\nState the purpose of the following queue method:
\nenqueue()
State the purpose of the following queue method:
\ndequeue()
State the purpose of the following queue method:
\nisEmpty()
Assume that the queue Q holds the following data:
\nThe reversed queue Q would be:
\nConstruct an algorithm in pseudocode for reversing the queue using a stack data structure.
\nYou may assume that the data in the queue is input and a new empty stack is created.
Only the standard queue and stack operations are allowed.
Consider the following recursive method:
\nmystery(N)\n
if N>0 then
return 3 + mystery(N-3)
else
return 3
end if
end mystery
where N
is an integer.
Determine the value of mystery(7)
. Show all your working.
Outline one disadvantage of solving problems recursively.
\nAward [2 max]
In a stack, the same end is used to insert and delete the elements;
whilst two different ends are used in the queue to insert and delete the elements;
Stack has only one open end so only one pointer is used to refer to the top of the stack;
but queue has two open ends and two pointers should be used (to refer front and the rear end of the queue);
Queue is a first-in-first-out (FIFO) data structure;
and stack is last-in-first-out (LIFO) data structure;
Award [1 max]
(enqueue
) adds an item to rear/tail of the queue;
Award [1 max]
(dequeue
) removes an item from front/head of the queue;
Award [1 max]
(isEmpty
)
checks if the queue is empty or not;
returns TRUE
if the queue is empty, FALSE
otherwise;
Award [5 max]
Award [1] for a while loop (through queue);
Award [1] for placing each item removed from the beginning of the queue to the top of the stack;
Award [1] for a while loop (through stack);
Award [1] for adding each element popped from the stack to the end of the queue;
Award [1] for the correct use of stack and queue methods;
Example:
\n//S is a new/created empty stack\n
// push all of the elements of Q to stack
while not Q.isEmpty()
X=Q.dequeue()
S.push(X) // OR S.push(Q.dequeue())
end while
//then, pop each element from the stack and add it to Q
while not S.isEmpty()
X=S.pop()
Q.enqueue(X); //OR Q.enqueue(S.pop())
end while
Award [3 max]
\nmystery(7)= 3 + mystery(4);\n
= 3 +3 + mystery(1) ;
= 3 +3 + 3 +mystery(-2)=3+3+3+3=12 ;
NOTE: Award only [1] if the working is not shown and only the final result is given.
\nAward [2 max]
More difficult/complicated to code;
if the data structure being processed is not recursive;
It is difficult to find bugs;
particularly while using global variables;
Can use more memory (than iterative solution) when executed;
because every recursive call increases the call stack;
Recursion to a deeper level will be difficult/impossible to implement;
if the call stack space on the system is limited;
Slower execution / using a recursive function takes more time to execute;
as compared to its non- recursive/ iterative counterpart;
Well answered question.
\nCandidates mostly gave good responses for this question.
\nCandidates mostly gave good responses for this question.
\nCandidates mostly gave good responses for this question.
\nA few candidates did not attempt this question. However, those who did generally answered well. A few candidates incorrectly used 'enqueue' operations also for the stack.
\nA simple enough recursive algorithm, leading to a high number of correct answers.
\nImages in computers are stored as two-dimensional arrays.
\nA black-and-white image (Figure 1) is stored as a 10 × 10 two-dimensional array named MAT (Figure 2).
\nEach element of MAT holds a number for a colour; 1 represents the colour black and 0 represents the colour white.
\nIn an application, the black-and-white image can be inverted (all white pixels are changed to black, and all black pixels are changed to white).
\nMethod invert(N,A)
accepts a positive integer N
and an N × N
two-dimensional array A
that holds the data for a simple black-and-white image; it returns the inverted N × N
two-dimensional array A
.
In the application, it is also possible to rotate an image clockwise by 90 degrees (90°).
For example, when the simple black-and-white image is rotated, the corresponding 10 × 10 two-dimensional array MAT is updated.
This would mean the first row of the original MAT is the last column in the rotated MAT, the second row is the second-to-last last column, … and the last row is the first column.
\nConsider the following algorithm fragment:
\nK=input()\n
loop for M=0 to K mod 4 - 1
A=rotate(N,A)
end loop
where:
\nN
is an integer and A
is the N × N
two-dimensional array that holds data about an imageK(K>=0)
is an integer showing how many times the image should be rotatedrotate(N,A)
accepts an integer N
and an N × N
two-dimensional array A
representing an image. It returns an N × N
two-dimensional array representing the image rotated clockwise by 90°.The algorithm for method rotate(N,A)
uses an additional N × N
two-dimensional array, named The
N × N
dimensional array B
is initialized and updated using the values from A
to represent the image rotated clockwise by 90°.
Construct an algorithm in pseudocode for the method invert(N,A)
.
State the number of degrees by which the image will be rotated if the input value of K
is 3.
Outline why it is more efficient that the loop in the given algorithm fragment executes (K mod 4)
times instead of K
times. You may give an appropriate example in your answer.
Construct the algorithm in pseudocode for the method rotate(N,A)
described above.
To avoid inefficient use of memory, a new algorithm for the method rotate(N,A)
is constructed.
The N × N
two-dimensional array A
should be rotated clockwise by 90°, without the use of any additional arrays.
One way of rotating the two-dimensional array A
clockwise by 90° is to transpose A
, and then reverse each row of A
.
The transpose of A
is formed by turning all the rows of A
into columns. For example, the value in the first row and third column (A[1][3]
) is swapped with the value in the third row and first column (A[3][1]
).
Construct the new algorithm in pseudocode for the method rotate(N,A)
described above.
Award [3 max]
Award [1] for nested loops/loop through all array elements;
Award [1] for checking the array element for the number of colour;
Award [1] for updating correctly each of the array elements;
Example 1:
\nloop for I=0 to N-1\n
loop for J=0 to N-1
if A[I][J]==1
then A[I][J]=0
else A[I][J]=1
end if
end loop
end loop
Example 2:
\nR=0\n
C=0
I=0
loop while I< N*N
if A[R][C]==0
then A[R][C]=1
else A[R][C]=0
end if
C=C+1
if C>9 then
C=0
R=R+1
end if
I=I+1
end loop
Award [1 max]
270 (degrees);
Award [2 max]
A rotation by 360 degrees returns the image/matrix to its original value, so no action need be taken. A rotation by 360+N degrees is equivalent to a rotation by N degrees(this logic repeats, so for 90 degree rotations, there are only 3 transformations needed: by 90, by 2*90 and by 3*90);
making more is unnecessary/inefficient;
Unnecessary calls to the method rotate()
which would make the algorithm less efficient are avoided;
for example, repeating 10 times and repeating 2 (=10 mod 4) times, both return the array holding the image rotated by 180 degrees;
NOTE: Accept any appropriate example, with any value of K which is greater than or equal to 4;
\nAward [3 max]
Award [1] for completely correct nested loops;
Award [1] for correctly determining row indexes (in both matrixes, A and B);
Award [1] for correctly determining column indexes (in both matrixes, A and B);
NOTE: The method heading and return statement may not appear in the answers. Only an algorithm for the method rotate()
is requested.
Example:
\nrotate(N,A)\n
// initialize two dimensional array B
// for example, int[][] B = new int[N][N];
loop for I = 0 to N-1
loop for J = 0 to N-1
B[I][J] = A[N-J–1][I]
// instead of these array subscripts
// the following can be written
// B[J][N-1-I] = A[I][J]
end loop
end loop
return B
end rotate
Award [6 max]
\nExample:
(Transposes the two-dimensional array and then reverses each row.)
Award [3] for transposing.
Award [1] for the correct outer loop;
Award [1] for the correct inner loop;
Award [1] for the correct swap;
Award [3] for reversing each row of the transposed matrix.
Award [1] for the correct outer loop;
Award [1] for the correct inner loop;
Award [1] for the correct swap;
Award [1] for using nothing but a temporary variable to achieve this / no additional / extra space used except one temporary variable;
NOTE: The method heading and return statement may not appear. Only the algorithm for the method rotate()
is requested.
rotate (N,A)\n
//transposes A
loop for I=0 to N-1
loop for J=0 to I-1
TEMP = A[I][J]
A[I][J] = A[J][I]
A[J][I] = TEMP
end loop
end loop
// reverses each row of transposed matrix A
loop for I=0 to N-1
loop for J=0 to N div 2-1
TEMP = A[I][J]
A[I][J] = A[J][I]
A[J][I] = TEMP
end loop
end loop
return A
end rotate
This was answered well.
\nThe question was well answered with many gaining full marks.
\nThe question was well answered with many gaining full marks.
\nAnswers to this question vary from poor to excellent. Some candidates constructed excellent algorithms and they gained full marks on this question.
\nAnswers to this question vary from poor to excellent. Some candidates constructed excellent algorithms and they gained full marks on this question.
\nRefer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nThe emergency management information system (EMIS) has a multitier architecture.
\nIdentify two functions of the Data Tier of the EMIS.
\nIdentify two characteristics of a TCP/IP Socket.
\nAward [2 max].
Award [1] for any valid function up to [2 max].
Stores/retrieves/searches/edits the data;
Encapsulates/holds the code for the database (accept DML / SQL or any other language);
Abstracts/Simplifies access to the databases;
Personalises the SQL for different databases (e.g. contains optimised queries for Oracle, MySQL etc.);
Manages the transactions (anything relating to ACID);
Award [2 max].
Award [1] for any characteristic up to [2 max].
Binding anything relevant (e.g. nodes, port, IP);
Associating a socket with a socket address;
Associated with the IP address and a port number for the local node;
IP address;
Port number;
Sending/receiving data (packets);
Node-to-node communication;
Works at OSI levels 3, 4, and 5 (Accept any from L3 - Network, L4 - Transport, L5 - Session);
Refer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nTania is considering purchasing an off‑the‑shelf emergency response system rather than a bespoke system as an implementation option in the proposed EMIS.
\nOther than cost, explain one advantage of purchasing an off‑the‑shelf emergency response system rather than a bespoke system.
\nOther than cost, explain one disadvantage of purchasing an off‑the‑shelf emergency response system rather than a bespoke system.
\nExplain two advantages of using URL rewriting as a strategy for making the HTTP connection stateful.
\nAward [2 max].
Award [1] for any advantage up to [2 max].
Tried and tested;
So, less risk;
Regularly updated;
Therefore, contains fewer errors;
More tech support;
e.g. Online chat systems.
Usually available for various platforms / operating systems;
Therefore, fewer compatibility issues, or can be run on different HW and SW;
Shorter timeframe for implementation;
Which is important in the context of saving lives/obtain benefits more quickly;
Books/Training material more accessible;
Easier to train staff on using the system;
Reviews and feedback exist already for the product;
Therefore, the quality of the final product can be known in advance;
Off-the shelf is likely to implement common standards;
Whereas, you would need to program compatibility in a bespoke system/to work with a multitude of devices;
Award [2 max].
Award [1] for any disadvantage up to [2 max].
Modifications are not possible without help of developers;
Source code is not usually available to change;
Compatibility/interfaces with existing systems;
It may not be possible to connect / share data with systems already in use;
Standard operating procedures may need to change;
To fit the software capabilities/functions;
Software may contain unused features;
That is potentially confusing for users;
Software is designed for general requirements;
It may not include features needed by Bangbai;
Award [4 max].
Award [1] for explaining what URL-rewriting is in the context of stateful connection and allow [1] for an example or a comparison with session cookies
URL Rewriting changes the URL to include parameters
e.g. www.bangbai.com?userId=Asdf34e3
Mark as [2] and [2].
\nWorks without cookies/cookies disabled/as an alternative to cookies;
URL re-writing will still work as it embeds the session ID inside the request;
URL Rewriting does not result in anything being saved (e.g. cookies) on the client side;
Therefore, the privacy of the client cannot be compromised (e.g. By searching contents of the cookie folder later);
May work with legacy devices/devices without access to cookies;
That are not able to use cookies/do not have access to an alternative to URL re-writing;
Makes the links more descriptive/readable;
Which will help the developer resolve issues (accept example, such as server identified in URL);
(Note to examiners: descriptive cannot be awarded a second mark if not related to the scenario e.g. search engines is not correct)
Allows the details of the identification of the user to be recorded in log files;
Which will help for future analysis/reviews/data mining;
Refer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nSome citizens have used the citizen reporting function of the app through a VPN.
\nExplain why the use of a VPN would reduce the effectiveness of the citizen reporting app.
\nAward [6 max].
Award [1] for each point that explains why the use of VPN reduces the effectiveness of the app up to [6 max].
A VPN hides the true IP address;
Instead, it provides the IP address of the VPN’s server;
A VPN adds an additional layer of complexity has been added;
Which may increase the likelihood of the connection dropping;
A VPN encrypts/tunnels the data which is transmitted;
Which has a potential overhead (more computational power/increases the size of data packets) and this may reduce emergency responses times;
A VPNs may log traffic that passes through;
This may present a potential security concern if sensitive information is reported;
A VPN may employ a filtering policy/blocks ports;
So certain parts of the app may not work (e.g. VOIP protocols may not work);
If GPS/location service is deactivated, then the system is reliant upon IP Address;
Location information can be obtained from the GPS/GPS is sent in data packets;
However, it may not be as easily verifiable by comparing with a known IP location;
Not having the true IP address would mean that the EMIS server would not have any indication of the location of the source of the report;
VPN usage may give users a feeling of anonymity which may encourage misuse;
Which may divert resources to the hoaxes instead of authentic reports;
Refer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nRahul has suggested that the use of the citizen reporting function of the app might be much higher than initially requested and this could affect the emergency assistance function if they share the same server.
\nAs a result of this, Rahul has decided to put citizen report on a separate cluster of servers and use a load balancing algorithm to manage the workload of the server.
\nEvaluate the appropriateness of the following load balancing algorithms for use in the Bangbai EMIS:
\nThe answer could include the following:
\nDefinitions:
The source IP hash combines the source and destination IP address to generate a hash key, which is then assigned to a specific server. The benefit of this approach is that a client who experiences a dropped connection can be returned to their session with the same server.
The client-side random load balancing algorithm delivers a list of server IPs to the client, which then selects a server IP at random.
Security
As Client Side Random allows control of the choice of server to be made by the client it would leave the system much more vulnerable to DOS/DDOS attacks.
Persistence
If disconnected, Client Side Random may allocate a new server to the client as it will choose randomly from the list. However, if the IP is the same, then Client-side Hash will pair the client with the previous server. This may mean that the work being done before is not lost (e.g. Client continues from where she left of seamlessly).
Distinguishing between users
Client-Side Hash is affected when a single IP address is used by many users (e.g. proxy servers sharing a connection, VPNs etc.). A single user might also disconnect and re-connect with a different IP address due to DHCP so would be seen as a “different” person.
Cost Client Side Random is a cheaper solution as it doesn’t require any expensive hardware on the server side (i.e. the hardware load balancers etc.).
\nSingle Point of Failure (SPOF)
Client Side Random eliminates the SPOF as all requests do not depend on one device (i.e. the hardware load balancer provided by the system). Similarly, it avoids bottlenecks if the load balancer is overloaded.
Control
When using client side random, Bangbai Government is essentially losing control over the load balancing process. If for some reason they suddenly want to re-direct all queries away from certain servers (e.g. It’s been compromised, or the data centre has a fire etc.) they can’t, as they cannot easily/quickly change the algorithm on each of the client devices.
Intelligence/Adaptiveness/Flexibility
Client Side Random may not take into consideration privileged information about the servers, which it does not have access to. Therefore, it cannot decide which of the servers is *currently* best suited to handle a specific type Such information may include:
Additional Research
Caching can affect a lot of load balancing algorithms as they use DNS to allocate the next server. This can skew the allocation of servers, but because Client-side Random uses a randomly generated server from a simple list, it avoids this problem.
The HTTP/2 specification, which is now supported by every major browser, has built in support for Client-Side Load Balancing. The citizen reporting app can benefit from this as it uses HTTP for the REST API.
Overall comparison/evaluation
The main issue with the source IP hash load balancing algorithm is that each change can redirect EVERYBODY to a different server, which again lags the time of response for a citizen call in Bangbai.
That is why some good load-balancers have implemented a consistent hashing method to ensure that if a server fails, for example, only the client connected to this server are redirected and not all.
The counterpart of consistent hashing is that it doesn’t provide a perfect hash, and so, in a farm of 3 servers, some may receive more clients than others and this can take a toll on the time of response to citizen calls.
When a failed server comes back, its users (determined by the hashing done on the Source IP) will be redirected to it again.
There is no overhead in terms of CPU or memory when using such an algorithm.
Conclusion
A final measured conclusion that links together the various points and recommends one or both of the algorithms as appropriate for the needs of Bangbai.
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nIdentify two characteristics of a digital signature.
\nIdentify two stages in the proof-of-work process.
\nAward [2 Max]
Anonymity (signature key identifies the user but not their real name).
Asymmetric (cryptography);
Certificate authority stamp;
Collision resistant;
Data / transaction / message;
Deterministic;
Hash / bitstring;
Non-invertibility;
Non-repudiation;
Private key / Secret key
Public key / key generation;
Randomness (for Private key generation);
Secure / encryption;
Signature function / signing algorithm;
Timestamp (sometimes);
Unique.
Award [2 Max]
Candidate block is formed from transactions in the pool
Nonce is generated (based on difficulty level);
Miners try to find the nonce / Hash generated and compared to target / mathematical calculations / solving the problem;
Puzzle solved / Hash smaller than target;
Broadcast to distributed ledgers;
Other miners verify/validate;
Block added;
Reward is issued to successful miner;
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nDescribe how a Merkle tree stores the hash addresses for the blockchain technology.
\nExplain why the residents of Santa Monica may be concerned by the lack of a central authority to manage MONS transactions.
\nAward [4 Max]
A transaction is hashed and added (as a leaf node);
A pair of leaf nodes are combined (hashed) to form the hash of a parent;
When the number of nodes on the same level is odd the rightmost node is copied to the parent (For example, 10, 5, 3, 2, 1);
This is repeated (recursively) until the Merkle root node is created;
The root node hash is created to represent all of the hashes of the nodes;
Award marks for a diagram that shows the steps.
\nAward [4 Max]
Award [2 max] for a Governance technology concern with example and a further [2 max] for expansion and consequence.
Technology example answer 1 [4 marks]
Concerns that there is no way to correct errors;
A transaction sent to the wrong person;
Relies on the receiver’s honesty to return the funds;
But difficult to identify the receiver from their signature;
Technology example answer 2 [4 marks]
Residences may be concerned that errors or mistakes won’t be corrected;
Their wallet password may be compromised and transactions made from their account;
They would need to put in a request to Pablo (Santa Monica mayor) to trace the transactions;
Pablo (Mayor) is unlikely to act since it isn’t a major breech on the blockchain;
Technology example answer 3 [4 marks]
The MONS currency may be subject to a 51% attack;
With no central authority to roll back the blockchain;
Double spend problem will occur;
Currency would lose credibility/residences may stop using it.
Technology example answer 4 [4 marks]
Residences are trusting that the software is designed well and secure;
Since it is open-source they may be concerned that hackers will find a flaw;
With no central authority to manage the blockchain, which is distributed;
There could be concerns that necessary updates/patches won't get rolled out.
Award [2 max] for a Governance non-technology example
\nNon-technology example answer 1 [2 marks]
Human nature to trust in authority;
When there is no Governance there may be irrational concern;
They may worry about the currency's value going down;
Because there is no way to influence the exchange rate;
Non-technology example answer 2 [2 marks]
The MONS currency could be abused by the criminal element;
It may be used for money laundering / fraud / illegal payments;
The anonymity of digital signatures makes this possible;
No central authority to prevent this;
Do not award marks for saying how to overcome concerns.
\nRefer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nTwo features of hashing are determinism and non-invertibility.
\nExplain how determinism and non-invertibility are used to facilitate the use of the blockchain.
\nAward [6 Max]
\nDeterminism:
The hash algorithm must always generate the same output for the same input;
when replicated on different nodes;
Otherwise, the consensus cannot be reached;
Without determinism different miners would get different results;
And there would be no consensus;
So, the distributed ledger would be different for every node;
Without determinism one block could not link to the next / prevHash;
Therefore, transactions could be edited / blockchain would not be immutable;
The blockchain would be insecure;
Merkle tree and the block are validated many times by miners;
Without determinism the Merkle proof won’t work;
So, transactions can’t be validated;
Without determinism, when a sender signs a transaction, other nodes on the blockchain wouldn’t be able to be certain it was them;
Which may result in an increase in illegal payments and corruption;
Non-invertibility:
A public key is hashed to provide a unique encrypted public address that can be published;
Whereas private keys are not publishable and can be hashed (needed to access the wallet);
Non-invertibility guarantees that publishable information is protected, and separated from private key;
Prevents the private key from being calculated if you have the public key;
Non-invertibility/secure private key prevents false transactions being made;
So that “digital signatures” can authenticate the person who made the transactions;
If the nonce used an invertible hash it could be calculated;
So, it would be solved quickly / difficulty level could not be set;
And fake branches could be created / double spend could occur;
Mark as 3 and 3.
Award [1 max] for definition + [2 max] for explanation, for both sections (determinism and non-invertibility)
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nPablo has claimed that the use of blockchain technology for the MONS cryptocurrency will mean the cryptocurrency is both secure and scalable.
\nTo what extent do you agree with Pablo?
\nAnswers may include:
\nSecurity features
\nSecurity concerns
\nScalability
\nStrategies to improve scalability include
Increasing the block size to include more transactions.
Modifying the underlying protocol (although the issue with this is that there needs to be some central governance to make these decisions).
\nSharding and other “Layer 2” solutions can be implemented to reduce congestion on blockchains, in which slower transaction types are put on a different chain which deals only with that type.
For example, Lightning networks, which is a layer 2 payment protocol designed to be layered on top of a blockchain-based cryptocurrency.
Security could be optimized according to the \"Blockchain Trilemma\".
\nScalability concerns
\nConclusion
A reasonable conclusion that includes both security and scalability.
Refer to the Paper 3 Case study: computer science in medicine, available under the \"Your tests\" tab > supplemental materials.
\nDefine bioinformatics and give an example of the data used in medical research.
\nOutline one feature of fuzzy logic which makes it suitable for medical diagnosis.
\nBioinformatics is the analysis of biological data by computers;
For example: DNA / patient statistics / results from blood samples, etc.
Note: Accept any example related to medical research.
\nAward [1] for a feature of fuzzy logic and [1] for outlining its relevance to medical diagnosis, up to [2 max].
Fuzzy logic can put a measure on uncertainty (give an approximate/probabilistic value);
Can express relationships in a probabilistic manner;
Patterns can be found which are not easy to classify with traditional logic;
Work with multi-variable connections;
Can help to give probability of certain diagnoses;
Note: One symptom may be important only if there are some related ones;
vagueness and uncertainty of measurements e.g. borderline blood results etc.;
Refer to the Paper 3 Case study: computer science in medicine, available under the \"Your tests\" tab > supplemental materials.
\nCompare ultrasound and a CT scan in the creation of a medical image.
\nOutline two compatibility issues that might be faced with the introduction of Electronic health records (EHRs) in a large country.
\nAward [1] for each comparison up to [4 max]. Note that the italicised descriptions below are from then case study and will not gain credit unless they are expanded on.
\nAward [1] for each issue and [1] for each associated outline, for two issues up to [4 max].
\nHardware incompatibility;
Different machines making measurements with dedicated processors;
Software incompatibility;
e.g. different OS where not all function with the electronic records software;
Different format of records;
Not all centres taking the same measurements;
Different format of results;
For example temperature “> 40” or temperature “= 40.5”;
Analogue values may be rounded differently;
Note: Accept other reasonable issues which could occur.
\nRefer to the Paper 3 Case study: computer science in medicine, available under the \"Your tests\" tab > supplemental materials.
\nWith reference to the technology involved, explain how augmented reality imaging could be used to assist a surgeon in one country to carry out a complicated operation under the supervision of an expert surgeon in another country.
\nAward [2] for a clear description of augmented reality, [2] for a clear explanation of how an image could be sent to the expert surgeon, and [2] for the role in the operation (up to [6 max]).
\nAR:
Augmented reality projects digital/additional information;
onto a real-time situation/onto the real world;
Augmented reality allows an actual situation to be complemented in such a way;
that essential information is added to a video image;
An expert surgeon in another place sees the operation as if they were there/as a video being filmed;
\nTags attached to the affected area to be operated can be overlaid on the image;
Can overlay information on the view they have;
Transmission;
Annotated video data is continually streamed between the two;
Using a camera at the operation end;
In real-time over a (very) secure and fast network;
Viewed by expert surgeon on a screen;
Example of use;
The expert can show on the image what actions should be made (and where);
Allow example;
Using the information being sent back on a headset tablet/smart phone/transparent screen;
Refer to the Paper 3 Case study: computer science in medicine, available under the \"Your tests\" tab > supplemental materials.
\nA new health centre is planned in a remote mountain area to serve a community which is scattered over a large area. The nearest large hospital with complete medical services is difficult to reach.
\nThe services to be offered in the new health centre should include:
\nThe planners are also considering whether to create an internet site with authorized access for the community.
\nWith reference to the technologies involved, discuss ways in which the required services could be met and their effect on the people in the community.
\nDiscussion should focus on:
\n“health carers at the health centre for visits made by appointment”
People will need a physical presence at the centre for reassurance which means carers need to be employed and in place – enough to cope with the estimated need especially as visits to the hospital are difficult.
“expert doctors from other locations, who are available 24 hours a day via a VPN connection”
Essential for crises which occur outside of the hours the centre is open.
Will need a secure and reliable connection with access from mobile device, and access to any data and phone calls coming into the centre.
“a comprehensive care system for chronically sick patients at home”
Continual measurements can be sent to the health centre; this could be done with wearables. Someone with a heart problem could have the heart rate continually measured on a bracelet with an imbedded RFID to communicate wirelessly via NFC to a receiving device which sends the data automatically to the health centre.
The centre would need to have software to interpret the data (or this could be done at the patient side – therefore less to send) and any fluctuations identified.
Danger signals would mean the doctor needs to know. Health carer would check on minor changes as well as regular check-ups – need for health carers depends on proportion of chronically sick and elderly.
Effect on population – good system to stay at home may be met with some aversion to remote monitoring.
“some provision for emergency operations in the health centre”
Could be dealt with by telesurgery when essential but will need appropriate cameras/connections and software, as well as a doctor who is confident to be involved.
“diagnostic equipment to identify cases where a person needs to be treated at the large hospital”
An ultrasound scanner should probably be purchased. For example, regular scans are needed for pregnant women. However, these need expert technical operators and interpreters. One suggestion would be for the scans to take place via telemedicine and the results sent electronically to be analysed at the hospital.
An internet site for communication and advice would have the advantages of knowledge so that a decision whether or not to make an appointment can be made. Accounts would need to be set up and security ensured via firewalls, encryption etc. as personal medical information is sensitive. It would be helpful to give information as to when an appointment should be made and simple remedies for simple problems. Some people may be suspicious of using this medium for medical uses and be concerned about privacy.
\nRefer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nIdentify two smartphone resources that might limit the user experience of the Bangbai app.
\nOutline why an application programming interface (API) would be useful when developing a smartphone app which uses the CAD system.
\nAward [2 max].
Award [1] for each smartphone resource identified up to [2 max].
Screen size;
Memory;
Processor speed;
Available primary or secondary storage;
Battery life;
GPS Receiver;
Do not accept any resources that are obviously on the server side
Do not accept software as a resource.
Award [2 max].
Award [1] for identifying why an API may be useful and [1] for a brief elaboration up to [2 max].
An API ensures abstraction;
as the user only how the service is requested, how the service is implemented;
An API acts as a “contract” or definition of the services of the CAD system;
which makes it clearer to client application developers and back-end developers;
The API would ensure arguments (parameters) are passed to the system;
in the correct order and type);
An API would make sure that the app is expecting a specific data type;
which will be returned from a CAD request/service;
An API provides a consistent method/protocol/interface for building a resource;
and thus, reduces the amount of programming required/provides structure.
An API would allow the smartphone app and the CAD system to be “compatible”;
can be easily updated if the situation changes;
An API ensures authentication/authorisation/security checks are carried out;
before allowing operations to be done;
Using an API would allow server to be more secure;
as unused ports and binary/executables/programs/scripts could be hidden from users. (i.e. Only the API handler would be accessible, not the program modules);
Using an API would allow changes to be coordinated between all users;
and backward compatibility when the app is upgraded;
An API standardises the operations available across different clients/devices;
and the level of service would not be as device dependent;
An API would allow the server to track usage of individuals (through keys);
To identify when certain users were overusing services;
Refer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nSome people have asked if the informing function of the Bangbai app could allow the anonymous reporting of incidents and issues. They believe that potentially useful information (for example, information about criminals) might not be reported because people are afraid of their identities being discovered.
\nTo what extent might it be technically possible for the Bangbai app to guarantee the anonymity of its users if this feature was approved?
\nThe answer could include the following:
\nRefer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nIdentify two characteristics of a peer-2-peer (P2P) network.
\nIdentify two sources of entropy.
\nAward [2 max].
Many clients connect directly to many other clients;
Clients also act as servers;
No centralized administration for the network/decentralized network;
Network is more resilient to failure;
Is more scalable than a client server network;
There are no \"bottlenecks\" as with Client Server model;
Note: Do not accept “widely used for illegal file sharing” (or similar).
\nAward [2 max].
Answers may include:
atmospheric noise;
radioactivity;
thermodynamics;
Brownian motion of particles;
mouse movements;
algorithmic sources;
Note: Do not accept “Entropy can be obtained from physical sources” as this is clearly stated in the case study. A physical source must be stated (e.g. radioactivity) to get that mark.
\nRefer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nOutline how a smartphone uses data from GPS satellites to obtain its location.
\nRahul has stated the importance of a multi-tier architecture using standard protocols. Explain why this approach is important.
\nAward [4 max].
Award [1] for identifying part of the process that a smartphone uses to obtain its location up to [4 max].
Trilateration;
Uses signal strength and latency based on very accurate atomic clock;
Complex formula taking into consideration the curvature of the earth to arrive at latitude, longitude and altitude;
The smartphone uses the distance between satellites to create overlapping “spheres” that intersect in a circle (which is the phones location);
When fewer satellites are available the accuracy diminishes and may be specified to within a radius only;
Assisted/augmented GPS can help accuracy by adding location information received from or about WIFI networks and the triangulation of cell towers;
The smartphone depends on data received from GPS satellites, but that can be obstructed or distorted by obstruction (e.g. tall buildings), weather or water;
The answer could include the following:
\nA multi-tier approach for developers provides:
Abstraction of layers;
Less complexity;
Faster development time;
Easier testing;
Work can be divided better amongst teams;
Performance – system can be divided and allocated to many processors/nodes;
Easier addition of clients, databases or logic which does not “break” other layers;
The use of standards and protocols provides:
Future proofing;
Interoperability;
Communication with legacy devices;
Compatibility with best of breed 3rd party products (e.g. firewalls, load balancers, Quality of Service and network monitoring software etc.).
Quick patching of discovered errors, exploits etc.;
Standards and protocols may already be implemented and have available code references or libraries which would reduce development time etc.;
Security updates and upgrades from the community;
[1–2 marks]
A limited or superficial response that indicates a basic understanding of one or both approaches. Uses little appropriate subject specific terminology.
[3–4 marks]
A competent explanation of the importance of one or both approaches. There is appropriate use of subject specific terminology throughout the response.
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nDescribe the steps that need to be carried out by the blockchain system to find a user’s current MONS balance.
\nDolores states, “one of the great things about the blockchain is that we can ensure that the solution time remains at 10 minutes, and we can do this even as the number of MONS miners increases” (lines 63–65).
Explain why it is important to ensure the solution time remains at 10 minutes.
Award [4 max].
Balances are not stored in the blockchain/calculated in real time;
A digital signature/hash address is used to identify the user;
An algorithm must go through the entire blockchain examining all transactions that match the signature/address;
Relevant transactions debits and credits are added to calculate the balance;
Third party services are available to monitor the blockchain and provide a balance for the specified addresses;
It is likely that the wallet (app) will regularly compute the balance by verifying all the MONS it contains, but to do a complete confirmation could take a long time (e.g. 10–60 mins on bitcoin);
Award [4 max].
Proof of work delays the creation of new blocks and therefore avoid spamming and/or instant re-writing of the blockchain;
A certain amount of time is required to make sure that there are not too many blocks mined;
If mining takes much longer than 10 minutes, it may discourage miners from mining
If mining takes much longer than 10 minutes it may make cryptocurrency transactions too slow;
Miners are required by the network so therefore a balance must be found which takes miners with standard hardware the correct time to solve;
Complexity of the PoW (and therefore time required) can be altered by changing the nonce value used to create a valid hash;
Difficulty of PoW can be adjusted so that miners take that time to create blocks;
if the number of miners rises too much so the time drops, the reward can be decreased to try to reduce the attractiveness of mining;
Many cryptocurrencies (e.g. Bitcoin) modify the difficulty of their PoW to attract miners while maintaining the minimum time for a candidate block hash to be generated;
Note: Do not accept “adding more (powerful) GPUs”, as this will simply increase the chance of a particular miner solving the proof of work first, not the difficulty of the task for all miners.
\nRefer to the Paper 3 Case study: a new computer aided dispatch system for Bangbai, available under the \"Your tests\" tab > supplemental materials.
\nIt is expected that at any given time during a normal day, there will be between 50 and 100 members of the public interacting with each individual server in the cluster. If the network card in one of the servers breaks while being used, it is very likely that the users connected to it would still be able to complete their current operations without any inconvenience.
\nExplain why this hardware problem would not seriously affect the users who are currently connected to that particular server.
\nThe answer could include the following:
\nRedundancy:
\nFailover:
\nReplication of session information:
\n[1–2 marks]
A limited response that indicates very little understanding of the topic or the reason is not clear. Uses little or no appropriate subject specific terminology. No reference is made to the scenario in the stimulus material. The response is theoretical and descriptive.
[3–4 marks]
A superficial explanation of why this hardware failure would not seriously affect the users who are currently connected to that particular server. There is some use of appropriate subject specific terminology in the response.
[5–6 marks]
A thorough explanation of why this hardware failure would not seriously affect the users who are currently connected to that particular server. Explicit and relevant references are made to the scenario in the stimulus material. There is appropriate use of subject specific terminology throughout the response.
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nCritics have complained about the potential environmental effects caused by the computing resources required by a blockchain network.
\nAnalyse the potential effects that the use of MONS could have on the environment.
\nAward [6 max].
Negative impacts on the environment:
Miners which work on the network require energy to process proof of works;
Farms of miners will need energy for cooling systems such as AC, which have negative environmental results (e.g. greenhouse gases);
The use of computers to maintain the network may result in e-waste, which would be detrimental to the environment;
The mining of raw materials for electronic products (e.g. silicon, aluminum, copper, lead, and gold) can damage natural habitats for animals/pollutes water;
Positive/Mitigating factors:
Renewable energy may be used (solar energy is used by Bitcoin Miners now)
Low power specific computational devices (ASICS) are now widely used which reduces power consumption;
As miners aim to make a profit, they will always use the cheapest source of energy and therefore prefer solar etc.;
A moving towards a proof of stake rather than a proof of work would reduce the amount of processing required, therefore reducing cost and environmental damage;
Moving away from physical currency would reduce cotton/paper/plastic production;
The new computing machinery would replace the older physical technology (banks, counting machines, printing, etc.);
Refer to the Paper 3 Case study: a local economy driven by blockchain, available under the \"Your tests\" tab > supplemental materials.
\nPablo states: “In a traditional banking system, users trust the banks to keep everyone’s money safe; but with MONS, the whole blockchain, right from the very first transaction, would be visible to all MONS users, so it is important to be able to explain to citizens how their money is guaranteed to be safe” (lines 109–112).
\nWith reference to the key technologies, to what extent do you believe the MONS project will ensure the safety of the residents’ money?
\nAward [12 max].
Answers may include:
Security features
All transactions are recorded into files called blocks.
Each block contains a hash of the previous block as well as some transactions.
Every transaction is visible to everyone, which makes it difficult to change existing data which may be replicated on thousands of computers (decentralisation).
Any change to any historic transaction would be noticeable because the hashes of all subsequent blocks would not agree.
Transactions are confirmed many times (consensus control).
The more users of MONS there are, the more likely that there will be additional miners, which will increase the security of the network.
A proof of work is required when creating a new block, which makes the effort required to falsify many blocks unfeasible.
Each user has his own private key which is unknown to anyone else, as well as a public key (cryptography).
With no central authority there is no focus point for hackers to attack.
As MONS uses a private blockchain then only verified and approved computers could mine.
The larger and more distributed the network is, the safer it is considered to be.
Security concerns
Ledgers are technically not immutable (but to do so would require unfeasible computing power and taking over >51% of the network within the space of 10 minutes (i.e. a 51% attack).
The 51% attack is more likely to be successful on a small private blockchain rather than a large public one.
Attacks on cryptocurrencies have been documented (reference opportunities).
These attacks related to access to wallets (obtaining private keys).
Currency transfer websites are a target and have been hacked with cryptocurrencies stolen.
With no central control it is difficult to rollback transactions.
DDoS attacks on cryptocurrency services may slow transactions slightly/may affect MONS value.
Future concerns have been expressed about the scalability of the blockchain, lack of standards, and how it can be used if laws on data privacy become tighter.
Refer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nIdentify two characteristics of a genetic algorithm.
\nOutline what is meant by the term “elitism”.
\nAward [2 max].
(Search) heuristic / Finds a near optimal solution;
Based on the theory of evolutionary biology / natural selection;
Uses convergence;
Uses a stochastic approach;
Uses a mating pool;
Uses elitism;
Uses a stopping condition;
Uses selection;
Uses crossover;
Uses mutation;
Uses a fitness function;
Uses offspring/generations;
Uses stochastic universal sampling;
Award [2 max].
Taking only the fitness members of a population to the mating pool;
Based on a calculated fitness value;
Unfit population members are discarded / fit members are carried forward;
Refer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nCalculate the offspring from parents P1 and P2 using the cycle crossover (CX) method.
\nShow all your working.
\nThe partially matched crossover (PMX) operator is a genetic operator that can be used with a genetic algorithm written to solve the travelling salesman problem.
\nPMX combines two chromosomes (parents) to produce a new chromosome (offspring).
\nOutline how the parental characteristics (cities) are preserved when two offspring are generated through PMX crossover.
\nAward [4 max].
\nSolution 1
\nAward [1] for B D in correct place
Award [1] for G I F J in correct place
Award [1] for C E in correct place
Award [1] for A H in correct place
Solution 2
\nAward [1] for D G in correct place
Award [1] for I F J B in correct place
Award [1] for A C in correct place
Award [1] for H E in correct place
Note to examiners: allow follow through errors, so that if a candidates’ logic is correct from the point of an error, they are awarded marks that point onwards.
\nAward [4 max].
\nOffspring 1
PMX algorithm randomly selected sub-sequence of P1 is copied into the first offspring;
P2 contributes the remaining cities to the first offspring;
To ensure that P2 cities are not duplicated, they are mapped against P1;
Offspring 2
The remaining cities in P1 (i.e. not copied to offspring 1) are copied into the second offspring;
P2 contributes the remaining cities to the second offspring;
To ensure that P2 cities are not duplicated, they are mapped against P1;
Award [1] for this alternative offspring 2 solution if offspring 1 is correctly described
\nAlternative Offspring 2
The process for offspring 1 is repeated but with a different P1 random subsequence;
Mark as [2 max] for Offspring 1 and [2 max] for Offspring 2
\nAccept a correct example that explains the process but not replicated from the case study.
\nRefer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nCompare and contrast the effectiveness of heuristic and non-heuristic algorithms for optimizing solutions.
\nAward [6 max].
A heuristic is an algorithm that does not guarantee an optimal solution;
Instead, a stopping criterion is determined before running;
Heuristic sacrifices accuracy (optimization) for speed;
Heuristics use randomness to escape local extrema / for exploration;
Unlike heuristics, brute-force does not build off previous success/is entirely explorative and novel;
Given enough processing power/time, a brute force approach will always produce an optimal solution;
A brute-force approach is not suitable / heuristic only suitable approach for non-polynomial (computationally intractable) problems;
The number of different permutations if the number of cities is high will make the problem difficult to solve computationally;
In some situations, an optimal solution may be necessary ethically (e.g. where people’s;
lives are at risk) / In other situations, a non-optimal solution can be used;
The following flowchart is intended to represent an algorithm in which numbers that are input cannot be negative.
\nThe flowchart contains a logic error that will affect the algorithm’s functionality.
\nThe algorithm is to be altered to restrict the values that are input to whole numbers between 0 and 1000.
\nIdentify the logic error in the algorithm.
\nOutline how the error in the algorithm identified in part (i) can be corrected.
\nState the name of the method that could be used to restrict the values that are input.
\nA further change has been requested for the algorithm to enable it to calculate the average of all the numbers entered. The average will be output when the algorithm terminates.
\nBased on the flowchart, construct this algorithm using pseudocode. You must include the required changes:
\nAward [1 max]
\nThe algorithm will always output zero as the value of LOWEST, for any set of the input values (because all input values are greater than or equal to 0);
The LOWEST is initialized to 0 and negative inputs are not allowed, zero will be the permanently lowest number;
Award [2 max]
\nExample 1:
\nReplace LOWEST = 0;
With LOWEST=99999999/ any very high number;
Example 2:
\nBefore the loop/ Accept “at the beginning”;
The first number NUMBER should be inputted and LOWEST set to NUMBER / LOWEST=input(NUMBER);
Loop only 999 times (because 1 number already inputted)/ condition in the loop should be changed to COUNTER>998;
Example 3:
\nIf statement should be used within the loop;
after the statement ‘input NUMBER’;
For example, if COUNTER==0 then LOWEST = NUMBER/ set LOWEST to the first inputted number;
Award [1 max]
Validation (check);
Data type check;
Range check;
Award [8 max]
\nCorrect initialization of HIGHEST, LOWEST and TOTAL;
Correct use of loop for 1000 inputs (doesn’t have to be while loop);
Checking if NUMBER is between 0 to 1000(accept inclusive or exclusive range);
Checking if NUMBER is a whole number;
Running total of numbers (for average calculation);
Correct comparison and changing the value of HIGHEST if needed;
Correct comparison and changing the value of LOWEST if needed;
Appropriate calculation of AVERAGE;
Output of AVERAGE, HIGHEST and LOWEST (outside loop);
Example answer 1
\nHIGHEST = −1 //any value lesser than or equal to 0\n
LOWEST = 10000 //any value greater than or equal to 1000
COUNTER = 0
TOTAL = 0
loop while COUNTER < 1000 // allow COUNTER <= 999
input NUMBER
if NUMBER<0 or NUMBER>1000 or NUMBER div 1 ≠ NUMBER/1
//accept NUMBER<1 or NUMBER>999 or NUMBER mod 1 ≠ 0
output \" Your number is invalid, please try again\"
else
if NUMBER > HIGHEST then
HIGHEST = NUMBER
end if
if NUMBER < LOWEST then
LOWEST = NUMBER
end if
TOTAL = TOTAL + NUMBER
COUNTER = COUNTER + 1
endif
end loop
AVERAGE = TOTAL / COUNTER // allow TOTAL / 1000
output HIGHEST
output LOWEST
output AVERAGE
Example answer 2: (the lowest and the highest are set to the value of the first inputted number)
\ninput NUMBER\n
loop while NUMBER<0 or NUMBER>1000 or NUMBER div 1 ≠ NUMBER/1
output \" Your number is invalid, please try again\"
input NUMBER
end loop
HIGHEST = NUMBER
LOWEST = NUMBER
TOTAL = 0
loop COUNTER FROM 0 to 998
input NUMBER
loop while NUMBER<0 or NUMBER>1000 or NUMBER div 1 ≠ NUMBER/1
output \" Your number is invalid, please try again\"
input NUMBER
end loop
if NUMBER > HIGHEST then
HIGHEST = NUMBER
end if
if NUMBER < LOWEST then
LOWEST = NUMBER
end if
TOTAL = TOTAL + NUMBER
end loop
AVERAGE = TOTAL / 1000
output HIGHEST, LOWEST, AVERAGE
Example answer 3
\nHIGHEST = -1 //any value lesser than or equal to 0\n
LOWEST = 10000 //any value greater than or equal to 1000
C = 0
TOTAL = 0
loop while C<1000
input NUMBER
if NUMBER>=0 and NUMBER<=1000
if NUMBER mod 1 == 0
if NUMBER > HIGHEST then
HIGHEST = NUMBER
else
if NUMBER < LOWEST then
LOWEST = NUMBER
endif
end if
TOTAL = TOTAL + NUMBER
C=C+1
endif
else
output(“invalid input, enter another number”)
endif
end loop
output HIGHEST, LOWEST, TOTAL/1000
The term logic error was not always familiar to candidates. Many candidates correctly identified the logic error in Part(a)(i).
\nA large number gave less precise or incorrect answers to Part(a)(ii).
\nA large number of candidates did not score any marks for question in Part (b) because they were not able to state the name of the method that could be used to restrict the values that are input.
\nIn Part (c) candidates were required to produce an algorithm based on the flowchart given in the question. Most candidates achieved some marks for this algorithm, but full marks were rare.
\nRefer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nFenna has decided to use roulette wheel selection and cycle crossover (CX) for her genetic algorithm. She has two other important decisions to make:
\nDiscuss the impact that these decisions may have on the success of the genetic algorithm.
\nAward [12 max].
\nRoulette wheel selection
\nCyclic crossover (CX)
\nPopulation size
\nInitial routes
\nMutation rate
\nStopping criterion
\nConclusion
\nPlease see markband.
\nThe names of vegetables must be always held in alphabetical order in a list in the main memory.
\nThe application program should allow insertion and deletion of the names of vegetables from this list.
\nGiven the following vegetables: potato, asparagus, lettuce, radish.
\nCompare the use of a dynamic linked list for holding these names of vegetables with a static one-dimensional array.
\nSketch a single linked list holding these vegetables.
\nList the steps required to insert cabbage into the linked list.
\nExplain why deleting the first node in this list is different to deleting other nodes.
\nState the dynamic data structure suitable for maintaining this list of vegetables which will allow faster searching for a given vegetable name.
\nThe vegetable names are input in the following order
\npotato, asparagus, lettuce, radish.
\nSketch the data structure suggested in part (d) containing the vegetable names sorted in alphabetical order.
\nAward [1] for each comparison, up to [3 max].
\nThe size of the dynamic list does not have to be predetermined as in an array;
The size of the dynamic list is not fixed whilst the size of an array is always fixed;
If names are sorted they can be added/deleted (more easily) by changing the pointers without having to shuffle the names;
As records can be dynamically added/deleted the memory is better used because there are no wasted / missing spaces as in an array;
Award [1] for a node containing two fields / data(name) and link (pointer) to the next node and [1] for showing an external pointer pointing to the first vegetable on the list, and null pointer in the last node, and pointers which link the nodes in alphabetical order up to [2 max].
\nAward [1] for each step identified up to [4 max].
\nCreate a new node containing cabbage;
Traverse the list (from the beginning) to find the place to insert a new node;
Cabbage should be inserted before lettuce and after asparagus;
The pointer in new (cabbage) node should be set to point to the node that is before the insertion point / lettuce;
The pointer in node before insertion point / asparagus / should now point to the new node / cabbage;
Note: award marks for clearly labelled diagrams in candidates’ answers.
\nAward [1] for identifying a reason why deleting the first node is different to deleting other nodes and [1] for an expansion up to [2 max].
\nExternal pointer (First) must be changed/only in situation when deleting the beginning node the external pointer must be changed;
And set to the pointer in the link field of the first node (Asparagus) which points to the second node/Lettuce;
Award [1 max].
\nBinary tree;
\nAward [3 max].
\nAward [1] for clearly a binary tree and the root is Potato.
Award [1] for the correct left subtree.
Award [1] for the correct right subtree.
The following method, swap(A,B)
is written to exchange the values of variables A and B.
swap(A,B)\n
TEMP = A
B = TEMP
A = B
end swap
Method swapRows(MAT,K,L)
swaps the elements of two rows (row K
and row L
) in the two‑dimensional array MAT
.
For example,
\nA game consists of four rounds. In each round a player can score up to 100 points.
\nThe data about the game is sorted in alphabetical order of names and stored in the memory as follows
\nWherePLAYERS
is a one-dimensional array holding names of players (currently sorted in alphabetical order).ROUNDS
is a two-dimensional array holding players’ scores.TOTALS
is a one-dimensional array holding total scores.
For example,PLAYER[1]
is Boris. The total number of points he scored is 180 and this can be found in TOTALS[1]
.
Boris scored 40 points in the first round which can be found in ROUNDS[1][0]
.
The value stored in ROUNDS[1][2]
is 50 which means that Boris scored 50 points in the third round.
State Paul’s total score.
\nState where Hugh’s score in the fourth round can be found.
\nAll the data stored in memory should be sorted in ascending order of total score using selection sort.
\nFor example, after sorting, the data given opposite will be held in memory as follows
\nConstruct an algorithm that will sort all the data in ascending order.
\nIn your solution you should call methods swap()
and swapRows()
given in part (a) and part (b).
Award [1 max].
\n105;
\nAward [1 max].
\nROUNDS[2][3]
;
Award [6 max].
\nAward [1] for the correct outer loop (loops through the array TOTALS
).
Award [2 max] for correct determination of MINIM
/ the position of smallest element in part of array TOTALS
(range should be from J + 1 to 5), [1] for minor error.
Award [1] for correct condition / to check whether swaps are needed or not.
Award [1] for correct swap of elements in array TOTALS
.
Award [1] for correct swap of elements in array PLAYERS
.
Award [1] for correct swap of rows in two-dimensional array ROUNDS
.
Example answer:
\nloop for J from 0 to 5\n
MINIM = J
loop for I from J + 1 to 5
if TOTALS[I] < TOTALS[MINIM]:
MINIM = I
end if
end loop
if MINIM != J
swap(TOTALS[MINIM],TOTALS[J])
swap(PLAYERS[MINIM], PLAYERS [J])
swapRows(ROUNDS, MINIM, J)
end if
end loop
A business has a range of different computers within the organization, including laptops, desktops and file servers. Wherever possible the organization uses a common operating system on its computers.
\nMemory requirements and processor speed will vary depending on the tasks required of the computer.
\nThe business has decided to implement a computer-based system to switch the room lights on and off automatically. The lights will only be switched on if the level of light is below a specific reading and there are people in the room. The lights will be switched off when the room has been unoccupied for at least five minutes.
\nOutline two resource management techniques that are likely to be carried out by the operating system of a desktop computer.
\nOutline one way the operating system hides the complexity of the hardware from the computer user.
\nContrast the memory requirements of a laptop computer and a file server.
\nContrast the processor speed requirements of a laptop computer and a file server.
\nState two types of sensor that are required to control the lighting to ensure it switches on when it is required.
\nExplain how the system makes use of the data it receives from the sensors to determine when to switch the lights on.
\nOutline how the system will prevent the lights from being switched off too quickly when it thinks the room is unoccupied.
\nAward [4 max]
\nVirtual memory;
to enable the hard drive to act as primary memory if required;
Paging;
scheme by which a computer stores and retrieves data from secondary storage for use in main memory;
Multitasking;
to enable more than one application to run at the same time;
Scheduling (method by which work is assigned to resources that complete the work);
to determine which process will own CPU for execution while another process is on hold.;
Policies (ways to choose which activities to perform);
according to which decisions are made about which operations should be authorized/ which resources should be allocated;
Interrupt handling;
so that urgent tasks required by parts of the system may be executed;
Polling;
to sampling the status of an external device;
Mark as 2 and 2.
\nAward [2 max]
Award 1 mark for the virtual machine (presented by the OS to the user, hiding all the complexities of the hardware behind layers of OS software) and 1 mark for an expansion.
The virtualization of real devices;
such as the use of drive letters for partitions to represent a virtual hard drive;
Use of icons;
to represent peripherals/to access different drives;
Award [2 max]
The primary memory/secondary memory in a laptop will be less / smaller than would be found on a file server;
because it is a smaller device that is used by an individual, so doesn’t need to store / run so many programmes simultaneously;
Award [2 max]
The processor of a file server would be faster/have more cores than that of a laptop;
as it has many more resources to manage/as it needs to keep track of many workstations/printers/peripherals;
Award [2 max]
Light sensor;
infra-red/motion sensor;
Award [4 max]
The sensors send data to the processor continuously;
The data received from the sensors is converted to digital (using an analogue to digital convertor);
The readings are compared to pre-set values in the controller/system;
If the light level is found to be below the pre-set value and a presence is detected (in the room);
A signal is sent to the actuator to turn on the lights;
Award [2 max]
A timer (set to 5 minutes);
If the light level is found to be below the pre-set value a timer is activated but the lights remain on;
When the timer reaches 5 minutes, the lights switch off (if no further presence is detected);
This question was answered well by many students. Part (a) was reasonably well answered with many gaining at least two of the marking points.
\nPart (b) was well answered.
\nStudents generally have problems with compare/contrast questions, describing the requirements individually without contrasting, as was the case in Part(c).
\nStudents generally have problems with compare/contrast questions, describing the requirements individually without contrasting, as was the case in Part(c).
\nA large number of candidates scored full or nearly full marks for the questions (d)
\nA large number of candidates scored full or nearly full marks for the questions (e)
\nA large number of candidates scored full or nearly full marks for the questions (f)
\nOutline one usability issue of a cell phone (mobile phone).
\nAward [2 max]
Screen size/ larger screen;
Easier to view large amounts of data without excessive scrolling / reduced eyestrain / more accessible to those with weak eyesight;
Screen size/smaller screen;
Difficult to accurately select the correct character on the virtual keyboard;
Identify one fundamental operation of a computer.
\nDistinguish between fundamental and compound operations of a computer.
\nAward [1 max].
Retrieve;
Compare;
Store;
Add;
Award [2 max].
Fundamental operation requires one machine instruction cycle/do not require the processor to go through many machine instruction cycles to reach a result;
A compound operation is complex / it is an operation that involves a number of other operations to reach the result;
For example, find the largest number in an array/ sort the array in ascending order etc.;
Candidates were generally able to identify a fundamental operation of a computer, such as retrieve, compare, store or add.
\nCandidates were generally able to describe correctly the meaning of complex operations of a computer but were less clear in their descriptions of fundamental operations, so as to distinguish the two terms.
\nState two differences between primary storage and secondary storage.
\nAward [2 max]
Primary storage is accessed by a computer's central processing unit (CPU) and secondary storage is not accessed directly by the CPU;
Primary storage has lower access time / has smaller capacity/ more expensive type of memory than secondary storage (which is slower than primary storage, with larger capacity but it is cheaper);
Primary storage is volatile (uses random-access memory (RAM), cache memory, or some other specialized hardware to store data while the computer is powered on/ volatile devices), whilst secondary storage on a computer is provided by non-volatile devices (such as SSD or HDD);
Primary storage holds data temporarily whilst data is kept permanently/ for a long time in secondary storage;
Primary storage holds currently running programs/data/operating system, secondary storage does not.
A new computerized system is being planned for a school library.
\nDescribe one method by which systems requirements can be obtained from the stakeholders.
\nOutline one reason for providing a prototype for this new system.
\nAward [2] for one method that is suitable for the given scenario.
\nAnswers may include:
Interviews could be held (with the librarian/stakeholders);
To establish the functions required by the system;
Direct observation could be made of the users/students using the present system;
To gain an insight on how the library is being used;
Allows stakeholders to gain an idea of how the system would be/work/look;
so they can provide feedback / suggest improvements;
A parasite is destroying olive trees in a region in southern Europe. This area is monitored by taking aerial digital images at midday each day. A neural network is then used in the analysis of these images.
\nGenetic algorithms follow an iterative process in developing a solution to a problem.
\nOutline the steps involved in this iterative process.
\nOutline why neural networks need to be trained before they can be used in this analysis.
\nExplain why supervised learning may be preferred to unsupervised learning for training these networks to make predictions on the progress of this parasitic disease.
\nMany companies now use an automated response system when answering basic telephone queries from customers. This system uses speech analysis together with recorded messages.
\nExplain why the content of the messages given by these systems must be carefully chosen.
\nThe initial population set is chosen randomly/pseudo randomly;
A fitness function is applied to each population;
The fittest members are selected for the next stage;
Genetic operators are applied;
Such as crossover / mutation;
The process is repeated until;
An acceptable level of fitness is found / a plateau is reached / a maximum number of iterations has been reached;
Network networks initially have a randomly chosen set of weights;
Which will not solve any problem;
These weights must be altered;
Until they fulfil their objective;
Award up to [6 max].
Award [3 max] for considerations linked to each of the two forms of learning.
With supervized learning the processing of the image is guided (supervised) by the output dataset to the purpose of classifying certain features of the image;
For example, to the value of the pixel (grey or colour) one can assign likelihood of belonging to neighbouring values of greys/colours;
And this can be defined in advance as a way to represent a potential value for an infected tree;
However, with unsupervised learning the processing of the image is not guided in any way / the output is not known;
And the purpose is to discover and build clusters that have common characteristics;
Therefore, this may clearly help in building up the main regions, but not specifically on focussing on the infected trees;
Award up to [4 max].
Questions/requests must be short so repetition is not required / so they are immediately understood;
And chosen so that there is a restricted response set;
That can be recognised by the system / that can be stored by the system;
The requests must lead to a satisfactory end;
Or customers will get frustrated / hang up / the company will lose business etc.;
Outline why computers use the binary number system.
\nAward [2 max]
because the binary system uses only two digits (0 and 1);
and computer uses bi-stable devices / devices that can be either in one of the two possible states(such as pulse or no pulse, on or off, 0 or 1, true or false) /;
Identify one cause of data loss.
\nDescribe one way offsite storage can be used to prevent data loss.
\nAward [1 max].
Any malicious activity;
Natural disasters;
Human error;
Award [2 max].
Internet backup service could automatically back up (all important) data files;
to a remote server that could be accessed/controlled over the internet;
Copies of all important data files (backup) could be placed on two separate hardware devices;
which are placed in two different physical locations;
A remote file server could be set up;
for uploading all important data files;
The vast majority of candidates identified a relevant cause of data loss, such as malicious activity, natural disasters or human error.
\nCandidates were generally able to identify appropriate methods of offsite data storage, but clear descriptions of how these could be used to prevent data loss were less common, with answers simply describing the method rather than how it could prevent data loss.
\nExplain why compression of data is beneficial when transmitting data files across a network.
\nAward [3 max]
\nCompressing a data file reduces the file size;
The amount of time it takes to send a file over the network depends on the size of the transmitted file, so the amount of time needed to transmit the file is reduced /transmission of a compressed file takes less time than transmission of that same uncompressed file;
Also, compression of data files before transmission reduces the financial cost of running a network/ less equipment / bandwidth is needed to transmit the data file;
Outline the role of the memory data register in the machine execution cycle.
\nHolds (a copy of) the contents of the memory;
Which are to be transferred from/to memory to/from other CPU components;
Allowing the processor and memory to act independently/processor not affected by differences in the speed of operation;
A group of programmers are involved in creating a new software product. They create many new sub-programs but also use existing sub-programs within the product.
\nOutline why a sub-program is considered an example of abstraction.
\nEvaluate the use of designing and developing different parts of software products concurrently.
\nOutline one way in which users can be informed of software updates.
\nAward [2 max]
\nA sub-program is a named section of code that performs a specific task (in a program) / can be called by name / referred by the identifier when needed;
without knowing the details (of code and data structures) as these are wrapped / hidden within the sub-program;
Award [3 max]
\ndifferent stages (of programming) (Accept examples!) run simultaneously (rather than consecutively);
this decreases product development time / decreases the time to market;
leading to improved productivity/reduces costs;
however, it requires more resources/more software developers;
Award [2 max]
\nA message can be sent to the user (When the software is installed and registered, the user provides an email address / phone number);
With a link to the update;
notifications/alerts are sent to the computer (a cookie is placed on the user's computer which communicates with the software developer);
about automatic updates;
(when the program is run) it queries a URL the program developer has built in to check whether the current version matches the latest version;
if not, notifications/alerts are sent;
State the function of the control unit (CU) in the central processing unit (CPU).
\nExplain the purpose of cache memory.
\nAward [1 max].
It decodes the instructions and controls all the other internal components of the CPU to make it work;
Award [3 max].
Cache memory is a memory that a computer microprocessor can access more quickly than it can access regular RAM;
It is integrated directly with the CPU chip or placed on a separate chip which has a separate bus interconnect with the CPU;
and stores frequently used data only until a computer is powered down;
Thus, when a processor requests data that already has an instance in the cache memory; it does not need to go to the main memory or the hard disk to fetch the data;
Cache memory is a small-sized type of volatile computer memory;
that provides high-speed data access to a processor;
and stores frequently used computer programs, applications and data;
Cache memory can be primary or secondary cache memory, where primary cache memory is directly integrated to the processor;
And secondary cache memory is a reserved portion on a disk stores and provide access to frequently accessed data/applications from the disk.
Candidates generally provided appropriate statements to illustrate their understanding of the function of the control unit in the CPU.
\nThis question was generally well answered with many full or nearly full marks answers seen. Candidates demonstrated a good understanding of the purpose of cache memory.
\nExplain how data is sorted by the selection sort.
\nOutline one difference between a bubble sort algorithm and a selection sort algorithm.
\nAward [3 max]
The selection sort algorithm maintains two subarrays of a given array, the subarray which holds already sorted elements;
And the subarray which is unsorted;
In every iteration, the minimum element (considering ascending order OR maximum element considering descending order) from the unsorted subarray is found/selected;
And then swapped with the item in the next position (at the appropriate place / in the last position) to be filled in the sorted subarray;
OR
\nThe selection sort algorithm searches through the entire array for the smallest (considering ascending order OR the largest element considering descending order) element;
When found, it (the smallest/largest element) is swapped with the first element of the array;
Then searches for the smallest / largest element in the remaining array (an array without the first element) and swap it with the second element;
This process repeats on the remaining items (searches for the smallest / largest element in the remaining array (an array without first and second elements)) and swap it with the third element, and so on);
Award [2 max]
\nBubble sort swaps adjacent items;
selection sort finds the next smallest (each time it goes through the list);
Bubble sort can exit early/ is faster if already the list is sorted;
selection sort will need to complete the procedure for the entire list every time;
(The efficiency of Bubble and selection sort is different when applied on already sorted list) in the best-case bubble sort takes an order of N time;
whereas selection sort consumes an order of N2 time (where N is the number of items on the list));
Note: To award marks for such an answer it should be evident that the list is already sorted OR the term 'the best-case' should appear because the worst-case /average-case complexity/efficiency is same in both algorithms (O(N2)).
\nCalculate how many different colours can be represented using two hexadecimal characters.
\n2 hex = 4 + 4 = 8 bits;
hence 2^8/16^2/256 colours;
Note: Allow [2] for 16^2 = 256 colours with no workings and also ONLY 256
Tapetum lucidum refers to the layer of tissue in the eyes of many animals, such as cats and owls, which helps to improve their night vision by reflecting light. The eyes of these animals glow in the dark.
\nA student wishes to identify a particular animal which belongs to the above group.
\nThe web and social media are increasingly populated by pictures of pets and other animals. Most of these pictures are annotated with tags, such as those used on social networks.
\nSearch engines use indexing for the storing of keywords that might be used in a search engine query.
\nWith the use of an example, explain how a multimedia search in the semantic web would be preferable to a text based search for this student.
\nIdentify three differences between an ontology and a folksonomy.
\nDiscuss whether it is possible to integrate the expressivity of folksonomies with the authoritativeness of ontologies.
\nExplain the role that web crawlers perform in developing this index.
\nOpen source software, such as Linux, is often developed by using the collective intelligence of the developer community.
\nExplain how collective intelligence can lead to the successful development of open source software.
\nAward up to [4 max].
Award [2 max] for a general knowledge and understanding of multimedia web.
Award [2 max] for describing a situation where the multimedia web may be beneficial to using a text based search.
Knowledge of multimedia web
The multimedia web makes an expanded use of the semantic web (formally and semantically interlinked data of any kind) making possible to provide input in a form other than text, and possibly return output in various forms;
Therefore, the search is made at the level of “concepts” and not just textual terms;
In a way that the computer can retrieve semantical links among different concepts/concepts presented in different formats;
That includes the ability for crawlers to go through scientific classifications of text/captions/description of images;
That can all be indexed and clustered into a common “concept”;
Example 1:
To detect/discover/verify/monitor the presence of species based on sound
For example:
We might aim in recognising and searching on the web starting from the sound of some nocturnal animal that we don’t see/we don’t know, but whose presence is revealed by their eyes;
Giving the sound as input would allow to perform a search based on registration/audio that would run on multimedia sources linked with semantical links;
Example 2:
To detect/discover/verify/monitor the presence of species based on images
For example:
We might start a multimedia search based on images/photos of nocturnal animals we may have taken;
To see whether those sightings were associated to dangerous species or not;
To signal the presence of some unusual species in the region;
To signal the presence of some animal in difficulty to the protection agency;
Award up to [3 max].
Award [1] for each difference up to [3 max].
Designed or extracted by knowledge engineers VS;
Created collaboratively by users;
Laborious and expert VS quick/easy non-expert;
Controlled vocabulary/dictionary VS no control of vocabulary/informal;
Formal specification of knowledge domain (taxonomies) VS;
Informal metadata on documents;
Not just for the web VS mostly for the web;
Essential for the semantic web VS important for social web;
Explicit meaning and high expressive power VS;
Ambiguity and low expressive power;
Experts’ view of the domain VS social aspect of meaning;
Award up to [6 max].
Award [2 max] for a superficial response that uses generic terminology.
Award [4 max] for a response that shows some analytical comments, unsubstantiated conclusions and some use of appropriate terminology.
Award [6 max] for a coherent analysis leading to substantiated conclusions with the appropriate use of subject specific terminology.
General, possibly described through examples
The ontology of the semantics web is extracted with expert means from documents;
(For example, by making features analysis / aggregating concepts / eliminating disambiguation;)
Whereas, the folksonomy is the result of adding different vocabulary (done by the users) via tags in posts/web pages/social web (like Tumblr);
(For example, tagging the photo of a cat under an informal “cat’s eye” would add a different perspective to the ontology);
The problem:
If not monitored, tagging may be source of “garbage” and hinder the research for the ontology;
The ambiguity problem of tagging needs to be addressed so to extract a weight to ambiguous use of tags;
Possible countermeasures:
Expand the query within social tagging platforms;
In order to extract a weight to ambiguous use of tags and use this weight to cut-out some irrelevant retrieved information;
OR
Use the folksonomy tags (at least some) to update (possibly as metadata) the ontology vocabulary;
However, depending on the context, this may not always be feasible/applicable and depends on the domain of discourse;
OR
Re-engineer the ontology to include a collaborative form of construction from tagging;
However, this is method is not applicable in expert fields where quality of content must be preserved;
OR
Keep the ontology and folksonomy well separated, but let them work in tandem;
In a way to have feedback from folksonomies, but merged in a controlled way;
Award up to [4 max].
Award [1] for each comment that indicates the role that web crawlers perform in developing an index that is used by a search engine up to [4 max].
A web crawler is given a “seed” page which is where it starts;
It searches for hyperlinks;
Which it recursively follows;
Making a copy of each web page visited;
Which can be indexed by the search engine;
Award up to [3 max].
Award [1] some example to fix the scenario of open source;
Award [1] what is meant by collective intelligence;
Award [1] some explanation/expansion to link the concepts;
The focus:
“Software for Public Interest”;
Open source and free software development is the result of initiatives taken by sparse communities of programmers that collaborate effectively to maintain complex programs/packages of code;
\n(For example, Debian Foundation, Linux Foundation, Mozilla Foundation, Apache Foundation, Free Software Foundation, Wikipedia…;)
\nThe structure:
A distributed system of development AND tightly governed /
Each developer codes individually, but the whole project relies on the fact that portions of code may be integrated as components of other parts;
Organisations may have different modes of governance, and have precise ways (processes) to contribute to a project, both technical and social;
\nThe objective is to guarantee coordination, quality and relevance for the project development (technical) based on contributions of the individuals;
While modulating possible clashes/conflicts between different personalities;
Examples:
OS kernels, Wikipedia, mail programs, GNU, …;
Build a deposit of old software (free/open source), for preservation and sharing (with everybody);
Old open source SW may in fact be at risk of not being publicly available for a variety of reasons, such as sites become proprietary and limit public access, crash of the systems, business decisions;
Role of collective intelligence
Individuals are expert developers, but act collectively, for public interest, and this becomes a movement that may make a cultural/political difference/impact (the key is high quality, not populism!);
e.g. the French Public Administration adopts Open Source software and has rejected proprietary products (Microsoft, specifically)
Explain the importance of the memory management function of an operating system.
\nAward [3] as follows:
The function of the memory management [1].
An example if its use [1].
Reason for the importance [1].
Example:
Allocates and de-allocates memory/ assigns blocks of memory to programs;
Ensures a program has sufficient memory to run/manages virtual memory if needed;
To avoid overwriting /clashing of programs/optimise system performance/maximise memory usage
A network is set up with shared printers so that when a user wishes to print, print jobs are sent to a queue until the printer is available.
\nThe factorial of the positive integer n, which is written n!, is the product of all the positive integers less than or equal to n. A stack may be used to perform a factorial calculation as shown by the algorithm:
\n//stack for factorial(NUM)\n
//creates a stack of (NUM - 1) elements
//when NUM = 6
NUM = 6
loop while NUM > 1
stack.push(NUM)
NUM = NUM – 1
end loop
PRODUCT = 1
loop while not stack.isEmpty()
NUM = stack.pop()
PRODUCT = PRODUCT * NUM
end loop
output PRODUCT
Outline why a queue is the appropriate data structure to manage print jobs.
\nDraw a diagram to show how a print queue may be implemented using a linked list.
\nExplain why a stack would not be appropriate as a data structure for managing print jobs.
\nCopy and complete the trace table for the algorithm shown for NUM = 6
.
Explain how a stack may be used in the implementation of a recursive function.
\nAward [2 max]
Print jobs are to be completed in the order received;
Queue is appropriate because print jobs are added/enqueued at the back/rear and dequeued/removed from the front / because queue is a FIFO data structure;
Award [3 max]
\nCorrect use of pointers and null pointer in the last node;
External pointer to the beginning of the list (head);
External pointer to the end of the list (tail);
Each node consists of at least 2 parts/fields: data (print jobs) and pointer;
Award [3 max]
Print jobs would not be managed in an orderly manner;
Because stack is LIFO data structure / elements are added/pushed and removed/popped at only one end;
And each time another one is added it takes precedence over those that are already in the data structure;
Award [3 max]
\nNUM column correct;
PRODUCT column correct;
OUTPUT column correct;
Note: The trace table may be differently presented.
\nAward [4 max]
\nA recursive function calls itself during its execution;
First call (all local variables, data, return addresses, etc.) is pushed onto stack;
Second/subsequent recursive calls are pushed on to the stack (added above previous call(s));
When the terminating condition is met/ execution of recursive function ends;
The function calls pop from the stack;
In the reverse order to which they were pushed/LIFO;
\n
Assume X = 5 and Y = 3.
\nDetermine the value of the following expression:
\n\nAward [1 max]
Identify two essential features of a computer language.
\nAward up to [2 max].
Fixed vocabulary;
Unambiguous meaning;
Consistent grammar;
Consistent syntax;
Provide a way to define basic data types and operations on those types (ability to write functions/procedures);
Provide ability of Input and output handling;
Provide some kind of loop that can be stopped / conditional statement / branching (conditional and unconditional branching);
It should have variables that reference computer memory, syntax for basic arithmetic and logical;
Operations on those memory locations;
It has to run on/be able to be processed by a computer (i.e. it must have a compiler/interpreter)
Note: do not accept aspects that address interoperability/portability/standards/user friendliness
\nConstruct a logic diagram for the following Boolean expression.
\n\n
Award [3] as follows:
Clearly a logic diagram with 2 inputs, 1 output and 3 logic gates [1];
OR gate has two inputs one of which is NOT A [1] and the other is A AND B [1]
Colours are represented by a computer as a combination of the three primary colours: red, green and blue.
\nNumerical values are used to represent the different shades of each primary colour. These values range from 0 to 255 in decimal, or 00 to FF in hexadecimal.
\nState why hexadecimal numbers are frequently used in computing.
\nState the number of bits used to represent a non-primary colour, such as yellow.
\nState the maximum number of colours that can be represented in a computer pixel.
\nAward [1 max].
Hexadecimal numbers are used for shorter representation of data because a (modern) byte can be represented exactly by two hexadecimal digits;
Hexadecimal numbers are used for shorter representation of data, because computers store and handle binary digits, and four binary digits make one hexadecimal digit;
Award [1 max].
24;
Award [1 max].
256 × 256 × 256 / (28)3 / 224;
2563;
16 777 216;
This question required candidates to recognise that hexadecimal numbers are used for shorter representation of equivalent binary numbers, and the relationship between groups of binary digits and individual hexadecimal digits. Answers seen, were often too vague, simply stating that, for example, the numbers are easier to use.
\nThis question required candidates to realise that non-primary colours are stored as a combination of the three primary colours red, green and blue. 8 bits are required for each of these, making 24 bits necessary to store each non-primary colour. Many answers seen incorrectly gave 8 bits as the requirement.
\nAs with part b, candidates were expected to recognise that each computer pixel would be made up from a combination of each of the three primary colours, with one byte, 8 bits, or 28 = 256 combinations for each primary colour. The answer would therefore be 256 × 256 × 256, or 16 777 216 combinations. Many answers seen incorrectly gave 256 combinations.
\nConstruct a trace table for the following algorithm:
\nI = 0\n
loop while 6 > I
K = K + I
I = I + 2
end loop
output(K)
Award [3 max]
\nAward [1] for correct values in column I
Award [1] for correct values in column K
Award [1] for correct output
Note: Column 6 > I
may not appear in the trace table.
Identify two characteristics of a data packet.
\nIt contains a set amount of data;
It contains a fixed structure (or identify elements of the structure other than data);
It contains data that is to be sent via a communications channel;
It contains specific details for transmission e.g. address of sender and receiver, error codes etc.;
Award 2 marks if two of the contents of a packet are given and expanded.
\nTwo fundamental operations of a computer are add and retrieve. State another two fundamental operations.
\nCompare (accept Check);
Store (accept Write / Save);
Note: Accept the following wording for categories of operations
Input (Read);
Processing/execution (e.g. calculate, decode, fetch, delete, evaluate, sort, transfer, transmit);
Output;
Control;
Remark: Beware of repetitions with the wording in the question paper, or repetitions between the two given examples. Marks should not be awarded twice in those cases.
For example,
Search/look up, or comparable wording, are synonyms of the given Retrieve;
Insert/put, or comparable wording, are synonyms of the given Add;
Lists of repeated arithmetic operations that fall under examples of calculations (subtract, divide, multiply, square) are all examples of calculations, and hence processing.
Explain why protocols are used in network communications.
\nProtocols are a set of rules;
(That are used) so that both sender and receiver are using/expecting the same formats/methods;
To allow data to be transmitted successfully / without errors;
A new computer system is being developed using prototypes.
\nOutline one advantage of using surveys as a method of obtaining requirements from stakeholders.
\nOutline one disadvantage of using surveys as a method of obtaining requirements from stakeholders.
\nIdentify one other method of obtaining requirements from stakeholders.
\nOutline two advantages of using prototypes.
\nExplain why more than one cycle of analysis and design might be needed.
\nExplain why this computer system should be tested thoroughly before being put into operation.
\nAward [2 max]
Surveys allow analysts to obtain appropriate information quickly;
from a large number of persons / stakeholders;
Standardized question formats are prepared;
that can provide data that can be easily quantified/allow quantitative analysis (the success of a survey depends on the effectiveness of questions);
The use of standardized formats;
minimizes the risk if the analyst adding their opinion;
Survey is a straightforward/easy/practical way of gathering data;
it can be distributed using various methods (printed copies, e-mail, embedded in a website, online forms)
Surveys allow greater anonymity for respondents;
which can lead to more honest responses;
Award [2 max]
\nPoorly designed surveys;
May make it difficult to analyse the data;
(Response may be limited/not all questions answered / not all forms will be returned;
Can be challenging to analyse the collected data ;)
Questions in the survey were not effective;
Can be differences in how people understand the survey questions;
Data gathered cannot be quantified;
Award [1 max]
Direct observation;
Interviewing;
Focus groups;
Examining existing documents/ Literature searches;
Investigating previous solutions;
Award [4 max]
The final product meets the requirements/ is more successful;
as feedback is provided by the users during the development process;
Costs/time saved at a later stage;
as early feedback avoids later changes (which may require a considerable amount of time/cost);
The best design can be decided upon early;
As it allows different prototypes can be tried out/tested;
Mark as 2 and 2.
\nAward [3 max]
Another cycle of analysis and design might be needed because the stakeholder could ask for modifications;
because errors or omissions are found that need to be corrected;
new/different features could be added that affect the current design;
which affects the costs/ delivery time / hardware requirements/ contributes significantly to system quality and performance;
Award [3 max]
so that it functions the way it is supposed to / to ensure that the actual outcomes are equal to the predicted outcomes;
so that it meets its design specifications functions;
so that functions correctly / to eliminate any errors/bugs;
so that the speed/capacity/compatibility issues are solved;
so that all security features are configured and enabled;
because wrong/incorrect/stolen information could have serious consequences for its customers (accept an actual consequence);
because wrong information could harm the company’s reputation / loss of earnings / sued/ etc.;
In the context of the networked world, state the role of a client.
\nIn the context of the networked world, state the role of a server.
\nA piece of computer hardware or software that accesses a service made available by a server /
The role of a client is to access a service made available by a server by sending a request for service;
Note: the term client is to be understood only from the computing perspective, i.e. this is not a human.
\nA program/host computer that awaits and fulfills requests from client programs (in the same or other computers) /
The role of a server is to fulfill requests from client programs (which can reside in the same or in other computers)
Note: the term server is to be understood only from the computing perspective, i.e. this is not a human.
\nA company has a large networked computer system.
\nSome of its data is non-sensitive data that would cause no risk to the company if accessed. Some data, however, is sensitive, such as the company’s financial records and documents that contain trade secrets and personal information about employees or clients.
\nData corruption can result in data loss.
\nOutline two ways in which access to sensitive data can be managed.
\nOutline two ways to improve the security of the company’s network.
\nExplain how corrupted data files can be recovered.
\nThe company is considering implementing a virtual private network (VPN).
\nExplain one benefit to the company of using a VPN.
\nAward [4 max]
\nEach user should have appropriate access rights;
Managers, employees and clients/customers are permitted to access different parts of the data;
Sensitive data can be protected by locking it with a password;
preventing unauthorised access who doesn't have this;
Administrator should record who has logged on and from which computer / and for how long;
to discourage security violations/ to avoid undesirable events from occurring;
File systems should be encrypted (as it passes throughout a network / resides on computers);
to make data unusable if accessed by unauthorized user;
Each computer should have access rights depending on its location;
Logged in computers should not be unattended;
Mark as 2 and 2.
\nAward [4 max]
\nEach user should have a user ID and a personal password;
Passwords should be regularly changed;
Two-factor authentication for remote users and administrators could be required (this could be a digital certificate, tokens, thumbprint scanners);
In addition to the usual user ID and password;
In order to prevent intruders/strangers from accessing the company's network;
the router is set to accept only specific MAC addresses;
Regularly installing updates and patches;
to ensure the network is protected against new threats such as malware;
Mark as 2 and 2.
\nAward [4 max]
Restore files from a backed-up data file;
ensuring it is a recent copy to minimize loss;
a parallel/failover system could be operated;
that could be switched to (if the live system is corrupt);
data recovery software could be (installed and) run;
to repair corrupted files;
Award [3 max]
A VPN improves data security;
By passing the company’s data through a hidden tunnel;
And encrypting the internet traffic inside encapsulated data packets;
A VPN improves the company’s productivity;
as the workers will not have to be in a particular location to get to be productive;
VPN is not dependent on any particular network or Wi-Fi connection to work/ can be used on any type of device;
Remote access;
VPNs is not dependent on any particular network or Wi-Fi connection to work;
The company can have a remote workforce /employees or freelance staff working from different geographic locations/can connect their different office locations;
Some databases/websites that support the company’s business operations may not be directly accessible in some countries;
A VPN helps to unblock geo restricted contents / has ability to bypass geo-blocking;
By hiding IP addresses / obscuring the access requests to appear to be originating from various IP address which are not in an unrestricted location;
A VPN can reduce a company’s infrastructure costs;
Because can be used on any type of device;
So, the company can offer BYOD options to employees;
A different airport has two runways for arriving flights. Two objects of the LinkedList
class, named runway1
and runway2
, are associated with these two runways.
Arriving flights are added to a list depending on the runway they are assigned to.
\nBoth linked lists contain Arrival
objects, corresponding to arriving flights, and are sorted by ETA.
The following diagram represents runway1
.
Consider the following method.
\nvoid process(LinkedList<Arrival> myList, int i)\n
{ if (i < myList.size())
{ process(myList, i + 1);
System.out.println(myList.get(i).getETA());
}
}
Outline an advantage of using a library.
\nEvaluate the use of dynamic linked lists to static arrays when managing arriving airplanes.
\nSketch the resulting linked list when an airplane with ID RO225, STA 12:05 and delay 0 is added to this list.
\nDefine the term recursion.
\nTrace the call process(runway1,0)
given the diagram of runway1
as drawn above. Copy and complete the following table.
In case of bad weather it is possible that one of the runways has to be closed and the two linked lists (runway1
and runway2
) need to be merged using a method mergeLists()
into one new linked list runway
.
Construct the method public LinkedList<Arrival> mergeLists()
that merges the two sorted linked lists in to one sorted linked list result
which needs to be returned. You may assume that runway1
and runway2
are accessible to the method and do not need to be passed. The original two lists are allowed to become null
as a result of the merging.
In answering this question, you may use the following methods from the JETS LinkedList
class, in addition to any method provided or developed in this exam paper.
addFirst(<object>) // adds the object at the head of the list\n
addLast(<object>) // adds the object at the tail of the list
getFirst() // returns the head object in the list
getLast() // returns the tail object in the list
removeFirst() // removes and returns the head object
removeLast() // removes and returns the tail object
size() // returns the number of objects in the list
isEmpty() // returns true if the list is empty
Award up to [2 max].
Award [1] for identifying an advantage.
Award [1] for an elaboration of the advantage.
Example answers:
Convenience;
Because implementations of common tasks are available;
Reliability;
because these implementations are fully developed, functional and robust.
Award up to [4 max].
Award [1] for identifying an issue and [1] for a valid comparison related to the issue.
Mark as [2] and [2]
Award up to [2 max].
Award [1] for a good attempt (for example the new node being added as the 3rdnode in the list).
Award [2] for a fully correct diagram.
When a method calls on itself.
\nAward up to [4 max].
Award [1] for correct recursion levels i including i = 3.
Award [1] for the correct flight id's (with or without the line for i = 3.
Award [1] for 12:55 and 11:05 in the correct order.
Award [1] for 12:30 (ETA) in the correct order.
Note: that there are many ways to trace a recursive algorithm.
For answers without iterators
Award up to [7 max].
Award [1] for correctly instantiating the LinkedList
variable result
.
Award [1] for declaring (and instantiating) all other variables.
Award [1] for correct main loop.
Award [1] for correctly comparing the first Arrivals in the two lists.
Award [1] for correctly removing the earlier Arrival from its original list.
Award [1] for correctly adding this Arrival to the end of the resulting list.
Award [1] for attempting to add the remainder of a non-empty linked list.
Award [1] for correct loop for copying the remainder of runway1
.
Award [1] for correctly removing/adding the remainder of runway1
.
Award [1] for also copying a possible remainder of runway2
.
Example without iterator:
\npublic LinkedList<Arrival> mergeLists()\n
{
LinkedList<Arrival> result = new LinkedList<Arrival>();
Arrival temp = null;
while (!runway1.isEmpty() && !runway2.isEmpty())
{
if (runway1.getFirst().compareWith(runway2.getFirst())<0)
{ temp = runway1.removeFirst(); }
else
{ temp = runway2.removeFirst(); }
result.addLast(temp);
}
while (!runway1.isEmpty())
{ temp = runway1.removeFirst();
result.addLast(temp);
}
while (!runway2.isEmpty())
{ temp = runway2.removeFirst();
result.addLast(temp);
}
return result;
}
Alternative example without iterator:
\npublic LinkedList<Arrival> mergeLists()\n
{
LinkedList<Arrival> result = new LinkedList<Arrival>();
Arrival head1 = runway1.peekFirst();
Arrival head2 = runway2.peekFirst();
while ((head1 != null) && (head2 != null))
{ if (head1.compareWith(head2) <= 0) // or <
{ result.addLast(head1);
runway1.removeFirst();
head1 = runway1.peekFirst();
}
else
{ result.addLast(head2);
runway2.removeFirst();
head2 = runway2.peekFirst();
}
}
while (!runway1.isEmpty())
{
result.addLast(runway1.removeFirst());
}
while (!runway2.isEmpty())
{
result.addLast(runway2.removeFirst());
}
return result;
}
For answers that use iterators
Award up to [7 max].
Award [1] for correctly instantiating the LinkedList
variable result
.
Award [1] for declaring and instantiating iterators and all other variables.
Award [1] for correct main loop.
Award [1] for correctly comparing the first Arrivals in the two lists.
Award [1] for correctly adding the earlier Arrival to the end of the resulting list.
Award [1] for testing iter.hasNext()
and loop termination.
Award [1] for attempting to add the remainder of a non-empty linked list.
Award [1] for correct loop used for copying the remainder of runway1
.
Award [1] for correctly copying the remainder of runway1
.
Award [1] for also copying a possible remainder of runway2
.
Example with iterator:
\npublic LinkedList<Arrival> mergeLists()\n
{
LinkedList<Arrival> result = new LinkedList<Arrival>();
ListIterator<Arrival> iter1 = runway1.listIterator();
ListIterator<Arrival> iter2 = runway2.listIterator();
Arrival curr1 = null;
Arrival curr2 = null;
if (iter1.hasNext()) {curr1 = iter1.next();}
if (iter2.hasNext()) {curr2 = iter2.next();}
while ((curr1 != null) && (curr2 != null))
{ if (curr1.compareWith(curr2) <= 0) // or <
{ result.addLast(curr1);
if (iter1.hasNext()) {curr1 = iter1.next();}
else {curr1 = null;}
}
else
{ result.addLast(curr2);
if (iter2.hasNext()) {curr2 = iter2.next();}
else {curr2 = null;}
}
}
while (iter1.hasNext()) result.addLast(iter1.next());
while (iter2.hasNext()) result.addLast(iter2.next());
return result;
}
Consider the following algorithm.
\nDetermine the outputs that will be produced by this algorithm.
\n47, 23, 11
Award [1] per output.
Note: Allow FT if either of the first two outputs are wrong.
Copy and complete the following truth table where:
\nX = A XOR B
Y = A NOR C
Z = X OR NOT Y
Award [4 max].
Award [1] for all 8 input values correct;
Award [1] for correct X column;
Award [1] for correct Y column;
Award [1] for correct Z column;
Allow follow through from incorrect columns X or Y.
Generally, well answered, with many full or near full marks awarded. Some candidates lost marks by not giving a sufficient number of input combinations, so that instead of there being 8 possible input combinations, only 6 or 7 were supplied. Other candidates, due to not systematically filling the input columns, but using a more random approach, may have provided 8 input combinations, but at least one was a repeat of another.
\nA bus company provides services within a city. The basic fare depends on the travel distance between the departure station and the destination station.
\nThe cost per kilometre is € 0.20.
\nChildren under the age of 5 can travel for free.
\nChildren between the ages of 5 and 15 inclusive can travel with a child age ticket, which gives a 50 % discount off the kilometre fare.
\nThe senior discount (age 65+) offers 30 % off the kilometre fare.
\nThe sub-program costperkm(AGE)
accepts an integer AGE
(the age of a passenger), then calculates and returns the cost per kilometre.
For example,
\ncostperkm(10)
returns 0.1,costperkm(20)
returns 0.2,costperkm(80)
returns 0.14
Passengers can find the distance between any two bus stations.
\nFigure 1 shows the one-dimensional array NAMES
. It is used to store the names of all bus stations on the route from Oppox to Dovely.
Figure 2 shows the one-dimensional array DISTANCES
. It is used to store the distances (in kilometres) on the route from Oppox to Dovely.
DISTANCES[K]
holds the distance between the bus stations NAMES[K-1]
and NAMES[K]
.
For example, the distance between Kronos (NAMES[7]
) and Longlines (NAMES[8]
) is 1.2 km and can be found in DISTANCES[8]
.
The sub-program calcdistance(P1,P2)
accepts the indexes of the names of two bus stations in the array NAMES
, where index P1
is always less than index P2
, and returns the distance between them.
Construct an algorithm in pseudocode for the sub-program costperkm(AGE)
.
State the distance between Kiko and Endsley.
\nState the distance between Oppox and Brinkley.
\nDescribe how the distance between the two bus stations can be calculated in this sub‑program.
\nAn algorithm is needed that inputs the names of the two bus stations and the age of the passenger. It then calculates and outputs the price of a ticket.
\nIf any of the inputted names are not found, the algorithm outputs an appropriate message. Figure 3 shows three examples of inputs and outputs.
\nFigure 3: Three examples of inputs and outputs from the algorithm
\nConstruct an algorithm as described. You should call sub-programs costperkm()
and calcdistance()
in your algorithm.
Award [4 max]
\nAward [1] mark for correct condition (in if statement) and correct calculation of the cost per km for each type of tickets, x4.
\nExample 1:
\ncostperkm(AGE)\n
if AGE<5
then COST=0.0
else
if AGE<=15
then COST=0.20*0.50 // COST=0.20*50/100
else
if AGE<65 //accept AGE<=65
then COST=0.20
else COST=0.20*0.70 // COST=0.20*70/100
endif
endif
endif
return COST
end costperkm
Example 2:
\ncostperkm(AGE)\n
if AGE<5
then COST=0.0
endif
if AGE>=5 and AGE<=15
then COST=0.20*0.50 // COST=0.20*50/100
endif
if AGE>=15 and AGE<65
//accept AGE>=15 and AGE<=65
then COST=0.20
endif
if AGE>=65
//if condition in the previous if statement is
//AGE>=15 and AGE<=65, then this condition
//should be AGE>65
then COST=0.20*0.70 // COST=0.20*(100-30)/100
endif
return COST
end costperkm
Note: The method heading and the return statement may not appear in the candidates’ responses.
\nAward [1 max]
1.3;
Award [1 max]
1.2 + 1.0 or 2.2;
Award [3]
The sum of elements;
in the array DISTANCES
from P1+1
;
to P2
;
Award [6 max]
Award [1] for all variables correctly declared and initialized;
Award [1] for any correct loop through the array NAMES;
Award [1] for to determine positions of both names in the array;
Award [1] for outputting a message if one or other not present;
Award [1] for comparison of positions to find smallest/largest;
Award [1] for correct calculation and output of the price;
Award [1] for correct invocation of methods calcdistance()
and costperkm()
Example 1:
\nNAME1=input()\n
NAME2=input()
AGE= input()
POS1=-1
POS2=-1
K=0
loop while K<=9 and (POS1==-1 or POS2==-1)
if NAMES[K].equals(NAME1) //accept '==' instead of equals()
then POS1=K
end if
if NAMES[K].equals(NAME2)
then POS2=K
end if
K=K+1
end loop
if POS1==-1 OR POS2==-1
then
output('stations are not found')
else
if POS1 > POS2
then
output( calcdistance(POS2,POS1)* costperkm(AGE))
else
output( calcdistance(POS1,POS2)* costperkm(AGE))
end if
end if
Example 2:
\nST1=input()\n
ST2=input()
AGE= input()
PS1=-1
PS2=-1
loop K from 0 to 9
if NAMES[K].equals(ST1) //accept '==' instead of equals()
then PS1=K
end if
if NAMES [K].equals(ST2)
then PS2=K
end if
end loop
if PS1!=-1 AND PS2!=-1
then
if PS1 < PS2
then T=PS1
PS1=PS2
PS2=T
end if
PRICE= calcdistance(POS1,POS2)* costperkm(AGE)
output(PRICE)
else
output('stations not found')
end if
Example 3:
\nNote: Award marks for the algorithm written in Java/Python/Javascript/any other programming language. The following example is the solution written in Javascript.
\nfunction findStation(station)\n
{ var found = false;
var i = 0;
do
{ found = (ROUTE_X_NAMES[i] == station);
if (!found) i = i + 1;
} while (!found && i < 10);
if (found) return i;
else
{ output(\"No such bus station as \"+station);
return -1;
}
}
var station1 = input();
var P1 = findStation(station1);
var station2 = input();
var P2 = findStation(station2);
var AGE = input();
if (P1 >= 0 && P2 >=0)
{ if (P1 < P2)
output(\"Cost = \"+costperkm(AGE)*calcdist(P1, P2));
else
output(\"Cost = \"+costperkm(AGE)*calcdist(P2, P1));
}
State the hexadecimal representation of the binary number 10001010.
\nAward [1 max]
\n8A;
\nMost candidates correctly stated the hexadecimal representation of the binary number 10001010.
\nFor an identified application, explain why a binary search would be preferred to a linear search.
\nFor example, [2 max] if no application given;
Searching through a database of names;
That contains a large amount of data;
That is already sorted;
And needs to be searched in the least amount of time;
Is faster because binary search divides and searches smaller blocks of data/does not have to compare each element in the list;
A medical centre uses a computer system to manage both patients’ data and appointments. This system, which is used by the doctors, nurses and secretaries, has two unordered files: a patients’ file and an appointments’ file, both of which can only be accessed sequentially.
\nEvery evening the following processing takes place:
\nOutline the pseudocode that the processing must follow when the system sends out the text reminders.
\nDescribe two different methods that the medical centre could use that would allow data to be restored should it be lost for any reason.
\nThe medical centre is concerned about the privacy of the data it is storing and has to make decisions concerning:
\nDiscuss the issues that should be considered before making these decisions.
\nAward marks for a response which indicates the logical steps that have to be followed.
\nAward [5 max] as follows:
Iterate through the appointments file;
Check for correct day;
Repeat for each appointment on that day;
Using the patient ID for that appointment;
Iterate through the patients file until record for that ID found;
Retrieve phone number and send out SMS;
Example:
\nNote: Candidates are not requested to construct the (algorithm in) pseudocode.
\nAward [1] for method and [1] for description – only accept TWO methods.
Mark as [2] and [2].
Backup;
Data files on a regular basis;
Printed copies;
Printouts can be kept of transactions;
Transaction Log file;
Written for each transaction can be used to restore;
Accept any reasonable methods described including second server and cloud use.
\nThere are 2 possible issues here: who has what level of access to the data in the hospital and whether storing in the cloud is safer than storing locally.
\nFor each of these 2 issues award [3 max] as follows:
Award [1] for identifying the issue.
Award [1] for some valid development of the issue.
Award [1] for a suitable discussion.
Example answers could include reference to the following but this is not an exclusive list. Award marks for any two reasonable issues discussed – one of which is access and the other security.
\nOfficial access to the data [3 max]:
Access to this sensitive data must be restricted.
Only those directly concerned can be able to access it.
Even less people should be able to edit it.
Therefore access levels should be set up, with strong levels of authentication.
Physical access to servers should be controlled if using the local system;
Data security [3 max]:
Is the data safer stored locally or on the cloud?
Cloud service providers are professionals – they should have stronger security than a hospital system.
What track record / reputation does the cloud service provider have?
If patient data could be sold/inspected, then both the patient and hospital could suffer serious consequences.
Is the cloud governed by appropriate privacy laws?
Is it located internationally or is it governed by the laws of the country in question?
Could be intercepted in transmission;
Explain why abstraction is required in the design of algorithms.
\nAward [3 max].
Abstraction allows us to create a general idea of what the problem is and how to solve it;
Abstraction removes all specific detail, and any patterns that will not help in solving a problem. This helps in forming a “model” (If designers don’t abstract they may end up with the wrong solution to the problem they are trying to solve);
Abstraction is widely used because there exist a number of “patterns” in programming that keeps repeating in every application/program;
The pattern corresponding to an issue can be found, then the abstract solution to it can be found and implemented, and the problem is solved;
Most programming languages provide some built-in abstract patterns, which are easy to use (some API provides more advanced patterns);
Abstraction is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics;
In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance);
Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency;
The resulting object itself can be referred to as an abstraction, meaning a named entity made up of selected attributes and behavior specific to a particular usage of the originating entity. Abstraction is related to both encapsulation and data hiding;
Candidates generally found this question more difficult, with very few responses scoring more than 1 mark. Candidates who did gain marks recognised that abstraction enables a programmer to represent the main features of a problem, in order to solve it, without including irrelevant detail.
\nIdentify one method of inputting data that can improve the accessibility of a computer system for some users.
\nAward up to [1 max].
Text-to-speech;
Voice recognition;
Braille keyboards;
Touch screen;
Input from scanner;
Outline what is meant by a sorting algorithm.
\nOutline one difference between a bubble sort algorithm and a selection sort algorithm.
\nAward [2 max]
A sorting algorithm is a method for reorganizing a number of items;
into a specific order (such as alphabetical order, highest-to-lowest value);
Sorting algorithm performs specific operations on the input list/array;
In order to deliver ordered list/array as output;
Award [2 max]
\nBubble sort swaps adjacent items;
Selection sort finds the next smallest (each time it goes through the list);
Bubble sort can exit early/ is faster if already the list is sorted;
Selection sort will need to complete the procedure for the entire list every time;
(The efficiency of Bubble and selection sort is different when applied on already sorted list)
in the best-case bubble sort takes an order of N time;
whereas selection sort consumes an order of N2 time (where N is the number of items on the list));
Note: To award marks for such an answer it should be evident that the list is already sorted OR the term 'the best-case' should appear because the worst-case /average-case complexity/efficiency is same in both algorithms (O(N2)).
\nIn this question both parts, (a) and (b), were well answered by the majority of candidates. Many candidates scored full or nearly full marks for this question.
\nIn this question both parts, (a) and (b), were well answered by the majority of candidates. A few candidates confused Bubble Sort with Selection Sort. Many candidates scored full or nearly full marks for this question.
\nConstruct a trace table for the following algorithm.
\nK = 1\n
N = 1
M = 2
loop while K < 5
output(N,M)
K = K + 1
N = N + 2
M = M * 2
end loop
Award [5 max] as follows:
Award [1] for a trace table with at least three columns (headings K, N, M, K<5 and output);
Award [1] for each correct output up to [4 max]
This question was well answered with the vast majority of candidates gaining some marks, many of whom
achieved full or nearly full marks.
Copy and complete the following truth table.
\nAward [1] for all correct input values, [1] for a correct A NOR B column and [1] for a correct (A NOR B) OR A column.
\nAn organization is implementing a new computer system.
\nThe management considered phased conversion and direct changeover as methods of implementation.
\nIdentify two organizational issues related to the implementation of the new system.
\nEvaluate these two methods of implementation.
\nState one type of testing that involves users.
\nIdentify three consequences of inadequate testing.
\nDiscuss the social and ethical issues associated with the introduction of a new computer system.
\nAward [2 max]
User roles / the organization restructure their workflow;
Technology issues / issues of software compatibility / hardware compatibility;
Award [5 max]
Direct changeover:
is the cheapest and quickest/the old system is completely switched for the new one;
this is straight forward but also the most risky / nothing to fall back on;
no need to keep data duplicates;
it allows the organization to change the system when most convenient;
the employees have very little time in order get use to the new system as the change is instantaneous;
there is a period of time when neither systems are operational;
Phased conversion:
method where the old system is still in use but parts of the new system or modules are introduced, involves bringing in the new system one step at a time;
less risky than direct changeover; less risky that the whole system will go wrong/if something happens, it will only affect the specific part;
takes a lot of time;
employees have enough time for training/to get use to the new system / are introduced to the changes in small stages;
Employees/users could ask for changes which then hold up the installation of the next phase which helps improving the system;
Award [1 max]
User acceptance test;
Beta testing;
Award [3 max]
Can lead to software which is not appropriate for the purpose it was intended/can lead to the system not meeting user requirements;
Can lead to (undiscovered) bugs in software/errors in the system;
Can lead to end user dissatisfaction;
Can lead to reduced (employee) productivity;
Can lead to decreased reliability of the organization;
Award [4 max]
Personal/professional development of all employees must be considered;
Physical safety (of all users);
Ergonomic standards (human-computer components);
Human dignity of all users;
The new system might be designed to replace some staff;
Code of ethics (system resources should not be used without approval);
Candidates were usually able to identify at least one organizational issue related to user roles or technology, when implementing a new system. In many cases, candidates got both.
\nThe vast majority of candidates were able to correctly evaluate the two given methods of implementation, direct changeover and phased conversion, with very comprehensive contextual responses seen. In some cases, it wasn't quite clear whether the candidate was describing phased conversion or pilot implementation. However, these cases were rare.
\nThe vast majority of candidates correctly stated beta testing, as a type of testing that involves users.
\nCandidates generally demonstrated their understanding of the consequences of inadequate testing with many full or nearly full mark responses seen. Some candidates unfortunately gave good descriptions of the consequences that concentrated on the same marking point, for example, they described the software not meeting user requirements or being fit for the intended purpose in multiple ways, therefore limiting their mark.
\nCandidates recognised the more obvious social and ethical issues associated with the introduction of a new computer system, such as the need to replace some staff, or issues related to the implementation of a code of ethics. However, many candidates concentrated too much on matters related to poor data protection issues. In addition, the issues related to ergonomics, physical safety at work or professional development were rarely seen.
\nAssume X = 5, Y = 3 and A = TRUE.
\nDetermine the value of the following expression:
\n\nShow all your working.
\nAward [2 max]
Award [1] for showing the working out
Award [1] for the correct result (TRUE)
((5>5) XOR TRUE) AND (3+2>4) = (FALSE XOR TRUE) AND TRUE=
=TRUE AND TRUE;
=TRUE;
Many candidates correctly determined the value of the expression and gained full marks.
\nA company has expanded its office space into nearby rooms and has decided to set up a local area network (LAN) to support its operations.
\nThe LAN will connect the room where the server is installed to new computers in the additional office space. The network engineer produced the following Gantt chart for this task.
\nDefine the term concurrent processing.
\nIdentify two tasks that will be carried out concurrently.
\nIdentify two tasks that will be carried out sequentially.
\nAfter 5 years the company decided to replace the LAN with a wireless local area network (WLAN).
\nOutline two advantages, to this company, of installing a WLAN.
\nA WLAN will introduce additional security issues for the company.
\nDiscuss any two of these issues and the ways in which the company might resolve them.
\nThe company is considering expanding their network to allow employees to connect from anywhere in the world. The expanded network would need to provide security and allow the employees full functionality of the internal network.
\nExplain how setting up a virtual private network (VPN) would provide a suitable solution.
\nProcesses/task are carried out simultaneously/at the same time;
\nInstall connectors on wall of server room AND Install connector on wall of new office space;
\nOR
\nTest the cabling AND Connect the new computers with the cabling;
\nAny pair of tasks that are NOT a correct answer to part (b);
\nAward [1] for stating an advantage, [1] for expansion/example in context.
Mark as [2] and [2]
Answers may include:
Use on the move;
More versatile staff encouraged to collaborate etc.;
Allows BYOD:
Which could lead to greater productivity (as familiarity with device);
No extra equipment is needed for expansion after initial set-up;
Which will save the company time and money;
Reduces wiring;
Therefore improved safety for employees;
Mark as [2] and [2].
\nThe data can be intercepted as it goes through “the air”;
Can be resolved by strong encryption/protocols;
WPA-2 / a description of WPA-2;
Use of trusted MAC addresses;
Regular changes of router password; [2 max]
BYOD issues leading to insecure devices;
Clear company policy regarding use;
Use of sand-box;
Only approved devices allowed;
MAC addresses – only adding clean and tested devices brought in by staff;
Installation of MDM services;
Authentication (user ID + password on all devices including BYOD);
Security features added by company; [2 max]
A VPN/tunneling allows the employee’s device to appear to be part of / a node of the internal company network;
Thus affording him/her full access to the network resources;
Data that passes through a VPN can be encrypted;
So any unauthorized access will not be able to understand the data;
Tunnelling allows the company’s own protocols to be used/IPsec/TSL ensure security;
Even though the data is passing over an outside network;
Multiple exit nodes / hidden IP addresses/encrypted connections;
Make it hard to distinguish where the data was generated;
Construct a logic diagram for the Boolean expression
\nNOT A OR B AND C.
\nAward [1] for each correctly placed gate, up to [3 max].
\nIdentify one difference between a binary tree and a non-binary tree.
\nGiven the following binary search tree (BST), draw the resulting BST after the deletion of the root node.
\nAward [1 max]
Binary tree (is a tree) in which every node has (no, one or) at most two children whilst
a non binary tree can have nodes with more than 2 children (non binary trees do not have an upper limit on number of children nodes);
Each node in a binary tree can have at most two subtrees (left and right subtree), a node in a non binary tree can have any number of subtrees;
\nAward [2 max]
\nAward [1] for the root (1)
Award [1] for the correct right subtree
Alternative answer
Award [1] for the root (4)
Award [1] for the correct right subtree
In this question both parts, (a) and (b) were well answered by the majority of candidates.
\nIn this question both parts, (a) and (b) were well answered by the majority of candidates. Part(b) Only a few candidates did not draw the resulting binary tree after deleting the root node.
\nConsider the following algorithm, where N
is a positive integer.
loop for K from 1 to N\n
loop for J from 1 to N
if K = J then
output K
end if
end loop
end loop
Construct the algorithm which performs the same task using a single while
loop, instead of nested for
loops.
Award marks as follows up to [4 max].
Award [1] for correct initialization.
Award [1] for correct condition.
Award [1] for correct output.
Award [1] for changing the value of controlling variable.
Note: The question explicitly requires one while
loop.
Do no not accept a for
loop. Do not accept two while
loops.
Example answer
\nK = 1\n
loop while K <= N
output K
K = K + 1
end loop
Example answer (including J variable)
\nK = 1\n
J = 1
loop while K = J AND K <= N
output K
K = K + 1
J = J + 1
end loop
A group of programmers are involved in creating a new software product. They create many new sub-programs but also use existing sub-programs within the product.
\nOutline why a sub-program is considered an example of abstraction.
\nEvaluate the use of designing and developing different parts of software products concurrently.
\nOutline one way in which users can be informed of software updates.
\nAward [2 max]
\nA sub-program is a named section of code that performs a specific task (in a program) / can be called by name / referred by the identifier when needed;
without knowing the details (of code and data structures) as these are wrapped / hidden within the sub-program;
Award [3 max]
\ndifferent stages (of programming) (Accept examples!) run simultaneously (rather than consecutively);
this decreases product development time / decreases the time to market;
leading to improved productivity/reduces costs;
however, it requires more resources/more software developers;
Award [2 max]
\nA message can be sent to the user (When the software is installed and registered, the user provides an email address / phone number);
With a link to the update;
notifications/alerts are sent to the computer (a cookie is placed on the user's computer which communicates with the software developer);
about automatic updates;
(when the program is run) it queries a URL the program developer has built in to check whether the current version matches the latest version;
if not, notifications/alerts are sent;
Many candidates provided vague or too general answers.
\nMany candidates correctly answered this part.
\nOne-to-7 is an international organization that works with teachers and other educators. One department within this organization provides an online forum for teachers to discuss ideas for lessons and to share resources.
\nIn order to access this forum teachers are required to submit the following information, which will be stored in a table in the database.
\nFigure 1: Online form to register personal details to the One-to-7 forum
\nOnce the submit button on the online form has been selected, the personal data is input into the database.
\nOnce the teacher is registered they can post comments on the forum.
\nThe One-to-7 database in managed by the database administrator (DBA).
\nIdentify one reason why the teacher’s name has been split into two fields.
\nOutline one reason why there may be concerns about the amount of personal information that is requested.
\nOutline why the transaction needs to be atomic in the context of this scenario.
\nExplain how transactions are managed to ensure isolation when registered teachers add comments to a discussion thread on the forum.
\nIdentify two tasks that are carried out by the database administrator (DBA).
\nThe DBA is considering using the email address as the primary key, but is concerned that many of the 250 000 educators who are registering for this online forum may have more than one email address. Users may create duplicate accounts, deliberately or accidently, by using different email addresses as usernames.
\nExplain the factors that would need to be considered in using a composite primary key instead of only using the email address.
\nAward [1 max].
atomicity;
sorting;
Award [2 max].
Not all of this information may be necessary for the purposes it is being collected for / asks for too much information;
Teachers may be concerned about issues of privacy;
If the information is shared with third parties it could be used / aggregated to identify the teacher / identity theft;
Teachers may be put off either by the excessive time required to complete the form;
This may lead to some teachers refusing to complete the application form / not as many teachers will sign up;
Award [2 max].
Atomicity in transactions ensure that the indivisible series of database operations either all occur, or nothing occurs;
This prevents updates to the database occurring only partially / this maintains data integrity / consistency;
Award [3 max].
Isolation specifies the sequence that changes is processed / specifies that any parallel processing must produce the same result as if the processes were carried out sequentially;
Each post to the thread takes place independently of others;
One post will be completed before another starts / a post will not become visible until completed;
Data and the transaction (row for the thread) is locked for that moment when the transaction is carried out;
The addition of one post to the thread must not displace another’s, regardless of the order in which they finally appear;
A transaction log is created prior to the transaction to allow rollback;
This means that should an error occur part of the way through the transaction it will be rolled back and the database will return to its original state;
Award [2 max].
Data configuring / applying patches or upgrades;
Setting permissions / passwords / access rights / ensuring security;
Back up / recovery / archiving;
Data cleansing / consistency checks on data / remove data errors;
Award [4 max].
The large number of educators is critical to the number of fields included in any composite key;
The composite key must be unique;
Composite key could be made up of several fields;
Allow suitable example (e.g. combinations of first name, last name, email, phone number etc.);
Allow example that would not be suitable;
Part of the primary key could include a random element in case of duplicated name and dates of birth;
This would require an understanding of the nature of the educators, for example, are they of a particular age which would reduce the possible number of dates of birth, are they from one particular country so certain names would be more likely to occur;
This would influence the number of fields that would be required to reduce the possibility of a duplicate entry occurring;
This was poorly answered. Few candidates connected the question and scenario to atomicity or sorting purposes, while the majority claimed the reason for splitting the name into two fields was to avoid any confusion.
\nGenerally, well done, but many partial marks were achieved on this question due to incomplete answers.
\nWas not well answered; Candidates were not able to outline the need for atomicity in transactions and many tended to confuse the question with networking environments, and failures in data transmission.
\nWas not well answered with many candidates giving generic answers for isolation in the scenario, but not knowing what happens when a transaction takes place with respect to this property.
\nThis was poorly answered. Responses were either vague or gave incorrect tasks of a DBA.
\nMany candidates were unable to clearly explain this question as they did not show understanding of the concept of a composite primary key. Some candidates, however, used correct examples to demonstrate its use and implications in the proposed scenario.
\nThe machine instruction cycle is the process by which a program instruction is fetched, decoded, executed and the results are stored.
\nState where all instructions and data are stored.
\nOutline the role of the data bus and address bus in this process.
\nPrimary memory / RAM
\nAward up to [2 max].
Note: there must be explicit reference to both address and data bus
Example 1
Buses are used as physical connections to carry information to the CPU;
The data bus transports data from/to CPU, whereas the address bus the memory address where the data is supposed to go/be.
Example 2
Data bus is a physical connection to transport data from-to CPU to be processed;
Address bus is a physical connection to transport an address of memory storage where data (transported in the data bus) should be read/written;
Note: Award [1] mark, for responses that show some understanding of use of buses in CPU, for address location and data transport without using specialist terminology
\nOutline two advantages of a school using a computer network.
\nDescribe the purpose of the following hardware component of a network: Router
\nDescribe the purpose of the following hardware component of a network: Network interface card (NIC)
\nOutline why protocols are necessary.
\nDefine the term data encryption.
\nEvaluate the use of trusted media access control (MAC) addresses as one method of network security.
\nAward [4 max]
File sharing/resource sharing;
instead of using a disk or USB key to carry files from one computer to another files can be shared directly using a network/all computers in the network can share resources such as printers, scanners;
Communication;
students/teachers can communicate with people around the world via the network;
Interactive teamwork;
software (like Microsoft Office) enables many users to contribute to a document concurrently;
Flexible access;
network allows students to access files from different computers (throughout the network) (one can begin work on a project on one computer and finish up on another);
Software cost;
software products are available for networks at a substantial savings in comparison to buying individually licensed software;
Software management;
load software on the server saves time compared to installing and tracking files on independent computers/upgrades are also easier because changes only have to be done once on the file server instead of on individual computers;
Improved network security;
if the school has its own network, it can monitor network traffic / can create a security culture (everyone who has a username and password is responsible for keeping data secure);
Mark as [2] and [2].
\nAward [2 max]
A network router is a hardware device that is connected to multiple channels for different networks;
through an interface that is situated on each network;
Router acts as a processing unit for information packets;
it duplicates information packets for use during transmission from one network to another;
The router uses a protocol or set of rules;
to determine which information packets are to be routed to certain interfaces within the network;
Award [2 max]
Network interface cards are used to connect each computer to the network;
so they can communicate with the network router to receive information packets;
Interface cards determine the infrastructure of a local area network (LAN);
and allow all of the computers to connect to the network;
Award [2 max]
Protocols define the rules that govern network communication (for example, packet format, type and size, what happens when an error occurs, and which part of the network is supposed to handle the error and how);
Computer networks consists of various types of equipment (such as routers, switches, hubs and network interface cards) and the equipment comes from different vendors, but they must all work together or the network does not operate correctly;
\nProtocols work in layers (the highest being what the user sees, and the lowest being the wire that the information is transferred along) and these layers communicate with each other according to the rules (allowing communication to occur accurately and efficiently);
\nAward [1 max]
Data encryption refers to calculations/algorithms that transform plain text into a form that is non-readable to unauthorized parties (authorized recipient of an encrypted text uses a key and the algorithm to decrypt the data/ to transform it to the original plain text version);
Award [4 max]
Each (wireless network) adapter has a unique label called a MAC address;
Routers uses these addresses to identify/authenticate computers (routers include an option to whitelist or blacklist certain devices based on MAC addresses, so access could be restricted to any device which is not in the whitelist);
\nOne disadvantage is that the whitelist should be amended any time a new device is purchased / when access to guests should be granted;
\nAlso this method is useless against hackers who use programs which intercept data passing through network and report the MAC address of any device communicating on the network;
\nCandidates were mostly able to outline at least one advantage of a school using a computer network. Answers were usually based around file or resource sharing. However, in many cases, the second advantage outlined was also related to file or resource sharing. Very few of the other possible answers were seen.
\nCandidates generally found this question to be difficult and very few correct answers were seen, concerning the purpose of a router.
\nCandidates who achieved a mark for this question generally recognised that a network interface card was used to connect a computer to the network. Unfortunately, candidates who scored, generally only achieved a single mark, as they did not expand on their answers.
\nCandidates generally recognised that protocols define rules that govern network communication, but generally did not expand beyond that point, so rarely achieved two marks.
\nA mixed set of responses was seen for this question, in which candidates were required to define the term encryption. Candidates recognised that it was a security method but were often unable to provide sufficient detail to define clearly what it is.
\nCandidates generally demonstrated a good understanding of what MAC addresses are and how they can be used in network security. Most candidates scored some marks. However, responses often lacked sufficient distinct points to allow all of the marks to be awarded.
\nDefine the term bit.
\nBinary digit;
(Minimal) unit of storage that can be set to 0 or 1;
Explain how an operating system manages peripherals.
\nAward [3 max]
\nOS keeps tracks of all peripheral devices (the I/O controller) / decides which process gets the device when and for how much time / allocates and de-allocates devices;
OS works with device drivers and the basic input/output system (BIOS) to perform hardware tasks
/ the necessary drivers (for every peripheral) are built into the OS and/or when a new peripheral is added software / device driver provided by a hardware maker is installed into the operating system (to tell the computer's OS how to work with the peripheral/hardware) (because without a device driver the OS would not be able to communicate with this peripheral device);
A device driver translates the OS's instructions into a language (analogue signals) that the device can understand;
There are various types of device drivers for peripherals (such as keyboards, mice, disk drives, controllers, printers, graphics cards, ports, etc.);
Device drivers run in the OS kernel space (in the part of the OS that directly interacts with the physical structure of the system) (and implement functions such as open, close, read, write);
The running application/user's program can make a call to device driver functions which provide an interface between user space and kernel space;
Example answer:
An OS manages peripherals via their respective drivers;
For example, sound card drivers;
are necessary so the OS knows exactly how to translate the 1s and 0s (that comprise the MP3 file) into audio signals;
that the sound card can output to headphones / speakers;
A well answered question. Many comprehensive answers were seen.
\nA transport authority is investigating how many people use a certain direct train route, which is used every day of the week.
\nAt the end of each day, the total number of passengers who travelled on this route is stored in a collection, PASSENGERS
.
The first item was written to the collection on Monday 1st January 2018.
\nThe next items, collected on Tuesday and Wednesday, were added like this:
\nThe collection DATA
contains the following data:
2, 4, 1, −2, −4, 1, 0
\nConsider the following pseudocode:
\nCOUNTER = 0\n
SUM = 0
DATA.resetNext()
loop for X from 0 to 6
if DATA.getNext() > 0
ARRAY[X] = DATA.getNext()
COUNTER = COUNTER + 1
SUM = SUM + ARRAY[X]
end if
end loop
output SUM/COUNTER
Trace the pseudocode using the table below:
\nAssuming that the first item read from the collection is from Monday 1st January 2018, construct pseudocode that will read PASSENGERS
into an array, P_ARRAY
.
Using P_ARRAY
, construct pseudocode to output the day of the week with the highest average number of passengers. Use the sub procedure convert()
which converts the numbers 0 to 6 into days of the week, for example convert(1)
will return “Tuesday”.
Note: you should not assume that data for an exact number of weeks is stored.
\nAward [1] for each correct column (excepting the first). If the first row is not completed, mark as follows:
All 4 correct except for first row: [3]
3 correct except for first row: [2]
2 correct except for first row: [1]
1 correct except for first row: [0].
Follow through for an output that is correct from their incorrect COUNTER
or SUM
columns.
P_ARRAY // array declaration\n
X = 0
(PASSENGERS.resetNext())
while PASSENGERS.hasNext()
P_ARRAY[X] = PASSENGERS.getNext()
X = X + 1
end while
Award [1] for evidence of the idea of a loop (for or while etc.).
Award [1] for correct while/until loop with correct condition.
Award [1] for correct reading of collection into array.
Award [1] for declaring and incrementing X.
The following are two alternative approaches. Most solutions should fit one or the other markscheme. Do not penalise those who introduce separate variables instead of arrays.
\nExample 1:
\nMAXAV = 0\n
X = (P_ARRAY.length) − 1
MAXDAY
loop for DAY from 0 to 6
SUM = 0
COUNTER = 0
loop for C from DAY to X //loop while C < X
SUM = SUM + P_ARRAY[C]
COUNTER = COUNTER + 1
C = C + 6 // C = C + 7 or allow step 7 in the loop
end loop
if SUM/COUNTER > MAXAV
MAXAV = SUM/COUNTER
MAXDAY = DAY
end if
end loop
output convert(MAXDAY)
Award [1] for correct initialization of numerical variables (e.g. MAXAV
, COUNTER
, SUM
).
Award [1] for correct loop through each day.
Award [1] for correct for loop through array.
Award [1] for incrementing array position by 7 each time.
Award [1] for calculation of average (SUM/COUNTER
).
Award [1] for comparing this with MAXAV
.
Award [1] for adjusting MAXAV
and MAXDAY
if necessary.
Award [1] for correct use of CONVERT
sub-procedure.
\n
Example 2:
\nMAXDAY = 0\n
DAYSUM ARRAY
WEEKS ARRAY
COUNT = 0
while COUNT < P_ARRAY.length //loop through p.array
DAY = COUNT MOD 7
WEEKS[DAY] = WEEKS[DAY] + 1 //add number of weeks for this day
DAYSUM[DAY] = DAYSUM[day] + P_ARRAY[COUNT]
COUNT = COUNT + 1
end while
COUNT = 0 //reinitialize
while COUNT < DAYSUM.length //loop through dayArray can also be
//a for loop as there are 7 days.
if DAYSUM[COUNT] / WEEKS[COUNT] > MAXDAY //find maxDay
MAXDAY = COUNT
end if
COUNT = COUNT + 1
end while
output convert(MAXDAY)
Award [1] for correct initialisation of variables/arrays.
Award [1] for correct loop through array.
Award [1] mark for incrementing day.
Award [1] mark for incrementing sum for each day.
Award [1] mark for incrementing number of weeks for each day.
Award [1] mark for correct calculation of average for each day.
Award [1] mark for finding MAXDAY.
Award [1] mark for correct use of CONVERT procedure.
Outline what is meant by beta testing.
\nAward up to [2 max].
Involves sending sample software to the intended audience;
(Selected audience do not pay for this software);
To try/use the software product;
And give the feedback to the authors (which help in correcting bugs);
An application package used in an office includes a word processor. A secretary uses the word processor to create a text file.
\nThe text file is automatically saved at regular periods while being edited.
\nAll files created in this office contain information important to the business.
\nThe office manager decides to buy and install new software and hardware.
\nDescribe how a spellchecker checks whether a word in a text file is correctly spelt or not.
\nState one advantage of this feature.
\nIdentify two additional features of a word processing package that could be useful for this office.
\nOutline the purpose of one application software package other than a word processing package that could be used in this office.
\nOutline the security measures that should be taken to prevent data loss.
\nOutline one problem that may arise from the installation of new hardware and software in the office.
\nThe changeover to the new system can be achieved by either direct changeover or phased conversion.
\nCompare direct changeover and phased conversion.
\nEach word in the text file is compared with words in a dictionary (held in memory/online);
If the word is found in the dictionary it is correctly spelt / if the word is not found in the dictionary, spellchecker will recognize that it is incorrectly spelt;
Award [1 max].
If power goes off, only the text typed after last (automatic) save is lost;
NOTE: accept responses that express evidence of just a partial loss of the file.
\nAward up to [2 max].
Apply styles, effects;
Insert (tables/pictures/graphs/formulas/...);
Mail merge;
Macros;
Print;
etc.
Award [1] for stating an application software package and [1] for stating its use in the office, up to [2 max].
\nExample answers
Spreadsheet;
For graphically presenting various data;
Database software;
For holding employees/customers data;
Web page creators/editors;
To create/manage the office’s web pages;
etc.
Award up to [2 max].
Off site data storage;
Make backups regularly/periodically/frequently;
Prevent physical damage to the computers / Keep equipment in safe and dust-free places / Protect equipment from static electricity that can erase data or damage components / Protection during lightning and electrical storms;
\nNote: Accept any reasonable examples, but there should be more than one. The focus of the question is on data loss, and not in relation to security/hacking.
\nAward [1] for stating a problem and [1] for an elaboration, up to [2 max].
Users/employees might be afraid of these changes (for various reasons);
And not willing to help in this change;
Data migration problems;
For example, different file formats so conversion must be performed;
Employee efficiency may drop;
As they learn to use the new system;
Issue of compatibility with legacy software/hardware;
So features of new software/hardware may not work correctly;
Award [1] for outlining what is meant by direct changeover, [1] for outlining what is meant by phased conversion, and then [1] for an advantage or disadvantage of each, up to [2].
\nExample answer:
Direct changeover, the old software and hardware is completely replaced, in one move, by the new software and hardware;
Phased conversion involves selecting one section in the office for the direct changeover and other sections will be switched when the first section selected is running satisfactorily. Eventually the whole office has been changed;
A phased conversion is less risky than a direct changeover as any problems that might arise will be isolated in only one section in the office;
Direct changeover means everyone in the organization has same software/hardware and so there are no compatibility issues;
A rail transport company uses a global positioning system (GPS) to determine a train’s position.
\nThe GPS data is used to provide real-time arrival data on video displays in train stations.
\nThe GPS data is made publicly available so that software developers can use it to build apps.
\nThe mobile application ATrainAway uses the real-time train GPS data as well as the GPS data from the user’s smartphone.
\nExplain how GPS works.
\nState one data item concerning the arrival of a train that may be provided on the video display.
\nOutline how sensors can be used in combination with GPS to provide more accurate arrival data.
\nOutline two pieces of information that the ATrainAway application could provide to the user.
\nDiscuss the advantages and disadvantages of using GPS in transportation systems.
\nAward [4 max]
The GPS receiver in a train takes the information from the satellite/ picks up the signals from (at least) 3 satellites;
The signals transmitted are: time of transmission, coordinates of the satellite;
The difference between the (atomic) time of transmission and (atomic) time of receiving the signal is used to calculate the distance;
The method of trilateration is used to determine position from the distance to satellites/ is used to determine the train’s exact position/ is used to calculate position of the train through equation resolution on a sphere;
Award [1 max].
Train number/ route / direction;
Status (on time / delayed / cancelled);
Time train / next train are due;
Award [2 max].
Motion sensors/vibration sensors (can be placed on track rail);
(Accept any sensors which detect trains that pass them!)
(Sensing devices are placed) at a distance from each side of a train station/junction
OR
at some fixed points where obstacles (like tunnels) prevent GPS from working properly;
Data from each sensor can be logged continuously and used in calculations/determinations (of expected arrival times/ delays / rerouting during disruption, etc.);
\nAward [4 max].
Real-time information (train number/ route / direction and status (on time / delayed / cancelled);
relating to the arrival / departure of a particular train;
The time next train is due (the next 2/3 times a train will arrive at the station);
helps passenger to spend less time waiting on trains;
Should save user's (passenger) most frequented stops and routes;
for quick access to get the next rail trip;
Alerts (set);
to let you know when a train is nearing the station;
Trip planning (conducted);
through Google trip planner within the app;
Information on the nearest station, distance to station/ next train arrival/ next train departure;
to help passenger to spend less time travelling/ save time;
Mark as 2 and 2.
\nAward [4 max].
Safer transit;
Trains are tracked and in case of emergency the location can be reached at the earliest and emergency services provided;
More favourable view of transit/helps passenger to get punctuality status of the train/;
GPS can provide worldwide three-dimensional positions (24 hours a day) (in any type of weather);
Sometimes it is too difficult to ensure reliable positioning;
Objects, such as buildings, overpasses, and other obstructions (that shield the antenna from a satellite) can potentially weaken a satellite's signal;
Privacy issues;
Knowing the absolute position of anything, anytime, anywhere;
Mark as 2 and 2.
\nMost candidates knew that a GPS works by communication with satellites. Some candidates failed to achieve full marks as result of incomplete and vague descriptions. A few candidates, for some unknown reasons, wrote that the satellite calculates the train's position.
\nGenerally, well answered, with many full or near full marks awarded.
\nGenerally, well answered, with many full or near full marks awarded.
\nThis question was well answered with the vast majority of candidates gaining some marks, some of whom achieved full or nearly full marks.
\nCandidates were usually able to identify the advantages and disadvantages of using GPS in transportation systems. Some marks were lost because of vague discussions.
\nDefine the term recursion.
\nProcess/method/ procedure/ subroutine/ function/ algorithm that calls itself;
\nTaxonomy is the part of science that focuses on naming and classifying or grouping organisms. Swedish naturalist, Carl Linnaeus, developed the current hierarchical classification system of taxonomic classification in the 1700s. This classification is hierarchical so one class has many orders, and one order has many families.
\nBirds can be classified under the Linnaean hierarchical taxonomy as “Aves”. In one system of classification, Aves has 23 orders, one of which is the order Ciconiiformes, which holds six families within it.
\nSpoonbills constitute one of the families within the order Ciconiiformes. Data can be collected about spoonbills, such as length of the bill or beak, and is included in the database.
\nConstruct an entity-relationship-diagram that shows the relationships between the class, order and family.
\nOutline, using an example, how data validation can ensure that data is entered into the birds database correctly.
\nOutline, using an example, how data verification can ensure that data is entered into the birds database correctly.
\nDistinguish between data and information when entering the length of a spoonbill’s beak in the database.
\nIdentify two characteristics of a conceptual schema.
\nExplain why the use of data modelling is critical to the success of a database, such as the one used in this scenario.
\nExplain, using the example described in the scenario, why referential integrity is important in databases.
\nAward [2 max].
Award [1] for each correct relationship with labels.
Award [1] for a top-down diagram showing the relationships.
One CLASS contains many ORDER;
One ORDER contains many FAMILY;
Award [2 max].
Note: original MS did not make any sense
Length check;
Could ensure only a value within an acceptable range is entered (allow example);
Type/format check on bill;
Only numerical (int/float etc.);
Award [2 max].
Double entry;
Will only allow data entry if both match;
Proof reading;
Will give a visual check that the data is correct;
Award [2 max].
When the length of the bill / beak of the spoonbill is measured it is simply a decontextualized figure such as 10 cm;
When it is included in the database and interrogated it will have a meaning, so it then becomes information;
The database will contain only the figure “10”;
the “cm” will not be included and is part of the meaning of the attribute/field.
Note: the “information” mark must reference the database in some way
\nAward [2 max].
A high-level / overall / general view of the database;
Shows the main concepts;
Shows the main relationships,
Can be described by a Data Structure Diagram;
Award [3 max].
Data modelling gives a visual representation of the proposed system;
So that all stakeholders have the same understanding of the system;
Shows basic relationships / establishes naming conventions etc.;
Some that developers are able to develop the actual database;
Avoiding issues such as redundancy/lack of integrity/lack of consistency;
The data model will take the information from the conceptual schema and logical schema to informs the physical model for the development of the database;
A lack of modelling may result in a structurally deficient implementation with poor data integrity / redundant data;
This may mean developing prototypes of the database to test whether the proposed structure of the database will function as intended;
Award [3 max].
Note: only award full marks if there is a valid reference to the scenario.
Referential integrity requires that a value used as a foreign key corresponds to a value of a primary key / validates the database through relationships;
Therefore if the Ciconiiformes/order of the Spoonbill is not in the database, you will not be able to add it because of referential integrity;
Referential integrity constraints;
Ensure that if a record is updated or deleted, these changes will made in related cells and the possibility of update anomalies is reduced / eliminated;
Most of the candidates clearly identified the main entities but failed to establish and correctly label the relationships.
\nSome candidates showed a good understanding of data validation and data verification with appropriate use of examples related to the scenario. However, many candidates provided answers that were generic, which showed confusion with both concepts.
\nSome candidates showed a good understanding of data validation and data verification with appropriate use of examples related to the scenario. However, many candidates provided answers that were generic, which showed confusion with both concepts.
\nMost candidates had no problem identifying what data was, but were not able to clearly distinguish the concept of information within the scenario.
\nA few candidates were able to correctly identify the characteristics of a conceptual schema.
\nThis was not well answered. Many candidates provided vague responses and just a few referred to data modeling as being critical process for avoiding issues such as redundancy, lack of integrity or lack of consistency.
\nMost of candidates could not explain referential integrity with respect to the scenario.
\nDescribe the characteristics of a queue.
\nAward [2].
FIFO data structure;
Items can be added only to one end (rear/tail) and removed from the other end (front/head);
Outline the function of an interrupt.
\nAward [2 max].
An interrupt is a signal to the CPU sent by hardware or software;
The function of an interrupt is to alert the CPU to suspend execution of the current program;
And to transfer the control to the interrupt handler (which saves the state of the current program to the interrupt stack, services the interrupt and resumes the normal CPU activity);
NUMBERS
is a collection that holds only positive integers.
A three-digit number has three digits: a hundreds digit, a tens digit and a units digit.
For example, for 406, its hundreds digit is 4, its tens digit is 0 and its units digit is 6.
An algorithm is needed to copy each three-digit number from the collection NUMBERS
, where the hundreds digit is smaller than its tens digit and its tens digit is smaller than its units digit, into a one-dimensinal array named THREE
. If there are no such numbers in the collection then an appropriate message should be displayed.
For example:
\nIf NUMBERS
= {9, 3456, 12, 237, 45679, 368, 296}
then the contents of the array, THREE
, is:
If NUMBERS
= {1234, 56, 90, 324, 876}
then the array THREE
is empty and a message such as “No such numbers”, should be outputted.
Consider the following algorithm.
\nN = 372\n
X = N DIV 100
Y = X + 10 * (N MOD 100 DIV 10)
Z = Y + (N MOD 10) * 100
Determine the values of variables X, Y, andZ
after execution of this algorithm. Show your working.
Construct this algorithm. You may assume that the array THREE
is initialized with a sufficient number of elements.
Describe how a selection sort algorithm could be used to sort the array THREE
in ascending order.
Award [3 max]
X = 372 div 100 = 3;
Y = 3 + 10 * (372 mod 100 div 10) = 3 + 10 * ((372 mod 100) div 10) = 3 + 10 * (72 div 10) = 3 + 10 * 7 = 73;
Z = 73 + (372 mod 10) * 100 = 73 + 2 * 100 = 273;
Award FT marks if working is shown.
Award 1 mark only for each correct value if no working shown, up to 3.
X = 3;
\nY = 73;
\nZ = 273;
\nAllow FT marks.
\nAward [8 max]
Award [1] for reset/starting from the first item in the collection and for initialization and correct increasing of the array index (K)
Award [1] for the while loop through the collection
Award [1] for retrieving a number from the collection
Award [1] for if statement- checking whether the number retrieved is a three-digit number
Award [1] for correctly calculated digits in retreived number,
Award [1] for each
Award [1] for if statement which compares the three digits of the retrieved number
Award [1] for correctly placing ITEM into the array THREE
Award [1] for the correct output message
Example answer:
\nK=-1\n
NUMBERS.resetNext()
loop while NUMBERS.hasNext()
ITEM=NUMBERS.getNext()
if ITEM>99 and ITEM<1000 then
F=ITEM DIV 100
S=ITEM MOD 100 DIV 10 //or S= ITEM DIV 10 MOD 10
T=ITEM MOD 10
if F<S and S<T then
K=K+1
THREE[K]=ITEM
end if
end if
end loop
if K==-1 then
output('No such numbers')
endif
Award [4 max]
The selection sort algorithm starts by finding the minimum/smallest value in the array THREE (containing K elements);
and moving it to the beginning of the array THREE (element at the first position is THREE[0]) / exchanges it with the element in the first position;
the correct entry is in the first place in the array and the process is repeated on the remaining entries / this step is then repeated for the second lowest value, then the third, and so on;
once this has been repeated K-1 times;
the K-1 smallest entries are in the first K-1 places which leaves the largest element in the last place (the array is sorted in ascending order);
Candidates generally found this question difficult. They were required to determine the values of a number of variables using the formulae given. These formulae included program code for integer division and the remainder of integer division. Unfortunately, candidates often ignored this and simply gave answers as though regular division was used, therefore the answers given were incorrect. However, some candidates achieved full marks, and others achieved marks for partially correct responses.
\nA wide range of marks were awarded for this question, in which an algorithm was written. The algorithm involved copying data from a collection, processing it and then copying some of the data that meets a test into an array. Candidates achieved credit for the correct elements of their algorithms. Some common errors included candidates using an array for the initial data retrieval, rather than a collection, and not correctly using a loop, to ensure all the data elements had been read from the collection.
\nSome candidates achieved high marks for this question, as they were able to correctly describe how a selection sort could be used to sort the resulting array from part b in ascending order. A few candidates lost marks because they used the wrong type of sorting algorithm, for example, a bubble sort or an insertion sort. Another error seen involved candidates sorting the data into descending order.
\nThe names of students attending a science fair were recorded in a stack data structure as each one arrived.
\nThe first item stored in the stack was “Sophie
”.
Note that “Troy
” is currently in position 0 in the stack.
Construct the pseudocode that will search the stack for a specific name, and output its position in the stack. You may assume that all names in the stack are unique.
\nExplain the benefits of using a binary search tree, compared to a stack, when searching for a specific item.
\nIf the tree is populated with the data from the stack, the first item popped off will become the root. For each subsequent item popped from the stack, a recursive procedure is followed until the item is correctly placed in the tree.
\nWithout writing code, describe this recursive procedure.
\nBy considering only the data visible in the stack shown above, sketch the binary search tree that has been created from the items removed from the stack.
\nAward [5 max] as follows:
\nExample answer 1:
\nsearchName(NAME, STACK)\n
DEPTH = 0
NAMEDEPTH = -1
while not STACK.isEmpty() do
X = STACK.pop()
if X == NAME
then NAMEDEPTH=DEPTH
DEPTH = DEPTH + 1
end while
if NAMEDEPTH == -1
then output(NAME + ’not found’)
else output(NAMEDEPTH)
endif
end searchName
Award [1] for initialization.
Award [1] for a correct while/until loop.
Award [1] for correct comparison and assignment.
Award [1] for updating and outputting correct position of NAME
on the stack(NAMEDEPTH
)
Award [1] for use of stack methods (pop()
and isEmpty()
)
Example answer 2:
\nNAME=input()\n
CSTK = STACK.copy() // must make a real copy,
//any attempt to make a copy of stack is acceptable
DEPTH = 0
SEARCHING = true
while SEARCHING and not CSTK.isEmpty() do
if NAME == CSTK.pop()
then
SEARCHING = false
else
DEPTH = DEPTH + 1
end if
endwhile
if not SEARCHING
then output(DEPTH)
else output NAME + \" not found\"
end if
Award [1] for initialization.
Award [1] for a correct while/until loop (even if flag is missing).
Award [1] for correct comparison and assignment.
Award [1] for incrementing and outputting correct position of NAME (DEPTH)
.
Award [1] for use of stack methods pop()
and isEmpty()
).
Award [3 max].
\nExample answer 1 (time efficiency):
The data in the binary search tree(BST) is ordered;
Such that as each node is checked for the item, half of the remaining nodes are ignored;
But each element in the stack has to be checked;
Which, for large data sets, may be inefficient compared to the BST;
Example answer 2 (memory efficiency):
Each element on the stack has to be popped off/removed from the stack to be checked for the searched item;
When the item is found the stack will be empty/stack contents will be changed;
When an element in the BST is checked for the item it is not removed from the BST;
So there is no need to create an additional copy of the BST (but a real copy of the stack must be created which for large data sets may be inefficient);
Award [4 max].
\nExample answer:
The (next) stack item is (placed into a new node and) compared (alphabetically) to the root;
If the root is empty it would be placed here (and this recursive procedure terminates);
Else, depending upon the comparison, it would look to the node to the left or right and the (recursive) procedure calls itself again (with the new root);
If it is lower than the root, then the left child of the root becomes the new root;
If it is higher than the root, then the right child of the root becomes the new root;
Note: Marks should also be awarded for an algorithm constructed in pseudocode.
\nAward [3].
\nAward marks as follows:
Clearly a binary tree;
Correct root;
All values correct;
Consider the following circular linked list:
\nwhere head is an external pointer that points to the first node in the circular linked list.
\nThree operations are performed on this circular linked list in the following order:
Arrays and linked lists are used to store linear data.
\nSketch a diagram showing the resulting circular linked list.
\nOutline how the last node of the circular linked list is identified.
\nDescribe the steps required to calculate the sum of all numbers held in this circular linked list.
\nCompare the use of arrays and linked lists.
\nA linked list can be used to implement a data structure queue.
\nIdentify two applications of a queue data structure.
\nAward [3 max].
Award [1] for the node containing number 20 is pointed to by the pointer 'head';
Award [1] for the diagram showing only two nodes and all the correct links;
Award [1] for the last node containing number 5;
Award [2 max].
\nThe last node is identified by its next/link pointer;
which contains the address of the node at the beginning of the list / is equal to the pointer “head “;
Award [4 max].
\nInitialize (a temporary pointer with the head and) a variable sum with 0 (zero);
Loop from the beginning to the end of the circular linked list / until all the nodes get traversed);
Add the value (of the data field) (of the current node) to the sum;
Change the temporary pointer so it points the next node of circular linked list;
Note: Answers written in pseudocode are acceptable.
For example,
sum = 0\n
curr = head
loop
sum = sum + curr.data
curr = curr.next
until curr == head
Award [4 max].
\nIn an array, memory is assigned during compile time(predetermined) whilst in a linked list it is allocated during execution/runtime;
Arrays are of fixed size whilst linked lists are flexible and can expand and contract its size;
Array requires less memory (due to actual data being stored within the index in the array) whilst there is a need for more memory in linked list (due to storage of additional next and previous pointers/references);
Elements are stored consecutively in array whereas elements are stored randomly in linked lists;
Memory utilization is inefficient in the array whilst memory utilization is efficient in the linked list;
Accessing an element in an array is direct (fast) while accessing an element in linked list is sequential/linear (slower) /to get into the nth element only the array name with index within the square bracket should be written whilst a linked list (to get the nth element) should be traversed starting from the beginning of the list, and traversing through the list until found/ ;
Operations like insertion and deletion in arrays consume a lot of time whilst the performance of these operations in linked lists is fast;
Award [2 max].
\nPrint queues (a number of print jobs on a queue instead of waiting for each one to finish before specifying the next one);
Queue is used for synchronization when data is transferred asynchronously between two processes (for example IO Buffers, file IO);
Queues are used in CPU scheduling algorithms;
Handling of interrupts in real-time systems (the interrupts are handled in the same order as they arrive, first come first served);
Computer modelling of physical queues (supermarket checkouts) (call centre phone systems use queues to hold people calling them in an order, until a service representative is free);
Most candidates were able to sketch a diagram showing the resulting circular linked list.
\nA mixed set of responses was seen for this question. Most candidates knew that the last node in a circular linked list contains a pointer to the first node of the list. A few candidates incorrectly wrote that the next of the last node point to the null.
\nCandidates were required to write the main steps involved in an algorithm to calculate the sum of all numbers held in the circular linked list. Many candidates were well prepared, some candidates even wrote their answers in algorithmic form and they generally achieved better results than those who simply described the steps. The full range of marks, from zero to four were achieved for this question.
\nWas reasonably well answered with many gaining at least two of the marking points. Some candidates described two data structures individually without performing any comparison and thus losing marks.
\nWas well answered.
\nSketch a double linked list that holds the following sequence of names: Anne, Lana, Mary.
\nAward [3 max]
Award [1] for showing that every node in a double linked list contains three fields (data and 2 pointers);
Award [1] for showing every node has link to its previous node and next node/can be traversed forward by using next field and can be traversed backward by using previous field;
Award [1] for showing that the first node must be always pointed by an external pointer (for example head) (and the last node could be pointed to by an external pointer (for example rear));
Award [1] for showing that the previous field of the first node must be NULL and the next field of the last node must be NULL.
Most candidates sketched a doubly linked list and answered this question reasonably well.
\nOnly a few candidates did not attempt this question.
\nA number of devices in and around the home can be operated by control systems.
\nA home owner wishes to install automatic lights to illuminate a water fountain in her garden. These lights will automatically turn on at sunset and turn off at sunrise.
\nDescribe two hardware components that would be an essential part of this control system.
\nExplain the concept of feedback, with respect to computer control systems in general.
\nThe home owner has also installed a control system that waters the flowerbeds in the garden. This system aims to maintain the water content of the flowerbeds between a minimum and a maximum value. However, the system is only activated when the light intensity is below a certain level.
\nOutline the algorithm involved in controlling the watering system described above.
\nAward [1] for identifying the hardware component and [1] for describing its purpose within the control system.
Mark as [2] and [2].
Sensor;
To detect the presence/absence of the light;
Microprocessor;
To carry out any processing;
Output transducer / Actuator / Activator;
To turn the lights on or off;
The output value is (continuously) compared to the desired value;
To produce an error value/difference between observed and measured;
The controller uses the error value/difference between observed and measured;
To determine the new input to the system;
Award [5 max] for the following:
[1] the system is turned on (when the light intensity is below a given value);
[1] for light loop/while input light intensity is below the given value the system continues being on;
[1] for comparison and activating watering / checking the water content of the flower beds and turning on water if the water content is not in a given range;
[1] for water loop / watering until maximum value;
[1] for turning off water when the water content of the flower beds is filled to maximum;
[1] for turning off system when the light intensity increases the given value;
Note: Candidates are not requested to construct an algorithm in pseudocode.
\nExample answer:
\nA wireless local area network (WLAN) is used to extend access to a school’s wired local area network.
\nThe advantages of this WLAN are user-mobility and economical access points.
\nThe concept of packet data transmission is used within this network.
Figure 1 shows the simplified structure of a data packet.
Figure 1: The structure of a data packet
\nIdentify one hardware component of the WLAN, other than computers.
\nOutline two disadvantages of this WLAN.
\nIdentify three ways in which the network administrator can reduce the risk of unauthorized access to confidential data.
\nDefine the term protocol.
\nWith reference to Figure 1, explain how data is transferred by packet switching.
\nAward up to [1 max].
Wireless router/modem;
Access points;
Switch;
Wireless repeater/extender/booster;
Award [1] for identifying a disadvantage and [1] for an expansion, for two disadvantages up to [4 max].
\nData transfer will decrease (compared with a wired LAN);
Because the number of computers using the network increases;
(and because) WLAN has lower bandwidth than a wired LAN;
Less data security;
As devices from outside the school can access the network/intercept transmissions;
More easily open to misuse;
As teacher/administrator cannot directly monitor a specific student/teacher/ machine;
Intermittent connectivity due to physical barriers (walls);
Results in low transfer/speed and may hinder operations.
Note: Accept any reasonable points, provided they are appropriately elaborated.
\nAward up to [3 max].
Give each user appropriate login details/passwords;
Different access rights for students, teachers, school administrators (file-level and share-level security);
All passwords and files should be encrypted;
Use the latest WiFi protocol/WPA2;
Require MAC address authentication;
Password protect the documents;
Note: the focus of the question is on confidential data (firewalls not accepted)
\nSet of rules for data transmission;
\nAward up to [6] as follows:
\nAward up to [3 max] for a general description of how data is transferred by packet switching. ([1 max] if this general description is very simplistic and refers to just the Header/Data/Trailer already shown in the question paper).
\nAward up to [3 max] for added detail that references the contents of the given data packet in the answer.
\nExample of general description
\nData is organized in specially formatted units (data packets) which are routed from source to destination using network switches and routers;
\nNetwork switches and routers determine how best to transfer the packet between a number of intermediate devices (routers and switches) on the path to its destination (rather than flowing directly over a single wire on the path to its destination);
\nData packets are reassembled at the destination;
\nExample of referencing content
\nAddresses have to be in a standard format so that each switch/routing station recognizes the address;
Address of sender identifies the sending computer, so that any packets not received can be re-requested;
Address of receiver identifies intended recipient so it can be forwarded on correctly;
The protocol used must be identified so that the correct rules are followed;
Size of packet / size of fields in packet – All packets/fields must have the same size so that the data can be reassembled;
Sequence number so that packets can be reassembled in correct order;
Transmission codes to show whether the data packet is transmitted or re-transmitted;
Control bits, to maintain the integrity of the data by ensuring that the data received is the same as the data sent;
Error checking code – when an error is detected, an algorithm either corrects the error or requests that the packet is resent;
Outline what is meant by virtual memory.
\nAward [2 max]
Virtual memory is a memory management capability of an OS;
that (uses hardware and software to) allow a computer to compensate for physical memory shortages by temporarily transferring data from random access memory (RAM) to disk storage;
Most candidates provided the generally correct answers. Only a few were not able to outline the meaning of \"virtual memory\".
\nA washing machine manufacturer has created its website to be viewed on standard desktop computers as well as mobile devices. The mobile browsing experience differs from desktop browsing.
\nDifferent devices such as desktop computers and mobile devices have different operating systems.
\nDefine the term screen resolution.
\nDescribe two issues resulting from the website being viewed on various devices, such as desktops and smartphones.
\nExplain the role of the operating system (OS) in terms of managing the hardware resources.
\nA washing machine uses a control system.
\nThe microprocessor controls the washing machine and its actions. To complete the wash and rinse process the user selects the program, loads the washing machine and pushes the start button.
\nDescribe the interaction between the sensors, microprocessors and output transducers in this situation.
\nAward [1 max]
Screen resolution is the number of pixels a screen can display (horizontally and vertically). (For example, the screen can show 1024 pixels horizontally and 768 vertically);
Award [4 max]
Screens that are different sizes (for example, 3–6 diagonal inches for a phone, and 9–12 diagonal inches for a tablet, size of 13–17 inches for a notebook screen, and a desktop screen size of 20–30 inches);
can still have the same screen resolution (for example, a laptop could have a 13-inch screen with a resolution of 1280 x 800 and a desktop computer could have a 17 inch monitor with the same 1280 x 800 resolution);
but physically smaller screen will not show less of the website;
the screen with the higher resolution will be able to show you more of the website because that screen has more pixels and the image will be sharper;
but elements on the screen (icons and text) will look smaller;
Most mobile displays currently have screens with fewer pixels than desktop displays and are physically smaller;
typing on small on-screen keyboards is difficult;
less precision (clicking a 12-pixel-high text link with a mouse is no problem but tapping the same link with fingers could be difficult);
there is no mouse pointer so there is no concept of \"hovering\" over a page element/ remaining in an uncertain state;
most modern touch screens allow zooming;
allow the user to perform gestures using one or more fingers, such as swiping/pinching;
Note: Award marks not only for issues for a viewer but also for issues for a creator of the interface.
\nAward [4 max]
OS controls all the activities of computer system and acts as an interface between user and hardware;
Thus the role of OS is
to keep track of who is using which resource;
to grant resource requests;
to mediate conflicting requests from different users/programs;
to allocate time to different programs or different users/ each one gets their turn to use that resource (for example printer);
to allocate space for different users, each one gets a part of the resource (for example sharing main memory/ hard disk);
Award [6 max]
Award [2 max] for evidence that:
Sensors (input devices) detect/measure the water level;
sensors detect/measure the temperature (of the water);
sensors detect/measure the dampness/moisture level of the clothes;
sensors also detect movement of the machine's drum and other associated actions;
Sensors continuously take readings/measurements (in the context of above) and send these readings to the processor;
\nAward [2 max] for evidence that:
processor controls sensors, valves and actuators responsible for controlling the parts that clean clothes;
processor determines what actions the machine should take next;
the washing machine has been programmed/ it goes through a process of running its internal programs;
processor compares readings with pre-set values (in the context of the various sensors);
if the readings fall outside of the specified range, the processor sends a message to the output transducer to switch on/off ... (in the context of part of the washing machine);
Award [2 max] for evidence that:
output transducers are used for turning on and off devices that control the rest of the machine;
such as the motors that spin the tub;
or the water pump;
Example:
once the start button is pushed the washing machine begins to dump water into the drum, a sensor will detect that the water level has been reached;
based on the setting, the processor will allow the water to flow only to a predetermined level;
it will send the signal to output transducers to shut off the water;
and begin the agitation process;
once the timer tells that it is time, processor sends signal to output transducer to stop agitating;
it then begins the spin process/ removing the dirty water from the machine at the end of the spin cycle, the washing machine's processor sends signal to turn on the water pump and sucking it out of the machine;
Mostly a well answered question.
\nMostly a well answered question.
\nCandidates mostly gave good responses for this question.
\nA wide variety of answers and quality of answers was seen for this question covering the full mark range. Candidates who were able to fully describe the interaction between the sensors, microprocessors and output transducers and the steps involved generally scored quite highly.
\nTrucking On, a logistics and haulage company based in Marseille, France, keeps track of its lorries and operations in a database.
\nLorries are made up of the truck and a trailer. Trucks are usually coupled with the same trailer but sometimes trailers are moved to a different truck for part of the year.
\nEach driver only uses one truck.
\nThe following LORRY table shows information about the lorries.
\nTrailer space is measured in cubic metres.
\nThe table can also be represented as:
\nLORRY (TruckID, Truckmake, Energysource, Driver, Tel, TrailerID,\n
Trailerspace, Coupled_from, Coupled_to)
The table has been split into two tables following the rules of normalization. The resulting two tables are shown with the primary key underlined:
\nLORRY (TruckID, Truckmake, Energysource, Driver, Tel)\n
TRAILER (TrailerID, Trailerspace, Coupled_from, Coupled_to, TruckID)
Identify two characteristics that make a database unnormalized.
\nOutline why data redundancy may be a problem in the LORRY table.
\nIdentify the steps to create a query to find the names and telephone numbers of the drivers who drive lorries that have more than 60 cubic metres of trailer space.
\nNormalize the database to 3NF. Use the same format as shown, ensuring that primary keys are clearly indicated by underlining them.
\nAward [2 max].
Note: Allow answers that refer to any stage of normalisation.
Each data item hasn’t be broken down any further / contains repeating data;
Each row is not unique / does not contain a primary key;
Each field/column does not have a unique name / does not have atomic values;
Award [2 max].
This would mean that data is duplicated within a table / allow an example of duplicated data in this table;
However, when it is updated, it may not be updated in all cases;
Which could lead to anomalies within the data and the incorrect information being used;
Award [4 max].
Award [1] for all relevant tables selected (Lorry and Trailer);
Award [1] for all relevant fields selected (Driver and Tel);
Award [1] for correct condition;
Award [1] for correct link between tables;
SELECT Driver, Tel
FROM Lorry INNER JOIN Trailer
ON Trailer.TrailerID = Lorry.TrailerID
WHERE TRAILERSPACE > 60;
Accept logically equivalent answers written in English or a Data Manipulation Language.
\nAward [7 max].
Award marks as follows:
Separate, correct DRIVER table;
FK links Driver to TRUCK table (driver always drives same truck);
New “journey” table created — called JOURNEY in examples below;
JOURNEY PK either a new JourneyID field, or a composite key as shown below;
Correct FK links to TRUCK and TRAILER tables in JOURNEY table;
Coupled.to and Coupled_from in correct table;
TRAILER table + PK correct;
DRIVER (Driver, Tel)
TRUCK (TruckID, Truckmake, Energysource, Driver)
JOURNEY (TruckID, TrailerID, Coupled_from, Coupled_to)
TRAILER (TrailerID, Trailerspace)
DRIVER (Driver, Tel)
TRUCK (TruckID, Truckmake, Energysource, Driver)
JOURNEY Journey ID, TruckID, TrailerID, Coupled_from, Coupled_to)
TRAILER (TrailerID, Trailerspace)
This was a memory recall question, where many candidates were able to identify at least one characteristic of unnormalized databases. However, many others were not prepared for this question.
\nThe question was connected to a given scenario. Successful candidates were able to provide examples of redundant data affecting the given table, but just few candidates were able to outline consequences.
\nMost candidates were able to get the basic structure of the query though some of them could not set the two tables and their relationship properly while writing the query. Also, many candidates provided generic answers failing to provide the necessary details (fields, tables, conditions) to answer the query.
\nCandidates seemed unprepared for this question, most of them were not able to correctly split the table, identify the relationships and in many cases did not identify primary keys (this being explicitly required in the wording of the question).
\nA bus company provides services within a city. Passengers can look up the distance between any two bus stations on any of its routes.
\nFor each route, a one-dimensional string array is used to store the names of all bus stations on the route and a two-dimensional array is used to store the distances between the bus stations (in kilometres). Only the lower triangle of the two-dimensional array is used to store the distances.
\nFigure 1 shows data about Route X, a bus route between Oppox and Dovely.
\nFigure 1: One-dimensional string array, ROUTE_X_NAMES
, and
two-dimensional array, ROUTE_X_DISTANCES
, for Route X
For example, the distance between Kingsley and Kronos (2.0 kilometres) can be found in ROUTE_X_DISTANCES [7][5]
.
The two-dimensional array ROUTE_X_DISTANCES
is valid if all the entries on and above the main diagonal are zero and all the entries below the main diagonal are greater than zero.
Figure 2 shows an invalid form of ROUTE_X_DISTANCES
.
Figure 2: Invalid form of two-dimensional array ROUTE_X_DISTANCES
State the distance between Kiko and Longlines.
\nConstruct an algorithm in pseudocode that checks the elements of the array ROUTE_X_DISTANCES
and outputs whether the array is valid or not.
Construct an algorithm in pseudocode that inputs the names of two bus stations and outputs the distance between them. If any of the inputted names are not found, the method should output an appropriate message.
\nThe array ROUTE_X_TIMES
(Figure 3) stores the approximate number of minutes it takes for a bus to travel to a bus station from the previous one. For example, ROUTE_X_TIMES [6]
stores the number of minutes it takes for a bus to travel from Kingsley to Allapay: 7 minutes.
Figure 3: The array ROUTE_X_TIMES
Explain how this data could be used to determine the number of minutes it takes for a bus to travel between any two bus stations.
\nAward [1 max].
5.9;
Award [5 max].
Award [1] for correct outer/row loop
Award [1] for correct inner/column loop
Award [1] for use of a flag
Award [1] for checking whether all elements on and above the main diagonal are zero
Award [1] for checking all elements below the main diagonal (they all should be positive numbers)
Award [1] for outputting the appropriate message
Example 1:
\nVALID=True\n
loop R from 0 to 9
loop C from 0 to 9
if R>C and ROUTE_X_DISTANCES[R][C]<=0
then VALID=False
end if
if R<=C and ROUTE_X_DISTANCES[R][C]!=0
then VALID=False
end if
end loop
end loop
if VALID
then output('VALID')
else output('INVALID')
end if
Example 2:
\nFLAG=1
loop R from 1 to 9
loop C from 0 to R-1
if ROUTE_X_DISTANCES[R][C]<=0
then FLAG=0
end if
end loop
end loop
loop R from 0 to 9
loop C= from R to 9
if ROUTE_X_DISTANCES[R][C]!=0
then FLAG=0
end if
end loop
end loop
if FLAG ==1
then output('IT IS VALID')
else output('IT IS NOT VALID')
end if
Example 3:
\nNote: Marks should also be awarded if a candidate wrote the algorithm in Java/Python/Javascript.
\nAward [1] for correct outer/row loop
Award [1] for correct inner/column loop
Award [1] for stopping as soon as an incorrect value is found
Award [1] for checking whether elements on and above the main diagonal are zero
Award [1] for checking elements below the main diagonal (they all should be positive numbers)
Award [1] for outputting the appropriate message
function check()\n
{ for (var i=0; i<10; i++)
{ for (var j=0; j<10; j++)
{ if (i>j)
{ if (ROUTE_X_DISTANCES[i][j] <= 0.0) return \"invalid\";
}
else if (ROUTE_X_DISTANCES[i][j] != 0.0 ) return \"invalid\";
}
}
return \"valid\";
}
output(\"ROUTE_X_DISTANCES is \"+check());
Award [6 max].
Award [1] for all variables correctly declared and initialized;
Award [1] for looping through the array ROUTE_X_NAMES;
Award [1] for determining positions of the first name in the array;
Award [1] for determining positions of the second name in the array;
Award [1] for outputting a message if one or other not present;
Award [1] for a comparison of positions to find largest;
Award [1] for the correct output of distance from ROUTE_X_DISTANCES;
Example 1:
\nNAME1=input()\n
NAME2=input()
POS1=-1
POS2=-1
K=0
loop while K<=9 and (POS1==-1 or POS2==-1)
if ROUTE_X_NAMES [K].equals(NAME1) //accept '==' instead of equals()
then POS1=K
end if
if ROUTE_X_NAMES [K].equals(NAME2)
then POS2=K
end if
K=K+1
end while
if POS1==-1 OR POS2==-1
then output('stations are not found')
else
if POS1 > POS2
then output(ROUTE_X_DISTANCES [POS1][POS2])
else output(ROUTE_X_DISTANCES [POS2][POS1])
end if
end if
Example 2:
\nST1=input()\n
ST2=input()
PS1=-1
PS2=-1
loop K from 0 to 9
if ROUTE_X_NAMES [K]==ST1
then PS1=K
end if
if ROUTE_X_NAMES [K]==ST2
then PS2=K
end if
end loop
if PS1!=-1 AND PS2!=-1
then if PS1 < PS2
then T=PS1
PS1=PS2
PS2=T
end if
output(ROUTE_X_DISTANCES [PS1][PS2])
else
output('stations not found')
end if
Example 3:
\nNote: Award marks if algorithm is presented in a Java/Python/Javascript/any other program rather than IB pseudocode.
For example, please see the following Javascript program
function findStation(station)\n
{ var found = false;
var i = 0;
do
{ found = (ROUTE_X_NAMES[i] == station);
if (!found) i = i + 1;
} while (!found && i < 10);
if (found) return i;
else
{ output(\"No such bus station as \"+station);
return -1;
}
}
var station1 = input();
var station2 = input();
output(\"Finding the distance between \"+station1+\" and \"+station2);
var station1index = findStation(station1);
var station2index = findStation(station2);
if (station1index >=0 && station2index >= 0)
{ if (station1index >= station2index)
output(\"Distance \"+ROUTE_X_DISTANCES[station1index][station2index]);
else
output (\"Distance = \"+ROUTE_X_DISTANCES[station2index][station1index]);
}
Award [3 max].
Determine positions/indexes/subscripts of both bus stations in array ROUTE_X_NAMES;
Calculate the sum of the elements of array ROUTE_X_TIMES (calculate the number of minutes as the sum of the array elements);
\nBetween (lower +1) index and higher index;
\nThe majority of students attempted it, and many got it right.
\nAlgorithms were required based on the question scenario. Some candidates did not attempt these questions. Some candidates achieved high marks by demonstrating good programming skills. Many candidates scored several marks for the construction of a partial solution or a solution that was partially correct.
\nAlgorithms were required based on the question scenario. Some candidates did not attempt these questions. Some candidates achieved high marks by demonstrating good programming skills Many candidates scored several marks for the construction of a partial solution or a solution that was partially correct.
\nVaried from poor to excellent.
\nA transport authority is investigating how many people use a certain direct train route.
\nAt the end of each day, the total number of passengers who travelled on this route is stored in a collection, PASSENGERS
.
The first item was written to the collection on Monday 1st May 2017.
\nThe next items, collected on Tuesday and Wednesday, were added like this:
\nData for 30 complete weeks was added to the collection.
\nConstruct pseudocode that will read PASSENGERS
into the two-dimensional array, 2D_ARRAY
.
Construct the pseudocode for the procedure total
, that takes as input a column number of this two-dimensional array and returns the sum of the elements in that column.
The transport authority wishes to know how many passengers, on average, travel on each day of the week.
\nUsing the procedure total
construct the pseudocode to output the day of the week with the highest average number of passengers, and the value of this average.
You should make use of the sub procedure convert()
which converts the numbers 0 to 6 into days of the week, for example convert(1)
will return “Tuesday”.
The transport authority stores details about the ticket prices in a one-dimensional array, FEES
, where FEES[0]
contains the price of a ticket for Monday to Friday, while FEES[1]
contains the price of a ticket for Saturday and Sunday.
The procedure salesCalculate()
takes as input the column and row indices that define two specific days during the 30 weeks, and outputs the total amount of money generated from ticket sales between those two days (inclusive).
Construct, in pseudocode, the procedure salesCalculate()
.
Award [4] as follows.
\nExample answer 1:
Assumes that an array of sufficient size is declared (2D_ARRAY[][]
) and PASSENGERS
contains valid data for all 7 days in each of 30 weeks.
PASSENGERS.resetNext()\n
N = 0
loop while PASSENGERS.hasNext()
//accept not PASSENGERS.isEMPTY()
//accept N<PASSENGERS.length()
WEEK = N div 7
DAY = N mod 7
2D_ARRAY[WEEK][DAY] = PASSENGERS.getData() // PASSENGERS.getNext()
N=N+1
end loop
Award [1] for while loop.
Award [1] for correct calculation of row index(WEEK).
Award [1] for correct calculation of column index(DAY).
Award [1] for correct array subscripts.
Award [1] for correct use of collection methods.
Example answer 2:
Assumes that an array of a sufficient size is declared (2D_ARRAY[][]
) and PASSENGERS
contain valid data for all 7 days in each of 30 weeks.
PASSENGERS.resetNext()\n
loop for WEEK from 0 to 29
loop for DAY from 0 to 6
2D_ARRAY[WEEK][DAY] = PASSENGERS.getNext()//PASSENGERS.getData()
end loop
end loop
Award [1] for nested loops.
Award [1] for loops that generate the right output (correctly read PASSENGERS
into 2D_ARRAY
).
Award [1] for assignment into correct array location.
Award [1] for correct use of collection methods.
total (N)\n
// if N (column number) is not passed as an input parameter then
// assignment must appear in pseudocode, for example, N = input()
SUM = 0
loop for WEEK from 0 to 29
SUM = SUM + 2D_ARRAY[WEEK][N]
end loop
return SUM
end total
Award [1] for assigning the input to a variable / passing the value of N
.
Award [1] for initializing and returning/outputting SUM
.
Award [1] for correct loop.
Award [1] for correct addition of each term to SUM
. (Note: The array position must be completely correct with the input column and the varied row.)
MAXAV = 0\n
MAXDAY = \"\"
loop for DAY from 0 to 6
if total(DAY)/30 > MAXAV
MAXAV = total(DAY)/30
MAXDAY = convert(DAY)
end if
end loop
output MAXAV,MAXDAY
Award [1] for correct loop.
Award [1] for use of method total() when calculating the average number of passengers.
Award [1] for initializing, updating and outputting/returning MAXAV
and MAXDAY
.
salesCalculate(2D_ARRAY, A, B, X, Y)\n
// A,B are row & column of first day,
// X,Y are row & column of last day.
TOTAL = 0
loop for COL= B to 6
if COL < 5 then
TOTAL = TOTAL + 2D_ARRAY[A][COL] * FEES[0]
else
TOTAL = TOTAL + 2D_ARRAY[A][COL] * FEES[1]
end if
end loop
//calculates total for week A,
//days are in the range from B to 6
//weekdays are days 0-4, and weekend 5,6
loop for ROW = A + 1 to X - 1
loop for COL= 0 to 6
if COL < 5 then
TOTAL = TOTAL + 2D_ARRAY[ROW][COL]*FEES[0]
else
TOTAL = TOTAL + 2D_ARRAY[ROW][COL]*FEES[1]
end if
end loop
end loop
//calculates total for all weeks from A+1 to X-1,
//days are in the range from 0 to 6
loop for COL= 0 to Y
if COL < 5 then
TOTAL = TOTAL + 2D_ARRAY[X][COL]*FEES[0]
else
TOTAL = TOTAL + 2D_ARRAY[X][COL]*FEES[1]
end if
end loop
//calculates total for week X,
//days are in the range from 0 to Y
output TOTAL
end salesCalculate
Award [7 max].
Award [1] for initializing, updating and outputting TOTAL.
Award [1] for nested loops.
Award [1] for correct calculation of TOTAL
in row/week A (column subscripts/days/ in 2D_ARRAY
must be in range B to 6).
Award [1] for correct calculation of TOTAL
in row/week X (column subscripts/days/ in 2D_ARRAY
must be in range 0 to Y).
Award [1] for correct calculation of TOTAL
in rows/weeks from A + 1 to X – 1 (column subscripts/days/ in 2D_ARRAY
must be in range 0 to 6).
Award [1] if evident that the number of days to be included in calculating total amount is different for weeks A + 1 to X – 1, week A and X (three different cases).
Award [2], [1] for checking for weekdays / weekend and [1] for using correct subscript in FEE (0 for weekdays, 1 for weekend).
Consider the following recursive method, where N
is a positive integer
mystery(N)\n
if (N > 0) AND (N mod 2 = 0) then
mystery(N−2)
end if
output N
end mystery
Determine the output produced by the method call mystery(4)
.
Award up to [3] as follows:
[3] for fully correct response (sequence of output) “0;2;4”;
[2] for response (sequence) “4;2;0” (all elements are correct, but they are in inverse order);
[1] for response ”0” (only base case is correct);
OR
“0;2” (incomplete output, but initially correct, and with correct order);
OR
“–2;0;2;4”,“0;2;4;6” (correct sequence immersed in some unnecessary and incorrect context);
[0] in all other cases (e.g. responses “2”, “4”, “2;0”, “2;4”, “4;2”);
\n0
2
4
An application package used in an office includes a word processor.
\nThe office manager decides to buy and install new software and hardware.
\nThe changeover to the new system can be achieved by either direct changeover or phased conversion.
\nThe new software allows basic text summaries and analysis to help check text files, including functions such as calculating word frequency.
\nDescribe how a spellchecker checks whether a word in a text file is correctly spelt or not.
\nOutline one problem that may arise from the installation of new hardware and software in the office.
\nCompare direct changeover and phased conversion.
\nIdentify one way of testing this software.
\nEach word in the text file is compared with words in a dictionary (held in memory/online);
If the word is found in the dictionary it is correctly spelt / if the word is not found in the dictionary, spellchecker will recognize that it is incorrectly spelt;
Award [1] for stating a problem and [1] for an elaboration, up to [2 max].
Users/employees might be afraid of these changes (for various reasons);
And not willing to help in this change;
Data migration problems;
For example, different file formats so conversion must be performed;
Employee efficiency may drop;
As they learn to use the new system;
Issue of compatibility with legacy software/hardware;
So features of new software/hardware may not work correctly;
Award [1] for outlining what is meant by direct changeover, [1] for outlining what is meant by phased conversion, and then [1] for an advantage or disadvantage of each, up to [4 max].
\nExample answer
In direct changeover, the old software and hardware is completely replaced, in one move, by the new software and hardware;
Phased conversion involves selecting one section in the office for the direct changeover and other sections will be switched when the first section selected is running satisfactorily. Eventually the whole office has been changed;
A phased conversion is less risky than a direct changeover as any problems that might arise will be isolated in only one section in the office;
Direct changeover means everyone in the organization has same software/hardware and so there are no compatibility issues;
Award [1 max].
Debugging (Accept: white-box testing – i.e. structural testing/flow testing;
black-box testing / requirement testing);
User acceptance testing (alpha-testing) / Beta-testing;
Investment planning is something that many people need to be aware of. Planning for your future requires research because bad choices can be very costly.
\nInterest paid on money invested is usually in the form of compound interest. The formula to calculate compound interest is:
\n\nT is the total value of the investment,
P is the principal sum invested,
r is the interest rate per time period converted to a decimal (for example, 5 % is 0.05),
n is the number of time periods.
An additional $1000 is added to a principal amount of $30 000 at the end of each month.
The monthly interest rate is 0.5 % and this rate is compounded at the end of each month.
Each month, tax is calculated on the monthly profit at a rate of 25 % when the investment total (T) is $40 000, or below. However, when the investment total (T) is above $40 000, the tax rate is 40 %.
\nThe tax is calculated at the end of each month after interest has been added. A running total of the tax is kept and only deducted from the investment total (T) at the end of the year.
\nCalculate the total value of the investment after two years if the principal sum of $30 000 is invested. The yearly interest rate is 10 % and this rate is compounded at the end of each year.
\nOutline, using a diagram or otherwise, a method of calculating the total value of the investment after 12 months.
\nConstruct an algorithm to calculate the fund value at the end of each month. This algorithm should also calculate the total value of the investment after the tax has been deducted after 12 months.
\nMany investment companies offer alternative investment schemes and use modelling to set the rates of interest.
\nExplain why the investment company would use modelling when setting the rates of interest.
\nAward [2 max].
36300;
if interest only award [1 mark max], $6300;
Award [5 max].
Award [1] Initial investment 30000 for month 0;
Award [1] Investment 1000 each month;
Award [1] Interest rate of 0.005 * Principal
Award [1] Calculate compound interest for 12 months;
Award [1] Add interest to the investment;
Award [6 max].
An array does not need to be used to obtain full marks.
Award [1] Create array or variables / initialise array or variables / P[0] = 30 000;
Award [1] Create interest rate and assign it to 1.005;
Award [1] Calculate interest;
Award [1] Add interest and 1000 to each month;
Award [1] If statement to determine the correct tax rate;
Award [1] Output investment - tax;
Alternative solution without an array
\nAward [4 max].
A what if scenario can be employed;
A mathematical model will allow you to adjust variables to see what impact that will have on the investment;
You can see exactly what is happening to the money each month;
If the client decides to pay in less or more money for a given month you can see what affect this will have on the profits;
If the interest rate changes, you will be able to see what changes this has on profit;
If the tax rate changes you can see how this affects the investment profits.
State two compatibility issues that may arise when international businesses merge.
\nAward [2 max].
Language differences / lexical differences present across datasets to be merged;
Data representation differences / different data structures (e.g., date format, incompatible file formats);
Incompatible hardware;
Incompatible operating systems / different software versions;
Candidates were generally able to state at least one compatibility issue related to the merging of international business systems. Some candidates lost out by naming two issues that were too similar, so therefore covering the same marking point.
\nOutline one reason why accurate user documentation is necessary for a system.
\nAward [2 max].
User efficiency;
To ensure that users know how to use the system correctly;
Support/Troubleshoot;
To provide users help when they encounter errors;
Accuracy;
To ensure the correct methods are used to enable reliable output;
Improved user experience;
the user is aware of all available features, so they can make the most out of the system;
Candidates were able to identify a reason why accurate user documentation is necessary for a system. A few candidates mixed this up with system documentation. Some candidates also named two reasons rather than expanding on the one reason, as required by the question.
\nConsider the following binary tree.
\nAn inorder traversal of this binary tree will produce a list of names sorted in ascending order.
\nState two applications of stacks.
\nExplain the use of a one-dimensional array as a static stack. Your answer should include brief outlines of the push and pop operations and the tests for empty and full stacks.
\nState the result of postorder traversal.
\nDraw the binary tree after deleting the root node.
\nCompare the use of static and dynamic data structures.
\nAward [2 max]
Holding all data of a function/method call; simulation of recursion;
Conversion of expressions (infix to postfix, infix to prefix, etc.)
Evaluating expression;
Parsing;
Award [6 max]
Award [3 max] for the following:
An array A of N elements should be initialized (fixed, predetermined size);
keep track of the top of the stack since not all of the array holds stack elements (in an integer variable, for example, named TOP);
\nthe main property of a stack is that stack values/objects go on and come off of the one end of the stack (LIFO data structure);
\nAward [1] for each stack method outlined.
\nPush
Places a value (object) on the top of the stack;
Increase TOP by one and set A[TOP]= value;
Pop
Returns a value from the top of the stack and removes that value from the top of the stack;
Returns A[TOP] and decreases TOP by 1;
IsEmpty
Reports whether the stack is empty or not / returns True if the stack is empty, False otherwise;
Returns True if TOP is less than 0, False otherwise;
IsFull
Reports whether the stack is full or not/ returns True is stack is full, False otherwise;
Returns True if TOP is greater than N-1 (where N is size of the array), False otherwise;
Award [1 max]
The names must be in the following order:
Elm, Elder, Holly, Rowan, Larch, Hazel;
Award [3 max]
Award [1] for the correct root.
Award [1] for the correct left subtree.
Award [1] for the correct right subtree.
Award [3 max]
Static data structures are fixed sized (for example, arrays) whilst dynamic data structure (for example, trees, linked lists) have flexible size;
The size of static data structures is predetermined; the amount of memory once allocated to them at compile time cannot change on run time whereas dynamic data structures they can grow or shrink as needed to contain the data to be stored;
\nSlower access to elements of dynamic data structure (sequential access) when compared with (direct) access to elements of static data structures;
\nMostly well answered questions.
\nNot all candidates answered this question, but most of those who did outlined the push and pop operations and the tests for empty and full stacks. The use of a one-dimensional array as a static stack was weakly explained.
\nMostly well answered.
\nMostly well answered.
\nMostly well answered.
\nGalaxy Bank is a US based bank with many banks (branches) across the country. Galaxy Bank uses a relational database to support its operations.
\nEach branch has many customers and each customer may take out a number of loans.
\nSome of the data in the LOANS table is shown below.
\nThe underlined attribute indicates the primary key.
\nLOANS
\nTwo other tables in the database are identified below:
\nThe underlined attribute indicates the primary key in each table.
\nACCOUNTS
\nCUSTOMERS
\nSecurity is the top priority for Galaxy Bank.
\nConstruct the entity relationship diagram (ERD) that shows the relationship between the bank branch, the customers and their loans.
\nWith reference to the table LOANS, state the output of the following query:
\nSELECT LOANS.Loan_ID, LOANS.Customer_ID, LOANS.Amount, LOANS.Type\n
FROM LOANS
WHERE (LOANS.Amount > 600000) AND ((LOANS.Type = \"Home\") OR
(LOANS.Type = \"Venture\"));
Identify the steps to create a query to find the names of customers whose account balance is greater than $300 000.
\nExplain how controlling access rights contributes to the security of the Galaxy Bank database.
\nExplain how row locking ensures the consistency of the data in the Galaxy Bank database.
\nBank, Customers and Loan correctly positioned;
for EACH 1 to n relationship / for “has customers” and “has loans” (accept words to this effect);
Award [1] for any two correct rows, [2] for all three rows correct.
\nAward up to [4 max].
\nAnswers may include:
\nStep 1: From the table CUSTOMERS,ACCOUNTS;
Step 2: Choose Family_name attribute;
Step 3: For a condition of the Customer_ID matching in both the CUSTOMERS and ACCOUNTS table;
Step 4: And also satisfying the condition of the Balance > 300 000;
SELECT CUSTOMERS.Family_name, ACCOUNTS_Balance
FROM CUSTOMERS INNER JOIN ACCOUNTS
ON CUSTOMERS.Customer_ID = ACCOUNTS,Customer_ID
WHERE ACCOUNTS.Balance > 300 000
Award [1] for identifying the FamilyName.
Award [1] for checking that Customer_ID matches.
Award [1] for identifying the use of both CUSTOMERS and ACCOUNTS.
Award [1] for balance check of greater than 300 000.
Note: SQL is not required.
\nAward up to [3 max].
\nAccess control;
This means that different users will have different levels of access to the Galaxy Bank database;
Therefore customers will only be able to access the information that they require to carry out their transactions;
Whereas other users such as the DBA will have access to more of the database;
Ensuring that the sensitive information within the Galaxy Bank database is secure from unauthorized access, editing etc.;
Note: Do not accept responses pertaining to how access rights are granted.
\nAward up to [3 max].
\nRow locking prevents two or more database users from updating the same data at the same time;
When a row is locked it means that another database session cannot update that data until the lock is released (which unlocks the data and allows other database users to update that data;
If the database as a whole is locked, then only one database session can apply any updates; Locks are done using statements;
Identify two differences between a wide area network (WAN) and a local area network (LAN).
\nAward [2 max].
WAN covers a much larger area (national/international), LANs usually cover a smaller area (such as a single site);
Nodes connected to WANs often make use of connections through public networks (such as the telephone system), nodes connected to LANs are usually connected through private infrastructure;
LANs are more secure than WANs (due to how WANs transmit the data /how far the data would need to travel);
A higher bandwidth is available for transmission in a LAN than a WAN/ LANs can have a higher data transfer rate than a WAN;
LAN is typically cheaper than WAN to implement/ maintain (as the equipment required for LAN is less expensive);
WAN includes a large number of devices connected together, LAN includes less;
WANs are typically slower than LANs due to the distance data must travel;
WAN requires hardware to connect different networks, such as a router, LAN can be simple and does not need to connect to other networks;
Candidates were aware of the differences between wide area networks and local area networks, but often spent a long time writing a description that only covered one difference, rather than the two required by the question.
\nOutline the reason for compression when transmitting data.
\nAward [2 max].
The reason for compression when transmitting data is to save on transfer times;
As it reduces the number of bits needed to represent data (when compared with the original data);
Compressing data involves modifying/restructuring files, so that they take up less space;
And this results in cost savings in cloud storage;
To take up less bandwidth;
Because data compression reduces the size of files to be transmitted over a network;
Note to examiners: Award [1] for a reason (for example, to save data usage for sending files over the internet, to save storage capacity, to speed up file transfer, to decrease costs for network bandwidth, etc.), and award [1] for an expansion.
\nCandidates were aware of a reason for the use of compression when transmitting data. Some candidates, however, directed their responses to generic reasons for compression, rather than the scenario of data transmission, as stated in the question.
\nConsider the following doubly linked list which holds the names of flowers in alphabetical order.
\nConsider the two stacks: FLOWERS
and FRUITS.
Describe the features of a dynamic data structure.
\nExplain how “Primrose”
could be inserted into this doubly linked list. You should draw a labelled diagram in your answer.
Show the output produced by the following algorithm.
\n\nloop while (NOT FRUITS.isEmpty()) AND (NOT FLOWERS.isEmpty())
X = FRUITS.pop()
Y = FLOWERS.pop()
if X < Y then
output
X
else
output Y
end
if
end
loop
A third stack, FLOFRU
, is needed. It should contain all the data from FLOWERS
and FRUITS
and will store it as shown below
\n
Describe how the FLOFRU
stack could be created.
Award up to [2 max].
Each node contains data and also a link to other nodes;
Links between nodes are implemented by pointers (a pointer references a location in memory or holds a memory address);
List size is not fixed / predetermined;
Award up to [6 max] as follows. (There are 7 marking points)
[1] create new node;
[1] instantiation of values and pointers in new node;
[1] state where the search starts from;
[1] how to detect position for insertion;
[1] update pointers in new node;
[1] update pointers from the node at the insertion point, to the new node;
[1] update external pointers;
Remark: Some answers may just use illustrations alone, or very minimal explanations: see note below;
Create a new node (with pointer NEWNODE
) with data field Primrose and two pointer fields (next and previous), to be inserted;
Perform a linear search, either from the beginning or end of the list (using pointers FIRST
and LAST
, on the alphabetically order list;
The location/position of insertion, is found by comparing nodes (Primrose to be inserted after Lavender, LOCATION
points to Lavender) (Accept any description to that effect);
(At the end of this phase, the situation looks as in Figure 1)
\nFigure 1
Then, continue by setting the “next” field/pointer in the newly created node to NULL
;
Set the “previous” pointer in the newly created node to the current LAST
/ to point to Lavender/ to point to the node detected by LOCATION
;
Change/Set/Update the Lavender’s “next” pointer to point to the new node / to link with the NEWNODE
pointer (delete NULL
in the field and link to the existing NEWNODE
pointer);
Update the LAST
pointer to point to the newly created node;
Eventually the final doubly linked list looks like this (Figure 2);
\nFigure 2
\nNote: Award [4 max] for responses that return one or more drawings without any explanation at all, for evidence of these features:
[1] Evidence of creation of an initial new node for Primrose out of the list;
[1] The order of nodes Aster/Camellia/Lavender/Primrose is eventually correct;
[1] The two unidirectional links between Lavender and Primrose are (eventually) correctly displayed, from-to the appropriate fields;
[1] LAST points correctly to the appropriate field in the new node Primrose, and NULL fills the last field of the new node;
Award [1] for each one in the correct order.
Apple;
Broom;
Camellia;
Day Lily;
Note: Solution for the Spanish version (in this order):
Aster; Camelia; Lavanda; Lirio;
Award marks as follows up to [3 max].
\nExample answer 1
Create an empty stack (FLOFRU)
;
pop all elements from FRUITS
and push them onto FLOFRU
;
Then pop all elements from FLOWERS
and push them onto FLOFRU
;
Example answer 2
Create an empty stack (FLOFRU
);
While FRUITS
is not empty
pop an element from FRUITS
and push it onto FLOFRU
;
While FLOWERS
is not empty
pop an element from FLOWERS
and push it onto FLOFRU
;
Note: Award [2 max] for generic descriptions that do not use appropriate terminology on data structures and their operations.
\nA supermarket chain has identified four potential locations to build a distribution centre. The distribution centre will store goods and distribute them to a large number of supermarkets in the region.
\nA computer simulation will be run to determine the best location to build the distribution centre.
\nOutline two reasons for using a computer simulation in this scenario.
\nIdentify two data inputs for this computer simulation model.
\nIdentify two criteria that may be used to determine the best location to build the distribution centre.
\nDiscuss how the simulation model will use the data inputs in (b)(i) and the criteria identified in (b)(ii) to generate recommendations.
\nOutline why the use of a computer simulation may not be beneficial.
\nAward [1 mark] for reason and [1 mark] for expansion [4 marks max].
Cost;
Building a distribution centre is expensive so it is impractical to build four centres to see which one is the best location / build the centre in a poor site location;
Time;
The time to build and run the simulation is much less than building a distribution centre;
Amendments to input data / extra variables added;
The simulation could be adjusted to factor in unforeseen variables / run worst case scenario e.g. roadworks, changes in traffic congestion, new housing being built in the area;
Mark as [2] and [2].
\nAward [2 max].
Road networks to and from the distribution sites;
Location of the supermarkets / distance to the supermarkets;
Location of the port / airport / station that delivers the products to the distribution centre;
Cost of the land for each of the sites;
Average labour costs in the area;
Time taken to drive from the site to each supermarket at different times of the day;
Award [2 max].
Overall costs to build the distribution centre for each site;
Running costs to receive shipments / distribute goods;
Time taken to build the distribution centre at each of the sites;
Time taken to distribute goods / shipments to arrive;
Award [6 max].
\nOverall costs to build the distribution centre for each site;
Inputs of labour rate, time taken to build, cost of land are inputted;
Simulation is run with a variety of scenarios (e.g. number of workers, rate of pay for labour; cost of materials);
Running costs to receive shipments / distribute goods;
Inputs of fuel cost, distance to each supermarket / sites, fuel economy, number of trips, etc.
Simulation is run with a variety of scenarios (eg fuel price increases, congestion reduces fuel economy, more trips needed to ship goods)
Time taken to build the distribution centre at each of the sites;
Inputs for number of diggers, number of workers, building materials delivery schedule;
Simulation is run with scenarios (delay in window deliveries, change in the number of builders, etc.)
Time taken to distribute goods / shipments to arrive;
Inputs for time taken to travel to destination, number of vehicles; length of time to load / unload goods, etc.;
Simulation is run with scenarios (e.g. Increased traffic congestion, number of vehicles shipping goods, etc.)
Award [2 max].
The cost outweighs the benefit;
It may be impossible to simulate a simulation / too many variables / too many confounding factors;
No positive reasons such as time/danger/modification;
Outline the need for a translation process from high level language to machine code.
\nAward [2 max].
(The program written in HLL must be translated into machine code) so that the computer can execute the program;
as the computer only understands machine language / as code written in HLL can only be understood by humans and cannot be interpreted by the computers (which work in binary);
Candidates were mostly able to offer good responses as to why a translation process is required from high level language to machine code.
\nDraw the truth table for the following logic circuit.
\nAward [4 max].
1 mark for every two correct rows;
The majority of candidates achieved high marks for drawing and completing an appropriate truth table for the given logic circuit. Some marks were lost by candidates not including all possible combinations of inputs in their responses, or missing out some of the interim stages, therefore giving inaccurate outputs.
\nThe following matrix has non-zero elements on the diagonal, on the super-diagonal (the first diagonal above the main diagonal) and on the sub-diagonal (the first diagonal below the main diagonal). All the rest of the elements are zeros.
\nThe following two-dimensional array named MAT
of dimensions 6 × 6 is an example of such a matrix.
Method isValidMatrix(N,A)
accepts an integer N
and a two-dimensional array A
of dimensions NxN
. It returns True
if all elements below the subdiagonal and all elements above the superdiagonal are zeros and all elements on three diagonals are non-zeroes; otherwise it returns False
.
For example, isValidMatrix(6,MAT)
returns True
for the matrix MAT
given above.
Given the following recursive method mystery()
with two formal parameters:A
(a two-dimensional array) and R
(an integer).
mystery(A,R)\n
if R > 0 then
return A[R][R-1] + mystery(A,R-1)
else
return 0
end if
end mystery
State the value of MAT
[3][4].
Construct an efficient algorithm for the method isValidMatrix()
.
Determine the value of variable X
after execution of the following method call:
X = mystery(MAT,5)
where MAT
is the two-dimensional array given. You must show your working.
Deduce the purpose of the method mystery(A,R)
.
Award [1 max]
4;
Award [8 max]
Award [1] for initialization, correct changing and returning of a flag.
Award [1] for the nested loops.
Award [1] for correct initial and for correct terminal value and changing the value of the control variable in outer loop.
Award [1] for correct initial and for correct terminal value and changing the value of the control variable in inner loop.
Award [1] for efficiency (terminating execution when a zero or non-zero element is not at the correct position).
Award [1] for correct condition in if statement.
Award [1] for checking elements in the lower/upper triangle.
Award [1] for checking elements on the three diagonals.
Award [1] for the correct logical expression.
Example 1:
\nINVALID=False\n
R=0
loop while R<N and not INVALID
C=0
loop while C<N and not INVALID
if abs(R-C)>=2 and A[R][C]!=0 or abs(R-C)<2 and
A[R][C]==0 then
INVALID=True
endif
C=C+1
endwhile
R=R+1
endwhile
return not INVALID
Please note that instead the logical expression given in the Example answer 1 several if statements could be used and award 1 mark for each correct if statement (1 mark for checking elements in the lower triangle, 1 mark for checking upper triangle, 1 mark for checking three diagonals).
\nif R>C and R-C>1 then //lower triangle\n
if A[R][C]!=0 then
INVALID=True
endif
endif
if R<C and C-R>1 then //upper triangle
if A[R][C]!=0 then
INVALID=True
endif
endif
if R<C and C-R=1 or R>C and R-C==1 or R==C then //three
diagonals
if A[R][C]==0 then
INVALID=True
endif
endif
Example 2:
Award [7 max] (no ‘efficiency’ mark).
Award [1] for initialization, correct changing and returning of a flag
Award [1] for the nested loops.
Award [1] for correct initial and for correct terminal value of the control variable in outer loop.
Award [1] for correct initial and for correct terminal value of the control variable in inner loop.
Award [1] for correct condition in if statement.
Award [1] for checking elements in lower/upper triangle.
Award [1] for checking elements on the three diagonals.
Award [1] for the use of correct logical expressions.
INVALID=False\n
loop R=0 to N-1 do
loop C=0 to N-1 do
if abs(R-C)>=2 and A[R][C]!=0 or abs(R-C)<2 and
A[R][C]==0 then
INVALID=True
endif
endloop
endloop
return not INVALID
Award [4 max]\n
X = mystery( MAT, 5)= 5+ mystery( MAT, 4);
5 + 7 + mystery( MAT, 3);
5 + 7 −5 + mystery( MAT, 2);
5 + 7 −5 + 9 + mystery( MAT, 1);
5+7-5+9+1+mystery(MAT, 0)= 5+7-5+9+1+0 = 17;
Award [2 max]
Calculates the sum of R elements;
Starting from A[R][R-1] to A[1][0];
on the sub-diagonal (of the two-dimensional array A);
Parts (a) and (b) have been attempted with some repetition. The reasonable general knowledge of when and how data can be lost and backup strategies. However, many responses were vague enough not to describe the situation with reference to the basic technical terminology of the devices/systems.
\nThe question was reasonably well answered with many gaining at least 2 or 3 of the marking points.
\nQuite a few candidates did not attempt the recursion question. However, those who did generally answered well.
\nQuite a few candidates did not attempt the recursion question. However, those who did generally answered well.
\nCalculate, showing your working in each case: the binary (base 2) value of the denary (base 10) number: 105.
\nCalculate, showing your working in each case: the hexadecimal (base 16) value of the denary (base 10) number: 200.
\nAward [2 max].
Award [1] for showing workings.
(0)1101001;
\nAward [2 max].
Award [1] for showing workings.
C8;
\nThe vast majority of candidates were able to correctly convert a binary number to its denary equivalent.
\nMost candidates were able to correctly convert a hexadecimal number to its denary equivalent.
\nShowTime is a local theatre that allows online booking for its various shows.
All customers are able to access the database to book a movie of their choice.
However, some of the customers have received incorrect information when their booking has been made. This has been caused by update anomalies.
\nShowTime have introduced a database recovery system in case the database becomes corrupted.
\nIdentify two types of update anomaly.
\nOutline two methods of database recovery that can be used to restore the system.
\nIdentify three tasks that are carried out by the database administrator (DBA).
\nCustomers can choose a credit card as their method of payment. However, some customers are concerned that their personal information could get shared with unauthorized third parties.
\nExplain one way that the DBA at ShowTime can ensure the anonymity of the customers is maintained.
\nAward up to [2 max].
Insertion;
Deletion;
Modification;
Lost update;
Award [1] for each method of recovery followed by [1] for brief explanation up to a maximum of [2].
Mark as [2] and [2].
Do not accept generic back up responses. It must be DBMS related.
\nSystem log;
In the event of a disk crash (any catastrophic failure);
The recovery method recovers a past copy of the database;
Backed up to archival storage and reconstructs a more current state by redoing the operations of committed transactions, up to the time of failure.
Deferred Update;
To support ABORT and machine failure scenarios;
While a transaction runs, no changes made by that transaction are recorded in the Database;
On a commit, new data is recorded in a log file and flushed to the disk;
New data is then recorded in the database itself;
On abort, do not do anything (the database has not been changed);
On a system restart after a system failure, REDO the log;
Data on disk is not updated until after a transaction commits fully;
Award up to [3 max].
Authorizing/managing access to the database;
Coordinating and monitoring its use;
Capacity planning;
Routine backups to safeguard from data loss during crash;
Tried and tested strategies to recover the database after any crash;
reinstallation/overwrite of data; // Do not accept installation of new software alone
Manage security;
Award up to [3 max].
Important sensitive information like personal details such as names, social security;
Number and addresses should be separated;
A unique identifier should be assigned to each customer;
This identifier is then used to access the booking details in the ShowTime;
Note: No generic access rights issues like authorisation should be accepted.
Do not accept Encryption as it is a general point and not specific to DBMS.
A biotechnology company owns a resource centre which collects and classifies organisms for use in research.
\nOnly authorized employees are allowed access to some laboratories in the resource centre.
\nThese laboratories are protected by locked doors. Each door is controlled by a separate microprocessor. A digital camera is used to scan the iris of an employee who wishes to enter the lab. If the employee is authorized the doors are unlocked.
\nThe company is planning to use a centralized computer system to secure the resource centre’s building.
\nThe operating system has an important role in this system.
\nIdentify two benefits of using a digital camera as an input device in this control system.
\nOutline the use of a microprocessor in this control system.
\nOutline the function of an output transducer.
\nCompare a centrally controlled system with the system described above.
\nIdentify two functions of the operating system.
\nPolling and interrupt are two operating system management techniques.
\nSuggest with reasons which of these two techniques is the most appropriate for this centrally controlled system.
\nAward up to [2 max].
([1] for each of the two benefits).
Digital cameras are relatively cheap;
Robust;
No need for AD conversion;
Generally very high quality pictures (useful to prevent malpractice);
Generally quick;
Example answer 1
No need for conversion because image is in digital format;
Thousands/millions of photos of eyes could be taken before needing replacement;
Example answer 2
It is directly connected to a microprocessor for image comparison;
It could be fitted (purchased), with a macro lens so that a close up scan of the Iris is possible;
Award up to [2 max].
Processor compares the inputted image/pattern with the images stored in memory;
If a match is found, it sends a signal to unlock doors /
(if match is not found, it sends error message/the doors remain locked);
Output transducer is a device (an actuator) which converts;
an electrical signal into physical quantity (a physical action);
Output transducer is a device which converts energy from one physical form to another;
e.g. electrical energy (signal) into electro-mechanical or kinetic energy / to produce action (lock/unlock door);
Note: Award one mark only for an answer that just says that the output transducer can be used to lock/unlock doors.
\nAward [1] for the meaning of centrally controlled system;
[1] for the meaning of a distributed system, and;
[up to 2 max] for an expansion/comparison addressing both kind of systems [up to 4 max];
Example answer
A centrally controlled system involves a central computer which controls all labs/doors;
A distributed system can have only a dedicated microprocessor with memory to control one of the labs/doors;
A centrally controlled system is more versatile;
Could be used in solving other business tasks (accept specific examples);
Can unlock all doors easily during an emergency;
Access rights can be updated easily;
Data is stored centrally and therefore easier to update;
A failure in a central system would affect all doors;
A distributed system can be programmed with ad hoc OS depending on the technologies used;
It may be practical choice when dealing with legacy systems/ specific devices/ old infrastructure/while updating the facilities;
It contributes a higher sense of partition of the physical space (territory) to groups / individuals;
Data are stored locally, so there is local consistency (and smaller size mean easier to manage);
Changes to data may be done locally, and if some data are common in two or more different systems, global inconsistencies across different systems may be introduced;
Award [2 max].
Memory management;
Resource allocation / Resource and Hardware management (printer, disk drives, etc.);
Booting / bootstrapping;
Loading and execute / provide service for applications software;
Disk/File system management;
Data security;
Provides a user interface to other levels of the machine;
etc.
Award [1] for choosing “interrupt”, [1] for explaining “interrupts” and [1] for justifying the choice in this context, up to [3 max].
\nExample answer:
Interrupt;
A signal sent from an input device to a computer causes the processor, and the main program that operates the computer (the operating system), to stop and figure out what to do next;
Interrupt is better in this situation because it does not waste central computer’s time (other tasks could be performed);
(example of emergency – it must give quick response);
Note: Award [1 max] for an answer of “polling”, but only if reasonably justified.
\nPolling – the continuous checking of all input devices by processor to see what state they are in/to see whether they are still connected/want to communicate;
So a faulty device that is polled will not reply;
Identify one function of a single-user operating system.
\nAward [1 max].
memory management;
Note to examiners: allow any other correct function of a single-user operating system.
\nMany correct alternative functions of a single-user operating system were identified by candidates.
\nThe QT Railway and QT Highway have recently been built to connect Qinghai with Tibet. This has made the mountainous region of Tibet accessible to the rest of China.
\nThe endangered Tibetan antelope migrates over 300 km each year to give birth to a single calf. The QT Railway and QT Highway cross this migration route, see Figure 2.
\nFigure 2: Map of the study site and habitat of Tibetan antelope
\n[Source: adapted (simplified redraw of the nature reserve data map) from Karina Manayeva, Buho Hoshino, Hiromasa Igota, Takashi Nakazawa and Ganzorig Sumiya, 2017. Seasonal migration and home ranges of Tibetan antelopes (Pantholops hodgsonii) based on satellite tracking. Int. J. Zool. Res., 13: 26–37. © 2017 Karina Manayeva et al.]
\nThe building of the QT Railway and QT Highway presents potential dangers to both the antelopes and the public travelling through this nature reserve.
\nTo understand more about the antelopes’ migration patterns, some antelopes have tracking devices attached. Using the information from these tracking devices, a 2D visualization model can be developed and updated in real time.
\nIdentify four items of data that would be included to create the 2D visualization model.
\nExplain why a 2D visualization model would be used rather than a 3D visualization model in this scenario.
\nExplain why the development of a visualization model was necessary in this scenario.
\nAward [4 max].
Continuously collected data (from satellite, electronic trackers, observation);
Data on current speed of antelopes / length of time for the entire herd to pass a certain point;
Previous migration paths stored and used to provide additional data;
Predicted path calculated to determine when the antelopes will hit the railway line / highway;
Model may show the expected time of highway / railway inception updated in real time;
Award [4 max].
2D visualization gives a rapid way of seeing what is happening relative topositions on the map and updates quickly;
A 3D model may have delays updating providing information too late;
The antelope is always on the ground / in a 2D space
So there is no need to map in 3D space
2D visualization will update rapidly because it is less complex;
A 3D model that requires more powerful graphics cards (GPU);
Award [4 max].
Award [2 max] for technical difficulties of collecting data;
Award [2 max] for a reasonable solution to the problem
Difficult to put people on the ground to keep pace with the antelope;
Because the area is inhospitable / mountainous;
The antelope may cross the road at any point over a vast distance so the number of people required is prohibitive;
Poor visibility may affect visuals of antelopes / too dark for cameras;
Transmission may get disrupted in a remote place like Tibet;
So satellite transmissions as a back up system;
Define the term usability.
\nAward [1 max].
The extent to which a device can be used by specific/its users;
To achieve specific goals effectively/efficiently/satisfactorily;
Candidates were mostly able to define the term usability, but some candidates found it difficult to do so without including the word usable, or similar, in their response.
\nMarble Reading Book Stores (MRBS) is a chain of bookstores based in London. The stores want to keep information about the books they sell, the authors of the books and the publishers they work with. The assumptions made when the database was created were:
\nThree of the tables in the MRBS database are shown below:
\nPUBLISHER
\nAUTHOR
\nBOOK
\nThe MRBS database undergoes many transactions.
\nConstruct the entity-relationship diagram (ERD) for this scenario.
\nOutline why data validation is difficult for the Book_Title attribute.
\nState the result from the following query:
\nSELECT Book_Title\n
FROM BOOK
WHERE Genre = \"Non-fiction\"
AND ISBN = '0-98124-612-2'
Construct a query to find the titles of the books published by “Orlando Crux”.
\nOutline why atomicity is important within a database.
\nOutline how data consistency can be maintained in transactions in this database system.
\nSome data in the MRBS database is redundant.
\nOutline one problem caused by redundant data.
\nAward [2 max].
Award [1] for correct relationship “publishes books from”.
Award [1] for correct relationship “writes”.
Award [2 max].
As Book_Title attribute is String/Varchar;
It does not allow many validation checks (like range check etc.);
Award [1 max].
Seeking the truth;
Award [4 max].
Award [1] for selection of both Publisher_Name and Book_Title from the two respective tables.
Award [1] for making INNER JOIN of the Publisher_Name from both tables-Publisher and Author.
Award [1] for the correct test ON Author_Num from both tables-Author and Book.
Award [1] for the correct test of equity of Publisher_Name.
SELECT Publisher.Publisher_Name, Book.Book_Title FROM Author\n
INNER JOIN Book ON PUBLISHER. Publisher_Name =
Author.Publisher_Name, ON Author.Author_Num = Book.Author_Num
WHERE Publisher.Publisher_Name = \"Orlando Crux\";
Award [2 max].
Helps the searching of a family name for example rather than a “like” name search;
So, making data into the smallest possible unit helps quicker searches;
Award [2 max].
Each user sees a fixed view of the data;
This may include visible changes made by the user / the user's own transactions and transactions of other users;
Award [2 max].
When a field value changes multiple occurrences must be updated;
For example, if a publisher moves, we’ll need to change the values for City and Country in multiple records;
Problem occurs if we forget to change the values in any of the records;
The database would then have data inconsistency;
Most students knew how to sketch an ER diagram though some of them don’t seem to know the various relationships in it and how to apply. Some of them can draw the entities but setting the relationship was not done correctly.
\nMost of the students understood the validations in String attributes and its challenges.
\nThe query was well understood.
\nMost students were able to get the basic structure of the query well though some of them could not set the two tables and their relationship properly while writing the query. Also many students searched for the publisher or author code not the publisher name.
\nMost students were able to explain atomicity though only very few students were able to refer to rollback as well.
\n‘Data consistency’ was understood though they could not relate to the given scenario of the bookstore database.
\nMost students gave generic answers and most of them incorrectly referred to the space redundancy that is not appropriate to this question clearly.
\nOutline one reason for the use of standards in the construction of networks.
\nAward [2 max]
Standards ensure compatibility between nodes on the network;
Through the use of common techniques/protocols/language;
Most candidates recognised that the use of standards in the construction of networks was related to the need for compatibility, with many answers based on that concept seen.
\nExplain how cache memory affects system performance.
\nAward [3 max].
Cache is high-speed memory;
Located between CPU and RAM;
Frequently used data/instructions are (temporarily) stored in cache memory;
To reduce the access time needed/Speed up retrieval time/To improve the speed of processing;
CPU searches as instruction’s address first in the cache, and if not found, in RAM;
Candidates were able to explain the positive impact of cache memory on system performance, with many high scoring responses.
\nOrderYourFoods is an online company that allows customers to order food and get it delivered to their location. It operates in a number of cities in India.
\nOn the home page of the company’s website www.orderyourfoods.com, the customer has to enter the city name and the address the food needs to be delivered to. Based on this information, the website displays a list of restaurants.
\nThe website has a pop-up advert that encourages customers to subscribe for discount offers, see Figure 3.
\nFigure 3: An example of a pop-up advert
\nThe following code is executed when the customer clicks on the subscribe button.
\n<? php\n
$to = 'info@orderyourfoods.com';
$from = '$_POST['email']';
$headers = \"From: \" . $from . \"\\r\\n\";
$subject = \"New subscription at OrderYourFoods\";
$body = \"New user subscription: \" . $_POST['email'];
if( filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) )
{
if (mail($to, $subject, $body, $headers, \"-f \" . $from))
{
echo 'Your e-mail (' . $_POST['email'] . ') has been added to our
mailing list!';
}
else
{
echo 'There was a problem with your e-mail (' . $_POST['email'] . ')';
}
}
?>
The website uses the following method to communicate with the potential customers, see Figure 4.
\nFigure 4: Banner for OrderYourFoods.com
\nOrderYourFoods currently displays an email address and a phone number to show customers how they can be contacted.
\n\n
State the protocol used in the company’s website.
\nExplain the importance of protocols on the World Wide Web.
\nState the type of scripting used in the php code.
\nState one inbuilt function along with parameters used in the php code.
\nDescribe the processing that occurs when the subscribe button is clicked.
\nIdentify one additional method of online interaction that can be incorporated in this website.
\nOrderYourFoods is concerned that it never appears close to the top of the list of search results when the term “food delivery” is typed into a search engine.
\nOrderYourFoods has decided to use black hat search engine optimization techniques to be more visible in search engines.
\nEvaluate this decision.
\nAward [1 max].
Hypertext transfer protocol secure/https;
Do not accept http.
Award [4 max].
To allow successful communication to take place;
Ensure data integrity such as error checking;
Regulate flow control such as prevent a fast sender from overwhelming a slow receiver;
Managing deadlock when two processes are each waiting for the other to complete before proceeding;
Manage congestion;
Manage error correction such as enabling reliable delivery of digital data over unreliable communication channels;
Manage packet switching;
Manage security / encryption / authentication ……;
Award [1 max].
Server-side scripting;
Award [1 max].
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
mail($to, $subject, $body, $headers, \"-f \" . $from);
Award [3 max].
The script reads the email id;
Checks if the email address entered is valid/executes the filter( ) function;
If correct, then the mail( ) function of PHP adds the email address and displays that your email address has been added to our mailing list;
Else, the error message will be displayed;
There is no error message if the email address is invalid.
OR
\nAward [1 max].
Social Networking/Facebook/Social Media/Twitter;
Forums;
Online chat;
Award [5 max].
Advantages [2 max]
The use of black hat SEO techniques may increase the visibility of the OrderYourFoods website;
Which will bring a short term gain;
Disadvantages [2 max]
Black hat techniques are unethical;
Use of these techniques may lead to blacklisting;
Evaluative comment [1 max]
OrderYourFoods may decide that the need to increase their visibility, and increase their sales potential, so this may be a pragmatic (if unethical) compromise;
OrderYourFoods may decide that the potential long term risks that may arise from the use of an unethical technique may not be a risk that is worth taking may affect the company’s reputation;
Not all candidates registered the fact that this site would need to be secure and therefore would use the HTTPS protocol.
\nAs this was a 4-mark question a brief definition type response would be unlikely to score highly. Most commented on the fact that protocols are needed to ensure that communication takes place, but few were able to provide the specific detail that an \"explain\" question demands.
\nSchools need to be aware that the candidates are expected to be practiced in the use of web software such as php, JavaScript and CSS. Answers did not show a high level of understanding even though some gained marks through answering quite generally in part (b).
\nA specific web element was expected here — many answered with on-line chat.
\nCandidates were more comfortable with this topic and provided some good discussions identifying both the short-term gains and long-term consequences of black hat SEO.
\nA business’s computer system needs to be updated.
\nThe new system is now ready for implementation.
\nIdentify one stakeholder to be considered when planning the new system.
\nOutline one consequence of not including all stakeholders in the design of the new system.
\nDescribe two appropriate techniques to gather the information needed to find a suitable solution for the updated system.
\nOutline one reason testing should take place at every stage of the development process.
\nEvaluate two methods the business could use to implement the new system. Include the benefits and drawbacks of each.
\nAward [1 max].
End users/ employees/ customers/ community members/ media/ suppliers;
Business owners/ managers/ shareholders/ investors;
Award [2 max].
User dissatisfaction;
because the system does not meet user requirements;
Developers not being paid for the final product;
as the business owner requests are not evident in the final product/ or outside of the project's scope;
Unsuccessful final product;
the developed system may either solve a different problem/ is not user friendly as compared to the existing system;
Note to examiners: Reward other reasonable responses.
\nAward [4 max].
Examining current systems (using interviews/ surveys/direct observation);
To compare the existing system against possible requirements to identify missing features;
Examining competing products;
To compare own system with competitors to enable decisions on features to add;
Review of organizational capabilities;
To determine how well the organization manages resources to gain an advantage over competitors;
Literature searches;
To research current methods and to help inform development choices;
Mark as 2 and 2
\nAward [2 max].
Testing is important (at every stage) to make sure the system operates in line with user requirements/as intended;
To prevent the end user being dissatisfied with the final system;
Testing is important to enable early discovery of errors;
to reduce time delay/ using more resources / avoid higher cost;
Award [6 max].
Award [1] for method, award [1] for benefit and award [1] for drawback.
Parallel running;
The old and new systems run together, so if a problem is found with the new system, it can be repaired/the old system can take over;
This is expensive as duplicate systems and staff are needed;
Pilot running;
The new system is only implemented in one branch of the organization so disruption is kept to a minimum;
It can take a long time for the new system to be fully implemented / two systems are still in operation within the organization, leading to duplication and possible errors;
Direct changeover;
The new system is implemented overnight so the changes happen very quickly;
If the new system fails, the company has no working system to fall back on;
Phased conversion;
Only one area/department/part of the system is updated at a time, so the disruption is kept to a minimum;
Multiple systems which may not be compatible with each other will be running at the same time;
Note to examiners: Accept other suitable examples of benefits and drawbacks.
\nMark as 3 and 3.
\nCandidates identified a range of correct stakeholders who should be considered when planning a new business computer system.
\nIn general, they then correctly continued and outlined a consequence of not including all stakeholders in the design of the new system. If marks were lost, it was most likely due to not expanding on the consequence they had named, and then, had gone on to name one or more additional consequences.
\nCandidates mostly misinterpreted this question as requiring methods of data collection, so talked about surveys, interviews or observations, when the question was asking about techniques to gather information, which meant, for example, examining current systems, examining competing products or literature searches. A small number of candidates did identify appropriate techniques.
\nVirtually all candidates were able to talk about the reasons for testing, but the question specifically asked about the reason for testing at every stage of the development process. Many good answers were seen, but there were also some answers that gave generic benefits of testing. In addition, candidates were asked to outline one reason, so candidates who gave simple answers covering more than one reason lost out on the expansion mark.
\nCandidates who chose to evaluate the direct and parallel running methods of implementing a new system often scored high marks and generally scored higher marks than those who chose to write about other methods. Candidates often mixed up the meaning of pilot and phased implementation, so therefore didn’t get all the available marks if they chose either of these methods.
\nConsider the following two-dimensional array, MAT
, with dimensions 6 × 6.
The value −1
is stored in MAT
at position [4][2]
. The position [4][2]
means row 4 and column 2.
A two-dimensional array in which most of the elements are zero is called a sparse matrix. A sparse matrix can be compressed by storing only non-zero elements using three one‑dimensional arrays.
\nThe first array, VALUES
, stores all non-zero elements taken from the sparse matrix in row‑major order (left-to-right then top-to-bottom order).
The length of the array VALUES
is equal to the number of non-zero elements in the sparse matrix. For the sparse matrix above, MAT
, the array VALUES
is:
The second array is ROWC
. ROWC[i]
stores the number of non-zero elements, from row 0
to row i
of the sparse matrix, inclusive.
The length of ROWC
is equal to the number of rows in the sparse matrix. For MAT
the array ROWC
is:
For example, ROWC[2]
stores 3
because in MAT
there are three non-zero elements from row 0
to row 2
, inclusive.
The third array, COL
, stores the column index for each non-zero element in the sparse matrix. COL[i]
stores the sparse matrix column index for the non-zero element stored in VALUES[i]
. For MAT
the array COL
is:
Consider the following three arrays. They hold the compressed contents of a 7 × 7 sparse matrix, .
\nState the total number of elements stored in MAT
.
State the number of non-zero elements in MAT
.
State how many rows in BIGMAT
contain only zeros.
State the index in VALUES
of the first non-zero element in row 5
of BIGMAT
.
State the index in of the first non-zero element in row of
\n36;
\n7;
\n1;
\n5;
\n5;
\nA teacher would like a simple program to store the names, marks and grades of students in a set of three parallel one-dimensional arrays called NAME[]
, MARK[]
and GRADE[]
.
The grade boundaries for the individual grades are shown below:
\nThe class has 30 students.
\nIdentify two components in a conditional statement.
\nConstruct an algorithm using pseudocode to take the marks that have been stored in MARK[]
, convert them into the appropriate grade and store the calculated grades in GRADE[]
.
Outline how the name, mark and grade in the three arrays correspond to the same student.
\nConstruct an algorithm using pseudocode to output the names and grades of all students who achieve a grade of Merit or Distinction.
\nExplain how you would change your algorithm in part (d) to allow a user to choose a grade and output the names and marks of the students who have achieved this grade.
\nAward [2 max]. if;
then;
else;
Note to examiners: allow an alternative descriptive version such as:
test/condition;
action/consequence;
(optional) alternative action/consequence;
Award [5 max].
Award [1] for an appropriate loop with correct loop parameters to cover 30 array elements/all students
Award [1] for correct use of indexes in two arrays ( and
)
Award [1] for each if statement with correct condition and grade assignment up to [4].
Note to examiners: Award [4] if candidate has correctly used an alternative conditional statement such as switch/ case.
\nExample answer 1:
\nloop COUNTER from 0 to 29\n
if MARK[COUNTER] >= 80
then GRADE[COUNTER] = \"Distinction\"
else
if MARK[COUNTER]>˝= 60
then GRADE[COUNTER] = \"Merit\"
else
if MARK[COUNTER} >= 40
then GRADE[COUNTER] = \"Pass\"
else
GRADE[COUNTER] = \"Fail\"
end if
end if
end if
end loop
Example answer 2:
\nCOUNTER = 1\n
loop while COUNTER <= 30
if MARK[COUNTER-1] >= 80
then GRADE[COUNTER-1] = \"Distinction\"
end if
if MARK[COUNTER-1] >= 60 and MARK[COUNTER-1] < 80
then GRADE[COUNTER-1] = \"Merit\"
end if
if MARK[COUNTER-1} >= 40 and MARK[COUNTER-1] < 60
then GRADE[COUNTER-1] = \"Pass\"
end if
if MARK[COUNTER-1} < 40
GRADE[COUNTER-1] = \"Fail\"
end if
COUNTER = COUNTER + 1
end loop
Award [2 max].
Three arrays are parallel/ they have the same number of elements/ the same length;
the same array index can be used to represent name, grade and mark of the same student/ the array index makes sure that data from the three arrays lines up;
Award [3 max].
Award [1] for correct loop to check all students
Award [1] for correct conditional statement checking correct array
Award [1] for correct output
Example answer 1:
\nloop COUNTER from 0 to 29\n
if MARK[COUNTER] >= 60 then
output NAME[COUNTER], GRADE[COUNTER]
end if
end loop
Example answer 2:
\nloop C from 0 to 29\n
if GRADE[C].equals(“Merit”)OR GRADE[C].equals(“Distinction”)
then
output NAME[C], GRADE[C]
end if
end loop
Award [3 max].
Award [1] for an input statement before the loop;
Award [1] for changing the conditional statement so that it checks the GRADE[]
array for the GRADE
input (using the same variable)
Award [1] for outputting the name and marks of the student who has achieved the inputted grade
Note to examiners: Accept a written explanation or an amended algorithm that corresponds to candidate’s answer to part(d).
\nExample 1:
\nG=input()\n
COUNTER = 0
loop while COUNTER < 30
if GRADE[COUNTER] = G
then
output(NAME[COUNTER], MARK[COUNTER])
end if
COUNTER = COUNTER + 1
end loop
Candidates who gave an example of a conditional statement did enough to get both marks for this question. Other candidates who described the make-up of a conditional statement, were also successful.
\nCandidates were able to demonstrate the construction of an algorithm to take marks that were stored, convert them into a grade and then store the calculated grades. However, fully correct pseudocode solutions were rare. Errors that were seen included incorrect loop constructs; loops not covering the whole data set; incorrect use of array indexing for both retrieval and storage; incorrect data types – the data to be stored was of the string data type, but this was not always shown; incorrect use of assignment.
\nThe vast majority of candidates recognised that a particular student’s data used the same index in each of the three arrays, therefore indicating that the data in each array corresponded to the same student. Relatively few candidates identified the fact that this was because they were parallel arrays.
\nAnother algorithm was required here with some of the same problems as seen in question 13b, however, most candidates did achieve marks here, mostly for the correct use of conditional statements.
\nCandidates were asked to explain how they would change their algorithm in question 13d to achieve some additional functionality. Most candidates did achieve some marks here for adding an input, changing the conditional statement and/or changing the output.
\nA school maintains a database of students’ details and teaching resources on a central server. This data can be accessed by all teachers in the school.
\nTeachers may need to edit resources when preparing their lessons.
\nWhen storing student details, data security is an important consideration.
\nThe school has appointed a database administrator (DBA).
\nA DBA is required to carry out tasks such as ensuring there is a strategy to recover the database if it becomes corrupted and that the data is shared ethically.
\nExplain how concurrent use of the school database is possible in this situation.
\nDescribe two ways that data security in the school's database can be maintained.
\nDescribe one strategy that could be used to ensure the data can be recovered if the database becomes corrupted.
\nSuggest how the privacy of student data can be ensured.
\nAward [3 max].
The ability of a database to allow multiple teachers to affect multiple transactions;
Allowing concurrent processing while ensuring transaction isolation;
Thus, ensuring the update of one teacher does not affect the update of another teacher;
While one transaction (by a teacher) is accessing a resource from a shared folder, it places a lock, an access restriction, on the resource, controlling the level of access allowed by another transaction by another teacher;
Award [4 max].
Award [1] for identifying a way of maintaining data security and [1] for a development up to [2 max]
Mark as [2] and [2]
Minimizing permissions;
Restrict users to have permission only to the means to do their job. Some can view, modify and insert some only view etc.;
Auditing changes;
Log changes made to teachers and permissions through auditing. This gives a trail to follow should you have problems. Without authorization no one gets grant of permissions;
Minimizing table access;
Isolate the teachers from the data tables they do not need / Create views and user defined functions to support user access requirements and not give access to the tables;
Award [2 max].
Award [1] for identifying a way of maintaining data security and [1] for a development up to [2 max].
Deferred update;
does not physically update the database on disk until a transaction has reached its commit point/if a transaction fails before reaching its commit point, it will not have changed the database in any way so UNDO is not required;
Shadow paging;
When a page is to be modified, a shadow page is allocated in which changes are made;
When it is ready to become durable, all pages that refer to original are updated to refer new replacement page;
Back-up;
Back-up copies of the entire database is done to ensure the database is at the most updated version of the original;
Award [3 max].
Award [1] for the method, award [1] for the explanation and [1] for the example up to [3 max].
Data masking or data obfuscation;
is the process of hiding original data with random characters;
e.g.: suppressing certain characters in the student address, student id etc.;
Data encryption;
Conversion of data into non-readable gibberish creates highly secure results such as scrambling the student_ID;
The only way to gain access to the data is to unlock it with a key or password which only those authorized can access;
Many students gave generic answers for isolation in this section. Few of the students gave very precise explanations as well.
\nMost students were able to do this question.
\nA majority of candidates were able to identify at least one way of maintaining data consistency but did not relate to the recovery part of the answer.
\nMethods of anonymising data was a challenge for most students.
\nThe IB Coordinator of AB World Academy introduces the Extended Essay to the Grade 11 students in January by researching the difference between primary and secondary data on the internet.
\nSome of the students used the Google search engine (Google.com) and others used the Ask search engine (Ask.com). These search engines gave results.
\nGoogle uses the PageRank algorithm and Ask uses the HITS algorithm.
\nThe IB coordinator uploaded the assignments onto a cloud-based Learning Management Platform.
\nAs part of their research, students downloaded images from the internet. Most of the downloaded JPG images were compressed using lossy compression.
\nDefine the term search engine.
\nDistinguish between the principles of these two algorithms.
\nDescribe the difference between cloud computing and local client-server architecture.
\nState the alternative type of compression to lossy.
\nEvaluate the advantages and disadvantages for students of using compressed images in their IB Coursework.
\nA PNG image uses open standards.
\nDistinguish between interoperability and open standards.
\nAward [1 max].
Software that interrogates a database of web pages;
Award [4 max].
PageRank algorithm [2 max]
PageRank works by counting the number and quality of in links of a page to determine a rough estimate of how important the website is;
The assumption is that more important websites are likely to receive more links from other websites;
Pages are given a score (rank) / counts links per pages;
HITS algorithm [2 max]
Based on authorities and hubs;
Authorities: A page is called an authority, if it contains valuable information and if it is truly relevant for the search query. It is assumed that such a page has a high number of in-links;
Hubs: These are pages that are relevant for finding authorities. They contain useful links towards them. It is therefore assumed that these pages have a high number of out-links;
Award [3 max].
Local client-server architecture [1 max]
The server is the central communicator between clients (e.g. email/chat server)/allows different clients to access and manipulate data;
Cloud computing [1 max]
Cloud computing puts the focus on sharing computing resources over the internet;
Differences between the two [1 max]
Cloud computing is often offered as a service to individuals and companies whereas local client server architecture is based at an organizational level;
Cloud computing can scale up or down depending on current demands more easily than local client server networks;
Client / server networks are more secure than the cloud as the data transmission is carried out locally;
Client / server networks have lower levels of latency than the cloud as the data transmission is carried out locally;
Award [1 max].
Lossless (Compression);
Award [4 max].
Advantages of using compression [2 max]
Allows for more rapid upload/download as the compressed file is smaller than the original;
Scrolling through the coursework may be quicker;
Disadvantages of using compression [2 max]
This may mean that the overall quality of the work is reduced;
This may be an issue when printing the work / or the quality of the image is a key contributor to the overall quality of the work;
Overall comment [1 max]
The impact of using compression may be dependent on the context in which the work is compressed;
Award [2 max].
Interoperability means a computer program can communicate and exchange information across a range of platforms;
Open standards are publically and free standards that enable interoperability;
All candidates are familiar with search engines but not all were able to put together a precise definition that including both the role of the user and processes involved.
\nThis was a memory recall question and dependent on the schools' coverage of the course.
\nCandidates did not answer this well being unable to clearly distinguish between the two types of architecture. They seemed particularly unaware of the difference in scale.
\nThis was a familiar topic and was answered well. Full marks went to candidates who related their answers to the specific scenario.
\nThis was a familiar topic and was answered well. Full marks went to candidates who related their answers to the specific scenario.
\nAnother memory recall question at was answered quite well.
\nOutline what is meant by the term computer network.
\nAward [1] for identifying the nature of a network and [1] for a development of the first point up to [2 max].
\nA group of computers and other computing hardware devices that are linked together through communication channels/cables/wirelessly;
To enable communication (sharing files, sharing information) between systems/among a wide range of users;
Outline what is meant by a database management system.
\nOutline one advantage of using beta testing prior to the release of a new product.
\nAward [1] for identifying a feature of a database management system and [1] for an expansion up to [2 max].
\nDatabase management system is an application software;
that allows users to define/create/maintain a database / provides (controlled) access to the data;
Examples of database applications are computerized library, inventory, flight reservation, etc.;
Award [1] of using beta testing and [1] for an expansion up to [2 max].
\nBeta testing is done from the user/client perspective;
So, requirement mismatches can be easily identified;
The real users have an opportunity to test a new product before it is (publicly) released;
So, user acceptance is assured;
Any bugs identified could be (easily) fixed before the public release of the product;
So, quality of the product is enhanced;
The array DATA_ARR[]
is a one-dimensional array of 12 integers.
Algorithm 1 represents a method of searching the array DATA_ARR[]
to see if it contains a specific value.
Algorithm 1
\ninput TO_FIND\n
LIMIT = 11
LOC = FALSE
ITERATE = 0
loop while not LOC and ITERATE <= LIMIT
if DATA_ARR[ITERATE] = TO_FIND then
LOC = TRUE
end if
ITERATE = ITERATE + 1
end loop
if LOC then
output TO_FIND, \"is in the array\"
else
output TO_FIND, \"is NOT in the array\"
end if
Algorithm 2 represents an alternative method of searching the array DATA_ARR[]
to see if it contains a specific value.
Algorithm 2
\ninput TO_FIND\n
LOC = FALSE
LOW_LIM = 0
UP_LIM = 11
loop while LOW_LIM <= UP_LIM and LOC = FALSE
MID_VAL = (LOW_LIM + UP_LIM) div 2
if DATA_ARR[MID_VAL] = TO_FIND then
LOC = TRUE
else
if TO_FIND < DATA_ARR[MID_VAL] then
UP_LIM = MID_VAL - 1
else
LOW_LIM = MID_VAL + 1
end if
end if
end loop
if LOC = TRUE then
output TO_FIND, \"is in the array\"
else
output TO_FIND, \"is NOT in the array\"
end if
Copy and complete the trace table for Algorithm 1 using TO_FIND = 39
.
The first value of the first row has been done for you.
\nState the constant used in Algorithm 1.
\nCopy and complete the trace table for Algorithm 2 using TO_FIND = 50
.
The first two values of the first row have been done for you.
\nOutline why MID_VAL
could not be a constant.
Evaluate the use of a sequential search and a binary search including the advantages and disadvantages of each.
\nAward [4 max].
Award [1] for TO_FIND
and LOC
columns;
Award [1] for ITERATE
column;
Award [1] for DATA_ARR[ITERATE]
column;
Award [1] for the correct output;
Award [1 max].LIMIT
Award [4 max].
Award [1] for LOW_LIM
column;
Award [1] for UP_LIM
column;
Award [1] for MID_VAL
and DATA_ARR[MID_VAL]
columns;
Award [1] for TO_FIND
, LOC
and Output columns;
Award [1 max].
The value (of MID_VAL
) changes during the operation of the algorithm;
Award [5 max].
\nAward [3 max] for sequential search
The algorithm searches through every element in the array starting at the beginning and working through one after the other;
…until the required item is found;
This method is potentially slow if the data set is large and the required element is towards the end of the list;
The data does not need to be in any particular order;
Award [3 max] for binary search
The data must be sorted before it is stored;
After comparing the data set with the target data, half of the data can be discounted using a simple condition;
…enabling the target to be more quickly located;
Note to examiners: Big O notation is not on the syllabus so answers with reference to this are not expected, however, if this type of answer is seen, please allow, for example:
\nSequential: main disadvantage is O(N) so inefficient;
advantage is that it works with an unsorted array;
Binary search: main advantage is that it’s efficient as it’s O(log n);
disadvantage is that the array must be sorted (and so must be sortable – not all data has a defined sort order);
Binary search cannot be performed on a linked list but a sequential search can;
Candidates generally constructed the correct trace table for this question; however, marks were often lost by not providing the correct quantity of iterations for the trace, or by making errors in how the output would actually appear if the program ran.
\nThe vast majority of candidates correctly identified LIMIT as the constant in the algorithm.
\nCandidates generally performed less well on the trace for the second algorithm (binary search), with similar errors to the trace carried out in part (a). Also, as this algorithm required more processing, additional errors included incorrect calculations of the variables, leading to incorrect values being displayed in the trace table.
\nThe vast majority of candidates gave an appropriate reason why the variable MID_VAL could not be a constant in the given algorithm.
\nVirtually all candidates were able to evaluate the use of a sequential and a binary search, with many of these candidates achieving high or full marks. One point that was often missing form candidates’ responses, however, which is fundamental to the topic, was the need for the data to be sorted/ordered for a binary search to work.
\nArmour Hardware Company has the following data about salespersons and the quantities of items sold.
\nEach salesperson can sell many different products.
\nSALES_PERSON
\nOutline two reasons why databases are normalized.
\nOutline why the SALES_PERSON table is not in 1st Normal Form (1NF).
\nConstruct the 3rd Normal Form (3NF) of the unnormalized relation shown above.
\nOutline why it is necessary to ensure that referential integrity is maintained in databases.
\nOutline why a primary key may consist of more than one attribute.
\nAward [4 max].
Applications interacting with the database are minimally affected;
When a fully normalized database structure is extended, to accommodate new types of data, database structure can remain largely or entirely unchanged;
So, the applications interacting with the database are minimally affected;
Key dependent;
Every non-key column in every table is directly dependent on the key, the whole key and nothing but the key;
Thus making reduced redundancies, lesser anomalies and better efficiencies;
Mark as [2] and [2].
Award [2 max].
For First Normal Form, each attribute value should be atomic;
In the given example product_Num, Pro_Name, Unit_Price and Qty is multivalued / All 4 tuples shown have multiple values in their first 4 attributes;
Award [8 max].
Award [1] for each correct table up to [4 max].
Award [1] for each correct primary key up to [4 max].
3NF
Product_Number
Product_Number, Unit_Price, Product_Name
Sales_Person
Sales_Person_Number, Sales_Person_Name, Manager_Number
Manager
Manager_Number, Manager_Name
Purchases
Purchase_ID, Date_And_Time, Product_Number, Sales_Person_Number
Award [2 max].
You can enter foreign keys that do not match the corresponding primary key in the related table;
This could cause a lot of problems such as mismatched customer data and mismatched transaction records;
Cascading update;
If the primary key for a record in the Managers table changes, all corresponding records in the Employees table are modified;
Cascading delete;
If a record in the Managers table is deleted, all corresponding records in the Employees table are deleted;
Award [2 max].
The combination of the two provides unique identifiers for the records of the table;
And that there is no single attribute that is able to uniquely identify a record;
In a manner that will not lead to potential duplication of records;
It identifies exactly one record of the table, then that record shows the single value of each of the non-key attributes;
That is associated with the unique combination of the key attributes;
Most students were clear about normalisation in removing redundancy but only a few could identify reasons of key dependencies and interaction of the applications with the database.
\nMost students were able to identify why the data was not in First Normal Form but some of the students could not use the terms ‘atomic’ or ‘multi-valued’.
\nMost students are able to correctly split the tables but only a few identified the foreign keys. The primary keys were in most cases identified.
\nMany students could not explain the referential integrity.
\nMost students understood the composite keys and the need for them.
\nDirect observation is a technique used by a system analyst to determine user requirements for updating a computer system.
\nIdentify one advantage of direct observation.
\nIdentify one disadvantage of direct observation.
\nAward [1] for an advantage up to [1 max].
\nDirect observation is systematic/structured process;
Direct observation allows that current computer system can be studied in its natural setting;
Direct observation provides a better understanding of the way computer system is used;
etc.
Award [1] for a disadvantage up to [1 max].
\nDirect observation is susceptible to observer bias;
Direct observation also can affect the behavior of users/process being observed;
Direct observation is time consuming;
etc.
The growth of the Internet has led to increased levels of collaboration between different IB World Schools.
\nThe World World Web consisted of over 1350 million web pages in 2017. Each web page is accessed by typing its uniform resource locator (URL) into the address bar of the browser.
\nExplain why a distributed network such as the World Wide Web may act as a catalyst to increase the collaboration between different IB World Schools.
\nExplain one function of a web browser.
\nDescribe how a domain name server (DNS) functions.
\nExplain how the use of a distributed network, such as the World Wide Web, may lead to copyright and intellectual property issues.
\nAward [3 max].
The Internet is growing exponentially meaning that more and more nodes (in this case IB World Schools) can be added;
This has led to greater connectivity between the different nodes;
However, the number of hops required to transmit information from one node to another is growing linearly;
Therefore, each node can access the increased number of nodes with no discernible latency which makes increased levels of collaboration between these nodes possible and desirable;
Award [3 max].
Browser Retrieves a Web Page;
The web browser retrieves (or fetches) code, usually written in HTML (HyperText Markup Language) and other computer languages, from a web server;
Then, it interprets this code and displays it as a web page for you to view;
Browser acts as a bridge between URL and DNS;
The user inputs the URL / website domain name on web browser’s address bar;
The web browser passes this website domain name to a domain name server;
Award [3 max].
User type the domain name into the URL search area on the web browser and press “Enter” on the keyboard.
The domain name is intercepted by a “Domain Name Server” or DNS.
\nThe main function of the DNS is to look up in its database the domain name you have typed and find the matching IP address.
\nIt then forwards the request onwards, using this address.
\nIf it cannot find the IP address in its own database, it then contacts other Domain Name Servers until it finds it, or if it can't find it anywhere, it displays a “web site not found” message to you.
\nWhen the request reaches the destination, the pages are sent back.
\nAward [5 max].
Copyright issues [3 max]
Copyright issues may occur because of the ease of access to materials on the World Wide Web;
When material is accessed on the World Wide Web it may breach copyright rules in a number of ways (such as copying / publishing/ public display), often without the user realizing they have done so;
It may also be a potential issue of the user is not aware of the complicated and extensive copyright laws;
The continuing technical evolution of the web may mean that new practices emerge that may inadvertently breach existing copyright laws;
IP [3 max]
Potential IP issues may occur with web sites for a number of reasons such as being linked to copyright, trademarks, patents;
When material is downloaded it may breach IP rights;
When material is modified without author’s permission;
These IP rights may vary between countries which leads to some acts being an IP issue on one country, but not in another;
There were a lot of vague responses with few homing in on the fact that the \"distributed\" nature of the web was the key element.
\nBeing an \"explain\" question the answers required knowledge of \"how\" or \"why\". Not that many explained the importance of the translation feature of a browser.
\nMost candidates identified some of the steps involved but omitted to say that the IP address would be returned to the original browser.
\nThis wasn't particularly well-answered with few understanding the differences between intellectual property and copyright issues. Many alluded to the problems of identification but few included the idea that regulations differ from country to country.
\nConstruct a logic diagram for the following expression.
\nNOT A OR (A AND B)
\nAward [3 max].
\nAward [1] for a logic diagram representing A OR B with 2 inputs, 1 output and 3 logic gates.
Award [1] for the OR gate having 2 inputs, one of which is NOT A.
Award [1] for another input to the OR gate, which is A AND B.
An international company is in the process of moving its Head Office from Europe to Asia.
\nIdentify two possible compatibility issues as a part of data migration.
\nOutline how a virtual private network (VPN) will allow employees who are in Europe to communicate with the Head Office in Asia.
\nOutline one social issue associated with this process.
\nAward [1] for each possible compatibility issue identified up to [2 max].
\nLanguage differences/different character set;
Different conventions of representing various data/currencies, dates, etc.;
Incompatible software/incompatible hardware;
Award [1] for identifying how VPN will allow employees to communicate and [1]for a development up to [2 max].
\nVPN allows secure communication with the Head Office in Asia;
A VPN is the company’s private network that uses a public network (in this situation the Internet) to connect remote sites/employees together;
Privacy is protected using VPN tunneling;
VPN uses encrypted connections routed through the Internet from the company's private network (Europe)to the remote site in Asia (or employee);
Hiding IP addresses to prevent unwanted exposure and data leaks;
Data security is ensured by encryption – anyone intercepting the encrypted data cannot read it;
Award [1] for identifying an issue and [1] for an expansion up to [2 max].
\nEmployees who will not be willing to move to Asia;
Lost jobs / finding new job / income decreased;
Employees who will move to Asia;
Personal or family issues during the period of moving or in a new environment / finances and cost of living / services such as schools, hospitals, transport / language problems;
The rise in global temperatures has led to the melting of the sea ice in polar regions. Scientists have developed a number of computer models that can be used to make predictions about the rate of sea ice melting in these polar regions and its effect on coastal areas globally. In order to create a computer model a number of variables are identified.
\nA computer model of the effects of the melting of the sea ice in the Arctic Ocean may include the following variables:
\nIn this model the following rules have been determined:
\nThe initial values are:
\nThe scientists observed when running the model numerous times using historical data there were significant differences between observed and expected results.
\nA second model was developed that included new variables and rules.
\nThe surface of the ocean reflects the heat from the sun. The ratio between the area covered by the sea ice and the area where there is no sea ice (open ocean) affects the value of the average albedo. The lower the albedo, the quicker the sea ice will melt.
\nThe average albedo is calculated using this formula:
\nAverage albedo =
\n\nNote:
\nThe average albedo will change with every iteration of the model. Each iteration is 2 years after the previous.
\nThe rules for the model are:
\nCopy and complete the following table showing each variable’s data type and a suitable range of values that would represent the information shown above.
\nUsing the rules and initial values above, construct the pseudocode that would enable the area of the sea ice and the sea level rise to be calculated if there was an increase of 0.04 °C in the ocean surface temperature.
\nUsing the information above state the area of the sea ice.
\nUsing the information above state the change in sea level.
\nUsing the formula, rules and initial data given above, construct the pseudocode that would calculate the year that the area of sea ice will be less than 10 000 km2.
\nIdentify two ways that this model could be implemented.
\nExplain why the accuracy of the simulation in predicting the area of the sea ice is critical.
\nAward [3 max].
Award [4 max].
Initialization – Original area of sea ice;
Initialization – Surface temperature change;
New sea ice area calculation;
Sea level change calculation;
Example algorithm:
\nOriginalSeaIceArea = 1000000\n
SurfaceTempChange = 0.04
NewSeaIceArea = OriginalSeaIceArea * (1 – SurfaceTempChange)
SeaLevelChange = -(NewSeaIceArea - OriginalSeaIceArea) / OriginalSeaIceArea * 100 * 20
Award [1 max].
960 000 (km2);
Award [1 max].
80 (mm);
Award [7 max].
Initialization – Initial areas of Ice and water, and starting year;
Use of loop;
Loop parameters (limits, condition, increment, end statement correct);
Average albedo;
Rate of decrease calculation;
Area of ice update calculation;
Area of open water update calculation;
Output;
Example algorithm:
\nIceArea = 1000000\n
OpenArea = 1000000
Year = 2019
Loop While IceArea > 10000
TotalArea = IceArea + OpenArea
AveAlbedo = ((IceArea * 0.6) + (OpenArea * 0.1)) / (IceArea + OpenArea)
Decrease = 0.3 / (AveAlbedo * AveAlbedo)
// allow Decrease = 0.3 / AveAlbedo ^ 2
IceArea = IceArea * (1 − (0.01 * Decrease))
OpenArea = TotalArea − IceArea
Year = Year + 2
End loop
Output \"Date when there less than 10 000km2 of ice in the ocean
is \" Year
Award [2 max].
Spreadsheets;
IDEs using code;
Award [3 max].
If the calculation of the rate of reduction of the sea ice is inaccurate the calculation of the amount of sea ice remaining;
At a given time will turn out to be wrong;
So, work to correct the problems may be too little/too great;
The year in which the sea ice is predicted to be 10 000 km2;
Will be wrong;
So, ice coverage may be more/less than expected in the calculated year;
Most candidates recognized this as a straightforward question. However, some candidates were unable to demonstrate the concept of data types and range of values for given variables.
\nThis question was reasonably well answered and most candidates were able to produce some pseudocode. However, a few candidates struggled to apply all the required formulae and couldn’t produce all the required values.
\nThe question was answered correctly by most of the candidates.
\nThe question was answered correctly by most of the candidates.
\nThe vast majority of candidates could not produce the correct pseudocode to calculate all the required values.
\nThe skill to apply a loop in this question was poorly demonstrated by most of the candidates.
\nThe question was not well understood by the majority of the candidates. Most of the responses were generic and off course.
\nMost candidates did not answer the question appropriately and focused more on generic points rather than being specific to the scenario.
\nState three operating system resource management techniques.
\nAward [3 max]
scheduling;
policies;
multitasking;
virtual memory;
paging;
interrupt;
polling;
A well answered question.
\nTo improve customer satisfaction, a supermarket chain wants to create an object-oriented program (OOP) to simulate the lines of customers at the check-outs in their point of sale (POS) system.
\nThis point of sale (POS) system consists of several check-out counters. After filling their shopping carts with items, customers line up at one of the check-out counters. In most cases, they wait in line until it is their turn to pay.
\nThree real-world objects are implemented using the following classes:
\nThe UML diagram for the class POSline
is provided below.
State the relationship between the POSsystem
and POSline
objects.
Draw a diagram to show the relationship between the objects POSsystem
, POSline
and Cart
. You are not required to draw a complete UML diagram.
Define the term identifier.
\nDistinguish between a class and an instantiation. You must make reference to the UML provided.
\nState the code fragment that instantiates an array line
of 20 Cart
objects.
Construct the method public void joinLine(Cart newCart)
that adds a newCart
to line
in the next empty array
location. You may assume that line
is not full.
Construct the method public Cart leaveLine(int n)
that removes the cart at position n
from line
by shifting down all the array entries bigger than n
, before returning the indicated Cart
object. You may assume that a cart exists at position n
.
Award [1 max].
Aggregation;
POSsystem has a (many) POSline(s);
Allow 1 to many;
Award [2 max].
Award [1] for one POSsystem connecting to multiple POSlines;
Award [1] for one POSline connecting to multiple Carts;
Example answer:
\n\n
Allow diagram showing aggregation for both (diamond at POSsystem end or 1 to many)
\nAward [1 max].
The (unique) name of a program element (variable / method / class);
Must have “name” or equivalent.
Award [3 max]. [1 mark each] for definitions of a class and an object and [1 mark] for an example relating to the UML diagram that involves both class and object for either the POSline or the Cart classes.
\nThe class is the blueprint / template of an object / defines the actions and properties of an object / an abstract representation of an object;
An instantiation is the (creation of an) actual object / example of an object / object filled with data / assigned space in memory;
The class POSline
stores instantiated objects of the Cart
class;
The class POSline
uses the constructor to set the (object’s) variables;
An instance of POSline
has values for id, active and line;
Allow similar example for the Cart object;
Award [2 max].
Award [1] for using new
;
Award [1] for Cart[20]
;
Allow with or without private
.
private Cart[] line = new Cart[20];
Award [3 max].
Award [1] for correct loop construction (for a while loop this includes initialization and incrementation);
Award [1] for correct condition (can be within the loop construct);
Award [1] for correct assignment;
public void joinLine(Cart newCart){\n
int i=0;
while (this.line[i] != null) {i++;}
this.line[i] = newCart;
}
Notes: Do not penalize the absence of the keyword “this” in any question.
With for loops, allow variations of line.length() – mark the logic
Further examples:
Note: if the answer takes size of array into account then the given condition must be correct.
public void joinLine(Cart newCart)\n
{
int i=0;
boolean placed = false;
while (i<20 && placed = false)
{
if this.line[i]= null;
{
this.line[i] = newCart;
placed = true;
}
i = i+1;
{
}
public void joinLine(Cart newCart)
{
for (int i; i<20; i++)
{
if (this.line[i] == null)
{
this.line[i] = newCart;
break;
}
{
}
Award [4 max].
Award [1] for declaring, initialising and returning a Cart
variable;
Award [1] for correct loop (including initialisation and incrementation);
Award [1] for assigning / shifting;
Award [1] for assigning line[19]
to null;
public Cart leaveLine(int n){ // given in the stem\n
Cart result = this.line[n];
for (int i=n; i<19; i++){
this.line[i] = this.line[i+1];
}
this.line[19] = null;
return result;
}
This was well-answered.
\nThose who answered part (a) correctly tended to answer this well. Most used uml diagrams to show the relationships either with words or by using the correct arrows.
\nGenerally well-answered.
\nThis was one of several questions in which reference to the scenario was required. This is to reward the candidates' understanding as opposed to simple memory recall. Not all candidates managed to make this connection.
\nThese 3 question parts tended to divide the candidates into those who were comfortable with OOP construction as those who weren't. To a certain extent this seemed to be school dependent.
\nStraight-forward for those competent with Java.
\nThese 3 question parts tended to divide the candidates into those who were comfortable with OOP construction as those who weren't. To a certain extent this seemed to be school dependent.
\nGenerally well-answered, helped partly by the assumption that the array was not full. It was particularly pleasing to see the answers that included a while loop as candidates seem to be reluctant to use this type of loop construction even when logically it makes sense to do so.
\nThese 3 question parts tended to divide the candidates into those who were comfortable with OOP construction as those who weren't. To a certain extent this seemed to be school dependent.
\nFew managed to achieve full marks as four separate operations were required. The assignment statement was linked to the loop conditions there were interesting variations - but is was essential not to try to access an array index that was out of bounds and therefore did not exist. Many omitted setting the last value to null.
\nIdentify one characteristic of a queue.
\nIdentify one application of a queue.
\nAward [1 max]
A linear (abstract) data structure;
First in First out/FIFO;
Elements can only be added at one end(rear/tail) and removed from the other (front/head);
Once a new element is inserted into the queue (enqueue), all the elements inserted before the new element in the queue must be removed (dequeue), to remove the new element;
Award [1 max]
Print queue;
CPU task scheduling;
Simulation of a real-life scenario (call centre, supermarket queue);
Playlist queue;
Interrupt queues;
Queues in routers and switches;
Mail queues;
Buffers in devices like keyboard;
Website traffic;
Note to examiners: Reward other reasonable responses.
\nMany candidates correctly answered this question.
\nMany candidates correctly answered this question.
\nDescribe how data is transmitted by packet switching.
\nAward [4 max].
\nPacket switching entails data being separated into specially formatted units (packets);
Each packet contains data and information such as packet number, address that identifies the sending computer and intended recipient, etc.;
Packets are routed from source to destination using (different) network switches and routers;
Using these addresses, network switches and routers determine how best to transfer the packet on the path to its destination;
Packets are reassembled at the destination (using packet numbers);
If any of packets is missing it should be retransmitted;
Construct a trace table for the following algorithm
\nA = 3\n
B = 7
loop while B >= A
A = A + 1
output(B − A)
B = B − 1
end loop
Award [4 max].
\nAward [1] for a trace table with at least three columns.
Award [1] for each correct column (out of the four columns − A, B, B >= A, output).
Define the term child in relation to a binary tree.
\nAward [2 max]
Child (is either null or) is a node that has up to two references /links to other nodes;
and has (only) one predecessor (parent) node;
“Child” is every node in a binary tree which is descendant/ the node which has a link from its predecessor (the node which is a predecessor of any node is called as parent node);
The child node can have up to two descendants (child nodes);
(All the nodes except the node which is the origin of the binary tree data structure (called root) are child nodes;)
This question generated responses that were a little vague.
\nDistinguish between random access memory (RAM) and read only memory (ROM).
\nOutline the function of an operating system in managing primary memory.
\nExplain the roles of the data bus and the address bus in the machine instruction cycle.
\nState how the data stored in the byte will be represented in hexadecimal.
\nState how many integers could be represented in this byte.
\nOutline why this byte could not be used to represent characters such as those used in Chinese.
\nConstruct a truth table with two input variables. If the input variables are equal the value of the output variable should be True, otherwise it should be False.
\nAward [3 max].
\nRAM acts as temporary storage of data, instructions and programs currently running (for the operating system and for the running applications) whilst ROM is permanent memory (stores the instructions and data that won't change/stores the instructions that the computer needs in order to boot up;
Memory access, both read and write operations are performed on RAM whilst ROM works with read only operation;
If power failures happened during access to RAM then all data will be permanently lost/RAM is volatile memory/whilst if power failure happened during the ROM access no data will be lost/ROM is non-volatile memory;
Award [1] for the answer saying that the function of OS in primary memory management is allocation of specific memory blocks to individual programs and [1] for reallocation up to [2 max].
\nA part of the OS (memory manager) assigns that block of memory to the program when a running program requests a block of memory;
When the program no longer needs the data in previously allocated memory blocks, they become available for reassignment;
OS ensures the availability of adequate memory for data structures/objects of each running program at all times;
By allocating the memory portions to programs after freeing the space (of the computer memory);
OS (memory management unit) uses virtual memory which provides secondary memory (external storage) for program that does not have enough space in RAM for execution;
After execution of the program this memory is reallocated (used by other programs)/freed;
Note to examiners: Award only [1] an answer such as “OS maintains file allocation table”.
\nAward [4 max].
\nBus is defined as a system that transfers data between hardware components/data bus and address bus enable a processor to communicate with the primary memory;
When the computer processor needs to fetch an instruction from the memory it uses the address bus to specify the (physical) address (of the memory block it needs to access);
It will get the data from (the specific) memory (block) (after checking the address bus to get the read address);
And then it will place this data on to the data bus/data bus carries the data;
When the processor wants to store results of execution to the memory it will set the write address on the address bus;
And put the data/results/to be written to memory on to the data bus (to carry this data);
Award [1 max].
5E;
Award [1 max].
\n28/256;
\nAward [1] for identifying why this byte could not be used to represent characters such as those in Chinese and [1] for an expansion up to [2 max].
\nThe characters must be represented as numbers so that computer can deal with them;
One byte (gives us the ability to represent only 256 characters) is enough to hold every possible character in a language which uses a limited set of text symbols, punctuation marks and special characters (for example, English, Spanish, etc.);
Chinese exceeds the 256 character limit and therefore requires more bytes to represent all of the characters in this language;
Award [2 max].
\nAward [1] for all four input combinations (A,B).
Award [1] for all four correct output values (C).
Note: 1 == True, 0 == False.
Cars have many automated features to improve the driving experience. One example is the use of headlights that automatically switch on and off.
\nSome cars have adaptive cruise control. This uses RADAR technology and a processor to ensure the car stays the same distance away from the car in front.
\nA system with many functions operating independently could be managed using either centralized or decentralized processing.
\nAs vehicles become fully autonomous (self-driving), ethical considerations must be taken into account when designing software.
\nState one input device used by the automated headlights.
\nExplain how the interaction between the inputs, processing and the outputs of the feedback loop ensure the car stays the same distance away from the car in front.
\nDiscuss the use of centralized and decentralized processing in the context of control systems such as those involved in the operation of motor vehicles.
\nExplain one ethical concern that must be considered in the development of autonomous vehicles.
\nAward [1 max]
photoelectric sensor;
light sensor;
Award [6 max]
Sensor (continuously) collecting data (related to the distance between the two vehicles);
Data is converted to digital using ADC…;
…and sent to the processor;
Processor has access to pre-set data (minimum distance required between the two cars);
Processor compares the input data against stored/pre-set data;
If the vehicle is too close, the processor sends a signal to an actuator to apply the brakes/ an output signal (for example, warning light on the dashboard/ audible warning) to the driver to apply break;
If the car has fallen back from the car in front, the processor sends a signal to an actuator to apply acceleration/ an output signal to the driver to apply acceleration;
This process is constantly looped (feedback loop);
Award [5 max]
Award [2 max] for centralised processing
Centralized processing would allow the different features of the car to be controlled by a single processor;
… this means that different features of the car are less likely to impact on the operation of other features, as the central processor can coordinate them;
Award [2 max] for decentralised / distributed processing
Decentralized processing allows each of the car’s features to have its own processor;
… enabling each feature to function independently/more quickly;
Award [1 max] for concluding statement
Centralized processing is more complex for the manufacturer to program, but is possibly safer as the different components coordinate;
Centralised processing is more expensive to achieve as the whole system needs to be coordinated in real time;
Decentralised processing has a faster response (time due to the use of multiple smaller PLCs);
Decentralised processing is simpler/cheaper for the car manufacturer as they can use standard parts that are already programmed, but it is more difficult to get them to coordinate with each other;
Decentralised processing allows scalability, the subsystems can be easily customised;
A crash in a centralized system would result in failure of the whole system / a critical system failure so would have far greater consequences than in a decentralized system where the system may be able to partially function hence are riskier than decentralized ones;
Award [3 max]
Autonomous vehicles can be seen as more dangerous to pedestrians/cyclists;
…as they have to be programmed to react to avoid unpredictable movements from them;
The ethical consideration is how might the processor decide whether to avoid the cyclist to hit a pedestrian instead (trolley problem);
When autonomous vehicle control systems are perfected;
… they should be safer than human drivers;
… it may then be an ethical consideration as to whether a human who cannot drive should be the responsible person in the autonomous vehicle?;
An autonomous driving system could collect detailed information about the movements of the car;
… this information could reveal where individuals go, and raise privacy concerns;
… which could be exploited for commercial gain/ be considered as a form of surveillance (an ethical consideration);
There may be times when an accident is unavoidable (the trolley problem);
The autonomous vehicle has to make a ‘decision’ about who to hit;
In this case is the driver, the manufacturer, the software engineer or the third party accountable?;
Note to examiners: accept other reasonable answers.
\nThis question was reasonably answered except by weaker candidates
\nSome candidates failed to achieve full marks as result of incomplete and vague answers.
\nSome candidates demonstrated poor understanding of control systems.
\nMany responses to part (b) were verbose while missing crucial information that would award the mark.
\nMany health agencies are using simulations in an attempt to understand how their resources could be used in the future. With many countries experiencing aging populations, health agencies have worked with computer scientists to develop simulations that will enable them to manage their resources more effectively.
\nOne of the key features of these simulations is the development of “what-if” models.
\nThe following variables can be considered as part of a model to be used to simulate the management of an aging population:
\nDescribe the main features of a “what-if” model.
\nIdentify three other variables that could be included in this model.
\nExplain the ethical issues that may arise from the collection of information for this model.
\nExplain why the model would be converted to a simulation.
\nAward [4 max].
Data is entered into a rule-based environment;
The rules may be kept the same and the nature of the data input may be varied;
Or the data that is input may remain the same and the rules may be varied;
Which allows for a range of possible scenarios to be investigated;
Award [3 max].
Life expectancy;
Gender;
Availability of life-extending treatments;
Genetic information;
Allow other appropriate answers.
\nAward [5 max].
\nExample answer:
One ethical issue is invasion of privacy;
to get the best quality model;
sensitive personal data will need to be collected;
trade-off between the benefits of this model and level of intrusion into people's lives;
especially if the data is being shared with third parties;
Award [3 max].
Simulation may be used to handle uncertainty and provide ranges of expected outputs; e.g. repeatedly inputting data drawn from random samples of plausible input values;
To look at the predicted spread of outcomes over time (consider the use of simulation in the analysis of queues);
A simulation is considered to be a representation of a model over time;
This means that the simulation can be used over a longer period of the development life cycle;
It can be used to assist with stages such as the implementation stage;
Many candidates did not address the specific points related to a “what-if” model and provided a generic description of the model.
\nThis question was relatively well done. Most candidates were able to identify the correct set of variables.
\nMany candidates were able to identify and explain suitable ethical issues. A relatively small number of candidates had difficulty in developing their responses beyond generic points.
\nMost responses tended to be generic. Candidates were unable to explain why the model would be converted to a simulation.
\nThe supermarket chain wants to use this OOP simulation to experiment with different ways of organizing their check-out system. For example, it is possible to have different check-out counters such as cash-only or card only, or to have check-out counters for ten items or fewer.
\nIt is also possible to have one line that serves a number of check-out counters.
\nDefine the term inheritance.
\nExplain one advantage of the OOP feature “inheritance” with reference to this scenario.
\nDescribe two advantages of using libraries of classes.
\nOutline two reasons why the use of multiple programming teams in different locations may be problematic when developing an integrated software solution.
\nAward [2 max].
A new class is derived from an existing class;
The new class inherits all variables/data/properties and methods/behaviours of the other class;
The derived class is called a subclass/child, and the original is called a superclass/parent;
Award [3 max].
Award [1] for an advantage;
Award [1] for some elaboration;
Award [1] for a reference to the context;
Note: to a certain extent mixing and matching can take place
\nIt promotes code reuse;
because the superclass POSline
;
holds common data and actions that are shared by all newly developed classes;
It reduces maintenance overhead;
because you only have to update the superclass;
in this case POSline
;
allows extensibility / ability to create other classes easily;
specific types of check-out can be created;
reducing development time / costs / testing;
Award [4 max].
Saves development time;
Since classes and their methods do not need to be rewritten;
Promotes abstraction;
Because reusable code exists that functions without knowledge of internal working;
Libraries contain error-free / robust code;
because it has been used and tested many times;
Promotes efficiency / organization;
As code will be shorter / easier to read / develop;
Familiarity with libraries;
Allow for easier maintenance / modification;
Mark as [2] and [2].
\nAward [4 max]. Mark as 4 separate points.
Teams may be located in different countries;
therefore have communication issues;
due to different languages;
or different time zones;
inability to discuss face-to-face;
Problems with different conventions (e.g. date format);
Managing the teams in different locations may be problematic (allow example);
Teams may not collaborate well due to personality issues;
Development time might increase;
Due to time lags between communications;
15(a)-(e) dealt with more general aspects of OOP. Candidates should look carefully at the wording in each question as to whether an explanation or description is required and at the number of examples/reasons etc. that are requested, as these aspects affect the way they should answer.
\nPart (a) was a straight-forward definition.
\n(b) asked for an explanation related to the scenario described. It should be clear from this type of question that full marks cannot be achieved if the scenario is not considered.
\nCandidates generally answered the question on libraries well. Clearly candidates who have had extensive practical experience of coding with libraries would have been better prepared for this type of question.
\nThe candidates generally came up with at least one appropriate reason.
\nThe flowchart below represents an algorithm that allows a user to enter the number of sides, length of side and apothem (see diagram below) for a regular polygon. It then calculates and outputs the area and perimeter of this shape.
\nWorked example: a regular hexagon
\nNumber of sides = 6
\nLength of side = 10 cm
\nApothem = 8.66 cm
\nPerimeter = Number of sides × Length of side
\n= 6 × 10
\n= 60 cm
\nArea =
\n
=
= 259.8 cm2
\nFrom the flowchart, pseudocode is to be created that will include sub‑programs to calculate and return the perimeter and area of the shape.
\nConstruct pseudocode for the body of the following sub-program to calculate and return the perimeter of the shape.
\nSUB_PERIMETER(NUM_SIDES, LENGTH_SIDE)\n
// Pseudocode to be added
end SUB_PERIMETER
Construct a similar sub-program to the one in part (i) to calculate and return the area of the shape.
\nYou must use an appropriate name for the sub-program and appropriate names for the parameters.
\nConstruct pseudocode based on the flowchart to collect input from the user, call the sub-programs created in parts (i) and (ii), and output the results.
\nWithout using pseudocode, explain how your algorithms could be altered to also find the area and circumference of a circle.
\nNote:
\nArea of circle = 2
\nCircumference of circle = 2
\nAward [2 max]
Award [1] for a correct formula that uses the passed arguments;
Award [1] for a return statement;
Example 1:
\nSUB_PERIMETER(NUM_SIDES, LENGTH_SIDE)\n
//Pseudocode to be added
return NUM_SIDES * LENGTH_SIDE
End SUB_PERIMETER
Award [4 max]
Award [1] for a correct sub-program (function) defined with end statement;
Award [1] for the correct arguments passed;
Award [1] for the correct use of return;
Award [1] for the correct formula used;
Example 1:
\nSUB_AREA(PERIM, APOTHEM)\n
AREA = PERIM * APOTHEM / 2
return AREA
end SUB_AREA
Award [5 max]
Award [1] for all three correct inputs;
Award [1] for all three inputs with appropriate prompts;
Award [1] for the correct definition of PERIM
;
Award [1] for the correct call of perimeter sub-program, including variables/arguments passed;
Award [1] for the correct call of area sub-program, including variables/arguments passed;
Award [1] for the return/output of both values;
Example 1:
\n//Main Program\n
output \"Number of sides?\"
input NUM_SIDES
output \"Length of each side?\"
input LENGTH_SIDE
output \"Length of apothem?\"
input APOTHEM
PERIM = SUB_PERIMETER(NUM_SIDES, LENGTH_SIDE)
output \"Perimeter is \", PERIM
output \"Area is \", SUB_AREA(PERIM, APOTHEM)
Award [4 max]
\nAward [1] for determining whether the shape is a polygon or a circle
Award [1] for inputting the radius (if a circle);
Award [1] for the creation of new subprogram (for area) OR
changing values of input parameters for the existing one (SUB_AREA ) OR
the calculation using correct formula (as given in the question paper PI * RADIUS * RADIUS)
Award [1] for the creation of a new subprogram (for circumference) OR
appropriately changing values of input parameters to the existing one (SUB_PERIMETER ) OR
the calculation using formula (as given in the question paper 2*PI * RADIUS)
Award [1] for calling both subprograms / outputting both values
Award [1] if after the alteration of the algorithm, it should still be able to calculate the area and the perimeter of the polygon as well as the area and the circumference of the circle
Example answer 1 (with existing subprograms, after inputting the three values: NUM_SIDES, LENGTH_SIDE, APOTHEM):
check if the inputted value for the NUM_SIDES is 1 or 0 (then the shape is a circle);
then inputted value for LENGTH_SIDE is to be used as radius;
2*3.14 should be set as NUM_SIDES and LENGTH_SIDE as APOTHEM;
call already written sub-programs(SUB_AREA and SUB_PERIMETER) so that algorithm calculates/finds correct area of circle and circumference;
if the shape is not a circle then code (as in Part(a)) for the polygon ( no other changes needed);
Example answer 2 (with new subprograms for area and circumference created):
construct two new sub-programs (for example, getCircleArea and getCircumference) ;
(in the main program) ask the user if the shape is a polygon or a circle;
if it is a polygon then code is as written in part a (no changes);
if it is a circle then ask the user to input the radius;
call both new subprograms to output area and circumference/ call the getCircleArea(radius) to find area and getCircumference(radius) sub-program to find circumference;
Example answer 3 (with simple if statement and formulas given in the question paper):
ask user to input if the shape is circle and use if statement to check this input value;
if not circle then code for the polygon (as written in part a);
otherwise (it is circle!) input radius;
calculate area;
and circumference using formulas given in the question;
Note to examiners: there may be other examples of correct answers.
\nSome candidates constructed excellent algorithms in part (a).
\nSome candidates showed little or no ability at algorithm construction.
\nSome candidates did not correctly call subprograms in part (a)(iii).
\nAn old set of 2D animated cartoons from the 1940s has been discovered and it is decided to modify them to turn them into 3D animation.
\nDefine the term visualization.
\nOutline the need for rendering in the creation of the animated 3D characters.
\nExplain two technical implications of implementing a 3D animation in this way.
\nThe creation of a human interpretable image from data;
\nAward [2 max].
The characters are defined as mathematical models;
They will need rendering to give a 3D effect;
Each movement will need to be fluid;
The animation is less interesting with flat figures;
Allow mark for explanation of rendering.
\nAward [6 max].
Rendering for non-interactive media such as animations is a much slower process than for interactive media/games;
Rendering times for individual frames may vary from a few seconds to days depending on the complexity of the scene;
Rendered frames are stored to a hard disk and then transferred to other media for playback;
3D rendering is computationally resource hungry;
Computer processing power has increased rapidly and greatly over the years;
Allowing a much higher degree of photorealism / realistic rendering;
The question was reasonably well answered by majority of the candidates.
\nMost answers tended to be superficial and generic in nature. The responses were mostly focused on a description of rendering rather than why it was important in the process.
\nMost candidates focused on explaining the process of rendering and creating 3D animation rather than technical implications of doing so.
\nWhen the number of customers in the supermarket is low, some check-out counters will close. When there are many customers waiting, a new check-out counter will open.
\nWhen a new check-out counter opens, some customers from the nearest line will choose to move their carts to this check-out counter.
\nFor this simulation, the assumption is made that every second cart in the old line will move to the new line and the other carts will remain in the original line.
\nOutline why the variable active
in the UML of the class POSline
was defined as a boolean data type.
Construct the code for a method split
(part of the class POSsystem
), that takes an existing, non-empty POSline
as a parameter. It should copy every second cart from the original line into a new line. Afterwards it should delete every second cart from the original line.
An example call in POSsystem
would be: POSline number2 = split(number1)
, where number1
is an existing POSline
.
You may use any method declared or developed.
\nAs a result of the simulation, the company has decided to create a new POS system for their supermarkets.
\nThere have been discussions about adapting existing open source code when developing modules of the new POS system.
\nDescribe two ethical issues that may arise if modules of the new POS system are developed from open source code.
\nAward [2 max]. active
indicates that a POS counter is either open (true) or closed (false);
boolean uses the least memory space / one bit to represent this data;
Award [8 max].
Award [1] for a correct method header;
Award [1] for correctly declaring and returning a new POSline
variable;
Award [1] for attempting to use modulo division / declaring and initialising a flag;
Award [1] for a loop with one correct terminal condition, including increment of i;
Award [1] for the second correct loop condition;
Award [1] for correctly checking that i is odd / checking and setting the flag;
Award [1] for copying a cart from the original line;
Award [1] for correctly adding every second cart to the new line;
Award [1] for a reasonable attempt at removing every second cart;
Award [1] for correctly removing every second cart from the original line;
public POSline split(POSline oldLine){\n
POSline newLine = new POSline();
Cart temp; // optional, see below
int i=0;
boolean remove=false;
while((i<20)&&(oldLine.getLine(i)!=null)){
if (remove) {
temp = oldLine.getLine(i); // can be combined
newLine.joinLine(temp);
}
remove = !remove;
i++;
}
remove=false;
while((i<20)&&(oldLine.getLine(i)!=null)){
if (remove) {
temp = oldLine.leaveLine(i)); // shifts carts
remove = !remove;
}
else{
i++;
}
}
return newLine;
}
Example answer using modulo division (MOD):
\npublic POSline split(POSline oldLine){\n
POSline newLine = new POSline();
int i=0;
while((i<20)&&(oldLine.getLine(i)!=null)){
if (i%2==1) {
newLine.joinLine(oldLine.getLine(i));//combined
}
i++;
}
while(i>0){ // must be reverse order
if (i%2==1) {
temp = oldLine.leaveLine(i);
}
i--;
}
return newLine;
}
Example answer using a flag that combines both copy and remove actions (not anticipated):
\npublic POSline split(POSline oldLine){\n
POSline newLine = new POSline();
int i=0;
boolean flag=false;
while((i<20)&&(oldLine.getLine(i)!=null)){
if (flag) {
newLine.joinLine(oldLine.leaveLine(i));
}
else i++;
flag = !flag;
}
return newLine;
}
Award [4 max].
(Any) software can be considered as a form of Intellectual property;
Company should consider whether there is a need to acknowledge the work of other programmers (don’t accept answers talking about plagiarism);
Open source software may have undergone many changes from the original;
So adequate testing of the final product must take place;
to prevent any malfunction that will affect their customers;
The company will be promoting the spread of open source software;
Helping to break the monopolies of the major IT companies;
To the benefit of people / countries with reduced financial resources;
The use of open-source software means that the code can (more easily) be read/understood/ hacked by others;
Leading to possible data breaches for their customers;
Code may contain malware;
Leading to possible data breaches for their customers;
Using open-source software results in less work for programmers;
This affecting their livelihood;
Mark as [2] and [2].
\nNotes:
- Award 2 marks for a valid issue if a detailed discussion has been provided
- Only give credit for issues that have some ethical connection
Most referred to the fact that only two states were possible but did not link this into saving of memory.
\nThe most difficult questions on the paper for SL candidates. This was a good test for the better programmers, but many candidates struggled with the logic. Two separate methods of processing every other value were seen in the answers: the use of the modulo function and incrementing the loop by 2. The use of previously defined methods was suggested, and many candidates did just that.
\nThe candidates appeared unprepared for this question but most described at least one valid ethical issue.
\nOutline the need for higher level languages.
\nExplain two benefits of using sub-procedures within a computer program.
\nIdentify three characteristics of a collection.
\nCollection NUMBERS
already exists and stores real numbers.
Construct in pseudocode an algorithm, using the access methods of a collection, which will iterate through the collection NUMBERS
and count how many elements stored in the collection are in the interval [−1,1].
The final answer should be output.
\nAward [1] for the answer identifying improved programmer productivity and [1] for making reference to machine independence up to [2 max].
\nHigh-level language(HLL) provides statements (for example, high level if
(…), while
(…) , etc.) which are not dependent on the specific machine / and ability to create various data structures;
Which saves the programmer’s time;
Higher level languages are closer to human language;
So programmers find them easier to understand/work with than lower level languages;
HLL saves programmer from knowing details of computer architecture (and using all the specific (machine) instructions);
So giving more time to creating/developing the best way of coding a problem/process of coding is simpler and more understandable;
Award [4 max].
Mark as [2] and [2].
Award [1] for an answer stressing the usefulness of sub-procedures in any of the following:
Program organization;
Program coding;
Program testing;
Maintenance;
etc.
Award [1] for the expansion up to [2 max].
\nProblem could be divided into smaller/easier parts;
Which means solving easier/smaller parts of the problem for one programmer;
Or for a team of programmers, each programmer could work on different smaller parts;
Simpler testing;
Each part of the program could be separately tested;
By the programmer who created the code or someone else in the team of programmers;
Reusable code;
Sub-procedures already written/tested could be used in various programs;
Simpler maintenance and changes;
Could be done only on required sub-programs;
Award [3 max].
\nAward [1] for data structure implementation/objects/elements of collections.
Award [1] for algorithms/methods/callback functions.
Award [1] for showing that collection reduces programming effort / increases performance (by providing efficient implementations of data structures and algorithms).
Award marks for description of a specific example collections (in Java or any other programming language) such as arrays, dictionaries, sets, lists, trees (they have some characteristics in common, but also each of them has different way of organizing the data elements/objects they contain).
\nCollection is a container of discrete values;
Usually of the same type (primitive data values and also some other data structures);
(But) collection objects can be of different types (pointers afford a flexibility and thus collection objects permit references to any data structure as well as to primitive values);
Collections have a set of methods that define operations performed on the elements/objects of that collection;
Such as adding/removing elements to/from collection, comparing elements of collection, searching, etc.;
Which reduces programming effort (because implementations of data structures and algorithms are provided);
Which increases performance of the program (because efficient implementations are provided);
Award [6 max].
\nAward [1] for initialization and for outputting correct result (COUNTER).
Award [1] for using collection methods.
Award [1] for correct loop.
Award [1] for retrieving a number (ELEMENT
) from the collection.
Award [1] for if statement within the loop.
Award [1] for correct condition in if statement.
Award [1] for increasing COUNTER
if needed.
Example answer:
\nCOUNTER = 0\n
NUMBERS.resetNext()
loop while NUMBERS.hasNext()
ELEMENT = NUMBERS.getNext()
if ELEMENT >= −1 and ELEMENT <= 1 then // abs(ELEMENT) <= 1
COUNTER = COUNTER + 1
end if
end loop
output COUNTER
Note: be flexible over the method names. For example, NUMBERS.getData() is acceptable instead of NUMBERS.getNext()
.
Reverse Polish notation (RPN) is a method used to represent mathematical expressions so they can be evaluated without the need for parentheses.
\nAn expression written in this form is known as postfix notation, whereas an expression written the traditional way is known as infix notation.
\nFor example:
\nInfix notation: (8 − 5) * 7
Postfix notation: 8 5 − 7 *
Both the infix and postfix expressions have the same result: 21
\nRPN expressions are evaluated from left to right as follows:
\nA collection named RPN already stores an expression formatted in Reverse Polish notation.
The algorithm reads the values from the collection and, using a stack data structure, evaluates it.
RPN.resetNext()\n
loop while RPN.hasNext()
VALUE = RPN.getNext()
loop while not (VALUE = \"+\" or VALUE = \"-\" or VALUE = \"*\" or VALUE = \"/\")
stack.push(VALUE)
VALUE = RPN.getNext()
end loop
OPERAND2 = stack.pop()
OPERAND1 = stack.pop()
if VALUE = \"+\" then
NEW_VAL = OPERAND1 + OPERAND2
stack.push(NEW_VAL)
end if
if VALUE = \"-\" then
NEW_VAL = OPERAND1 - OPERAND2
stack.push(NEW_VAL)
end if
if VALUE = \"*\" then
NEW_VAL = OPERAND1 * OPERAND2
stack.push(NEW_VAL)
end if
if VALUE = \"/\" then
NEW_VAL = OPERAND1 / OPERAND2
stack.push(NEW_VAL)
end if
end loop
RESULT = stack.pop()
output \"The result is: \", RESULT
An alternative data structure in which the expression used in part (a) may be stored is a binary tree. If the tree is traversed using postorder tree traversal, the output is formatted in RPN.
\nCopy and complete the trace table for the algorithm using the RPN collection data:
\n5 2 + 25 16 − * 3 /
Explain why a stack is used in the process of evaluating the expression in the algorithm.
\nOutline the steps involved in traversing the given tree using postorder tree traversal.
\nState the output from the given tree using inorder tree traversal.
\nAward [6 max]
Award [1] for correct values in VALUE column;
Award [1] for correct values of OPERAND2, OPERAND1 and NEW_VAL when VALUE is ‘+’;
Award [1] for correct values of OPERAND2, OPERAND1 and NEW_VAL when VALUE is ‘-’;
Award [1] for correct values of OPERAND2, OPERAND1 and NEW_VAL when VALUE is ‘*’;
Award [1] for correct values of OPERAND2, OPERAND1 and NEW_VAL when VALUE is ‘/’;
Award [1] correct output: ‘The result is: 21’;
Note: The trace table may be differently presented.
\nNote: Allow Follow Through.
\nAward [3 max]
A stack is a last in first out (LIFO) / first in last out (FILO) data structure;
…which means data is popped off the stack in the reverse order to which it was pushed;
In the expression, it is important to evaluate some of the values in a certain order(to obtain the correct result);
For example, 25 − 16 would give the wrong value if it was evaluated as 16 − 25;
Pushing items onto a stack and then popping them off reverses the order;
To evaluate e.g. “10 2 /” we must treat it as “do the operation on the operands 10 and 2”/ i.e. we have to access the operator before we can apply it to the operands;
A stack achieves the reversing of the order of the operators and their operands as a group (but it also reverses the operands which must be fixed);
Award [4 max]
Start from the root node;
If the root is null, return immediately;
Traverse left subtree;
Traverse right subtree;
Visit root;
start from the root node (for example traverse (root)) ;
terminate traversal (and backtrack) when/if root equals null;
(before visiting the root node) traverse (and visit/process/output) each node in the left subtree (i.e., traverse(root.left));
(before visiting the root node) traverse (and visit/process/output) each node in the right subtree (i.e., traverse(root.right));
visit/output/process root (for example, output(root));
Award [2 max]
Award [1] if the answer contains no more than one error.
(5+2)*(25−16)/3
Note to examiners: Ignore the brackets – these represent the completely correct mathematical expression, but they are not read from the tree. Some candidates might include them because they realise that they may be needed so the expression works correctly.
Most candidates had difficulty tracing the algorithm in Part (a).
\nThere were some candidates who did not attempt question 15.
\nPart (b) was reasonably well answered with many gaining at least 1 or 2 of the marking points.
\nOnly a few candidates earned full marks in Part (c).
\nSestra.com is a website maintained by a company who sell items made by local craftspeople.
\nThe website is compatible with different screen sizes and formats ranging from desktop computers to mobile smartphones. All the site’s pages contain the following code fragment:
\n<link rel = \"stylesheet\" href = \"../css/default.css\">
Visitors to the site can search categories of products (for example “Toys”, “Bags”, “Dresses” etc.) selected from a drop-down menu. The menu is populated from the records stored in the CATEGORY
table of the site’s database.
Parts of the code of the file search.php
is shown below:
// Other code present here\n
<?php
$categoryquerytext = 'SELECT 'category_id', 'category_name' FROM
'CATEGORY' ORDER BY 'category_name'';
$categoryqueryresult = mysqli_query($con, $categoryquerytext);
?>
// Other code present here
<form action = \"showresults.php\" method = \"post\">
<select name = \"category\">
<?php
while($row = mysqli_fetch_array($categoryqueryresult))
{
echo '<option value = \"'. $row['category_id']. '\">'.
$row['category_name']. '</option>';
}
?>
</select>
<button type = \"submit\">Search</button>
</form>
// Other code present here
The owners of the company have noticed that Sestra.com does not appear very prominently in search engine results.
\nThe Sestra.com site includes:
\nIdentify two ways that a cascading style sheet (CSS) can be used to ensure web pages are compatible with different screen sizes and formats.
\nExplain the processing this code enables on the server before search.php
is sent to the client.
Describe two ways in which the site developers could use white hat optimization to improve the site’s search engine ranking.
\nDistinguish between lossy and lossless compression.
\nExplain why the developers at Sestra.com would use lossless compression for the pdf documents.
\nAward [2 max].
Change/re-flow the layout of the page to suit different screen sizes/formats;
adjust font sizes;
adjust image sizes;
provide alternative menus / link options;
Award [3 max].
The code:
CATEGORY
table in a database, selecting all pairs of <category_id, category_name>
ordered by category_name;$categoryqueryresult
;“value”
attribute of each menu item to category_id
; “text”
attribute of each menu item to category_name
.Award [4 max].
Mark as [2] and [2].
Include authoritative / high quality website content;
To attract other reputable sites to link to it / promote it in the search engine ranking;
Use appropriate use meta tags (e.g. keywords/descriptions);
To provide clear data for web-crawlers/robots to use when categorising the page;
Separate content from formatting (e.g. use of CSS etc.);
To allow search engines to index the content of the site more effectively;
Use site maps / site diagrams;
To aid indexing by web-crawlers/robots;
Include a robots.txt file in the page header;
To give instructions to web-crawlers/robots as to how to index and describe the various pages on the site;
Award [2 max].
Lossy compression
Reduces the file-size by removing some of the data in the file;
Once removed, the data cannot be recovered;
This generally results in a loss of quality (e.g. picture resolution, audio frequency range);
Files compressed using lossy compression are used in their compressed form (e.g. images, video, audio);
Lossless compression
Reduces file size by looking for repeated patterns of data / redundant data and replacing those with a single shorter \"token\";
The tokens are associated with the data they represent by using a dictionary added to the file;
Flies must be decompressed before they can be used;
Decompression software reads the dictionary and replaces all the tokens with the original data They represent;
Files do not lose any of the data they contain when compressed / decompressed;
Award [3 max].
Lossless compression reduces file size while preserving all the data;
Once decompressed, the pdf document will contain all the data in the original document;
Some pdf software allows for the automatic lossless compression of the document / the developers would not have to apply compression retrospectively;
It would be hard for a lossy compression algorithm to distinguish between data that can be removed (e.g. reducing the resolution of the images) and data that is necessary for the pdf documents to make sense (e.g. parts of the text);
Using lossy compression may result in an unusable/unreadable document;
Accept answers that focus on why lossy compression would be unsuitable for the pdf files.
Many candidates reasonably answered this question. However, some candidates were unable to demonstrate the understanding of how style sheets could be coded differently to tackle different screen sizes.
\nThe vast majority of students didn’t write the expected response. Most of the responses were superficial and generic in nature.
\nThe question was answered correctly by most of the candidates.
\nThe question was reasonably answered by majority of the candidates.
\nThe question was reasonably answered by majority of the candidates. However, some responses lacked the details.
\nThe collection, storage and sharing of data is becoming increasingly important for organizations who have a choice about which type of database to use to store their data. Two examples of database types are relational and object-oriented.
\nThe 2016 US presidential election was seen to be a victory for data analytics. Companies that specialize in analytics use data warehouses.
\nExplain two advantages of using a relational database rather than an object-oriented database.
\nState two characteristics of a data warehouse.
\nOutline why data needs to be transformed before it can be loaded into the data warehouse.
\nOutline why opinion poll data and other election data are timestamped when added to the data warehouse.
\nOutline why analytics companies use link analysis.
\nOutline why analytics companies use deviation detection.
\nOnce data has been loaded into a data warehouse it can be mined. The use of data analytics is believed to have been important to the outcome of the US election campaign.
\nDiscuss whether the advantages of data mining techniques in this scenario outweigh the disadvantages.
\nAward [4 max].
Standards and support are available for RDB…
…make it more stable / easier to resolve issues / easier to recruit staff;
More user tools exist for RDBs…
…such as report generators / mail merge / security level permissions / concurrent access.
Easier to visualise data and relationships…
…so more likely to have a correctly modelled database i.e. has no redundancy / improved integrity
RDB tables and relationships are simple to implement…
…an OODB requires an understanding of concepts of OOP;
Mark as [2] and [2].
\nAward [2 max].
Repository data stored are historical/time variant;
Data is collected from different sources;
OLAP systems for reporting and data analysis (e.g. data mining) / provides businesses with information for informed decisions;
Provides tools so that data can be validated, reformatted, reorganized, summarized, and restructured;
Optimised for data retrieval;
Award [2 max].
Data is from my different external sources and (therefore) in many different formats;
For example, dates may be dd/mm/yy or mm/dd/yy or yy/mm/dd (allow any valid example);
To allow meaningful analysis, it must be in the same format/standardised;
Award [2 max].
Notes: maximum marks only if reference is made to the scenario
Do not award marks just for a description of time-stamping
The usefulness of information is often time dependent;
Example relating to the US presidential election, such as
Electoral opinions before a public debate may have less value than those after the debate;
Award [2 max].
Notes: don’t accept the word “link” on its own as a descriptor.
maximum marks only if reference is made to the scenario.
They use link analysis in order to establish relationships / associations between different data sets / different entities in the same data set;
\nExamples relating to the US presidential election, such as:
How people voted in relation to some other factor, e.g. the level of use of social media / where they took their vacations / size of family …;
Award [2 max].
Note: maximum marks only if reference is made to the scenario
They look for any unusual activity (anomaly pattern) in transactions;
\nExamples relating to the US presidential election, such as
Unusual switch in pre-electoral voting opinions;
Sudden pro-candidate or anti-candidate sentiment in a particular state;
Award [6 max].
\nMark as follows:
Award [1] for a generic advantage of data mining;
Award [1] for expanding on this advantage;
Award [1] for linking this to the scenario;
Similarly for a disadvantage;
Award [1] for a valid conclusion;
Advantages of data mining [3 max].
Clustering / cluster analysis allows objects to be treated as one group enabling the uncovering of previously hidden patterns;
For example, cluster analysis may search groups by race or gender to discover if a candidate is unpopular with a demographic;
Classification methods (e.g. genetic, rough set, fuzzy set) can be used to recognize patterns that describe the groups to which an item belongs;
For example, classifying voters by income may provide useful information that can affect future publicity strategies;
Association analysis allows a series of statistical relationships to be further explored or tested;
Associations look for If-then rules that predict a particular stance on a controversial topic (e.g. abortion) may influence the religious voters;
Disadvantages of data mining [3 max].
Data mining is based on the data collected from individuals;
This data may be sensitive personal information that the individual concerned may not want to be shared;
This personal data may be reaggregated to compromise the privacy and/or anonymity of the data subjects;
Conclusions [1 max].
The development of more sophisticated processing algorithms is inevitable, so although there are potential concerns about the invasive nature of data mining, providing sufficient safeguards are put in place, there is nothing inherently wrong with this;
Data mining is the start of the slippery slope of the state or multinational companies holding inappropriate quantities of personal data about citizens that is of limited value. Therefore, unless the privacy and/or anonymity of the data subjects can be guaranteed, this is an unethical practice;
Most candidates were able to identify at least one advantage but were unable to clearly explain them.
\nMost candidates were able to identify the characteristics of a data warehouse.
\nNot well answered as answers were very generic. Candidates were aware that data is from different sources but were not aware of it having many different formats which need to be standardized to allow for a meaningful analysis.
\nNot well answered. Candidates were not aware of the reason of having data timestamped when added to the data warehouse, and therefore very few candidates were able to connect the answer to the given scenario.
\nNot well answered. A few candidates mentioned the use of link analysis to establish relationships between data sets but were unable to make a good reference to the given scenario.
\nMany candidates were aware of the definition of deviation detection, and answered the question from this perspective, but failed to give actual examples related to the scenario and make appropriate connections.
\nMany candidates were aware of the definition of deviation detection, and answered the question from this perspective, but failed to give actual examples related to the scenario and make appropriate connections.
\nRefer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nOutline what is meant by a heuristic algorithm.
\nIdentify two reasons why premature convergence may occur.
\nAward [2 max]
A heuristic does not guarantee an optimal solution/finds an approximate solution;
Heuristics produce a solution relatively quickly/sacrifices optimisation accuracy for speed;
Used when exact algorithms (e.g. brute force) are impractical/used for computationally intractable problems;
Award [2 max]
Small (initial) population/Lack of diversity in (initial) population;
Failure to preserve population diversity/Genes of high rated individuals dominate the population early in the process; Low/zero mutation rate;
Stopping condition occurs too soon;
Selection strategy that reduces diversity/Elitism;
Crossover strategy that reduces diversity;
Refer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nThe following example shows two tours of ten cities (A–J) that are to be used to produce a new tour using the order crossover (OX) method.
\nParent 1
\nParent 2
\nCopy and complete the tables below to calculate the offspring.
\nThe initial sub-sequence of the offspring has been completed in the first row.
\nOffspring
\nExplain how the initial population size and the mutation rate will affect the probability that an implementation of a genetic algorithm will provide an optimal solution.
\nAward [4 max]
Award [1] for two values correctly entered;
Award [2] for three values correctly entered;
Award [3] for four values correctly entered;
Award [4] for five values correctly entered;
Award full marks for a correct last stage, even if the stages are not shown.
\nAward [4 max]
\nInitial population size
A large population size gives enough diversity (that makes an optimum solution more likely)/ A small population size lacks diversity (that makes an optimum salutation unlikely);
A large population takes too long to calculate (very long conversion) / A small population is calculated quickly (converges early);
Mutation rate
A very low mutation rate gives little diversity / A high mutation rate provides high diversity;
A low mutation rate tends toward exploitation (narrow search and local optima) / A high mutation rate tends towards exploration (search for too long and never converge);
Example answers with mutation and population size interaction
A low initial population size will give limited diversity/fewer good routes;
So the mutation rate will need to be higher/more cities swapped;
A high initial population size gives plenty of diversity/many good routes;
So a low mutation rate will be needed;
A mid-point sized initial population size and low(ish) mutation rate is necessary;
To stop the GA from converging on a local optima/to ensure the GA converges to a near-global optimum;
To explore the search space a balance between exploration and exploitation is needed;
A medium-sized population size with a low(ish) mutation rate will achieve this;
Mark as [2] for population size + [2] mutation.
You can also award up to [4] if comparisons only are made.
The following method, calcBMI()
accepts person’s height (H) in metres (m) and weight (W) in kilograms (kg) and returns their Body Mass Index (BMI).
calcBMI(H, W)\n
X = H * H
B = W / X
return B
endcalcBMI
Boris weighs 104 kg and is 2.00 m tall. His BMI can be calculated by calling method calcBMI()
as follows
BorisBMI = calcBMI(2.00, 104)
.
A person can belong to one of the following four weight categories:
\nThe data about a group of adults and their height measurement (in metres) and weight measurement (in kg) is held in three one-dimensional arrays.
\nWhereNAME
is a one-dimensional array holding names (currently sorted in alphabetical order).WEIGHT
is a one-dimensional array holding weight measurement in kilograms.HEIGHT
is a one-dimensional array holding height measurement in metres.
For example,NAME[0]
is Annie.
Her weight measurement is 52.40 kg and can be found in WEIGHT[0]
.HEIGHT[0]
is 1.56 which represents Annie’s height measurement in metres.
State the value of variable BorisBMI
.
Use pseudocode to construct an algorithm which accepts a person’s BMI and outputs the weight category the person belongs to.
\nState the name of the person whose height is held in HEIGHT[3]
.
Identify one reason why a binary search algorithm cannot be used to find the name of person whose height is given.
\nDescribe how the name of person whose height is given could be output.
\nConstruct an algorithm which will output the names of all the people whose BMI is greater than this group’s average BMI.
\nYou should call method calcBMI()
in your answer.
Award [1 max].
\n26.0;
\nAward [4 max].
\nAward [1] for outputting 'underweight' and correct condition in if statement.
Award [1] for outputting 'normal weight' and correct logical expression (18.5 < B < 25.0).
Award [1] for outputting 'overweight ' and correct logical expression (25.0 < B < 30.0).
Award [1] for outputting 'obese' (30.0 and greater than 30.0).
Award [1] for using if-else.
Example answer 1:
\ncategory(B)\n
if B < 18.5
output('underweight')
else if B < 25.0
output('normal weight')
else if B < 30.0
output('overweight')
else
output('obese')
end if
end category
Example answer 2:
\ncategory(B)\n
if B < 18.5
output('underweight')
end if
if B >= 18.5 and B < 25.0
output('normal weight')
end if
if B >= 25.0 and B < 30.0
output('overweight')
end if
if B >= 30.0
output('obese')
end if
end category
Award [1 max].
\nPaul;
\nAward [1 max].
\nBinary search can be applied only on sorted array / array HEIGHT
is not sorted so binary search cannot be used;
Award [1] for identifying each stage in the process of printing out a person’s name up to [2 max].
\nLinear (sequential) search could be used to find the position (array index) of a given height measurement in array HEIGHT
;
And the name in array NAME
at found position should be outputted;
Award [6 max].
\nAward [3 max] marks for calculating average.
Award [1] for initialization and changing the sum (of all BMIs) within the loop.
Award [1] for a correct loop.
Award [1] for correct parameters in the call of method calcBMI()
.
Award [1] for calculating average for the 30 persons (sum of all BMIs over 30).
Award [3 max] marks for displaying appropriate names after calculating the group’s average BMI.
Award [1] for an if statement within the correct loop.
Award [1] for condition in if (comparing the BMI of the person with the average BMI).
Award [1] for the correct output [1] for correct parameters in the method call
(calcBMI(HEIGHT[K], WEIGHT[K]
).
Example answer:
\nsum = 0\n
loop for K from 0 to 29
sum = sum + calcBMI(HEIGHT[K], WEIGHT[K])
end loop
average = sum/30
loop for K from 0 to 29
if calcBMI(HEIGHT[K], WEIGHT[K]) > average then
output(NAME[K])
end if
end loop
The Large Hadron Collider at CERN in Switzerland produces an average of 15 petabytes (15 million gigabytes) of experimental data every year. This data must be accessed and analysed by scientists around the world.
\nCERN has established the Worldwide LHC Computing Grid.
\nWith reference to the URL https://home.cern/topics/large-hadron-collider
\nState the protocol used.
\nWith reference to the URL https://home.cern/topics/large-hadron-collider
\nIdentify the steps taken by the domain name server when the scientist enters a URL such as https://home.cern into their web browser.
\nExplain two reasons why CERN would use grid computing to support its research.
\nInstead of copyrighting its experimental results, CERN has decided to publish its experimental results using Creative Commons licensing.
\nExplain two reasons why CERN would publish its experimental results using Creative Commons licensing.
\nAward [1 max].
HTTPS / hypertext transport protocol secure;
Award [3 max].
The DNS looks up the domain name “home.cern” in its database;
If it doesn’t have this string, it passes the query to another DNS according to defined rules;
This process continues until either an IP address is passed back to the starting DNS or an error message is returned;
The IP address (or error message) is sent back to the client that initiated the call to the DNS;
Award [6 max].
Mark as [3] and [3].
Multiple copies of all or part of the data can be kept at different sites;
This ensures that there is no single point of failure;
and the redundant data helps to ensure against data loss;
Different computers on the grid can use different analysis and data visualization tools;
This allows scientists to run whatever analysis tools best suit their own specialism/area of interest;
Rather than being limited to the tools provided by CERN;
Analysis can be performed using distributed processing time/capacity;
This reduces load and/or reliance on a centralized system;
Allowing a greater number of processes to be run concurrently;
Computers on the grid can be in multiple time zones;
This gives scientists more equitable access to data;
And facilitates round-the-clock monitoring and the availability of expert support;
Resources can be distributed across the world rather than being held in one country;
This may attract funding from governments for their own locally-based research;
As they may see the benefits of international cooperation;
Award [6 max].
Benefits of CC licensing:
CERN want their experimental results to be freely accessible (within specified limits);
Allows for the more rapid dissemination of data/information while preventing people from repackaging them and selling them as a commercial product;
May further the advance of scientific knowledge / be seen as an altruistic gesture;
No need to contact CERN about using the work / allows CERN to focus on their primary function, i.e. scientific research;
Limitations of copyright:
May be impossible to enforce;
Enforcement would require significant costs associated with hiring of lawyers etc.;
It may not be possible to find all cases where work has been used without copyright permissions;
Plagiarism may occur outside of Switzerland where different copyright laws may exist;
Candidates are not required to make comparisons with copyright, however credit should be given where valid limitations of copyright are explained.
Mark as [3] and [3].
The question was answered correctly by most of the candidates.
\nMany candidates reasonably answered this question. However, majority of the candidates failed to score full marks due to lacking specific details of the way the DNS server handles the URL.
\nMost responses tended to be generic and focused on explaining what grid computing is. Candidates were unable to explain why the grid computing would be useful to support the research. The connection with research was not addressed.
\nThe responses were mostly focused on description of creative common licensing rather than why it was useful for publishing the results.
\nRefer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nTwo selection methods used in genetic algorithms are:
\nCompare and contrast these two selection methods.
\nAward [6 max]
\nRoulette Wheel Selection (RWS)
Award [1 max]
Solutions are mapped to a roulette wheel / occupying space that is proportional to their fitness;
Better solutions have a greater probability of being selected / Worse solutions have a lower probability of being selected;
Truncation
Award [1 max]
The best / top N solutions are selected (for entry into the mating pool)/The worst / other solutions are not selected (for entry into the mating pool);
The number chosen for N (truncation point) affects the speed of convergence;
Comparison
Award [4 max]
Both solutions rank/sort the solutions from best to worst OR truncation must be sorted but RWS can be implemented without sorting (e.g. rejection sampling);
Thus, the chosen sorting algorithm OR approach affects the solution time (because it is done every cycle);
In truncation, weakest solutions will never be chosen/only strongest solutions can be chosen;
Whereas in RWS every solution has a chance of being selected/even the worst solution has a chance of being selected;
In truncation, once selected the top N solutions have a probability equal to that of any of the other top N solution (e.g. best and 4th best have an equal chance of being selected);
whereas in RWS proportionality is used so the top N percent are differentiated (e.g. best has a high chance of being selected than 4th best);
RWS is more likely to preserve diversity than truncation;
Because roulette wheel is more likely to avoid local minima than truncation;
Both truncation and roulette wheel make their selections based on fitness scores;
So need to consider the processing required to calculate fitness;
Both methods work well with large populations;
So if population diversity is necessary they are good choices/should not be chosen if population sizes are small;
Refer to the Paper 3 Case study: Genetic algorithms, available under the \"Your tests\" tab > supplemental materials.
\nTo what extent do the characteristics of genetic algorithms make them an appropriate approach to solving the route optimization problems?
\nAward [12 max]
\nBetter essays will be structured to include the following areas:
\nIntroduction
\nDiscussion points
GAs are suitable when:
Advantages
\nDisadvantages
\nCharacteristics that might be discussed
\nConclusion
Any reasoned conclusion is fine. For example:
In this scenario with only 20 cities, a GA is not appropriate because alternative methods such as the route inspection algorithm would be more suitable. Besides, the distance covered may not be the most important aspect of the tour. Particular sites of interest or events occurring on a particular day might be more important than a near-optimal route based on distance only.
\nA GA is a suitable solution because a brute force approach on a home laptop would be computationally intractable and an optimal route is not required, any near-optimal one is fine. Since GAs are likely to be easier to implement than other heuristic approaches, a high school student may find it the best solution for their purpose.
\nPlease see markband below.
\nOptical character recognition (OCR) is a method where printed text or handwritten text is converted to machine-encoded text.
\nRecognizing handwritten characters presents more of a problem because people have different handwriting styles.
\nFor example, the digitized handwritten letter X in Figure 3 does not exactly match the digitized letter X in Figure 4.
\nArtificial neural networks (ANNs) can be used to assist with recognizing handwritten characters that do not exactly match the expected pattern.
\nPredictive text, where the computer predicts the next word in the sentence, can be programmed to utilize a neural network.
\nThe sentence “The child is feeling” is entered into an application that uses predictive text and three options are suggested: better, like, a. Upon entering the two characters “hu” the word hungry is suggested.
\nOutline one problem that may lead to printed text characters not being detected correctly.
\nOutline why an ANN can be used to overcome the challenges outlined in this scenario.
\nExplain how ANN pattern recognition techniques are applied to ensure that the handwritten letter X in Figure 3 is recognized as a letter X.
\nIdentify two features that would be required by the ANN to predict the next word in the sentence.
\nExplain how the application uses a neural network to suggest suitable words.
\nOutline two potential problems with training the ANN to suggest appropriate words.
\nAward [2 max].
Printed text quality may be poor or faint/may use an unusual typeface e.g. BrushScript/In certain typefaces some characters can look similar e.g. sans serif;
For example, 5 and S may be confused/Numbers may be confused with letters 1 or I;
Award [2 max].
ANN can be trained to recognise handwriting styles / supervised learning;
ANN can learn to apply existing knowledge to new handwriting styles / unsupervised learning;
ANN can recognize parts of the image to determine if it is a match / doesn’t require the entire image to be a match;
Award [4 max].
The ANN accesses a database of correctly stored characters;
ANN breaks the image into smaller parts / applies a filter (2 or 3 pixels) to a section of the image;
Calculate whether the pixels match / multiple each image pixel to the feature pixel, add them up, divide by number of pixels / perfect match will be 1;
Apply convolution / repeat the application of the filter over and over;
Apply a ReLU (Rectified Linear Units) layer (remove negative values) to reduce the mathematical calculations;
Apply pooling to shrink the image stack;
Use the stack of filter images / convolution layer to see if the image is a match;
Award [2 max].
Dictionary of words;
Predictive text algorithms;
The ability to recall the previous words in the sentence / memory;
An understanding of language structure e.g. nouns, verbs, adverbs, etc.;
Previous words must be added back into the neural network;
Award [6 max].
If they have used a diagram should include:
Award [1] Input for previous words;
Award [1] Input for new characters the user enters;
Award [1] Hidden layers;
Award [1] Weights inputted into the network;
Award [1] Combining the two inputs;
Award [1] Non-linear regression / sigmoid function;
Award [1] Merge layers to produce output;
Award [1] Back propagation / Output that re-enters the ANN;
Award [4 max].
Unsupervised learning may have a poor set of words / text-speak is used;
So the ANN database doesn’t contain text-speak words so doesn’t learn;
Vanishing gradient problem / Exploding gradient problem;
Gradient signal is multiplied many times by weight matrix / The gradient signal can become smaller at every training step (vanishing) / can become excessively large at every training step (exploding) / This can make learning very slow or stops it completely;
Brownsville Council run several public libraries in different areas of the city. The libraries use an Integrated Library Management System (ILMS) to manage all items (for example books, DVDs, etc.) held by the libraries. Details of the items are stored in a database on a central server.
\nBelow is part of the extensible markup language (XML) code used to describe an item.
\n<item id = \"97812\">\n
<category>Book</category>
<author>Stark, Elizabeth</author>
<title>Handheld Device Usability</title>
<genre>Computer Science</genre>
<publisher>Taylor & Orams Inc.</publisher>
</item>
XML is based on open standards.
\nLibrary users interact with the ILMS through a web page that includes a form to search for items stored on the database.
\nThe library managers have decided to extend their web pages to include a blog and a forum, maintained by the head librarian, in order to increase engagement with library users.
\nDefine the term extensibility.
\nOutline one advantage of XML for sharing data on the web.
\nDistinguish between open standards and interoperability.
\nDescribe the role of the common gateway interface (CGI) in processing search requests made via the web form.
\nDistinguish between a blog and a forum.
\nTo what extent has the use of social media, blogs and forums enabled the head librarian to be a more effective decision maker?
\nAward [1 max].
The ability of something to be extended or expanded from its initial state, e.g. software / file Formats / programming languages;
The ability to add custom / user-defined elements (e.g. XML tags, plug-ins, add-ons);
Award [2 max].
In the real world, computer systems and databases contain data in incompatible formats;
XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data / makes it much easier to create data that can be shared by different applications;
XML makes it easier to expand or upgrade to new operating systems / applications / browsers;
Award [2 max].
Interoperability is the ability of different computer systems (including operating systems and applications) to work cooperatively / share data;
Open standards are standards that are publicly available and (normally) free to use;
Open standards are one factor aiding interoperability;
Award [2 max].
The Common Gateway Interface (GGI) is part of the Web's Hypertext Transfer Protocol (HTTP);
CGI is a method or convention for passing data back and forth between the server and the application;
A programmer can write a CGI application in a number of different languages. CGI provides a more efficient mechanism for data to be passed from the user's request to the application program (and back to the user);
CGI is not dependent on the operating system used by the server. The methods / conventions remain the same;
Award [2 max].
In a blog, only the owner can post an article / open a thread of discussion / start a theme;
In a forum all registered participants can post an article / open a thread;
In a blog, registered visitors may be allowed to comment but the blog owner may moderate the comments before displaying them;
in a forum all registered users are allowed to comment (without moderation);
In a blog users cannot edit or delete posts;
in a forum there may be moderators who can edit or delete posts after they have been made;
Award [6 max].
Note: do not award a tick for each idea, use the markband and use best-fit to determine the level of the response.
Blog
\nForum
\nBoth blog and forum
\n[1–2 marks]
A limited response that indicates very little understanding of the topic or the reason is not clear. Uses little or no appropriate subject specific terminology. No reference is made to the scenario in the stimulus material. The response is theoretical and descriptive.
[3–4 marks]
A superficial analysis of why the increased engagement with library users through the blog and forum will assist the head librarian with decision making. There is some use of appropriate subject specific terminology in the response.
[5–6 marks]
A discussion of why the increased engagement with library users through the blog and forum will assist the head librarian with decision making. Explicit and relevant references are made to the scenario in the stimulus material. There is appropriate use of subject specific terminology throughout the response.
Most answers were incorrect as the candidates were of the course in addressing ‘extensibility’ in this context.
\nMost candidates did not answer this correctly as the sharing data on the web using XML was not addressed specifically.
\nMost answers were generic in nature though candidates were able to distinguish between open standards and interoperability.
\nThough this was a straightforward question, many candidates had difficulty in answering this.
\nMost candidates were able to write at least one difference between a blog and a forum.
\nThough most of the responses lacked the details about how using blogs and forums could make the librarian more effective decision maker. The part where most candidates lost in this question was because they failed to address why the increased engagement with library users through the blog and forum will assist the head librarian in decision making. Explicit and relevant references had to be made to the given scenario that most candidates missed doing.
\nOutline what is meant by the term computer network.
\nDescribe one problem resulting from low bandwidth in a computer network.
\nAward [1] for identifying the nature of a network and [1] for a development of the first point up to [2 max].
\nA group of computers and other computing hardware devices that are linked together through communication channels/cables/wirelessly;
To enable communication (sharing files, sharing information) between systems/among a wide range of users;
Award [1] for a definition of the term bandwidth and [1] for a description of an issue caused by low bandwidth up to [2 max].
\nBandwidth indicates the maximum amount of data that can be transferred from one point to another in a unit of time;
\nLow bandwidth means slow network performance / extended duration when transferring large amounts of data / loss of users’ time (money) / the whole area (of the users) is not covered;
\nExplain the importance of the method isEmpty()
when constructing an algorithm which performs operations on a stack data structure.
Award [3 max].
\nMethod isEmpty()
returns True if there are no elements on the stack, False otherwise;
It is important to call this method in logical expression/condition in algorithm constructs such as branches and loops (if/while
);
Before popping an element from the stack / popStack()
;
To prevent errors/stack underflow/program crash;
An international organization, OBI, has three offices in Europe, see Figure 7.
\nFigure 7: The location of OBI’s offices in Europe
\n[Source: adapted (recoloured, cropped and annotated) Europe Map by Erin Dill 0, www.freevector.com.
Under copyright and CC 4.0 licence (https://creativecommons.org/licenses/by-sa/4.0/)]
\n
Office A and Office B report to Office C, the head office.
\nOffice A and Office B collaborate on many projects. Office C is not involved in the collaboration between Office A and Office B.
\nOBI has projects that involve large numbers of contributors from all over the world. These projects are managed by OBI staff in Office A.
\nThe contributors often include non-text based information.
\nDraw a directed graph based on the scenario.
\nDescribe the role of graph theory in determining the connectivity of the World Wide Web.
\nOutline two issues that may arise from using a non-text based search.
\nOBI has decided to gather information for one project by utilizing collective intelligence.
\nEvaluate this decision.
\nAward [2 max].
Award [1] for bi-directional arrow between A & B.
Award [1] for uni-directional arrow between A & C as well as B & C.
Award [3 max].
Connectivity is a basic concept in Graph Theory. Graph theory can be used to model or analyse the nature of the connectivity on a selected area, the web;
In World Wide Web, each web page is represented by vertex/node;
The hyper links between web pages are represented by edges/lines in the graph;
Arrows would indicate the direction of the hyperlinks (1-way / 2-way);
In Graph Theory, a graph is said to be connected if there is a path between every pair of vertex. From every vertex to any other vertex, there should be some path to traverse. That is called the connectivity of a graph;
Similar concept is used in connectivity of World Wide Web, where each vertex representing a type of web page is connected to any other vertex representing other kind of web pages;
Award [4 max].
Multimedia are assigned meta-tags;
If the appropriate tag is not assigned, the media will not appear in the search;
Searched by image similarity;
Google search the web using the image inputted by the user;
Non-text based searches are more difficult;
Because there a no specific content to search for;
Fewer search engines support multimedia searches;
Therefore the search engine may not be as efficient;
Mark as [2] and [2].
\nAward [5 max].
Advantages of using collective intelligence [2 max]
Collective intelligence costs significantly less per unit / pro rata than hiring a professional;
A single task is being worked on simultaneously by numerous individuals so it can be completed much more rapidly than using a single person;
It allows access (maybe part time or at very short notice) to a large number of contributors for specific events or tasks;
Disadvantages of using collective intelligence [2 max]
It may be hard to ensure sufficient quality control occurs as collective intelligence is a very deregulated environment;
It may be hard to verify the originality of the work, or which work was originally completed by who;
There may be many ideas, but it may be difficult evaluate each idea thoroughly as there may be a lack of centralised planning and/or a lack of a clearly defined hierarchy;
Conclusions [1 max]
Collective intelligence can help organizations in solving a problem in certain contexts;
These may include where there is a need to provide information quickly such as a health related requirement, or where the final information is not critical to the wellbeing of others, for example a site such as Wikipedia;
Graph theory is quite a complex area of the course. Many correctly sketched a diagram.
\nAnswers to (b) were quite vague and did not go further that identifying the function of nodes and links.
\nMost candidates identified at least one of the reasons.
\nMost candidates gained marks here, particularly in identifying both the diversity of opinions that could be gathered and the difficulties involved in analysing them.
\nDistinguish between the use of time slicing and priorities in the scheduling of processes by an operating system.
\nAward [3 max].
\nPrioritizing enables execution of the (highest priority) process until a higher priority task enters;
The OS/scheduler put processes (jobs) in the right place in a queue in order of priority (accept examples, an I/O operation has higher priority than calculations because it uses less CPU time);
Time slicing allows process to execute for a fixed time/each process is given a fixed period of time (time slice) for which the process is allowed to run/;
The scheduler is run once every time slice to choose the next process to run;
Note: Award [1 max] if evident that the scheduler software is responsible for organizing all of the processes that need servicing/responsible for looking at what resources are available (CPU time and peripheral devices) /responsible for making decisions about what order to put all the processes in (when to start any particular process, and when to finish it);
\nAn oil and gas company has a networked computer system for use of their employees in the Head Office.
\nThe company also uses the internet to enable communication with employees working on exploration and production in many remote geographical areas.
\nThe sub-sea oil and gas exploration and production unit of the company relies on thousands of kilometres of pipeline which are monitored by a computer control system which can detect leaks.
\nThe process of detecting leaks is carried out by sensors which are continuously monitoring changes in the flow and pressure of the liquids in the pipes.
\nThis data is processed on a computer in the office.
\nIf any of sensor values are outside of the acceptable parameters stored on a disk in the office, the following error routines are performed:
\nIdentify one hardware security measure that will ensure that confidential data from the Head Office cannot be accessed.
\nIdentify one software security measure that will ensure that confidential data from the Head Office cannot be accessed.
\nIdentify one network security measure.
\nExplain the environmental benefit of using a computer control system to monitor the pipeline.
\nExplain the relationship between sensors, output transducers and processor in this situation.
\nConstruct a system flowchart to represent the process described above.
\nAward [1] for each hardware security measure identified up to [1 max].
\nRetina scans;
Locked doors;
Alarms;
Protection of equipment within the building;
Award [1] for each software security measure identified up to [1 max].
\nUse of passwords;
Different access rights;
Encryption;
Award [1] for each network security measure identified up to [1 max].
\nEncryption;
UserID;
Trusted MAC addresses;
Award [3 max].
\nIn case of leaks (depending on severity of problem) which could cause pollution (any environmental problem);
Computer control system can react quickly/turn on and off appropriate devices immediately/many times in a short interval of time/(increased efficiency);
Computer control systems are very reliable (will not be tired / will not lose concentration);
(can continue to operate reliably 24 hours a day, 7 days a week) (increased level of safety);
Control systems are reasonably cheap to run comparing to the cost involved in situations which can harm environment (and human health) (reduction of costs);
Award [4 max].
\nInput from flow/pressure sensors is analog;
AD convertors are used to convert this analog data into digital form;
Processor performs / logical and arithmetical / operations;
The result of processing is in digital form so it should be converted (by AD convertors) into analog form;
This signal is sent to output transducers (a device that converts energy from one form to another) (for example, alarm sounds in the office);
Award [5 max].
\nAward [1] for sensor input.
Award [1] for manual input and validation/configuration.
Award [1] for a disk (which is holding data).
Award [1] for a monitoring process / checking whether input values exceed the allowed range or not.
Award [1] for error routines performed.
Example 1
\nExample 2
\nAn international school organizes a regional swimming competition for students from 10 different schools. Each school will send a team of 5 to 15 swimmers.
\nEach swimmer can enter up to 5 events (such as the “50 m freestyle” or “100 m butterfly”).
\nEach event consists of one or more races. A race can be a qualifying heat, or a final. The final has the best 8 swimmers from all the qualifying heats in the event.
\nEach race has a maximum of 8 swimmers.
\nThe UML diagrams for the classes Swimmer
and Race
are provided below.
In this scenario, Swimmer
objects are aggregated in a Race
object.
Define the term mutator method.
\nState one additional instance variable of type boolean
which could be added to the class Race
as indicated above.
With reference to both class UMLs provided above, distinguish between a class and an instantiation.
\nOutline one advantage of using aggregation in this context.
\nOutline one disadvantage of using aggregation in this context.
\nConstruct code for the constructor of the class Swimmer
that instantiates an object with parameters name
and school
. The event IDs should be set to “empty” and the times to 0.0
Many swimmers in the event have names that cannot be represented using basic character sets such as ASCII.
\nDescribe one feature of modern programming languages that allows the wide range of students’ names to be represented correctly.
\nAward [1 max].
A method that allows/controls changes to a private (hidden) variable;
Award [1 max].boolean isFinals
;
Award [3 max].
The class Swimmer
is the blueprint of a Swimmer
object;
An instantiation is the actual object filled with data;
The class Race
stores up to 8 different instantiated objects of the Swimmer
class;
Award [2 max].
Award [1] for identifying an advantage and [1] for an elaboration of the advantage up to [2 max].
Aggregation reduces dependencies;
and therefore reduces maintenance overhead;
Award [2 max].
Award [1] for identifying a disadvantage and [1] for an elaboration of the disadvantage up to [2 max].
Aggregation of swimmers in a object can cause issues with processing;
e.g. when searching for all heats that a particular swimmer participates in;
Award [4 max].
Award [1] for correct signature including parameters.
Award [1] for assigning name and school.
Award [1] for a (any) loop.
Award [1] for assigning empty to eventID[i]
.
Award [1] for assigning 0
(or 0.0
) to time[i]
.
Example answer:
\npublic Swimmer(String name, String school)\n
{
this.name = name;
this.school = school;
for(int i = 0, i < 5; i++)
{
eventID[i] = \"empty\";
time[i] = 0;
}
}
Award [3 max].
Modern programming languages use Unicode to encode characters.
Which uses 16 bits / has about 64 000 characters.
As opposed to ASCII which uses 8 bits / has 256 characters.
This was answered well. As this is an OOP course, some reference to objects, classes or encapsulation was expected which most students gave.
\nAny sensible and non-trivial answer was accepted.
\nSome candidates experienced difficulties in clearly distinguishing between the two terms. For the purpose of this course, a class is the template for objects which are created by instantiation.
\nCandidates struggled to give a clear advantage (e.g. better organization) for aggregation.
\nCandidates struggled to give a clear disadvantage (e.g. dependencies) for aggregation.
\nThis was well-answered.
\nIt was clear from the various guesses that this topic hadn't been covered in some schools.
\nSouthend Council in England is considering whether to use Pepper, a humanoid robot, to assist some elderly residents that live in care homes. These elderly residents suffer from memory loss and would rely on Pepper to direct them them to and from the local shops. Pepper uses ambient intelligence and is connected to the Internet of Things (IoT).
\nExplain why Southend Council may have concerns about introducing Pepper for this purpose.
\nAward [6 max].
The journey from the care home to the local shops may lead to Pepper encountering a large range of environments that may go beyond the ambient intelligence that Pepper posseses;
Which may mean that the information that Pepper can obtain from the environment by using ambient intelligence may be limited and lead to sub-optimal decisions being taken, some of which could have serious consequences;
Some of the residents may have trust issues associated with relying on Pepper, or they have be too trusting and delegate all decision making to Pepper when it is not appropriate;
Families and carers for these residents may have concerns about what information is being collected and shared by Pepper;
There may be issues of accountability that have not been resolved should an accident occur when Pepper is acting as a decision maker;
There may be technical issues such as black spots where Pepper is unable to communicate with the IoT that need to be addressed;
The trialing of Pepper may not have been sufficiently rigorous to train Pepper to act “correctly” in any given situation;
Candidates came up with a variety of reasons for not continuing with this project they clearly did not think it was a good idea.
\nThe array line
in POSline
is now replaced by a singly linked list
of CartNode
objects. The class CartNode
has been defined as follows.
public class CartNode\n
{
private Cart myCart;
private CartNode next;
public CartNode(Cart aCart)
{
this.myCart = aCart;
this.next = null;
}
public Cart getCart(){ return this.myCart; }
public CartNode getNext(){ return this.next; }
public void setNext(CartNode nextNode)
{
this.next = nextNode;
}
}
The class POSlist
has been implemented with the standard list methods addLast
and removeFirst
that act on list
.
A method leaveList(int n)
is required in the class POSlist
, similar to the method leaveLine(int n)
that was added to the class POSline
.
Define the term object reference.
\nUsing object references, construct the method public Cart removeFirst()
that removes the first CartNode
object from list
. The method must return the Cart
object in that node or null
if list
is empty.
Sketch the linked list list
after running the following code fragment where cart1, cart2, cart3, cart4
and cart5
have been instantiated as objects of the class Cart
.
POSlist queueList = new POSlist()\n
queueList.addLast(cart2);
queueList.addLast(cart1);
queueList.addLast(cart4);
queueList.removeFirst();
queueList.addLast(cart5);
queueList.addLast(cart3);
queueList.removeFirst();
Outline one feature of the abstract data structure queue that makes it unsuitable to implement customers waiting in line.
\nUsing object references, construct the method public Cart leaveList(int n)
that removes the nth CartNode
object from list
. The method must return the Cart
object in that node.
You may assume that the nth CartNode
object exists in the list.
You may use any method declared or developed.
Explain the importance of using coding style and naming conventions when programming.
\nAward [2 max].
A pointer to a memory location;
where the object is stored;
Award [4 max].
Award [1] for declaring a result
variable (or similar)
Award [1] for correct use of .getCart()
Award [1] for reassigning the head of the list
Award [1] for returning the correct result (either the Cart or null)
public Cart removeFirst()\n
{
Cart result = null;
if (head != null)
{
result = head.getCart();
head = head.getNext();
}
return result;
}
Award [2 max].
Award [1] for a three nodes in order.
Award [1] root pointer (with or without identifier) and null pointer.
Award [2 max].
The abstract data structure queue is a FIFO structure / only allows addition at the end and removal from the front;
this is not sufficient because customers can change lines at any time;
Has no fixed length;
Which could lead to unmanageable/very long queues;
Note: do not award marks for responses that focus on dynamic vs static, since queues can be implemented either way.
\nAward [6 max].
Award [1] for declaring all variables used (including loop variable i
);
Award [1] for initialising variable(s) for list traversal;
Award [1] for dealing separately with the case where n equals 1;
Award [1] for attempted looping through the linked list until the correct position;
Award [1] for correct loop using curr = curr.getNext()
; (or similar)
Award [1] for correctly rearranging references to unhook the nth node;
Award [1] for returning the correct result;
Example answer using two CartNode
variables:
public Cart leaveList(int n){\n
Cart result = null; // explicit default result
CartNode prev = null;
CartNode curr = head;
if (n==1){
result = removeFirst();
}
else{
int i=1;
while (i<n){ // no need to check for null
prev = curr;
curr = curr.getNext();
i++;
}
result = curr.getCart();
prev.setNext(curr.getNext());
}
return result;
}
Example answer using one CartNode
variable:
public Cart leaveList(int n){\n
Cart result = null;
CartNode curr = head;
if (n==1){
result = removeFirst();
}
else{
int i=1;
while (i<n-1){ // no need to check for null
curr = curr.getNext();
i++;
} // curr points to node (n-1)
result = curr.getNext.getCart();
curr.setNext(curr.getNext().getNext());
}
return result;
}
Award [2 max] for including any of the following elements on the discussion
\nIndentation / Use of white space
Annotations
Meaningful identifiers
Capitalization conventions
Award [2 max] for including any of the following reasons in the discussion
Helps understanding / reading;
For easer maintenance / extension;
For better team-work / collaboration / development;
To help with de-bugging;
Mark as [2] and [2].
\nThis was a straight-forward definition.
\nRequired candidates to show their understanding of the use of pointers for moving through a linked list. Many were unprepared for this, although it is an established part of the course, and incorrectly attempted to make use of the Linked List library class along with associated methods.
\nMany missed out the use of both head and null pointers in sketching the linked list.
\nThis was well-answered.
\nRequired candidates to show their understanding of the use of pointers for moving through a linked list. Many were unprepared for this, although it is an established part of the course, and incorrectly attempted to make use of the Linked List library class along with associated methods.
\nThis was a question that demanded specific examples which were not always given.
\nA generic Event
class is defined as follows:
class Event\n
{
private String eventID;
private int numberOfRaces;
private Race[] races;
private Race finals;
public Event(String ID, int numberOfRaces)
{
eventID = ID;
races = new Race[numberOfRaces];
for(int i = 0; i < numberOfRaces; i++)
{
races[i] = new Race();
}
finals = new Race();
}
public void addSwimmers()
{
// fills the qualifying heats with swimmers
}
public void fillFinals()
{
// fills the finals race with the best 8 from the qualifying heats
}
// more methods()
}
The class above assumes that the event has more than 8 swimmers and requires qualifying heats. However, an event with less than 9 swimmers has no qualifying heats, so the original class was inherited by a new class .
\nThe same method identifier addSwimmers
is used in both classes Race
and Event
.
Explain why this does not cause a conflict.
\nOutline two advantages of the OOP feature “inheritance”.
\nOutline how method overriding can help to create the new class FinalsOnlyEvent
.
Award [3 max].
Each method is defined within its own class.
Each method is called within an object of that class.
Therefore the compiler knows which method to use.
Award [4 max].
Award [1] for an advantage and [1] for an elaboration up to [2 max].
Mark as [2] and [2].
It promotes code reuse;
Because the parent object holds common data and action;
It reduces maintenance overhead;
Because you only have to update the parent;
Award [2 max].
Award [1] for a clear understanding of method overriding and [1] for relating it to this situation up to [2 max].
Method overriding redefines/replaces a method from the inherited class;
The constructor could only instantiate the finals
object;
The method addSwimmers()
could fill finals
directly;
The method fillFinals()
could do nothing;
Many candidates wanted this to be about polymorphism and overriding, but the two occurrences of this methods were quite simply in different classes and would be called and distinguished between by their respective objects.
\nA variety of reasons were accepted with most candidates going for code-reuse and the extensibility features.
\nThis wasn't well-answered, probably because candidates were unsure of the exact structure of the FinalsOnlyEvent class.
\nThe Driving Licensing Agency stores information about individuals who hold a driving license and/or own vehicles.
The following rules apply:
When an individual applies for a driving license, they have to complete a license application form. The following is an extract from that form:
\nThe data in the form shown above is stored in the Person table. The license application form also requires an individual’s medical information. This is stored in a table called PersonMedical.
\nThe following extract is a sample of the medical questions that are asked.
\nFigure 2: A sample of the medical questions asked on the license application form
\nConstruct the entity-relationship diagram (ERD) that shows the relationship between the individual, their driving license, and their vehicle(s).
\nExplain why Date of birth has been separated into three fields.
\nExplain two reasons why medical information should not be stored in the Person table.
\nOutline two issues caused by storing redundant data.
\nOutline two situations where data stored by the Driving Licensing Agency may need to be open to interrogation by other parties.
\nAward [2 max].
\nAccept either diagram. License, Individual, and Vehicle correctly positioned
Award [1] for 1 to 1.
Award [1] for 1 to m.
Award [3 max].
The order that a date is written varies by country, e.g. dd/mm/yyyy in UK, mm/dd/yyyy in US;
Some dates, such as 01 June 2018 (01/06/2018) could be confused with 06 January 2018 (06/01/2018);
leading to the incorrect information being stored and consequent decisions, e.g. license expired at the wrong time due to incorrect age;
The Date/String datatype will make analysing slower;
integers can be analysed more quickly than Date/String datatypes;
because functions will be used to split/extract the data;
The Date datatype will make validating data more difficult.
because it is easier to validate separate integer fields;
rather than one entire data that will need to be split by functions;
Award [6 max].
\nNormalisation
Medical information is only stored if the person has a medical condition / some people will have no medical information stored / some people may have more than one medical conditions;
this requires an additional table / normalisation requires a separate table / one to many relationship;
leaving in the person table will increase storage capacity / empty fields take up space;
Privacy
All employees will need access to the person table and that would include sensitive medical information;
Protects people’s privacy / data needs to comply with the Data Protection Act / private medical data seen by non-authorised personnel may cause harm to the licence applicant / potentially result in legal action;
having confidential data in a separate table allows that table to be only available to people with a certain permission level;
Updates
Person table is also likely to be less permanent and need updating more often;
medical information rarely gets updated so is more permanent;
the person table may be useful in other applications, as it offers a way of identifying citizens/the medical data is not likely to be used by other applications;
Mark as [3] + [3]
\nAward [4 max].
May lead to update/deletion anomalies;
Address changes may result in duplicate addresses;
so letters / fines may go to the wrong address;
Storing data multiple times wastes storage space;
and may slow down data retrieval / data entry;
Award [4 max].
Accept any suitable example
Police access
It is a legal requirement for the VDLA to give access to the police;
e.g. a speeding vehicle / an accident / linked to a police investigation;
so the police will need to look up the details of the person that owns the car;
facial scanning software may be cross-referenced with the car owner’s driving license photo;
so that police have a way to check the identity of the person driving the car;
Insurance company access
A person taking out car insurance signs a consent form to give VDLA access to their records;
this would allow the insurance company to build up a profile e.g., check for driving offences, see how long that person had owned a car;
thus, a quote could be created quickly / minimal effort;
provides proof of driver eligibility (i.e., not serving a driving ban);
Medical access
Doctors may require access to an accident victim’s records;
To check blood type etc.;
Mark as [2] + [2]
\nMost of the students clearly identified the main entities, their correct position and cardinality in the ERD diagram. Few failed to establish and correctly label the relationships.
\nThis was not well answered with many students giving vague generic answers when explaining the separation of the Date of Birth into three fields. Very few students included reasons related to data type making easier analysis / validation / correct formatting.
\nThis question was not answered well with most candidates struggling to explain reasons for having a separate table for medical information. However, the majority of students were able to explain privacy issues related to the question, but not able to explain other reasons such as normalization, updates or user access rights.
\nCandidates tended to comment on the waste of storage space and to mention update/deletion anomalies, but few were able to elaborate on these aspects or outline others.
\nThis question explicitly asked for two different situations in which the database had to be open to interrogation by other parties. Successful candidates were able to combine knowledge and real-world context and provide situations with concrete examples of third parties and the reasons for interrogating the DB.
\nAn Event
has been instantiated with 2 qualifying heats for a total of 11 swimmers.
Event free100 = new Event(\"100 m free style\",2);
The swimmers were added to the two Race
arrays and after the races, their times were recorded as shown in the table.
(For the purpose of this question, the name represents the full swimmer object.)
\nThe method fillFinals()
will select the 8 fastest swimmers, in ascending order of time, from both swimmer
arrays and copy them to the swimmer
array in the finals
race.
To help with this selection, all entries from races[0]
and races[1]
will be copied into two new parallel arrays of size 16, one array for swimmers and one array for their times.
The two temporary arrays will be sorted using the following code.
\nint i,j;\n
Swimmer swapSwimmer;
double swapTime;
for(i = 0; i < 15; i++)
{
for(j = 0; j < 15; j++)
{
if(tempTime[j] > tempTime[j + 1]) // if wrong order then…
{
swapSwimmer = tempSwimmer[j]; // swap the swimmer and…
tempSwimmer[j] = tempSwimmer[j + 1];
tempSwimmer[j + 1] = swapSwimmer;
swapTime = tempTime[j]; // swap the time
tempTime[j] = tempTime[j + 1];
tempTime[j + 1] = swapTime;
}
}
}
Sketch the resulting swimmer
array in finals
.
Construct the code fragment for the given situation that will copy swimmers and times into two parallel arrays named tempSwimmer
and tempTime
.
State the name of this sorting algorithm.
\nOutline two improvements to this code that would make the algorithm more efficient.
\nConstruct the code fragment that will copy the names of the 8 fastest swimmers in ascending order of time from the array tempSwimmer
to the array swimmers
in the race finals
.
Award [3 max].
Award [1] for array of 8 slots with array name.
Award [1] for correct entries (in any order).
Award [1] for correct order.
Do not penalize the lack of subscripts.
\nAward [6 max].
Award [1] for correctly declaring 2 arrays of size 16.
Award [1] for correct outer loop.
Award [1] for correct inner loop.
Award [1] for copying swimmer object.
Award [1] for copying time.
Award [1] for incrementing the index of the new arrays.
Example answers:
\nSwimmer[] tempSwim = new Swimmer[16];\n
double[] tempTime = new double[16];
int newIndex = 0;
for(int i = 0; i < 2; i++){
for(int j = 0; j < 8; j++){
tempSwim.swimmer[newIndex] = races[i].swimmer[j];
tempTime.time[newIndex] = races[i].time[j];
newIndex++;
}
}
Note: that the question asks for all entries to be copied. However, do not penalize \"efficient\" solutions that avoid copying the null and 0 entries.
\nBubblesort;
\nAward [4 max].
Award [1] for stating an improvement and [1] for an elaboration up to [2 max].
Mark as [2] and [2].
Include a flag “swapped”;
That can help stop the outer loop if there is a pass through the inner loop with no swap;
Limit the inner loop by deducting the outer loop counter;
So that the sorted elements are no longer compared;
Award [6 max].
Award [1] for correctly instantiating variables.
Award [1] for correct loop condition (count
< 8).
Award [1] for checking for a 0 time (or null entry).
Award [1] for correctly copying.
Award [1] for incrementing count
in the right place.
Award [1] for incrementing k
in the right place.
Example answers:
\nint k = 0;\n
int count = 0;
while(count < 8) && (k < 16){
if(tempSwim[k] != 0){
finals.swimmer[count] = tempSwim[k];
count++;
}
k++;
}
Note: Do not penalize for not including loop condition (k < 16
)
This was well-answered.
\nThis was the first significant piece of coding on the paper and, as in previous papers, divided the students into those who were comfortable with coding and those who weren't. From the former came a variety of solutions, some of which were quite innovative. The complexity came from ensuring that the correct indices were used for the different array items and for dealing correctly with private variables outside of their class.
\nAlmost all correctly gave Bubble Sort, but clear details of improvements that could be made were limited to the candidates who were adept at programming.
\nAlmost all correctly gave Bubble Sort, but clear details of improvements that could be made were limited to the candidates who were adept at programming.
\nMany candidates failed to realise that the 8 fastest swimmers were not the first 8 entries in the sorted array as this would give null entries.
\nBilletmania is an online company that sells tickets for theatre performances and music concerts. After a customer has chosen their seats, they can pay for the tickets through a secure online payment system. Once the transaction has been completed, the customer receives an email receipt.
\nAn information system and a database are used for Billetmania’s day-to-day operations.
\nDefine the term database transaction.
\nOutline how the Billetmania information system would utilize a database.
\nExplain the importance of transaction durability to Billetmania when clients book tickets.
\nExplain how the Billetmania database management system ensures that a seat is not booked by two people simultaneously.
\nAward [1 max].
A logical unit of work that is executed in full or not at all;
A transaction is a single logical operation that comprises of a sequence of database operations;
A transation satisfies the ACID (Atomicity, Consistency, Isolation, Durability) properties;
Award [2 max].
The database would store details of concerts, tickets sold, customers;
An information system would access the database to present data it in a way that aids informs managers / aids decision making (e.g. charts of ticket sales);
Accept any other reasonable example.
\nAward [3 max].
Durability ensures that transactions are saved permanently and do not accidentally disappear or get erased;
Billetmania does not need to worry the transaction being lost even in the event of power loss, crashes, or errors;
A seat in a theatre is guaranteed even if the database crashes;
Award [4 max].
Concurrency allows multiple users try to book tickets at the same time / complete a transaction at the same time;
Concurrency prevents access by more than one user to the same row/record;
Concurrency uses row locking;
Select seats are locked for a short period of time to ensure that they aren’t double booked/overwritten;
A standard question that was not well answered. Many candidates presented vague responses that did not define the concept of Database Transaction, some of them seemed to have confusion with the concept of Data Migration.
\nMost candidates were able to outline the role of the database in the given scenario by using correct examples but failed to point out how the information system would utilize the database access.
\nSome candidates provided detailed responses explaining durability in context by including characteristics of persistence in the event of system failure, but many of the responses were not specific enough and did not correctly relate the response to the given scenario.
\nMany responses were incomplete and failed to provide a proper explanation. Some of them were very generic. Most candidates were aware of the row locking concept and its application in the given scenario.
\nZCC has a chain of offices that sell different types of paper to customers all over the world. They have data stored in their data warehouses that will help them make important marketing decisions for the future, as they have plans to diversify into other products like gift-wrappers, scribble-pads, stationery, books and calculators.
\nZCC is going to use data mining techniques to discover patterns in their data.
\nThe company has customers who have missed the payment deadline for their purchases from ZCC.
\nOutline why data warehousing is time dependent.
\nOutline one reason why ZCC uses a data warehouse.
\nOutline why transformation of the data is necessary prior to it being loaded into the data warehouse.
\nCompare cluster analysis and classification as techniques for discovering patterns in ZCC's data.
\nDescribe how the process of deviation detection can be applied to identify customers who are likely to miss the payment deadline for their purchases from ZCC.
\nZCC is aware that other data mining and detection techniques will allow more informed marketing decisions to be made.
\nExplain how database segmentation and link analysis can be used by ZCC to improve their marketing strategies.
\nAward [2 max].
Data warehouses contain both historical and current data;
Timestamps are required to compare data from different times;
Award [2 max].
Increased Query and System Performance;
data warehouse is built for analysis and retrieval of data rather than efficient upkeep of individual records (i.e. transactions);
Timely Access to Data;
ETL, are used within a data warehouse environment. These routines consolidate data from multiple source systems and transform the data into a useful format that enable quick querying;
Enhanced Data Quality and Consistency;
Data from the various business units and departments is standardized and the inconsistent nature of data from the different sources is removed;
Individual business units will start to utilize the same data repository as the source system for their individual queries and reports;
Historical Intelligence;
Data warehouse stores large amounts of historical data and time-period analysis, trend analysis, and trend prediction thus allowing for advanced reporting and analysis of multiple time-periods;
Award [2 max].
When the data is collected from different sources each source will have their own standards if we have two different data sources A and B;
Selection of the data that is going to be useful in analysis – the different offices will have data relevant only to them, such as staff names, etc.;
Standardization of the data – the company may have imposed a standard on all its offices, but this is not always the case, and the data will certainly have to be Checked, e.g. date formats are different in different countries;
Other transformation techniques that students may give as examples are more like:
Award [6 max].
Award [1] for a description of cluster analysis
Award [1] for description of cluster analysis being used to find patterns
Award [1] for a description of link analysis
Award [1] for a description of link analysis being used to find patterns
Award up to [2] for comparison between the two techniques
Cluster Analysis
Cluster analysis groups customers by age / according to different factors, such as region/location;
Therefore, it enables comparison between groups;
Classification
A classifier or model is developed using training sets of data;
New data is then added to the model and compared against the predicted outcomes / new classifiers may be developed;
Discussion
Classification requires prior knowledge of the customer base, cluster analysis does not;
Data can be classed in new samples using classification whereas for cluster analysis only suggests groups based upon patterns in data;
Labelled samples from a set of classes is required for classification whereas for cluster analysis unlabelled samples will do;
Award [3 max].
Access the customer payment details for purchases of fairly large orders from the data warehouse;
For a given group (and for a particular period/given a range for timestamp) of customers;
Identify the outliers/customers who have defaulted more than a fixed number of times in payment after running the deviation detection (multiple if-then-else statements) algorithm;
List the names of those customers;
Award [5 max].
Award [1] for an outline of customer segmentation
Award [1] for an outline of link analysis
Award up to [3 max] for use by ZCC to improve marketing strategies
Customer segmentation
Divides a customer base into groups of individuals that are similar in specific ways relevant to marketing, such as age, gender, order of the type of paper, frequency of orders placed and the size of the orders normally placed;
assign each customer to one of the segments;
A typical segmentation makes each segment distinct from other segments (different segments have different needs), it is homogeneous within the segment (exhibits common needs);
segmenting is using borders to form groups;
Segmentation groups objects into similar groups;
The resulting groups contain members that are more similar to each other than they are to other groups;
Link Analysis
Load a claim and runs a query back to the database to find all other claims sharing any similar attributes;
show matches on the address of a claimant in the original case being investigated;
Now combine matches-merge identical nodes. So, we can more easily see unusual connections;
Once seen a suspicious link, accept or escalate;
Representing data as a network offers an engaging way for analysts to rapidly understand events;
Most candidates were able to identify why data warehouses required timed data.
\nMany candidates were unable to clearly explain why data warehouses are advantageous for a company.
\nMost candidates were able to describe why the data from different data sources needs to be standardized before being loaded into a data warehouse.
\nMany candidates were able to give generic descriptions of cluster analysis and classification, but they were unable to discuss the differences between the two in any detail.
\nMost candidates demonstrated a good understanding of data deviation in this situation.
\nThe majority of candidates were only able to discuss data segmentation and link analysis at an abstract level.
\n