0% found this document useful (0 votes)
3K views28 pages

Computer Science Paper 2 SL Markscheme-4

Uploaded by

vardanbajaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views28 pages

Computer Science Paper 2 SL Markscheme-4

Uploaded by

vardanbajaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

2224 – 6905M

Markscheme

May 2024

Computer science

Standard level

Paper 2

28 pages
–2– 2224 – 6905M

© International Baccalaureate Organization 2024

All rights reserved. No part of this product may be reproduced in any form or by any
electronic or mechanical means, including information storage and retrieval systems,
without the prior written permission from the IB. Additionally, the license tied with this
product prohibits use of any selected files or extracts from this product. Use by third
parties, including but not limited to publishers, private teachers, tutoring or study services,
preparatory schools, vendors operating curriculum mapping services or teacher resource
digital platforms and app developers, whether fee-covered or not, is prohibited and is a
criminal offense.

More information on how to request written permission in the form of a license can be
obtained from https://ibo.org/become-an-ib-school/ib-publishing/licensing/applying-for-a-
license/.

© Organisation du Baccalauréat International 2024

Tous droits réservés. Aucune partie de ce produit ne peut être reproduite sous quelque
forme ni par quelque moyen que ce soit, électronique ou mécanique, y compris des
systèmes de stockage et de récupération d’informations, sans l’autorisation écrite
préalable de l’IB. De plus, la licence associée à ce produit interdit toute utilisation de tout
fichier ou extrait sélectionné dans ce produit. L’utilisation par des tiers, y compris, sans
toutefois s’y limiter, des éditeurs, des professeurs particuliers, des services de tutorat ou
d’aide aux études, des établissements de préparation à l’enseignement supérieur, des
fournisseurs de services de planification des programmes d’études, des gestionnaires de
plateformes pédagogiques en ligne, et des développeurs d’applications, moyennant
paiement ou non, est interdite et constitue une infraction pénale.

Pour plus d’informations sur la procédure à suivre pour obtenir une autorisation écrite
sous la forme d’une licence, rendez-vous à l’adresse https://ibo.org/become-an-ib-school/
ib-publishing/licensing/applying-for-a-license/.

© Organización del Bachillerato Internacional, 2024

Todos los derechos reservados. No se podrá reproducir ninguna parte de este producto
de ninguna forma ni por ningún medio electrónico o mecánico, incluidos los sistemas de
almacenamiento y recuperación de información, sin la previa autorización por escrito del
IB. Además, la licencia vinculada a este producto prohíbe el uso de todo archivo o
fragmento seleccionado de este producto. El uso por parte de terceros —lo que incluye,
a título enunciativo, editoriales, profesores particulares, servicios de apoyo académico o
ayuda para el estudio, colegios preparatorios, desarrolladores de aplicaciones y
entidades que presten servicios de planificación curricular u ofrezcan recursos para
docentes mediante plataformas digitales—, ya sea incluido en tasas o no, está prohibido
y constituye un delito.

En este enlace encontrará más información sobre cómo solicitar una autorización por
escrito en forma de licencia: https://ibo.org/become-an-ib-school/ib-publishing/licensing/
applying-for-a-license/.
–3– 2224 – 6905M

Subject details: Computer science HL paper 2 markscheme

Mark allocation

Candidates are required to answer all questions in one Option. Total 65 marks.

General

A markscheme often has more specific points worthy of a mark than the total allows. This is intentional.
Do not award more than the maximum marks allowed for that part of a question.

When deciding upon alternative answers by candidates to those given in the markscheme, consider the
following points:

• Each statement worth one point has a separate line and the end is signified by means of
a semi-colon (;).

• An alternative answer or wording is indicated in the markscheme by a “/”; either wording can be
accepted.

• Words in ( … ) in the markscheme are not necessary to gain the mark.

• If the candidate’s answer has the same meaning or can be clearly interpreted as being the same as
that in the markscheme then award the mark.

• Mark positively. Give candidates credit for what they have achieved and for what they have got
correct, rather than penalizing them for what they have not achieved or what they have got wrong.

• Remember that many candidates are writing in a second language; be forgiving of minor linguistic
slips. In this subject effective communication is more important than grammatical accuracy.

• Occasionally, a part of a question may require a calculation whose answer is required for subsequent
parts. If an error is made in the first part then it should be penalized. However, if the incorrect answer
is used correctly in subsequent parts then follow through marks should be awarded. Indicate this
with “FT”.

General guidance

Issue Guidance
Answering • In the case of an “identify” question, read all answers and mark positively up to the
more than maximum marks. Disregard incorrect answers.
the quantity • In the case of a “describe” question, which asks for a certain number of facts
of eg “describe two kinds”, mark the first two correct answers. This could include two
responses descriptions, one description and one identification, or two identifications.
prescribed • In the case of an “explain” question, which asks for a specified number of
in the explanations eg “explain two reasons …”, mark the first two correct answers.
questions This could include two full explanations, one explanation, one partial explanation etc.
–4– 2224 – 6905M

Option A — Databases

1. (a) (i) Award [1 max].


String or Text;

(Accept also Varchar, Alphanumeric)

(ii) Award [1 max].


Real;

(Accept also Integer, Float, Number, Numeric)

(b) Award [2 max].


Range check;
... to ensure input is between –90 to +90;
Presence check;
... to ensure a value has been input;
Type check;
... to ensure the input is numeric;
Data validation is checking to see if the data entered is within an appropriate range;
For example, to check that gradient is between -90 to +90;

Note: The question asks for one way. Read whole response and mark to student’s
advantage

(c) Award [3 max].

Award [1] for three entities (tables - in any order);


Award [1] for Plant to Distribution (1 to many);
Award [1] for Site to Distribution (1 to many).

Note: Allow alternative ERD layouts


–5– 2224 – 6905M

(d) Award [2 max].


The Plant_ID and Site_ID can be repeated / not unique // Many plants can be in a site and
many sites can have the same plants // No one attribute in Distribution table can uniquely
identify the record;
Use of multiple fields uniquely identifies a tuple/record;
And removes the need to add a new ID field as Primary key (which would waste storage
space);

(e) Award [4 max].


Award [1] for all relevant tables used (Plant and Distribution);
Award [1] for use of count on SiteID;
Award [1] for correct species and date conditions;
Award [1] for correct condition for connecting the two tables.

SELECT COUNT(Site_ID) FROM Plant, Distribution WHERE Species = "Gorse"


AND DATE = '14/10/2019' AND Plant.Plant_ID = Distribution.Plant_ID

or

//Get the Plant_ID from the Plant table:


@PlantID = (SELECT Plant_ID FROM Plant WHERE Species = 'Gorse')

// @PlantID = 6 at this point; They can use 6 here instead of @PlantID


SELECT COUNT(Site_ID) FROM Distribution WHERE Plant_ID = @PlantID
AND DATE="14/10/2019"

or

SELECT COUNT(Distribution.Site_ID)
FROM Plant INNER JOIN Distribution
ON Plant.Plant_ID = Distribution.Plant_ID
WHERE Plant.Species = "Gorse" AND Distribution.Date = '14/10/2019'

or

(Accept also a description, e.g.)


Create a JOIN between the Plant and Distribution tables based on the Plant_ID field and
select records with Species = 'Gorse' and Date = '14/10/20219’. Count the number of records
in the table.

Note: Accept other date formats. Accept double or single quotes for strings.
–6– 2224 – 6905M

(f) Award [3 max].


Any data written to the environment database must be valid according to all defined rules;
Referential integrity;
... all foreign keys should have a primary key;
Cascades;
...changing data in one table should be carried through to related tables // Update of the data
must happen uniformly across all occurrences;
Normalise the database
... to remove/reduce redundant data // to remove repeated data;
Triggers;
... to automatically invoke updates to tables as required;
... all data must be sensible/conform to set rules before being stored;
Validation checks;
Verification checks;
Data updates use transactions to ensure automatic rollback on failure;

2. (a) Award [3 max].


Parent authenticated by the DBMS;
Outstanding amount/bill is calculated/displayed;
Transaction is initiated for the transport payment;
Payment details added / entered for transport;
If payment details and payment can be processed by DBMS, then
School transport Account is credited;
... parent’s account is debited;
Transaction is completed by DBMS successfully// The transaction is committed;
Automatic e-mail notification of payment sent to parent;
Else, Transaction is rolled back;
Notification of the failed/successful transaction sent to the parent;

(b) Award [3 max].


Record locking /Isolation/Data Locking/Row locking;
Ensures exclusive editing/it is done in isolation;
... to prevent the same data item from being changed by two different transactions / to
prevent data values from being accessed by a transaction while another transaction involving
the same data is in progress / the process helps keep the update mutually exclusive;

Optimistic Concurrency Control (OCC) // Multi-version concurrency control (MVCC);


Allows multiple users to access the unmodified version of data at the same time // Uses read
isolation;
.... To prevent dirty reads / reading the uncommitted changes of another transaction;
On update request, a check is done to see if the existing data has been modified by another
user since it was initially read // Uses write validation;
.... To prevent lost updates / overwriting changes from other transactions;

Note: The question asks for an explanation, so marks can be awarded from both blocks.
–7– 2224 – 6905M

(c) Award [2 max].


Approving Data Access // Managing user accounts;
Monitoring Performance // Performance tuning;
Backup and Recovery;
Implementing security;
Upgrading/updating the database // Maintenance;

(d) Award [4 max].


Access controls;
Effective and efficient access controls/restrictions so that the end users can access only
the data or programs for which they have legitimate privileges;

User accounts;
Different users have usernames and passwords/biometrics to enable unique login
experiences;

Data Encryption;
Nullifies the potential value of data interception;
Ensures the confidentiality of data;

Do not credit answers that refer to data integrity rather than security.

Mark as [2] and [2]

(e) Award [6 max].


Privacy considerations must be ensured
Prevention of unauthorized access to private data//providing security measures e.g. logins;
Encryption of data to ensure it is unusable to unauthorized users;
Especially as many of the data subjects will be under 18;
Ensuring that the inappropriate use of data cannot take place, for example sharing the
data with third parties without the consent of data subjects;
Measures to ensure accuracy and completeness when collecting data about a person or
persons (corporations included) by technology;
Availability of data content, and the data subject’s legal right to access;
Ownership rights to inspect, update or correct these data;
The data is not available to the vast majority of its users // Views are used to access specific
data instead of giving access to the whole table //Redaction;
The data base is designed to conform with data protection legislation;
Data must not be kept for longer than it is required;
Only relevant data must be collected and stored;
Keeping the data secure from loss or damage e.g. backup;
–8– 2224 – 6905M

3. (a) Award [2 max].


Reduces duplicated/Redundant data;
…which reduces wastage of storage space //…which reduces/eliminates data
inconsistencies;
... and improves performance / query processing time

Improves data security/privacy;


… as more granular access control can be implemented on individual tables//… enabling
sensitive data to be protected;

Improves data integrity/consistency;


…as integrity constraints (e.g. referential integrity) can be set // …to ensure changes to data
follow allowed rules // …by eliminating update/insert/delete anomalies;

Improves query performance / makes querying data easier;


… as data is stored in a structured manner // … complex queries become simpler //… and
thus, execute faster (on related tables using JOINS);

It makes changes / scaling up easier;


… as new data requirements are easily made by adding more relations /tables //… without
disrupting the existing system;

Note: Question asks for one reason to be outlined.

(b) Award [2 max].


The value in OlymRec has a decimal point / is not a whole number;
... so it would not be accurate /... a float/double/real data type is required;

The timing of athletes will vary in just milliseconds and so the minute will barely change;
So, a decimal point is required for the accurate measurement;
–9– 2224 – 6905M

(c) Award [5 max].


Award [1] to identify primary key in ATHLETICS table (either new ID e.g. EventID or
composite e.g. Event and Gender);
Award [1] to split into two appropriate tables (e.g. ATHLETICS and EVENTS) at 2NF;
Award [1] to identify Primary Key in EVENTS table;
Award [1] to identify the Foreign Key in ATHLETICS table;
Award [1] for all fields in both tables (e.g. ATHLETICS and EVENTS) correct.

1NF – Unique PK
ATHLETICS(EventID, Event, Type, SubType, Gender, OlymRec, WldRec)

1NF – Composite PK
Produce atomic entries, so that the first row in the ATHLETICS table, for example,
becomes two rows with the value of Event (100) repeated. Event + Gender is the
composite primary key. This will give:
ATHLETICS(Event, Type, Subtype, Gender, OlymRec, WldRec).

2NF – Composite PK
Event always has the same Type and Subtype, and this is now repeated in multiple rows,
so this information should be separated into a separate table, giving:

EVENTS(Event, Type, Subtype)


ATHLETICS(Event*, Gender, OlymRec, WldRec)

EVENTS(EventID, Event, Type, Subtype)


ATHLETICS(EventID*, Gender, OlymRec, WldRec)

Note: allow candidates to add their own field as primary key in any table

(d) Award [2 max].


To remove transitive (functional)/non-key dependencies;
... where non-key attribute(s) depend on another non-key attribute;
... to reduce insert/update/delete anomalies
... and further reduce data redundancy;
– 10 – 2224 – 6905M

Option B – Modelling and simulation


4. (a) Award [3 max].
NUMBER_OF_WALLS
WALL1_HEIGHT
WALL1_WIDTH
TILE_HEIGHT;
TILE_WIDTH;
Etc

Note: do not accept vague variables like ‘size’ (but ‘dimensions’ is acceptable).

(b) Award [4 max].


The cabinet widths when added together must be less than the wall width;
in order for the cabinets to fit the available space;

The width of the room and cabinet depths must be taken into account when fitting
cabinets to opposite walls;
to make sure there is enough room for a person to (comfortably) walk/work
between them;

Accept other reasonable answers.

Mark as [2] and [2]

(c) Award [4 max].


The accuracy of the measurements/shape of the room;
If the room was not measured correctly, the resulting simulation will not be correct;

The dimensions of the cabinets/tiles used in the simulation;


The cabinets/tiles may prove to be too big for the available space;

The quality of the representation of colours/designs/patterns of the products;


May lead to customer disappointment as they may not receive what they
were expecting;

If it’s not a VR simulation;


it may be difficult to visualize how much space there is around a person when the
cabinets are fitted;

Accept other reasonable answers.


Do not accept hardware limitations.

Mark as [2] and [2]


– 11 – 2224 – 6905M

(d) Award [5 max].


Award [2] for advantage;
Award [2] for disadvantage;
Award [1] for conclusion.

Example answers:
Allows the customer to try out different designs;
until it meets their requirements;

The simulation will take time to set up;


and it may not be timely enough to satisfy the customer;

The simulation depends on measurements taken;


And it may not be accurate enough / the kitchen may not fit in the actual space;

The usefulness of the simulation depends on the hardware;


It may take too much time to render;

The simulation is only a tool that may help to avoid making expensive mistakes / that may
help to ensure better customer satisfaction;
– 12 – 2224 – 6905M

5. (a) Award [2 max].


The images provided may be high resolution;
the device will therefore need to have sufficient amount of RAM;
So that images can load quickly / correctly;

Standard memory requirements should be enough;


Since only text and images are being displayed;

(b) Award [1 max].


(3D) Rendering;

(c) Award [3 max].


Ray tracing renders the image by computing the path of light between the objects in the
room and different viewpoints;
Allows the objects in the room to be simulated and shown as they would look from
different positions and angles;
Allowing a more realistic experience while operating the virtual walk-through;

(d) Award [4 max].


Privacy – the animation may accidentally capture images that the homeowner would
rather were not made public;

Security – the animation may show security flaws;


So that a potential burglar may enter the property;

Reliability – the animation may make the property seem better than it is,
so that the potential buyer may feel cheated;

Anonymity – items in the animation may identify the seller of the property;
which could be illegal / have negative impact on the seller.

Mark as [2] and [2] for 2 considerations.

Accept other reasonable answers.


– 13 – 2224 – 6905M

6. (a) (i) Award [1 max].


=SUM(B3:E3) // =B3+C3+D3+E3

(ii) Award [1 max].


=AVERAGE(B3:E3) // =(B3+C3+D3+E3)/4 // = F3/4;

(iii) Award [1 max].


=MAX(B3:E3)

(iv) Award [1 max].


=MIN(B3:E3)

Note: Penalise a missing ‘=’ sign only once.

(b) Award [5 max].


Inclusion of 7 or 1.07 anywhere in the answer (either in a cell or in formula);
Use of absolute cell reference for common target % in cell B16;
Use correct formula in cell B16, either “=B3*1.07” or “=B3*(1+$C$12/100)”;
Use correctly adapted formulas in cells C16, D16, E16;
Use correct formulas in F16 and G16, either similar to columns B-E or just directly
calculating the sum and average on B16..E16;

(c) Award [2 max].


The model only shows data for one year;
It may not be an accurate basis for predicting next year’s outcome;

The model assumes there is the same target % for each department;
This may not be an accurate reflection of the way the business is developing;

The future sales cannot be predicted based on a desired % increase;


For a prediction you need trends over time;

(d) (i) Award [1 max].


=B24+B28 / =B24+B26+B27 / =SUM(B24, B28)

(ii) Award [1 max].


=B13-B30 / =B13-B24-B28 / =B13-B24-B26-B27

Note: Penalise a missing ‘=’ sign only once.


– 14 – 2224 – 6905M

(e) Award [6 max].


Use of a loop with correct parameters;
Prompts to let user know for which department to enter data/which quarter;
Appropriately named array for at least one quarter;
All arrays appropriately named;
Correct formula to add together annual data;
All input/calculated data assigned to correct array elements;

Example algorithm:
loop COUNT from 0 to 7 //allow from 1 to 8
output "Enter data for ", DEPARTMENT[COUNT]," Department"
output "Apr – Jun: "
input APR_JUN[COUNT]
output "Jul – Sep: "
input JUL_SEP[COUNT]
output "Oct – Dec: "
input OCT_DEC[COUNT]
output "Jan – Mar: "
input JAN_MAR[COUNT]
WHOLEYEAR[COUNT} = APR_JUN[COUNT] + JUL_SEP[COUNT] +
OCT_DEC[COUNT] + JAN_MAR[COUNT]
end loop
– 15 – 2224 – 6905M

Option C – Web science


7. (a) Award [2 max].
Award [1] if up to 2 components identified;
Award [2] if all components identified.

The URL contains the protocol/scheme, domain, sub domain and Top-level domain
(path); and the file resource (Query/&fragment);
For reference:
Scheme/Protocol: https://
Subdomain: www
Domain Name: educationalsite.org
Top level domain: org
Path: /assets/home.html

(b) Award [3 max].


Award [1] for the text above the top row being correct;
Award [1] for top row being correct;
Award [1] for the body of the table being blank. 

Or
– 16 – 2224 – 6905M

(c) Award [2 max].


The web page does not display different content each time it is viewed; it doesn’t
change dependent on either user input, time of day etc;

A static web page requires the source code to be rewritten/edited/modified;


to add new content to be added;

A static page is one where the construction of the page is controlled by the browser
on the client device and does not link to an external data source;

Whereas a dynamic web page is linked to an external data source. The data
sources could include text files, a database, XML files etc;

(d) Award [3 max].


Client-side scripting languages would include Javascript, jquery etc;
These are commonly used languages that add functionality and interaction to pages;
There is broad implementation of the languages; and are accepted as a standard;
Client-side languages are rendered in the browser rather than on the server;
Failure to correctly support may reduce functionality; cause errors in appearance or
interaction;
Broad support of client-side scripting languages allows similar functionality and
therefore similar browsing experience independent of browser type;

(e) Award [2 max].


A protocol is a set of rules which enable network communication that must be
followed;
A standard is a set of rules which have broad support and should be adhered to and
provide a framework for development.

(f) Award [4 max].


The DNS server or Domain Name Service server, translates the Domain names into an IP
Address;
The browser first checks its own cache to see if it has a recent DNS record for the domain.
If found, it uses this information to directly connect to the website’s IP address.
If the required DNS record is not found locally, the DNS query is sent to the configured DNS
resolver until the top-level Domain (TLD).
Top-level domain servers are the ultimate authority for the domain and hold the master list of
sites for the domain.
Address resolution occurs in the application layer of TCP/IP.
The DNS resolver sends the IP address back to the user's web browser and information is
displayed.
If it is not found, an error message is sent back to the client’s browser.
– 17 – 2224 – 6905M

(g) Award [4 max].

File Size:
Lossy compression allows the file size to be reduced (more than lossless
compression);
This will mean that it can be used to transfer information (uploads and downloads)
between devices more rapidly than lossless compression;
Or
Due to higher compression from lossy methods, the file occupies less storage space
on a mobile device.
Or
Smaller file sizes mean faster loading and processing times, enhancing the overall
performance and responsiveness of mobile applications and devices.

Quality
Although there will be some reduction in the picture quality or sound (due to loss of
data);
The advantages of greater speed of transfer will outweigh the loss of image quality
as the screen size of the mobile device may not be sufficiently large for the
imperfections to be apparent; 

Cost
Lossy compression resulting in smaller file size would require less data usage,
conserving bandwidth and reducing costs for mobile users.

Note: Each cluster carries 2-mark (1 for identification and one for explanation)
Maximum 4.
– 18 – 2224 – 6905M

8. (a) Award [2 max].


Keywords are often matched with the metatag keywords and description as well as
the page content increasing the accuracy of the search;
Use of keywords helps to clarify the searchers thinking;
Using a phrase adds additional terms that are either ignored by the search engine or
could provide false positive results;
Can reduce contextual differences derived from use of language in the results I.e. the
phrase was meant to say XX but could be literally interpreted as XXYY;
Reduces differences derived from abbreviations and widely accepted but
grammatically incorrect text speech I.e. you and u why and y etc;

Note: Consider focus on Keywords alone or a combination of keywords and phrases.

(b) Award [1 max].


A–B–E

(c) Award [2 max].


The breadth first crawl ensures that all pages at a certain depth are indexed before
moving deeper; giving a thorough snapshot of the web.

The breadth first crawl completes /visits all the links on the page before moving to
the next page, whereas the depth first crawl follows the line of one series of links
from page to page until it ends. Potentially this means the initial pages may not be
completely indexed if the stack is large;

Prioritizes more important, higher-level pages, which are more likely to contain
significant information and links to other relevant content.

Breadth first enables a wider range of possible content to be searched although it


may not uncover information at the same level of depth;

(d) Award [2 max].


Page rank is a numerical value that represents the importance of a page;
A Dampening factor is applied to the calculation;
Page rank algorithm is recursive;
Page rank uses the page rank of incoming / outgoing links;

Note: Candidates do not need to know the formula for page rank.
– 19 – 2224 – 6905M

(e) Award [4 max].

Information inaccuracy:
As the Black hat SEO distorts search rankings (using keyword stuffing), it provides
false/inaccurate information;
The students may potentially have unintended access to inappropriate material;
The validity of material is questionable using unethical techniques;

Time and Resources:


This may lead to wastage of bandwidth visiting unintended websites.
The time wasted in visiting the site;

Security
including exposure to malware and other security issues
potential damage from this;

Note: Award [2] + [2]


Note: Award [2 max] if there is no reference to DP History.

Information for examiners about Black hat techniques (for reference purpose
only):
Black hat techniques may include:
Keyword stuffing - The practice of filling your content with irrelevant keywords in
attempt to manipulate where the page ranks
Clocking - Presenting a different URL and content to the user and the search
spider/crawler
Redirections – Sending the viewer to a different URL than the one initially clicked
Duplicated content – Adding duplicate content from High quality sources
Invisible words – Using hidden text (white background and white text, very small font
size which is invisible to the viewer but is searched and indexed
Bait and switch techniques - Create content around the topic being searched for
then switch the content once it is indexed
Paid links and link farms - Page rank and HITS use links as a metric for ranking -
paid links and link farms boost numbers of links and there for potentially impact
ranking
Blog comment spam - not as significant as now Google is blocking these from
calculations, but better blogs will have “nofollow” on the comments.
– 20 – 2224 – 6905M

9. (a) Award [2 max].


Award [1] for identification;
Award [1] for additional development.

Connection and sharing between nodes; enabling better resource utilization / collaboration /
distributed computing power / storage.

Reliability of the network in the event of failure of one or more nodes (fault tolerance);
providing redundancy and replication to ensure data durability and availability in cases of
node failures or network partitions.

Ownership & responsibility to a large group; by ensuring that each node maintains their own
security and functionality.

Distributed networks are more scalable, especially in scenarios where network is distributed
among large geographical area; they leverage localized resources and reduce latency and
improve overall user experiences.

(b) Award [2 max].


Award [1] for identification of the advantage of Client Server architecture;
Award [1] for development.

Has structured hierarchy/centralized control; the functionality of the network will be


centrally controlled, giving more systematic and structured access to the network
through the central server.

Enhanced security; as the sever is responsible for the security of the network
operations, it facilitates better implementation of the monitoring and enabling network
security.

Enables management of resources, storage, applications and users leading to cost


saving, enhance better administration.

Client devices doesn’t need to have as much processing power, memory, storage,
etc. because the applications are kept and run on the server;

(c) Award [4 max].


In cloud computing resources are managed and provided by centralized data
centres. and accessed via the internet;
It is often provided as a service, PaaS, SaaS, private cloud, community cloud, public
cloud etc
it is generally scalable (sometimes described as rapid elasticity) / adaptable /
distributed;
Peer to peer computing is distributed / decentralized;
Peers directly share resources such as files or processing power.
Level of access and control is generally set by the users;
It is focused on sharing rather than supplying a specific service;
There is equality between the peers in the network;

Note: Award [2] marks for giving an account of the similarities between cloud and
peer to peer computing up to a maximum of 4.
– 21 – 2224 – 6905M

(d) Award [6 max].


Decentralization means that resources are distributed rather than localized ensuring
that diverse systems and devices can communicate seamlessly;

Open standards (HTTP, TCP/IP, HTML, etc) shifts the control from government
(and cooperation) control to a broad selection including individual, like-minded
groups and organization;
This enables freedom of expression, sharing, co-operation, communication and
collaboration;

Interoperability is a product or system whose interfaces are understood by and work


with other systems;
There are no restrictions enabling ease of processing, manipulation and transfer of
data;
Interoperability enables information systems (particularly databases) to exchange
information without significant modification or the use of third-party agents. Other
systems can be designed to interact seamlessly;
Interoperability is based on open standards;

Mark as [3] and [3].


– 22 – 2224 – 6905M

Option D – Object-oriented programming


10. (a) Award [2 max].
an object is an abstract entity;
consists of data/attributes/properties;
has methods/behaviour/actions on (that data/attributes/properties);
An object occupies memory / has a lifecycle;
An object is an instance of a class;

(b) Award [1 max].


Any instance variable with the prefix 'set' and ( ) such as:
setNumberPlate(String numberPlate);
setPricePerDay(double pricePerDay);
setRentalClass(char rentalClass);
setYear(int year);
SetBrandModel(String brandModel);
SetFuelType(boolean fuelType);
SetTransmissionType(boolean transmissionType);

Note: Ignore the parameter and semi colon.

(c) Award [3 max].


public method;
return type;
correct return; // keyword 'this' is not required

Example answer:

public String getBrandModel()


{
return this.brandModel;
}

(d) Award [2 max].


A default constructor instantiates an object of a class;
with null or default values (for the instance variables/attributes);
without using any parameter;

(e) Award [2 max].


fuelType can no longer be boolean;
but could be another datatype such as int/char/String (or similar) to represent the distinct
values;
for 4 different types of fuel;

(f) Award [1 max].


Car inherits Rental (allow Car 'is a' Rental or Car extends Rental or Car is a subclass of
Rental.);

Note: Accept 'inheritance'.


– 23 – 2224 – 6905M

(g) Award [3 max].


Award [1] for (public) class Car extends Rental;
Award [1] for declaring numberOfDoors;
Award [1] for numberOfDoors being set to 4 within the constructor;
Award [1] for correct getter / setter method; // keyword 'this' is not required

Example answer:

public class Car extends Rental


{
private int numberOfDoors;

public Car()
{
this.numberOfDoors = 4;
}

public int getNumberOfDoors()


{
return this.numberOfDoors; // ‘this’ not required
}
public void setNumberOfDoors (int n)
{
this.numberOfDoors = n; // accept without ‘this’ also
}
}
– 24 – 2224 – 6905M

11. (a) Award [1 max].


Inheritance;

(b) Award [3 max].


Because the parent class holds common attributes and methods;
inheritance will enhance reuse of code;
and reduce maintenance costs;

Faster development time;


as the existing code (base class) is already tested;
and less code needs to be written and debugged;
// Do not accept: 'faster' or 'easier' without proper explanation.

child classes may add new functionality (Extensibility);


extending the parent’s action and data, without redefining them;

child class redefines the base class methods (Overriding);


to provide a different functionality to existing method of the parent class;

easier to maintain;
as the changes in the parent class are automatically reflected in the child class;

Note: Award [2 max] for one benefit with explanation. Award [1 max] for identification of
another benefit. Accept benefits explained for any incorrect but legitimate OOP feature
identified in 15a.

(c) Award [2 max].


Encapsulation;
Polymorphism;
Abstraction;

Note: Allow FT for 15a.

(d) Award [2 max].


Easier / faster to debug/test;
because there are far fewer mistakes in the smaller/individual modules.

Speedier / faster completion of the project;


because different teams work on different modules.

facilitates reusability of the code;


as the existing modules can be reused across other modules.

Improves code readability / organisation;


smaller manageable modules leading to better logical organization.

Note: Do not allow mixing the points from different clusters. Do not allow easier/faster
without any further description in context of modularity.
– 25 – 2224 – 6905M

12. (a) Award [2 max].


the value/variable passed when the function/method is called;
passed as a value or as a reference;
is found in the parameter list of the method definition/signature;

(b) Award [8 max].


Award [1] for correct method signature (excluding the return type);
Award [1] for instantiating a Car array (result) of size 100;
Award [1] for loop through allCars with length condition;
Award [1] for setting and resetting a variable (found or similar ), inside the outer loop;
Award [1] for the loop that checks the uniqueness
Award [1] for checking for a null pointer exception in at least one loop;
Award [1] for correct test; (use of equals() and ‘==’)
Award [1] for correctly adding the Car when not found in result;
Award [1] for returning the correct result - correct array of objects of Car;

Note: Do not accept ArrayList but allow FT for MP 5 and 7. The question specifically asks for
an array.

Example answer 1:

public Car[] findBrandModels(Car[] allCars)


{
Car[] result = new Car[100];
int i = 0;
while ((i<allCars.length) && (allCars[i]!=null))
{
int j = 0;
boolean found = false;
while ((j<100) && (result[j]!=null) && (!found))
{
if (result[j].getBrandModel().equals(allCars[i].getBrandModel()))
{
found = true;
}
j++;
}
if (!found)
{
result[j] = allCars[i];
}
i++;
}
return result;
}
– 26 – 2224 – 6905M

Example answer 2:

public Car[] findBrandModels(Car[] allCars)


{
int count = 0;
Car[] result = new Car[100];
for (int i = 0; i < allCars.length && allCars[i] != null; i++)
{
boolean found = false;
for (int j = 0; j < i; j++)
{
if(allCars[i].getBrandModel().equals(allCars[j].getBrandModel()))
{
found = true;
}
}
if (!found)
{
result[count++] = allCars[i];
}
return result;
}

Example answer 3:

public Car[] findBrandModels(Car[] allCars)


{
Car[] brand = new Car[100];
int index = 0;
for(int i=0; i<allCars.length && allCars[i]!=null; i++)
{
boolean found = false;
String bm = allCars[i].getBrandModel();
for(int j=0; j<index; j++)
{
if(brand[j]!= null)
{
if(brand[j].getBrandModel().equals(bm))
found = true;
}

}
if(!found)
{
brand[index++] = allCars[i];
}
}
return brand;
}
– 27 – 2224 – 6905M

(c) Award [5 max].

Example answer 1:
create a result array to store the return value of findBrandModels();
iterate through the result array to check individual Car object;
if the Car object does not fulfil all three criteria then remove this Car object from result / make
this Car object null;
iterate (or sort/search) through the result array;
to output the Car objects that are not null / return the result array;

Example answer 2:
create a result array to store the return value of findBrandModels();
iterate through the result array to check individual Car object;
if an object fulfils the three conditions then copy the car object in another array
(desiredCars);
iterate (or sort/search) through the other array (desiredCars);
to output / return the (desiredCars) array;

Example answer 3:
create a modified version of findBrandModels();
that takes additional parameters that specify desired features;
a car would only be added to the result array if the three tests were met;
create a result array to store the return value of modified findBrandModels();
iterate through the result array to output the cars / return the result array;

Example answer 4:
create a result array to store the return value of findBrandModels();
iterate through the result array to check individual Car object;
if the Car object does not fulfil all three criteria, then skip this Car object
if the Car object meets the three criteria
then output the Car object;

Example answer 5:
create desiredCars array;
iterate through the result of all findBrandModels();
if an object fulfils the three conditions;
copy the car object in the array desiredCars;
to output / return the (desiredCars) array;

Note:
Award [3 max] - If the response doesn’t use the findBrandModels(); For example, if the
response only focuses on using if conditions to check three specific requirements for Car
objects and present (either output or return) them (including duplicates) to the customer.
– 28 – 2224 – 6905M

13. (a) Award [1 max].

Customer Car

(b) Award [2 max].


The problem becomes that Car 'has a' Customer and Customer 'has a' car;
This is a circular / duplicate / redundant relationship;
which may cause inconsistencies;
It increases dependencies;
and causes more overhead when changes need to be made;

(c) Award [5 max].


Award [2] for stating obligations;
Award [2] for amplifications;
Award [2] for reasons given.

obligation - to respect privacy;


amplification - only relevant data should be stored that helps the customer;
reason - to limit the impact on privacy.

obligation - to provide data security;


amplification - programmers should incorporate safeguards such as encryption;
reason - to limit the chance of personal data being misused;

obligation - to protect data against corruption;


amplification - programmers should incorporate data validation / verification;
reason - to limit the chance of incorrect personal data being stored;

Note: Accept any other valid obligation. Do not accept a third obligation.

You might also like