It A-Levels New Edition

Download as pdf or txt
Download as pdf or txt
You are on page 1of 578

i

rs IT
for Cambridge International AS & A Level
COURSEBOOK

Paul Long, Sarah Lawrey & Victoria Ellis

Second edition Digital Access

Copyright Material - Review Only - Not for Redistribution


Copyright Material - Review Only - Not for Redistribution
IT
for Cambridge International AS & A Level
COURSEBOOK

Paul Long, Sarah Lawrey & Victoria Ellis

Copyright Material - Review Only - Not for Redistribution


University Printing House, Cambridge CB2 8BS, United Kingdom
One Liberty Plaza, 20th Floor, New York, NY 10006, USA
477 Williamstown Road, Port Melbourne, VIC 3207, Australia
314–321, 3rd Floor, Plot 3, Splendor Forum, Jasola District Centre, New Delhi – 110025, India
79 Anson Road, #06–04/06, Singapore 079906

Cambridge University Press is part of the University of Cambridge.


It furthers the University’s mission by disseminating knowledge in the pursuit of
education, learning and research at the highest international levels of excellence.

www.cambridge.org
Information on this title: www.cambridge.org/9781108782470
© Cambridge University Press 2021
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.
First published 2016
Revised edition 2019
Second edition 2021
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Printed in Italy by LEGO
A catalogue record for this publication is available from the British Library
ISBN 978-1-108-78247-0 Print Coursebook with Digital Access (2 Years)
ISBN 978-1-108-74932-9 Digital Coursebook (2 Years)
ISBN 978-1-108-79951-5 Coursebook eBook
Additional resources for this publication at www.cambridge.org/9781108782470
Cambridge University Press has no responsibility for the persistence or accuracy
of URLs for external or third-party internet websites referred to in this publication,
and does not guarantee that any content on such websites is, or will remain,
accurate or appropriate. Information regarding prices, travel timetables, and other
factual information given in this work is correct at the time of first printing but
Cambridge University Press does not guarantee the accuracy of such information
thereafter.

NOTICE TO TEACHERS
It is illegal to reproduce any part of this work in material form (including
photocopying and electronic storage) except under the following circumstances:
(i) where you are abiding by a licence granted to your school or institution by the
Copyright Licensing Agency;
(ii) where no such licence exists, or where you wish to exceed the terms of a licence,
and you have gained the written permission of Cambridge University Press;
(iii) where you are allowed to reproduce without permission under the provisions
of Chapter 3 of the Copyright, Designs and Patents Act 1988, which covers, for
example, the reproduction of short passages within certain types of educational
anthology and reproduction for the purposes of setting examination questions.

NOTICE TO TEACHERS
Exam-style questions and sample answers in this title were written by the authors. In
examinations, the way marks are awarded may be different. References to assessment
and/or assessment preparation are the publisher's interpretation of the syllabus
requirements and may not fully reflect the approach of Cambridge Assessment
International Education.
Cambridge International recommends that teachers consider using a range of teaching
and learning resources in preparing learners for assessment, based on their own
professional judgement of their students' needs.

Copyright Material - Review Only - Not for Redistribution


Teachers play an important part in shaping futures.
Our Dedicated Teacher Awards recognise the hard
work that teachers put in every day.
Thank you to everyone who nominated this year; we have been inspired and moved
by all of your stories. Well done to all of our nominees for your dedication to learning
and for inspiring the next generation of thinkers, leaders and innovators.

Congratulations to our incredible winner and finalists!

WINNER
Patricia Abril Stanley Manaay Tiffany Cavanagh Helen Comerford John Nicko Coyoca Meera Rangarajan
New Cambridge School, Salvacion National High School, Trident College Solwezi, Lumen Christi Catholic College, University of San Jose-Recoletos, RBK International Academy,
Colombia Philippines Zambia Australia Philippines India

For more information about our dedicated teachers and their stories, go to
dedicatedteacher.cambridge.org

Copyright Material - Review Only - Not for Redistribution


Copyright Material - Review Only - Not for Redistribution
Contents

Contents
How to use this series vi 12 IT in society 264
How to use this book vii 13 New and emerging technologies 285
Introduction viii
14 Communications technology 302
1 Data processing and information 1
15 Project management 329
2 Hardware and software 27
16 System life cycle 343
3 Monitoring and control 43
17 Mail merge 376
4 Algorithms and flowcharts 53
18 Graphics creation 396
5 eSecurity 87
19 Animation 429
6 The digital divide 101
20 Programming for the web 468
7 Expert systems 111 Answers 517
8 Spreadsheets 120 Glossary 546
9 Modelling 177 Index 553

10 Database and file concepts 187 Acknowledgements 562

11 Sound and video editing 243

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

How to use this series


This suite of resources supports students and teachers following the Cambridge
International AS & A Level Information Technology syllabus (9626). All of the books
in the series work together to help students develop the necessary knowledge and critical
skills required for this subject.

This coursebook provides 50% more practical activities than


our previous edition and follows the same order structure as the
Cambridge International AS & A Level Information Technology
syllabus (9629). Each chapter includes questions to develop
theoretical understanding or practical skills, and questions
designed to encourage discussion. Exam-style questions for every
topic help prepare students for their assessments.

The Teacher’s Resource gives you


everything you need to plan and
deliver your lessons. It includes
background knowledge at the start
of each chapter, class activities with
suggested timings, differentiation
ideas, advice on common
misconceptions, homework and
assessment ideas.

The Practical Skills Workbook contains worked examples


and unique tasks to help learners practise core practical IT
skills. With exercises increasing in challenge, it gives students
further opportunities to undertake practice and refine their
skills in the classroom or at home. It covers tasks for all of
the practical chapters of the Coursebook that support many
of the learning objectives required in the syllabus.

vi

Copyright Material - Review Only - Not for Redistribution


How to use this book

How to use this book


Throughout this book, you will notice lots of different features that will help your learning. These are explained below.

LEARNING INTENTIONS
Learning intentions set the scene for each chapter, help with navigation through the coursebook and indicate
the important concepts in each topic.

BEFORE YOU START KEY WORDS


This contains questions and activities on subject Key vocabulary is highlighted in the text when it is
knowledge you will need before starting first introduced. Definitions are then given in the
this chapter. margin, which explain the meanings of these words
and phrases. You will also find definitions of these
words in the Glossary at the back of this book.
REFLECTION
Reflection activities ask you to look back on the WORKED EXAMPLE
topics covered in the chapter and test how well
you understand these topics and encourage you to Wherever you need to know how to approach a skill,
reflect on your learning. worked examples will show you how to do this.

Questions EXAM-STYLE QUESTIONS


Appearing throughout the text, questions give you a
Questions at the end of each chapter provide more
chance to check that you have understood the topic you
demanding exam-style questions, some of which may
have just read about. You can find the answers to these
require use of knowledge from previous chapters.
questions at the back of the book.
Answers to these questions can be found at the back
of the book.
PRACTICAL ACTIVITY
Practical activities will help you to practise key
skills. These may require you to use supplementary TIP
source files, which you can download from the
digital edition of this book. Facts and tips are given in these boxes.

SUMMARY CHECKLIST
The summary checklists are followed by ‘I can’ statements which match the Learning Intentions at the beginning
of the chapter. You might find it helpful to tick the statements you feel confident with when you are revising.
You should revisit any topics that you don't feel confident with.

These boxes tell you where information in the book is extension content, and is not part of your syllabus.

vii

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Introduction
Welcome to the second edition of our Cambridge International AS & A Level IT series.
This Coursebook has been written by experienced authors specifically for the
Cambridge International AS & A Level Information Technology syllabus (9626) for
examination from 2022.
The syllabus develops a broad range of IT skills. Throughout this Coursebook there
are examples of IT in practice, practical activities which include extension activities for
you to complete and reflection points to provoke further thought and discussion. There
are questions that will test your knowledge and understanding. Whenever a task is
presented, we would encourage you to carry it out before progressing further.
The key concepts for Cambridge International AS & A Level Information Technology
(Impact of IT, Hardware and software, Networks and their role in the internet, mobile
wireless applications and cloud computing, The internet, System life cycle, New
technologies and how they may affect everyday life) recur throughout the syllabus.
This Coursebook has been written to reflect these key concepts, in particular in the
following chapters: Hardware and software (Chapter 2); IT in society (Chapter 12);
New and emerging technologies (Chapter 13); Communications technology, including
networks and the internet (Chapter 14); System life cycle (Chapter 16). It is not
necessary to work through the book in order from start to finish.
The syllabus defines three assessment objectives: AO1 Recall, select and communicate
knowledge and understanding of IT, AO2 Apply knowledge, understanding, skills
and judgement to produce IT-based solutions and AO3 Analyse, evaluate and present
reasoned conclusions.
The content of the syllabus focuses on current practice and practical applications of
computers in everyday life. To reflect this, the practical elements of this Coursebook
are not concerned with, for example, providing step-by-step advice on how to use
particular software, but rather with helping you to discover what is available and
have the confidence to apply your knowledge to different types of software. This will
help you to prepare for the many different aspects of using computers that they will
encounter in life, and not just in your exams.
This Coursebook makes reference to a variety of brand names. Note that marks will
not be awarded for mentioning manufacturers' names in answers.

viii

Copyright Material - Review Only - Not for Redistribution


Chapter 1

Data processing
and information
LEARNING INTENTIONS

By the end of this chapter, you will be able to:


• explain the difference between data and information
• explain the use of direct and indirect sources of data
• evaluate the advantages and disadvantages of direct and indirect sources of data
• describe factors that affect the quality of information
• understand the need for encryption
• describe different methods of encryption
• describe encryption protocols
• explain how encryption is used
• evaluate the advantages and disadvantages of different protocols and methods of encryption
• describe the use of validation methods
• explain the need for both validation and verification
• describe batch, online and real-time processing methods

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

• give examples of when batch, online and real-time processing methods are used
• write an algorithm
• evaluate the advantages and disadvantages of different processing methods.

BEFORE YOU START

• Do you know the difference between input and output?


• Do you understand that when input data is processed it can be stored or sent to output?
• Do you understand the term encryption?
• Do you understand the term hacking?
• Do you know what a protocol is?
• Do you understand the structure of a table used in a database?
• Are you able to use a spell checker?

A picture without context is a further example of raw data.


Introduction
We live in a world where we rely on data and
information. It is important that data is accurate. Digital
technology helps us to manage the input and transfer of
data so that it is fit for purpose for its intended audience.

1.1 Data and information


Data
Data is raw numbers, letters, symbols, sounds or images
with no meaning.
Some examples of data are:
P952BR
@bbcclick Figure 1.1: Example of raw data.
359
23557.99 The data P952BR could have several meanings.
It could be:
KEY WORD • a product code

data: raw numbers, letters, symbols, sounds or • a postal/ZIP code


images without meaning • a car registration number.
Because we do not know what the data means, it is
meaningless.

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

REFLECTION Data Context Meaning


P952BR A product A product code for a can
When answering a question such as ‘Give one code of noodles.
item of data’, do not try to explain what the data @bbcclick A Twitter The Twitter address
means because it then becomes information. handle for the BBC’s weekly
Just give the raw numbers, letters, symbols or technology show, Click,
image. which is worth watching
on BBC World News and
BBC2 to keep up to date
KEY WORD with technology.
359 Price in The price of a mobile
information: data with context and meaning Pakistani phone cover.
rupees

Table 1.2: Examples of data being given context and


Information meaning to become information.
When data items are given context and meaning, they
become information. A person reading the information
will then know what it means. Questions
Data is given context by identifying what sort of data it A company creates websites using style sheets.
is. This still does not make it information, but it is a step
1 Identify one item of data that will be used by
on the way to it becoming information.
the company.
2 Describe how this item of data can become
Data Context Comment information.
P952BR A product This is a product code,
code but it is still not known
what it is a product code Data sources
for, so it is still data.
@bbcclick A Twitter This is an address used
Direct data source
handle for Twitter, but it is not Data collected from a direct data source (primary
information unless it is source) must be used for the same purpose for which it
known to be a Twitter was collected.
handle or used within
Twitter software. It’s KEY WORDS
also not known whose
address it is. direct data source: data that is collected for the
359 Price in This is a currency value, purpose for which it will be used
Pakistani but it is not known what
Rupees the price is for, so it is still
data. The data will often have been collected or requested by
the person who intends to use the data. The data must
Table 1.1: Examples of data being given context. not already exist for another purpose though. When
collecting the data, the person collecting should know
For the data to become information, it needs to be for what purpose they intend to use the data.
given meaning. Information is useful because it means
something.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Indirect data source

Figure 1.2: Direct data source.

For example, a sports shop wants to find out what other Figure 1.3: Indirect data source.
shops are charging for trainers. There are various direct
sources from which this data can be collected. These Data collected from an indirect data source (secondary
could include: source) already existed for another purpose. Although
• visiting the other shops and noting down the prices it may have been collected by the person who intends
to use it, it was often collected by a different person or
• visiting the other shops’ websites and noting down organisation.
the prices
• carrying out a survey of other shop owners to ask
KEY WORDS
their prices (although the shop owners are unlikely
to want to give these). indirect data source: data that was collected for
Questionnaires can be used to gather specific data, a different purpose (secondary source)
such as opinions about an event that has taken place.
Questionnaires are particularly useful when there are
a large number of respondents and statistical analysis For example, a sports shop could use various indirect
will be carried out on the results. Questions on a sources to find out what other shops are charging for
questionnaire need to be structured carefully to: trainers, including:

• elicit the information required • carrying out a survey of customers who have
purchased trainers from the other shops (in this
• enable analysis of the data effectively case, the price will be the one paid by the customer,
• gather enough information without putting people which may have been a different price to that
off from completing the questionnaire. charged now, or it may have been discounted
at the time)
Online questionnaires enable quicker analysis of data
because the users fill in the data online and then the data • looking at till receipts from the shop (the price
is entered directly into a database. Online questionnaires is printed on the till receipt for the purpose
save time because no further data entry by a third party of providing proof of purchase, not for
is necessary. identifying prices).
Interviews are another direct source of information.
Questions are asked directly to respondents and the
interviewer can ask the respondent to elaborate on
their answers.

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

One indirect source of information that is commonly used


PRACTICAL ACTIVITY 1.01 is an electoral register. Governments keep a register of
Which of the following are direct data sources people who are registered to vote in each household. This
and which are indirect data sources? register includes names and addresses. Its main purpose is
to enable those people to vote in elections. However, it can
Data Reason Reason used also be used by credit reference agencies to check whether a
collected person lives at the address they say they do, or by marketing
Names To record To contact agencies to send direct marketing to the people listed on
and email their members by the register. There is an option for individual entries on an
addresses of membership email to see electoral register to be hidden from public view.
members of a and to be if they will Businesses that want to send marketing letters will
political party able to donate some often purchase a list of email addresses or telephone
contact them. money. numbers or addresses of people. Selling data is a big
Employee To identify To allow a business, especially if the data enables a company
attendance when police officer to direct their marketing at their target market. For
dates and employees to check an example, a company selling IT textbooks to schools
times attended employee’s would benefit greatly from a list of email addresses of IT
work and to alibi if a crime teachers. Different countries have different laws about
calculate their has been how personal data can be used in this way, but most
wages. committed. developed nations have data protection laws that require
Flight times To compare To decide the companies to get consent from customers before the
and prices the prices and best flight to customers’ data can be shared with a third party.
from airline times for a use for a trip
websites trip to Florida. to Florida. Advantages and disadvantages of
Names, ages For a national To allow a gathering data from direct and indirect
and addresses census. marketing data sources
of people company to The general rule is that data collected directly for the
find out which purpose for which it is intended is more likely to be
areas have accurate and relevant than data that is obtained from
the highest existing data (indirect source).
population of
children.
Direct data source Indirect data source
Weather To record To show
measurements the current the current The data will be Additional data that is not
from a weather weather. temperature relevant because what required will exist that may
station and rainfall on is needed has been take time to sort through
a website. collected. and some data that is
required may not exist.
The original source is The original source may
known and so can be not be known and so it
REFLECTION trusted. can’t be assumed that it is
reliable.
Direct data is usually used by the person that It can take a long time The data is immediately
collected it and for the purpose they collected it. to gather original data available.
However, it’s also possible for a person to collect rather than use data
data from an indirect (secondary) source. For that already exists.
example, if a journalist is writing a news article and
A large sample of If statistical analysis is
bases his story on existing news articles, then he
statistical data can be required, then there are
has used indirect sources rather than interviewing
difficult to collect for more likely to be large
the people involved in the original story.
one-off purposes. samples available.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Direct data source


The data is likely to be
Indirect data source
Data may be out of date
1.2 Quality of information
up to date because because it was collected The quality of information is determined by a number
it has been collected at a different time. of attributes.
recently.
Bias can be eliminated Original data may be Accuracy
by asking specific biased due to its source.
questions. Information that is inaccurate is clearly not good enough.
Data must be accurate in order to be considered of good
The data can be The data is unlikely quality. Imagine being told that you need to check in at the
collected and to be in the format airport 45 minutes before the flight leaves, so you turn up at
presented in the required, which may 18:10 for a 19:05 flight, only to find that you were actually
format required. make extracting the data supposed to check in one hour before the flight leaves.
difficult.
Examples of inaccurate information include:
Table 1.3: Comparing direct and indirect sources. • decimal point in the wrong place, for example
$90.30 instead of $903.00 could suggest a product
is much cheaper than it really is
Questions • misspelling such as ‘stair’ instead of ‘stare’, where
This spreadsheet is used to calculate the area of words have completely different meanings
a driveway. • misplaced characters, such as a licence plate of
A B C
BW9EP3T instead of BW93PET.
1 Area calculator
2 Length = 3m Relevance
3 Width = 5m Information must be relevant to its purpose. Having
4 Area = 15 m2 additional information that is not required means that
the user must search through the data to find what is
Figure 1.4: Part of a spreadsheet. actually required.
Examples of irrelevant information include:
The builder using the spreadsheet needs to know the
• being given a bus timetable when you want to
length and width of a driveway for a customer.
catch a train
3 Identify one direct source the builder could use to • being told the rental price of a car when you want
find the length and width. to buy the car
4 Identify one indirect source the builder could use to • a user guide for a mobile phone that includes
find the length and width. instructions on how to assemble a plug.
5 Give one advantage of using the direct source
instead of the indirect source to find the length
and width. Age
Information must be up to date in order to be useful.
Note: static and dynamic data is extension Old information is likely to be out of date and therefore
content, and is not part of the syllabus. no longer useful. When using indirect data sources,
always check when the information was produced.
Examples of out of date information include:
• the number of residents in a town based on a
census from 2011, but 500 new homes have been
built in the town since then
• a rugby score that has not been updated for 5
minutes, during which time a player scored.

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Level of detail CONTINUED


There needs to be the right amount of information for Describe how accuracy, relevance, level of
it to be good quality. It’s possible to have either too detail and completeness affect the quality of
little or too much information provided. If there is information in the invitation.
too much information, then it can be difficult to find
the exact information required. If there is not enough
information, then it is not possible to use it correctly.
For example, a person orders a pizza. They ask for
Questions
a large pepperoni to be delivered. They forgot to say 6 Identify three factors that could affect the quality
what type of base they wanted and where it should be of information.
delivered to. The pizza company does not have enough 7 Describe how the age of information could affect
information to fulfil the order. the quality of information within a user guide for a
Another example could be a traveller who needs to catch mobile phone.
a train from Bhopal to Kacheguda. The traveller phones
the rail company to find out the time of departure and
arrival for trains, but they have to listen to all the times
of the stations in between before they get the arrival
1.3 Encryption
time at Kacheguda. One specific type of encoding is encryption. Encryption
is when data is scrambled so that the data cannot be
understood. Data can be encrypted when it is stored on
Completeness disks or other storage media, or it can be encrypted when
it is sent across a network, such as a local area network
All information that is required must be provided in
or the internet. Encryption is important when sending
order for it to be of good quality. Not having all the
or storing sensitive data such as personal data or a
information required means it cannot be used properly.
company’s sales figures. Data being sent across a network
For example, a person has booked their car in for a or the internet can be intercepted by hackers. Data stored
service over the phone. The mechanic at the garage on storage media could be stolen or lost. The purpose of
tells them the name of the street but doesn’t give the encryption is to make the data difficult or impossible to
building number. read if it is accessed by an unauthorised user. Accessing
encrypted data legitimately is known as decryption.

PRACTICAL ACTIVITY 1.02


KEY WORD
Look at this invitation.
encryption: scrambling data so it cannot be
understood without a decryption key to make it
unreadable if intercepted

Caesar cipher
A cipher is a secret way of writing. In other words it is
a code. Ciphers are used to convert a message into an
encrypted message. It is a special type of algorithm which
defines the set of rules to follow to encrypt a message.
Roman Emperor Julius Caesar created the Caesar cipher so
that he could communicate in secret with his generals.
The Caesar cipher is sometimes known as a shift cipher
Figure 1.5: Birthday party invitation. because it selects replacement letters by shifting along
the alphabet.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 1.01

In this example the alphabet is to be shifted by three (+3) letters so that A = D, B = E and so on.

Original A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Encrypted D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

So to encrypt the word ‘Hello’, you would use:


H = K, E = H, L = O, O = R
which gives KHOOR.

While the Caesar cipher is very easy to use, it’s also very
easy to crack. Asymmetric encryption
Asymmetric encryption is also known as public-key
cryptography. Asymmetric encryption overcomes the
PRACTICAL ACTIVITY 1.03 problem of symmetric encryption keys being intercepted
1 Using the Caesar cipher +3 example above, by using a pair of keys. This will include a public key which
write an encrypted message to a friend. Ask is available to anybody wanting to send data, and a private
your friend to decipher it. key that is known only to the recipient. The key is the
algorithm required to encrypt and decrypt the data.
2 Choose how many letters you are going
The process works like this:
to shift by and write another encrypted
message to a friend. Don’t tell your friend
Sender Recipient
how many letters you shifted by. Your friend
should try to decipher the code by working Encrypts using recipient’s Decrypts using same
public key algorithm using their
out which letters appear most commonly. matching private key

3 Look online for how to ‘create a cipher


wheel ‘ and use it to encrypt and Figure 1.7: Asymmetric encryption.
decrypt messages.
Here is an example. Tomasz sends a message to Helene.
Tomasz encrypts the message using Helene’s public key.
Helene receives the encrypted message and decrypts it
Symmetric encryption using her private key.
Symmetic encryption is the oldest method of Tomasz
encryption. It requires both the sender and recipient to
possess a secret encryption and decryption key known as Hello
Encrypt
a private key. With symmetric encryption, the secret key Helene!
needs to be sent to the recipient. This could be done at a Helene’s
public key
separate time, but it still has to be transmitted whether
6EB69570
by post or over the internet and it could be intercepted. 08E03CE4

Sender Recipient
Encrypts using secret key Decrypts using the same Helene
secret key
Hello Decrypt
Helene! Helene’s
Figure 1.6: Symmetric encryption. private key

Figure 1.8: Example of asymmetric encryption.

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Asymmetric encryption requires a lot more processing limited to disks and can be used on other storage media
than symmetric encryption and so it takes longer such as backup tapes and Universal Serial Bus (USB)
to decrypt the data. However, as the decryption key flash memory. It is particularly important that USB flash
does not have to be transmitted, it is more secure than memory and backup tapes are encrypted because these
symmetric encryption. are portable storage media and so are susceptible to
being lost or stolen. If the whole medium is encrypted,
In order to find a public key, digital certificates are
then anybody trying to access the data will not be able to
required which identify the user or server and provide
understand it. The data is usually accessed by entering a
the public key. A digital certificate is unique to each user
password or using a fingerprint to unlock the encryption.
or server. A digital certificate usually includes:
• organisation name
HTTPS
• organisation that issued the certificate Normal web pages that are not encrypted are fetched
• user’s email address and transmitted using Hypertext Transfer Protocol
(HTTP). Anybody who intercepts web pages or data
• user’s country being sent over HTTP would be able to read the
• user’s public key. contents of the web page or the data. This is particularly
a problem when sending sensitive data, such as credit
When encrypted data is required by a recipient, the card information or usernames and passwords.
computer will request the digital certificate from the
sender. The public key can be found within the digital Hypertext Transfer Protocol Secure (HTTPS) is the
certificate. encryption standard used for secure web pages. It uses
Secure Socket Layer (SSL) or Transport Layer Security
Asymmetric encryption is used for Secure Sockets (TLS) to encrypt and decrypt pages and information
Layer (SSL) which is the security method used for sent and received by web users. SSL was first used in
secure websites. Transport Layer Security (TLS) has 1996 and was replaced by TLS in 1999. SSL can still be
superseded SSL but they are both often referred to as used, but it has vulnerabilities so it’s not recommended.
SSL. Once SSL has established an authenticated session, TLS is the protocol that is used by banks when a user
the client and server will create symmetric keys for faster logs onto online banking. A secure web page can be
secure communication. spotted by its address beginning with https:// and in
addition some browsers display a small padlock.
KEY WORDS

SSL: Secure Socket Layer KEY WORD

TLS: Transport Layer Security HTTPS: Hypertext Transfer Protocol Secure

PRACTICAL ACTIVITY 1.04

Find and watch a video about SSL.


Figure 1.9: The ‘s’ after ‘http’ and the padlock indicate that
this is a secure website.

Applications of encryption When a browser requests a secure page, it will check the
digital certificate to ensure that it is trusted, valid and
that the certificate is related to the site from which it is
Hard disk coming. The browser then uses the public key to encrypt
Disk encryption will encrypt every single bit of data a new symmetric key that is sent to the web server. The
stored on a disk. This is different to encrypting single browser and web server can then communicate using
files. In order to access any file on the disk, the encryption a symmetric encryption key, which is much faster than
key will be required. This type of encryption is not asymmetric encryption.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 1.02


Email
Email encryption uses asymmetric encryption. This
The web browser requests the certificate from the web means that recipients of emails must have the private
server. key that matches the public key used to encrypt the
original email. In order for this to work, both the sender
1 Browser requests certificate Web server and recipient need to send each other a digitally-signed
Web browser
message that will add the person’s digital certificate to
the contact for that person. Encrypting an email will
Figure 1.10: Asymmetric cryptography. also encrypt any attachments.

The web browser then uses the web server’s public How encryption protects data
key to encrypt a new symmetric key and sends that Encryption only scrambles the data so that if it is found,
encrypted symmetric key to the web server. The web it cannot be understood. It does not stop the data from
server uses its own private key to decrypt the new being intercepted, stolen or lost. However, with strong
symmetric key. 256-bit AES encryption, it is virtually impossible for
somebody to decrypt the data and so it is effectively
protected from prying eyes.

REFLECTION

Most Wi-Fi access points and Wi-Fi routers use


encryption. This serves two purposes. The first is
to only allow people who know the ‘key’ (usually
a password) to access the network, so that any
unauthorised users cannot gain access. The
second is to encrypt the data, so that it cannot
be understood by somebody ‘snooping’ on the
Wi-Fi network.
Wi-Fi networks are particularly susceptible to
‘snooping’ because no wires are required to
connect to the network. It is possible to sit in
Figure 1.11: Secure website identification. a car outside somebody’s house and see the
Wi-Fi network. The ‘key’ stops that person from
The browser and web server now communicate using accessing the network and also stops that person
the same symmetric key. from understanding the data that is moving
around the network.
Encryption Decryption
Did you know that, if you access a public
Wi-Fi hotspot that is ‘open’ and therefore not
Credit card Symmetric Scrambled Symmetric Credit card encrypted, anybody with the right software can
data key data key data see what you are sending over the network,
including your emails? This applies to laptops,
Figure 1.12: Symmetric encryption. tablets and mobile phones or any other device
using public Wi-Fi.

10

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Question Presence check


A presence check is used to ensure that data is entered.
8 Decipher this text that has been encrypted using the
If data is entered, then it is accepted. If data is not
Caesar cipher with a shift of +4.
entered, then the user will be presented with an error
AIPP HSRI message asking them to enter data.

1.4 Checking the accuracy


of data
Validation
Validation takes place when data is input into a
computer system. The purpose is to ensure the data is
sensible and conforms to defined rules. A railway season
ticket will have an expiry date. The season ticket is valid
until it expires. Once it expires it is invalid. The rule here
is that the date the season ticket is used must be before
its expiry date.
When data is validated, if it conforms to the rules then it Figure 1.13: Required data on a website.
will be accepted. If it does not conform to the rules, then
it will be rejected and an error message will be presented.
Validation does not ensure that data is correct.
WORKED EXAMPLE 1.03

KEY WORD When filling in a ‘contact us’ form on a website, it is


essential that an email address is entered. These inputs
validation: the process of checking data matches would be valid if only a presence check is carried out:
acceptable rules
• a • a@b
[email protected] • @
• 372823
PRACTICAL ACTIVITY 1.05
Notice that none of these are correct but they pass the
Create a flowchart to describe the process of rule that data must be present.
validation. You should include the following:
• Start • Data accepted
• End • Data rejected Range check
• Input of data • Validation decision A range check ensures that data is within a defined
range. A limit check has a single boundary. This could
• Error message be the highest possible value or the lowest possible value.
A range check includes two boundaries, which would
There are a variety of different validation be the lower boundary and the upper boundary. These
checks that can be used to check whether data symbols are used when comparing with a boundary:
is acceptable. These different checks are the
different types of rules that are used. > greater than > = greater than or equal to
< less than < = less than or equal to

11
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Examples of a length check include:


WORKED EXAMPLE 1.04
• A password must be at least six characters long.
a An opinion poll is taken and asks for the
respondent’s age. The respondents have to be • A grade must be exactly one character long.
at least 18 years old. The lower boundary is 18. • A product code must be at least four characters and
There is no upper boundary, so this is a limit no more than six characters.
check. This could be written as:
Data that is of the allowed length is not necessarily
Age > = 18 correct. For example, a valid date might require six
b Letters representing grades for an exam are digits. A date of 2ndFeb would be a valid length because
entered. Only the letters A–E are valid grades. it contains six characters, but it would not be correct
The grade must be less than F. The upper because it does not follow the required format.
boundary is E. There is no lower boundary, so
this is a limit check. This could be written as: Format check
Grade < F A format check ensures data matches a defined format.
c The number of students in a class must be It is sometimes known as a picture check and the data
between 5 and 28. The lower boundary is 5 and has to follow a pattern.
the upper boundary is 28, so this is a range check.
This could be written as:
WORKED EXAMPLE 1.05
Number of students > = 5 and < = 28
a An email address must include an @ symbol
preceded by at least one character and followed
Data that is within the boundaries is valid. Data that is by other characters. These data would be valid:
outside the boundaries is invalid. Data that is valid and • [email protected]
within the boundaries is not necessarily correct. A grade
[email protected]
of C could be entered when a grade A should have been
entered. C is valid but incorrect. • fdc@jb
b A student ID must be four numbers followed by
Type check two letters. These data would be valid:
A type check ensures that data must be of a defined • 3827BD
data type.
• 1111AA
Examples of a type check include:
• If an age is entered, it must be an integer.
Data that matches the pattern is valid. Data that is valid
• If a grade is entered, it must be text with and of the defined format is not necessarily correct. An
no numbers. email address of fdc@jb meets the rules above but is
• If a price is entered, it must be numerical. clearly incorrect.
• If a date of birth is entered, it must be a date.
Lookup check
Data that is of the correct data type is valid. Data that
A lookup check tests to see if data exists in a list.
is valid and of the correct data type is not necessarily
correct. A date of birth of 28/12/2087 could be entered. For example, when asking a user for their gender,
The date is valid because it is a date data type, but it is they can respond with ‘Male’ or ‘Female’. A lookup
clearly incorrect. validation rule would check to see that the values are
within this list. Students taking a qualification could
be issued grades of pass, merit and distinction. When
Length check
inputting the data, a validation rule could check that
A length check ensures data is of a defined length or only ‘X’, ‘P’, ‘M’ or ‘D’ are entered (‘X’ would be
within a range of lengths. for fail).

12

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Consistency check There are a variety of calculations that can be


performed to determine what the check digit should
A consistency check compares data in one field with
be. The important thing is that the same calculation
data in another field that already exists within a record,
used to create the check digit in the first place should be
to see whether both are consistent with each other.
used to confirm the check digit when the identification
number is input.
WORKED EXAMPLE 1.06

a When entering the gender of ‘M’ or ‘F’, a WORKED EXAMPLE 1.07


consistency check will prevent ‘F’ from being
entered if the title is ‘Mr’ and will prevent ‘M’
from being entered if the title is ‘Mrs’ or ‘Miss’.
b When entering data about dispatching products,
it would not be possible to mark an item as being
dispatched until after it has been packaged.

Check digit
A check digit is a number (or letter) that is added to Figure 1.15: Unique product code check digit.
the end of an identification number being input. It is
a form of redundancy check because the check digit is The Unique Product Code (UPC) check digit is used
redundant (not needed for the identification number, but with 13-digit barcodes. It is the last digit shown on a
just used for validation). When the identification number barcode. The algorithm for calculating the check digit
is first created, an algorithm (a series of calculations) is as follows.
is performed on it to generate a check digit. When the
identification number is input, the same algorithm is 1 Add all the digits in even numbered
performed on it. The result of the algorithm should positions together.
match the check digit. The data is valid when the result 2 Multiply the result (1) by 3.
of the algorithm matches the check digit. The data is not 3 Add all the digits in odd numbered
valid when the result of the algorithm does not match positions together.
the check digit.
4 Add results (2) and (3) together.
5 Divide the result (4) by 10.
Original identification number = 20392
Algorithm is performed on 20392 6 Calculate the remainder (modulo 10) of
Check digit = 4 result (5).
Data including check digit = 203924 7 Subtract (6) from 10.
Valid Example
Identification number including check digit is entered into the computer: 203924 Valid example
Algorithm is performed on 20392
Result of algorithm = 4 In this example, the International Standard Book
Result of algorithm (4) is compared with check digit that was entered (4). Number (ISBN) is 978095734041-1 where the last 1
They match. is the check digit. To calculate the check digit, this
Data is valid.
algorithm is performed on the ISBN (excluding check
Invalid Example
Identification number including check digit is entered into the computer: 205924
digit).
Algorithm is performed on 20392
Result of algorithm = 7 1 Add all the digits in even numbered positions
Result of algorithm(7) is compared with check digit that was entered (4).
together (978095734041): 7 + 0 + 5 + 3 +
They do not match. 0 + 1 = 16.
Data is invalid.
2 Multiply result (1) by 3: 16 × 3 = 48.
Figure 1.14: Valid and invalid check digit calculatons.

13

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED REFLECTION

3 Add all the digits in odd numbered positions The usual algorithm for UPCs is to multiply the
together (978095734041): 9 + 8 + 9 + 7 + odd digits by 3 rather than the even digits. It
4 + 4 = 41. is only for 13-character barcodes that the even
4 Add results (2) and (3) together: 48 + 41 = 89. digits are multiplied by 3.
5 Divide the result (4) by 10: 89 ÷ 10 = 8.9. Find out how to calculate a check digit for
6 Calculate the remainder (modulo 10, when 10-digit barcodes.
the number is divided by 10) of result (5): 89
MOD 10 = 9.
7 Subtract (6) from 10: 10 – 9 = 1.
Verification
The result of the algorithm is 1.
Verification is the process of checking that the
data entered into the computer system matches the
Invalid example
original source.
In this example, the ISBN has been entered incorrectly
because two numbers have been transposed (7 and 3)
accidentally: 978095374041-1. KEY WORD
1 Add all the digits in even numbered positions verification: ensuring data entered into the
together (978095374041): 7 + 0 + 5 + 7 + system matches the original source
0 + 1 = 20.
2 Multiply result (1) by 3: 20 × 3 = 60.
3 Add all the digits in odd numbered positions
together (978095374041): 9 + 8 + 9 + 3 + Visual checking
4 + 4 = 37. A method of verification can be for the user to check
4 Add results (2) and (3) together: 60 + 37 = 97. visually that the data entered matches the original
source. This can be done by reading the data displayed
5 Divide the result (4) by 10: 97 ÷ 10 = 9.7.
on screen and comparing it with the original data. If the
6 Calculate the remainder (modulo 10) of result data matches, then it has passed the verification process.
(5): 97 MOD 10 = 7. If it does not match, then it has failed the verification
7 Subtract (6) from 10: 10-7 = 3. process and needs to be re-entered. Visual checking
does not ensure that the data entered is correct. If the
The result of the algorithm is 3. The result 3 is original data is wrong, then the verification process may
compared with the check digit of 1 that was entered. still pass.
They do not match. The ISBN entered is invalid.
For example, if the intended data is ABCD but ABC
is on the source document, then ABC will be entered
into the computer and verified, but it should have been
PRACTICAL ACTIVITY 1.06 ABCD in the first place.

Use a website to generate check digits for


product codes.
Double data entry
Another method of verification is to input data into
the computer system twice. The two items of data are
compared by the computer system and, if they match,
then they are verified. If there are any differences, then
one of the inputs must have been incorrect.
For example, when changing a password, most systems
will ask the user to enter the new password twice. This
is because it is critical that the password is entered

14

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

correctly in order that the user can gain access to the


CONTINUED
system in the future. If the new passwords match, then
the password will be changed. If the new passwords The computer calculates the hash total to be 239. As 239
don’t match, then one of the passwords must have been does not match 194 there was either a data entry error or
entered incorrectly. an error in the manual calculation of the hash total. In
It is still possible to pass double entry verification this case the error occurred with the input of candidate
and for the data to be incorrect. If the data is entered 18264 whose mark should have been 38 not 83.
incorrectly twice, then the two values may match. For
example, if the CAPS key is left on by mistake then both
entries would match. A hash total is likely to find an error, but there are some
occasions when an error wouldn’t be found.
Hash total
Hash totals can be used when inputting a set of data. WORKED EXAMPLE 1.09
A hash total is calculated by adding together values
A user is inputting the following coursework marks
from an input field for all the records that need to be
for students:
input. Before input starts, the user will manually add
up the values. Once input is completed, the computer Candidate number: 18292
will compare the hash total it calculates automatically Coursework mark: 74
with the hash total calculated manually before data
Candidate number: 18264
entry. If the two totals are different, then a mistake has
Coursework mark: 38
either been made during data input or in the manual
calculation of the hash total. Candidate number: 18279
Coursework mark: 82
WORKED EXAMPLE 1.08 The user adds up the total of all the coursework
marks to give a hash total:
A user is inputting these coursework marks for
74 + 38 + 82 = 194
students.
The user then inputs the coursework marks as follows:
Candidate number: 18292
Coursework mark: 74 Candidate number: 18292
Coursework mark: 73
Candidate number: 18264
Coursework mark: 38 Candidate number: 18264
Coursework mark: 39
Candidate number: 18279
Coursework mark: 82 Candidate number: 18279
Coursework mark: 82
The user adds up the total of all the coursework
marks to give a hash total: The computer calculates the hash total to be 194.
Because 194 matches 194 the data entry errors of 73
74 + 38 + 82 = 194
and 39 were not detected.
The user then inputs the coursework marks as follows:
Candidate number: 18292
Coursework mark: 74
Control total
Candidate number: 18264
Coursework mark: 83 Control totals are very similar to hash totals. Hash
totals can use any field and the sum of the data used
Candidate number: 18279 may not have any meaning. Control totals have some
Coursework mark: 82 useful meaning. For example, a control total could be
the number of items in the batch that is to be input, or
the total of prices for individual items on an order.

15

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Parity check
A parity check is used to find errors during data WORKED EXAMPLE 1.11
transmission. Each byte (or word) of data is checked
These seven bits of data are about to be transmitted:
individually. For the purpose of explaining the parity
check, we will assume that the parity check is on a single 1001100
byte only. One of the bits in each byte is used as the There are three on bits which is an odd number. The
parity bit and the other 7 bits are used to represent the parity bit is therefore set to be off (0) so that the total
data. There are two types of parity check: even parity number of on bits is an odd number:
and odd parity.
10011000
With even parity, the total number of on bits in a byte
must be an even number. If the number of on bits within When this byte is received after transmission, the
the 7 bits of data is odd, then the parity bit will be set to number of on bits are added up. If the total is odd,
on to make the total on bits even. If the number of on then the data is accepted. In this example, the data is
bits within the 7 bits of data is even, then the parity bit received as:
will be set to off to keep the total on bits as even. 11011000
The total on bits is in the received data is four. This is
WORKED EXAMPLE 1.10 an even number so the computer system knows that
an error occurred during data transmission.
These seven bits of data are about to be transmitted:
1001100
Each on bit is represented by a 1 (one) and each off Parity bits only check to see if an error occurred during
bit is represented by a 0 (zero). There are three on bits data transmission. They do not correct the error. If an
which is an odd number. The parity bit is therefore set error occurs, then the data must be sent again. Parity
to be on (1) so that the total number of on bits is an checks can find an error when a single bit is transmitted
even number: incorrectly, but there are occasions when a parity
check would not find an error if more than one bit is
10011001 transmitted incorrectly.
When this byte is received after transmission, the
number of on bits are added up. If the total is even, WORKED EXAMPLE 1.12
then the data is accepted.
These seven bits of data are transmitted using even
parity with a parity bit of one:
With odd parity, the total number of on bits in a byte 10011001
must be an odd number. If the number of on bits
within the seven bits of data is even, then the parity bit The data is received as:
will be set to on to make the total on bits odd. If the 01011001
number of on bits within the seven bits of data is odd,
then the parity bit will be set to off to keep the total on The data is accepted by the even parity check because
bits as odd. there are four on bits. The parity check was not able
to identify the error where the first two bits were
transmitted incorrectly.

16

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Checksum PRACTICAL ACTIVITY 1.07


Checksums are the result of a calculation on the
contents of a file used to check whether a file has been 1 Copy a file such as a word processed
transmitted or copied correctly. This can be especially document to a different folder.
useful if checking that a hacker hasn’t disguised a
2 Compare the checksums of the original file
malicious file as a genuine one. Any slight change in a
and the copied file using an online checker.
file will mean that a different checksum is generated.
What do you notice about the checksums?
The checksum is usually represented to the user as
hexadecimal digits which are the numbers 0 to 9 and 3 Now make a change to the copied file.
letters A to F with 2 hexadecimal digits representing a
single byte. 4 Compare the checksums of the original file
and the changed copied file. What do you
Different algorithms can be used to generate the notice about the checksums?
checksum. Popular algorithms include SHA-256, SHA-1
and MD5. Although it’s very rare, MD5 and SHA-1 You can also see other checksums that would be
have been known to generate collisions. Collisions occur created using other methods.
where the same checksum is generated for a different
file. This can enable a hacker to disguise a malicious file
as a genuine file, but is unlikely to happen by chance.
Therefore, SH-1 and MD-5 are still suitable for checking
for transmission errors. If the checksum at the start of
transmission does not match the checksum at the end of
transmission, then there will have been a transmission
error. At the time of writing, there haven’t been any
reports of SHA-256 creating collisions and so it is
currently the safest checksum method to use.

Figure 1.16: Checksums for a Microsoft® Windows® file.

17

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The need for both validation • sorting and searching


• output and dissemination.
and verification
It is possible to enter valid data that is still incorrect. It
REFLECTION
is also possible to verify incorrect data. By using both
validation and verification, the chances of entering The data to be processed is usually stored in
incorrect data are reduced. If data that is incorrect files. Each file is a collection of records about
passes a validation check, then the verification check is a particular entity, for example, records of
likely to spot the error. customers, employees or products.
Each record consists of items of information
WORKED EXAMPLE 1.13 called fields, for example, customer surname,
employee number or product price.
The validation rule is that a person’s gender must be
a single letter. N is entered. This passes the validation
check but is clearly incorrect. When verified using
Organisations process data in different ways such as
double entry, the user enters N first followed by M
batch, online and real time processing.
the second time. The verification process has identified
the error.
However, it is still possible that the user could enter Batch processing
N twice and both the validation and verification
processes would fail.

JOB 10
JOB 9
JOB 8
JOB 7
JOB 6
JOB 5
JOB 4
JOB 3
JOB 2
PRACTICAL ACTIVITY 1.08

Perform a visual check on the following sentence.


B1
I were walking along the road yesterday wen I JO
spotted a dog without a lead I called the dog but
it did not respond. the dog ran away;
Figure 1.17: Batch processing.

In a batch processing system, the individual operations


Questions or transactions that need to be performed on the data
9 Describe the purpose of verification. are not done one by one by an operator in ‘real time’ but
are collected together into a batch. At a later time, the
10 Identify three methods of validation.
system automatically carries out all of the transactions
11 Explain, using examples, why validation and and updates the data file.
verification do not ensure that data is correct.
Examples where batch processing is used include
automated backups, the processing of employees’ wages,
1.5 Data processing customer orders and stock control.

Data processing is any activity that manipulates or For data to be processed it is often stored first. This can
carries out operations on data. be for long periods of time or momentarily. There are
two main file types that are used to store data, master
Data processing includes actions such as: files and transaction files. A master file usually stores
• collection and storage data about a thing such as a person, place or object. A
transaction file usually stores data about an event, such
• editing and updating as an order, electricity usage and travel expenses.

18

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

KEY WORDS

batch processing: sets of data are processed all at one time without user interaction
master file: a table in a database containing information about one set of things, for example, employees
transaction file: data that is used to update a master file

WORKED EXAMPLE 1.14

Businesses store customer details such as name, address and the total money they have spent in a file. There is a
record for each customer.
Here is an example file.
Field

Customer_Id Customer_Name Address Postcode Total_Spent (£)


01456 Webb 3 The Grove CM6 4EW 132.65
03678 Rahman 13 Abbey Road CB9 7FG 458.42
04632 Yang 6 Bath Terrace DW9 13CA 1342.90
06342 Jenkins 9 Bridge Street GS5 9RS 689.32
09763 Nkrumah 2 Cambridge Avenue BR8 9GR 2954.56
13693 Hussain 28 Fenton Street FC7 2BN 25.60
16936 Jackson 22 Grafton Street MB1 1CP 193.87

Customer_Id is the primary key for each


record. The data in the primary key field
must be unique for each customer.

This file is called the master file. In a payroll system, used for processing employee wages, the master file would
contain details of each employee, such as their ID number, name, address, hourly pay, total earned for the year and
the amount of tax they have paid.

Whenever a customer orders a product, the transaction After a regular interval, the complete batch of records
is recorded in another file called a transaction file. in the transaction file are processed. In this example,
invoices and delivery notes will be generated by merging
Here is an example transaction file.
the transaction and master files and the data in the
master file is updated by recalculating the Total_
Customer_Id Product_Ordered Cost (£)
Spent field.
16936 Sweater 25.00
At the start of the process, the transaction file is
09763 Blouse 30.50
validated and any transactions that are invalid will be
06342 Jeans 60.75 moved to an errors file.
03678 Shirt 35.60 The transaction file is sorted so that it is in the same
04632 Jacket 100.00 order as the master file.

Table 1.4: Example transaction file.

19

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 1.15

In this example the transaction and master files are sorted into ascending order according to the Customer_Id field.

Customer_Id Product_Ordered Cost (£) Customer_Id Product_Ordered Cost (£)


16936 Sweater 25.00 03678 Shirt 35.60
09763 Blouse 30.50 04632 Jacket 100.00
06342 Jeans 60.75 06342 Jeans 60.75
03678 Shirt 35.60 09763 Blouse 30.50
04632 Jacket 100.00 16936 Sweater 25.00
Figure 1.18: Unsorted. Figure 1.19: Sorted.

The batch process moves through the transaction file and finds the corresponding record in the master file with the
same Customer_Id.

WORKED EXAMPLE 1.16

The first transaction in the previous worked example has a Customer_Id of 03678. This transaction is merged
with the customer master file to produce an invoice and delivery note and to update the Total_Spent field in the
master file.
Notice how the Total_Spent field of the second record has been updated.

Customer_Id Customer_Name Address Postcode Total_Spent (£)


01456 Webb 3 The Grove CM6 4EW 132.65
03678 Rahman 13 Abbey Road CB9 7FG 494.02

This continues until all the records in the master file have been copied to the new version.
The new master file will now hold this information.

Customer_Id Customer_Name Address Postcode Total_Spent (£)


01456 Webb 3 The Grove CM6 4EW 132.65
03678 Rahman 13 Abbey Road CB9 7FG 494.02
04632 Yang 6 Bath Terrace DW9 13CA 1442.90
06342 Jenkins 9 Bridge Street GS5 9RS 750.07
09763 Nkrumah 2 Cambridge Avenue BR8 9GR 2985.06
13693 Hussain 28 Fenton Street FC7 2BN 25.60
16936 Jackson 22 Grafton Street MB1 1CP 218.87

20

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

One way of representing transaction processing as an


algorithm could be as follows.
Online processing
There are differing definitions of online processing.
For each line in transaction file
For this syllabus, the focus is specifically on interactive
Repeat processing.
Read next record in master file
Until transaction file ID matches master KEY WORDS
file ID
online processing: also known as interactive
master file total for current record =
processing, data is input by the user and
master file total + transaction file value
feedback given in the form of outputs
Next line in transaction file

Advantages and disadvantages of batch Interactive processing is what you are most likely to
be familiar with. Interactive means that the user and
processing computer are communicating together. The user inputs
data and the computer responds with an output. While
Advantages Disadvantages processing takes place, data is stored in RAM and is
It is a single, automated There is a delay as data not saved to non-volatile memory (for example, a disk)
process requiring little is not processed until until the user saves the data. The computer will process
human participation the specific time period. the data as quickly as possible so that the user is able to
which can reduce costs. see (or hear) the results of the processing. For everyday
It can be scheduled to Only data of the same tasks such as word processing, analysing data in a
occur when there is littletype can be processed spreadsheet, browsing the web and checking emails, the
demand for computer since an identical, response times will be thousandths of a second.
resources, for example, automated process is
One method of online processing is to deal with data
at night. being applied to all the
as transactions. A certain amount of data is input as a
data.
transaction. This amount of data is usually small.
As it is an automated Errors cannot be Once the data for the transaction is collected it is
process there will be corrected until the batch processed and the next transaction can occur.
none of the transcription process is complete.
and update errors that An online booking system, for example, an airline ticket
human operators would booking system, will process data in transactions. All
produce. the data about the customer, flight and seat number
will be collected in the transaction. This will then be
There are fewer
processed and a ticket can be provided as an output.
repetitive tasks for the
As each transaction is processed in turn, this avoids
human operators.
a seat on the aeroplane being double-booked. Once
a seat has been allocated to a transaction, until that
Table 1.5: Advantages and disadvantages of batch transaction is completed that seat cannot be booked
processing. by anyone else. This is because no transaction will be
processed until the previous one is completed. The same
would occur with a concert ticket booking system.
Question Electricity meter readings need to be recorded on a regular
basis so that accurate bills can be calculated. The readings
12 Describe how a telephone company might make use
are taken interactively using methods such as:
of both batch and interactive processing methods
including the use of master and transaction files. • a PDA or smart phone is used by an employee of
the electricity company
• the homeowner enters the meter reading using the
world wide web

21

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• the homeowner phones the electricity company and can authorise an organisation to take payments
enters the reading using the phone. automatically. This is often used for paying utility
bills which may vary each month.
Note that electricity meter readings can be taken
automatically using a smart meter which does not
require user interaction. Online stores
Online stores enable a customer to purchase a product
Electronic funds transfer from anywhere in the world and have it delivered to their
home address. An online store uses an interactive system
Electronic funds transfer (EFT) is the transfer of funds
where the customer can browse or search for products
(money) electronically to or from a bank account. Some
using a website. The customer can then add those
types of EFT payments include:
products to a virtual shopping basket which can be paid
• Direct payments where money can be sent from for using electronic funds transfer. The online store will
one bank account to another. This can either send a confirmation email to the customer and then
happen immediately or within a given time frame or email updates about the delivery of the product.
overnight. If it happens within a given time frame,
then there is usually a batch process involved that Automatic stock control
processes a batch of direct payments at one time.
The purpose of a stock control system is to ensure that
• Automated teller machines (ATMs) are used to a shop always has enough stock (products) to sell and
withdraw cash from a bank account. The ATM will never has too many. It’s also possible to have a stock
look up a customer’s bank account in a database control system that ensures there are always enough
and, if there are enough funds, then it will allow a parts needed for a manufacturing process. The main
withdrawal to take place and deduct the amount feature of a stock control system will be a database
withdrawn from the account balance. which will store data about each product that the shop
• Debit cards can be used to give an instruction stocks. In addition to this, data will be stored about the
to your bank to take funds to pay for goods or a suppliers.
service. A debit card is linked to a bank account
and, when used to make a payment, the transaction The system will need to store the following data about
is sent to the bank. A customer has to confirm the stock in order to maintain healthy levels of stock
card belongs to them by entering a PIN, although within the shop:
contactless payments are also possible without • quantity in stock
a PIN up to a limit for each transaction. Once
• reorder level (the point at which more stock will
the PIN is confirmed, the account number and
be ordered)
amount requested will be sent to the bank. The
bank’s computer system will check that the balance • reorder amount (the quantity that should be
available to the customer is sufficient for the ordered when the reorder level is reached).
transaction amount. If there are sufficient funds,
Each time a product is purchased at the till, its barcode
then the bank will return a message to the retailer
will be scanned. The barcode number will be found in
confirming that funds are available. The retailer
the database and the quantity recorded as being in stock
will then confirm the purchase and the amount to
will be reduced by one. When the quantity in stock
transfer from the customer to the retailer is sent to
reaches the reorder level for that product, an automatic
the bank. The bank’s computer system will then
order will be placed for the reorder amount of that
create a transaction for the amount of the purchase,
product. When the products that have been ordered
subtract the funds from the customer’s account and
arrive at the shop, the quantity in the database will be
add the funds to the retailer’s account.
increased by the number of products that have arrived.
• Direct debits are used where regular payments
need to be made. The owner of a bank account

22

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

WORKED EXAMPLE 1.17

Table 1.6 shows an extract of data that could be stored about stock in a stock control system (many fields have been
omitted such as Colour, Size, Category, Location etc):

Barcode Description Quantity in Stock Reorder Level Reorder Amount


012345678905 Male Polo Shirt 8 3 10
456789012343 Female Polo Shirt 4 3 10
567890123450 Boys Trainers 6 2 4
678901234567 Girls Trainers 1 2 4

Table 1.6

We can see from this that there are currently 4 female polo shirts in stock and the reorder level is 3. That means that
next time a female polo shirt is purchased, the quantity in stock will reduce to 3 and so 10 female polo shirts will be
reordered.
We can also see that there is only 1 girls trainer in stock and so it had already dipped below the reorder level so we
would expect to see that 4 girls trainers are already on order. When these 4 girls trainers arrive in store, the quantity
in stock will be increased by 4.
The system can be a little more complex than this in large supermarkets where they need to keep track of how much
stock is on the shop floor and how much stock is in the on-site stock room. There will also be times when products
go out of date and so have to be thrown away and the quantity in stock will need adjusting. Stock also goes missing,
sometimes by accidental damage or by theft. There will therefore be regular stocktakes where the shop checks the
amount of stock it has compared with what is stored in the database and then makes adjustments.

Electronic data exchange The traditional process of placing an order would involve
the buyer creating a purchase order, printing it and posting
Electronic data exchange, or electronic data interchange
it to the supplier. The supplier would then receive this paper
(EDI) is a standardised format for exchanging data
copy, enter the order onto their order entry system, print a
between organisations. For example, your school
delivery note to send with the order and print an invoice to
will submit coursework marks and estimated grades
send to the buyer. The buyer would then receive the invoice
to an awarding organisation, either online, or using
and then arrange for payment to be made.
software designed to facilitate the exchange of that
data. Application program interfaces (APIs) are used With business-to-business (B2B) electronic data
to provide a standard interface for importing and interchange, the buyer can create a purchase order
exporting data between different software. Accounts but, instead of printing it, the software will transmit
software will often automatically send data to the the order using EDI directly to the supplier’s ordering
government for tax purposes using an API. system. The supplier’s system will be able to give
immediate confirmation of receipt and updates
relating to the order, such as when the products have
Business-to-business buying and selling
been dispatched. Similarly, the supplier can create an
When a business buys in bulk from a supplier, the electronic invoice which will be transmitted by their
process can be made easier by having a common software to the buyer’s software and matched with the
interface for sending the order and receiving the order. original purchase order. Payment can then be made
Some large wholesalers may insist on clients using the using electronic funds transfer once the buyer confirms
wholesaler’s own software, but most will provide an API the goods have been received.
for clients to link their own software to.

23

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Real-time processing Computer games


When playing computer games, the input from the user
A real-time processing system processes data as soon as
needs to be processed immediately so that it can take
it has been input. Such systems are normally used when
effect and the game can be controlled. Each time a user
the immediacy of the data is vital.
asks a game character to move forward by pressing a key
or button, the character needs to do this immediately.
KEY WORDS In order to do this, the game needs to have a real-time
processing system to process the data.
real-time processing: data is processed as soon
as it has been input and outputs are generated
REFLECTION
immediately
Why would we not make every processing
system a real-time system? What would be
Air traffic control the impact if we did? List the advantages and
disadvantages of real-time processing.

Some real-time systems use a feedback loop where the


output directly affects the input.

INPUT PROCESS OUTPUT

Figure 1.20: Air traffic control.


STORAGE
In an air traffic control system, data such as the location
of all the aeroplanes currently in the air, is processed FEEDBACK
immediately so that the location of the planes can be
known by everybody using the system. This is vital
Figure 1.21: Feedback loop.
because this data will need to be given back to each plane
that is currently in flight to make sure no collisions occur.
There cannot be any delay in the processing of this data
because the result of a delay could be catastrophic.

24

Copyright Material - Review Only - Not for Redistribution


1 Data processing and information

Central heating system

WORKED EXAMPLE 1.18


A central heating system is constantly monitoring the temperature of its surroundings. The desired temperature
is stored, in this case 20 oC. When the temperature becomes too high, the boiler will be turned off. When the
temperature becomes too low, the boiler will be turned on.

Compare Turn boiler


Temperature Heat
temperature on or off
(INPUT) (OUTPUT)
(PROCESS) (PROCESS)

Stored
temperature e.g.
20°C (STORAGE)

Output = Heat – directly affects temperature = input

Figure 1.22: Thermostat. Figure 1.23: Temperature control.

When the boiler is turned on, it generates heat which will increase the temperature. This increase in temperature
affects the input to the system and therefore feedback has occurred because the output (heat) has affected the input
(temperature). The same happens if the boiler is turned off because the temperature in the room will be reduced and
when it reaches a certain level the boiler will switch on again and generate heat.

Air conditioning system As a rocket moves, its position is constantly changing.


If the position is off-course, then the rocket needs
rotating back on course. As the rocket is rotated, this
PRACTICAL ACTIVITY 1.09 immediately affects its position, which is also the input
Draw a diagram similar to the one in worked to the control system.
example 1.18 to show how an air conditioning
system would work. REFLECTION

Find out how different rocket guidance systems


Rocket guidance systems operate and the inputs and outputs that are used
to control the rocket’s path.
When a rocket is launched, the launch happens in
real-time. If the rocket veers off course, then any delay
in receiving instructions could see the rocket continue
in the wrong direction or, ultimately, crash. A rocket
guidance system needs to provide stability for the rocket
Question
and to control its movement. 13 Explain why real-time processing is required for a
video-conference.

25

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS

1 Using an example, define the term information. [2]


2 Users can pay for premium services on a website using their credit card.
a Explain why the website uses https at the beginning of the website address instead of http. [4]
b Explain symmetric encryption. [2]
The journalists working for the website encrypt their emails.
c Describe how asymmetric encryption is used with emails. [2]
When the users subscribe to premium features, they have to choose a password.
d Suggest how verification can be used when entering the password. [1]
[Total 9]
3 There is a form on the website in question 2 that can be used to submit news stories.
When data is entered onto the form, it is validated.
a State what the purpose of validation is. [1]
b Using an example related to submitting a news story, identify and describe one method of
validation. [3]
[Total 4]
4 Describe the difference between an online and a real-time processing system. [4]
5 Define the term ‘master file’. [2]
6 Describe three characteristics of a stock control system. [6]
7 Describe how a stock control system maintains stock levels automatically. [4]

SUMMARY CHECKLIST

I can explain the difference between data and information.


I can explain the use of direct and indirect sources of data.
I can evaluate the advantages and disadvantages of direct and indirect sources of data.
I can describe factors that affect the quality of information.
I can understand the need for encryption.
I can describe different methods of encryption.
I can describe encryption protocols.
I can explain how encryption is used.
I can evaluate the advantages and disadvantages of different protocols and methods of encryption.
I can describe the use of validation methods.
I can explain the need for both validation and verification.
I can describe batch, online and real-time processing methods.
I can give examples of when batch, online and real-time processing methods are used.
I can write an algorithm.
I can evaluate the advantages and disadvantages of different processing methods.

26

Copyright Material - Review Only - Not for Redistribution


Chapter 2

Hardware
and software
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• describe the characteristics of mainframe computers and supercomputers
• give examples of the use of mainframe computers and supercomputers
• explain the advantages and disadvantages of mainframe computers and supercomputers
• describe types of system software and how they are used
• explain the advantages and disadvantages of system software
• understand the need for utility software
• describe types of utility software and how they are used
• explain the advantages and disadvantages of utility software
• describe the uses of customer written software and off-the-shelf software
• explain the advantages and disadvantages of custom written and off-the-shelf software
• describe different types of user interfaces and their uses
• explain the advantages and disadvantages of different types of user interfaces.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you understand the difference between hardware and software?


• Can you explain the purpose of input, output and storage devices?
• Do you know the purpose of internal hardware devices including CPU, motherboard, RAM, ROM,
graphics card, sound card, HDD, SSD?
• Can you evaluate applications software and choose appropriate software for a given task?

dumb terminal that has very little processing power and


Introduction memory of its own or even an ATM (automated teller
machine). Mainframes are often used to host business
Hardware devices are the physical components of a databases that can be accessed by the business and also
computer. Hardware includes the CPU, motherboard, thousands of consumers simultaneously through a web
RAM, ROM, graphics card, sound card, monitor, interface. They are also used for large scale transaction
keyboard, mouse, printer and memory card, processing and batch processing. Other uses include
among others. statistical analysis such as analysis of census data.
Software is also known as programs or apps (application
software), such as word processing, spreadsheet, anti- KEY WORDS
malware or operating system. Each program consists
of programming code which gives instructions to the mainframe computer: powerful computer
computer in order to carry out a task. The code that serving several terminals
is passed to the hardware is in binary format which
consists of instructions in the form of lots of ones and
zeros (for example, 101011101110). Uses of supercomputers
While mainframes are designed to be used by
KEY WORDS thousands of users and carry out many different
types of instructions, supercomputers are designed to
device: a hardware component of a computer carry out large numbers of complex calculations. A
system consisting of electronic components supercomputer will run very few computer programs
software: programs which give instructions to and its focus is on executing instructions as quickly as
the computer possible for one purpose. They will be run at maximum
capacity so that their full power is used to process data
operating system: software that manages the and solve a problem.
hardware within a computer system

KEY WORD
supercomputer: large computer with parallel
2.1 Mainframe computers processing to complete highly complex
tasks quickly
and supercomputers
Supercomputers are required for research in quantum
Uses of mainframe computers mechanics where billions of complex calculations need
to be made to simulate the dynamics of millions of
Mainframe computers can serve many terminals, usually
atoms. They are also used in weather forecasting and
thousands, within an organisation. A terminal can
climate research where sophisticated numerical models
be a computer that is connected to the mainframe, a
of the atmosphere, ocean and space need to be created.

28

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

This means that their design prioritises the system


being available 100% of the time. To be reliable, the
hardware components must be capable of extensively
self-checking and recovering automatically in the case
of failure. Software for use on the mainframe will have
gone through extensive testing and should be able to be
updated quickly if problems are detected.
To remain available, the mainframe must be able to
continue to operate at all times. There will be redundant
hardware components, such as storage and power
supplies, that will take over automatically if an active
component fails. This will also mean that a failed
component can be swapped out with a replacement
without affecting the operation of the mainframe which
makes it serviceable. The term hot-swappable is used to
refer to hardware components that can be replaced while
the system is still running.
Mainframes can often operate without downtime for
Figure 2.1: Sierra Supercomputer at Lawrence Livermore
many years, but serviceability also requires that if the
National Laboratory.
mainframe does need to be taken down for maintenance
then it should be taken down for as short a period as
The supercomputers will process billions of observations possible. Longevity is important because mainframes
from weather monitoring stations, satellites, weather and supercomputers are a large financial investment
balloons, buoys and radar among others. and so they need to be useful for several years. The
ability to upgrade them by adding additional processors
or memory is important to ensure they can cope with
Characteristics of mainframe increasing demand.

and supercomputers Due to the power and quantity of processors,


mainframe computers and supercomputers generate a
lot of heat. This therefore requires cooling systems to be
in place. One method is to use air cooling which cools
the warm air in equipment racks and carries the heat to
large chillers, but this uses up a lot of power. A more
efficient method is to use liquid cooling which delivers
cold liquid direct to the processor chip. Many data
centres are now being built in colder parts of the world
where natural cold air can be circulated.
As mainframes service many applications and
thousands of simultaneous users, they require a multi-
layer approach to security including identifying users,
authentication and access control. Individuals and
groups can be given permission to access different
resources. Each resource will have different levels of
access that can be granted to it. For example, web users
would be allowed to see descriptions, images and prices
of active products for sale but only product managers
Figure 2.2: The IBM z13: mainframe computer. would be able to see non-active products or make
changes to the descriptions and prices. Security software
Mainframe computers need to have reliability, will also monitor the mainframe for potential security
availability and serviceability (RAS) characteristics. threats and alert administrators if a threat is suspected.

29

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Historically, the performance of a mainframe computer mega FLOPS, which is one million floating-point
has been measured by how many instructions its operations per second. Floating point instructions
processors can perform every second. This is measured are used in scientific computational research and so
in MIPs (millions of instructions per second). MFLOPS are more often used to compare the speed
However, this is not considered an accurate measure of supercomputers. MFLOPS give a more reliable
of performance of the mainframe as a whole for several measure of performance than MIPS but there are still
reasons, including that a complex instruction can take discrepancies where some processors can carry out a
longer to process than a simple one. CISC (complex single floating point operation but others would require
instruction set computing) processors will have a single several floating point operations for the same result.
instruction doing many things at once whereas RISC For example, the Cray-2 supercomputer has no divide
(reduced instruction set computing) processors will have instruction but the Motorola 68882 has divide, square
a single instruction that does very little but manages root, sine and cosine functions. This means that the
the instruction efficiently. Other factors that affect Cray 2 would require several floating point instructions
processing speed and mean that MIPs is not an accurate to carry out a division but the Motorola 68882 would be
measurement include: able to do this as a single floating point instruction.
• workload mix
• memory and cache sizes KEY WORDS
• amount of input and output activity
• operating systems and software FLOPS: floating point operations per second
– used to measure the performance of
• changes made to hardware. supercomputers
A batch workload that operates sequentially will make
efficient use of resources, but online activity such as As with desktop computers, there are a variety of
web access will have a much more random resource operating systems available for mainframe computers.
requirement. Larger memory and cache sizes can make a Some operating systems such as z/OS are general
significant difference to the performance of a mainframe purpose and offer a stable, secure and continuous
computer. Lots of input and output activity leads to less environment for software that runs on the mainframe.
efficient use of processors with tasks being suspended Others such as z/VM specialise in offering virtual
while input/output interruptions are processed. machines, each of which runs its own operating system.
As the amount of input and output activity can have a Some operating systems such as z/TPF specialise in
detrimental effect on the performance of a mainframe, transaction processing where there are a high volume
it’s possible to include dedicated system assist processors of transactions taking place such as ticket sales. Most
(SAPs) which handle input/output requests. This supercomputers run an operating system based on the
frees up the main processors enabling them to operate Linux operating system which is Open Source and so
without input/output interruptions. freely available for development.
Enhancements or bug fixes for operating systems
and applications software can improve the efficiency Questions
of processing or can have an adverse effect on how
efficiently processors are used. 1 State two purposes of mainframe computers.
2 Give two examples of uses of a supercomputer.
In general, the cost of mainframes is evaluated by
looking at how many MIPs can be delivered for the cost, 3 State what is meant by RAS in relation to
despite the shortfalls of the measurement. mainframe computers and supercomputers.
4 Explain why colder parts of the world are a
Another performance measurement is FLOPS (floating
favoured choice as a location for many data centres.
point operations per second), or MFLOPS (mega
floating point operations per second). MFLOPS means 5 Explain why MFLOPS are used instead of MIPS as
a performance measure for supercomputers.

30

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

Advantages
They are designed to
Disadvantages
The high cost of
2.2 System software
be reliable, available mainframes and Programs that are designed to maintain or operate the
and serviceable (RAS) supercomputers mean computer system are known as system software. The
which makes them more that they are only used by software that operates the computer hardware is known
reliable than regular large organisations such as the operating system.
computers. as governments, banks
and large corporations.
They require specialist KEY WORDS
operating systems which system software: software needed to operate a
are also very expensive.
computer system
They are scalable A lot of space is required
because processors and to install a mainframe
memory can be added or supercomputer and
as required. the temperature must
be maintained so that it
Operating systems
doesn’t become too hot. An operating system manages the hardware within
a computer system. When a computer is turned on
They are designed to Specialist support staff are
and after the Basic Input/Output System (BIOS)
last for at least 10 years. required for maintenance.
has loaded, the operating system is the first piece of
They are able to store The interface is command software that will load. It sits between hardware and
and process extremely driven which can be applications software and manages any communication
large amounts of data. difficult to understand. between the two.
More than one Supercomputers are
operating system can processing big data
be used at once which and so need massive Application
can improve the overall external storage drives
performance of the that are capable of
system. reading and writing data
quickly enough for the
Operating system
processing.
Hardware failures are
notified immediately so
that replacements can
be made very quickly. Hardware
Terminals only require
input and output
Figure 2.3: Operating system.
devices and can take
advantage of the
processing power of An operating system manages hardware by carrying out
the mainframe. Desktop tasks such as:
computers connected • allocating memory to software
to a mainframe can use • sending data and instructions to output devices
their own processing
power for smaller tasks • responding to input devices such as when a key
and the mainframe can is pressed
perform more complex • opening and closing files on storage devices
tasks. • giving each running task a fair share of processor time
• sending error messages or status messages to
Table 2.1: Advantages and disadvantages of mainframe
applications or users
computers
• dealing with user logons and security.

31

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

can be executed by the processor. It can also be referred


PRACTICAL ACTIVITY 2.01 to as the object file. The original high-level programming
Microsoft Windows is an example of an operating language file is known as the source file.
system. Find at least two other operating systems
used by desktop computers and at least three
KEY WORD
operating systems used by mobile phones
or tablets. compiler: translates high-level programming
language into an executable file in machine code

Device Drivers When a program is compiled, the whole source code is


While the operating system can manage the general translated into the executable file at once and can then
instructions to deal with hardware such as displaying be distributed to resellers, customers and individual
graphics on a screen, it requires the use of device drivers computers. As it is in an executable format, it can only
to deal with specific makes and models of hardware. A run on operating systems for which the compiler has
device driver is the software that comes with an external translated it. For example, programs that have been
hardware component and sends customised instructions to compiled for Windows© will not work on Linux© unless
that specific component. By using common device drivers, they are compiled again for Linux. The same situation
software applications are able to issue generic commands exists with mobile phone and tablet operating systems.
such as ‘print’ to the operating system without having to
know the different instructions required for every different
Program file (source file)
make and model of external hardware components.

Application

Compiler

Operating system

Executable file (object file)

Device driver

Execution
by CPU
Hardware

Figure 2.5: Compiler diagram.


Figure 2.4: Device driver.

The compilation process includes three stages:


Translators • lexical analysis
A translator translates a program written in a high- • syntax analysis
level programming language into machine code that a • code generation.
computer can understand.
During lexical analysis, any white space or comments will
Compilers be removed and the code will be broken down into tokens.
A compiler is a translator which creates a file containing Each token will represent a keyword, constant, identifier,
the machine code known as an executable file because it string, number, operator or punctuation symbol.

32

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

For example, in Python, the following code displays a Basic for Applications), which can be particularly useful
value to the screen when a document needs to be opened on a variety of
operating systems. Interpreters are also used when
print("Hello" + forename);
testing programs so that parts of the program can be
The tokens would be: executed without having to compile the whole program.
• print (keyword) • + (operator) Java uses both a compiler and an interpreter. The
• ( (symbol) • forename (identifier) original Java source code (files with a .java extension)
• " (symbol) • ) (symbol) is compiled into Java bytecode (files with a .class
• Hello (string) • ; (symbol) extension) which is an intermediate code. In order that
• " (symbol) the Java program can work on any operating system, a
Java Virtual Machine installed on the computer is used
Some tokens will be replaced by shorter tokens, for
to interpret the bytecode at the time of execution.
example, ENDWHILE might be replaced by EW. Any
errors detected during lexical analysis will be reported Java interpreter
to the user. for Mac OS

During syntax analysis, the structure of the program will be


Java Java Java interpreter
analysed to check that it conforms to the syntax (grammar) source code
Compiler
bytecode for Windows
of the programming language. Each set of tokens will be
analysed separately to see if keywords, constants, identifiers, Java interpreter
strings, numbers, operators and punctuation symbols have for Linux
been used correctly. A dictionary will be created which is a
list of variables used by the program, their data types and Figure 2.6: Java diagram.
the memory location to be used.
The final phase is code generation when the source code is Compiler and interpreter differences
converted into machine code for the target machine type.
Different machine types require different machine codes Compiler Interpreter
to carry out each instruction and so it’s important that the Translates source code Translates source code
source code is translated into the correct machine code. into object code all into object code one
at once in advance of line at a time.
Interpreters execution.
Interpreters also translate a program written in a Compiled object code Source code can be
high-level programming language into machine code, will only work on the translated into object
but use a different method. Instead of translating the operating system it has code for more than one
whole source code at once, it is translated one line at a been compiled for. operating system.
time. This can be less efficient than a compiler because Object code is ready Object code has to be
it takes time to do the translating as the program is to be executed without generated, so additional
being executed and also because statements within delay. time is added to the
programming loops (e.g. FOR, REPEAT, WHILE) have execution time.
to be analysed each time round. Compiling can take a Only the required code
long time, which is not needs to be interpreted,
KEY WORD appropriate for on-the- so this is efficient for on-
fly testing. the-fly testing.
interpreter: translates and executes a high-level
Errors are reported Errors are reported as
programming language one line at a time
after compilation has they are found during
completed. the interpretation.
An interpreter translates each line of the source code into The source code is
an intermediate stage and then executes the line of code. It optimised to run as
reports on errors as each line of source code is translated. efficiently as possible.
Interpreters are often used to translate macros or
Table 2.2: Compiler and interpreter differences.
application-based script languages (for example, Visual

33

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Linkers 2.3 Utility software


Computer programs often consist of several modules
Utility software is system software that performs some
(parts) of programming code. Each module carries
sort of maintenance on the computer system. Utility
out a specified task within the program. Each module
software does not include the operating system, but an
will have been compiled into a separate object file. The
operating system may come pre-installed with some
function of a linker (also known as a link editor) is
utility software.
to combine the object files together to form a single
executable file. In addition to the modules used, the
program may make reference to a common library. KEY WORDS
A common library contains code for common tasks
that can be used in more than one program, such as utility software: software that performs some
mathematical functions, memory management, open sort of maintenance on the computer system
and save dialogues, progress bars and input/output.
The linker can link modules from a library file into the
executable file, too.
Anti-virus
Source Source Source Source Anti-virus software is sometimes referred to as
file file file file antimalware software, as it deals with other threats such
as adware and spyware as well as viruses. It has two
main functions. The first is an anti-virus monitor that
Compiler
is continually monitoring the system for viruses and
malware. If the anti-virus monitor detects any unusual
behaviour or tell-tale signs of viruses or malware then
Object Object Object Object
file file file file it will prevent them from being executed so they cannot
cause damage to files or programs. The second function
is to check for viruses or malware that may already
be on a system. This is usually known as scanning the
system. If anything is found then the user will usually
be given the option to disinfect the affected area,
Runtime Executable put it into quarantine or ignore it. Ignoring it is very
Linker dangerous because it means the virus or malware will be
library program
executed and may have unexpected results. Disinfecting
is the safest option as it completely removes the threat
Figure 2.7: Linker diagram. from the system, but it does mean that any data or
program that had been affected would be deleted. The
Not all modules are always needed and a linker is compromise is to put the affected area into quarantine.
able to select which modules will form part of the This is a safe area where the virus or malware cannot be
executable file. executed, but the data or program remains isolated until
it can be checked more thoroughly.

Questions
6 Identify two functions of an operating system. Backup
7 Describe the function of a compiler. Backup utilities create a second copy of data and
8 Describe two advantages of an interpreter over programs that are in storage. A backup utility can be
a compiler. executed by the user, in which case the backup takes
place when the user asks it to, or it can be scheduled to
execute at a predetermined time so that the backup takes
place automatically. The user is usually able to select
which folders and files will be backed up and can usually
decide where the backup will be stored.

34

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

Data compression tracks that are in the same position on each platter form
a cylinder. Wherever possible, a computer will attempt
Data compression utilities will reduce the original size to store data in clusters on a single cylinder because this
of files so that they use up less storage space. This can requires the least access arm movement and the access
be achieved on a file-by-file basis or for a set of files arm is the slowest part of the hard disk.
or even a set of folders. It will be slower to open the
compressed file than the uncompressed file, but as it is Track Track sector
smaller it will use up less storage and can be transferred
from one location to another more quickly. Platter
Disc sector

Disk defragmentation
Storing data on a hard disk
A hard disk drive (HDD) consists of two main parts:
the device that is the electronics which store the data,
and the disk that is the medium onto which the data is
stored. The device (or drive) includes a read-write head
which sits at the end of an access arm and magnetises Head
sectors on the disk (platter).
Cluster

Actuator arm

Figure 2.9: Structure of a hard disk.

REFLECTION

Do you know where the phrase ‘my computer


has crashed’ comes from?

Fragmented files
As a hard disc gets used, files are kept together in
storage on the same cylinder or adjacent cylinders.
When files are deleted, gaps are left on the disc. As files
grow in size, they use up more space on the disc and
this may no longer be on the same or adjacent cylinder
and will be spread across many clusters. When all the
Figure 2.8: A hard disk.
cylinders have been used, the only space to store files is
within the gaps. If the gaps are not big enough, then files
There is usually more than one platter and therefore have to be split across gaps, meaning that they become
there will be several read-write heads for each side of fragmented. The problem with this is that when opening
each platter as shown in Figure 2.8. Each platter will the file, the access arm of the hard disc drive has to keep
have tracks and each track will be split into sectors. The moving to different locations which makes opening the
file a slow process.

35

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

defragmented files to a place where the whole file is kept


WORKED EXAMPLE 2.01
together. This can significantly improve the performance
In Figure 2.10, files have been neatly stored on the disc of a computer system, especially if program files have
with file A, followed by file B, then file C. become fragmented and can be defragmented.

A A A B B B C C
PRACTICAL ACTIVITY 2.02
Figure 2.10: Non-fragmented files.
Open 2.01 FragmentationDefragmentation.gif.
Figure 2.11 shows how each of the files has got bigger. In the grid, each colour represents a file, and
First of all file A got bigger with an extra two sectors, each cell represents an item.
then a new file D was added, then file B got bigger by
a sector, then file A again by a sector and finally file C. • The red file is originally stored as items 1 to 7.
• The blue file is then stored as items 1 to 4.
A A A B B B C C A A D B A C
• Additional items 8 to 10 are added to the
Figure 2.11: Fragmented files. red file, which are fragmented from the red
file items 1 to 7.
The files are fragmented and so they need to be
defragmented as in Figure 2.12. • The green file is then stored as items 1 to 3.
• The cyan file is then stored as items 1 to 5.
A A A A A A B B B B C C C D
• Additional items 4 to 5 are added to the
Figure 2.12: Defragmented files. blue file, which are fragmented from the
blue file items 1 to 3.
In Figure 2.13, files Q and S have been deleted.
• Additional items 4 to 5 are added to the
P P R R R T T T T green file, which are fragmented from the
green file items 1 to 3.
Figure 2.13: Non-fragmented files.
• The orange file is then stored as items 1 to 7.
A new file U needs to be stored but it requires four • The blue file is then deleted.
sectors. It could end up being stored as in Figure 2.14.
Now watch what happens as the purple file is
P P U4 R R R T T T T U1 U2 U3 added as items 1 to 2 where the blue file used to
be and the green file items 6 to 8 are added in a
Figure 2.14: Fragmented files.
fragmented manner.

Defragmentation can solve this problem by Finally, watch how the file is defragmented
temporarily moving U4, moving all of R next to P, by moving files into blank spaces and then
moving all of T next to R and then moving all of U reorganising them so each file is kept together.
next to each other, as shown in Figure 2.15.

P P R R R T T T T U1 U2 U3 U4

Figure 2.15: Defragmented files.


Formatting
When a disc is prepared for first time use, it needs to
be formatted. Formatting is the process of organising
the tracks on the disc into sectors. Each sector is where
Defragmentation data will be stored. A used disc can also be formatted, in
A defragmentation utility will reorganise all the files so which case all data will be lost and the tracks prepared
that each file is contiguous (kept together). It will do again as if the disc was being used for the first time.
this by moving fragmented parts of files and small files
to free space on the disc and creating space on whole
cylinders or adjacent cylinders. It will then move the

36

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

File management Off-the-shelf software


Files can be copied using features within an operating When software already exists and is purchased online or
system’s own interface. However, this can be slow and from a shop, it is known as off-the-shelf software. The
options are limited. File-copying utilities enable users to have software will have been written for a general purpose
more control over which files are copied and how they are that is likely to be useful to a large market. Anybody can
copied. For example, a user may only want to copy word purchase the software for a specified price.
processing documents that are within a series of folders and
they may want all the files to be copied to a single folder on
the destination storage. It is also possible to synchronise files KEY WORDS
across multiple storage locations or even multiple computer
off-the-shelf software: general purpose software
systems, so that when a change is made to a file in one
available to a large market
location, it will then be updated in all other locations.
Some files become locked by an operating system and
it becomes almost impossible to delete them. Deleting
utilities can overcome this problem by deleting locked files Advantages and disadvantages
and folders. When files are deleted using normal deletion
methods, the data is still on the disc although the user can’t
see it. Therefore another function of deleting utilities is Custom-written Off-the-shelf software
being able to delete files permanently so that they cannot software
be restored or accessed. Some deletion utilities will remove The entire development The development cost
temporary files that are no longer needed by the computer cost of custom-written of off-the-shelf software
system, or files that are no longer used but haven’t been software is met by the is spread between all the
deleted when a program has been uninstalled or a user client for whom it is customers who purchase
profile removed. written, which makes it it at a specified price,
very expensive. which means the cost is
Questions much lower.

9 List two utilities. Custom-written software Off-the-shelf software is


takes a long time to immediately available,
10 Describe the role of anti-virus software.
develop, so the client so the customer can
will have to wait before start using it straight
2.4 Custom-written being able to use the
software.
away.

software and off-the-shelf The requirements Some tasks that the


software of the client can be
met precisely with no
customer needs to carry
out may not be possible
additional features that and there will be lots
Custom-written software are not necessary. of features that the
When a client requires a software solution that will carry customer never uses.
out a specific purpose that is unique to their organisation, The developers of the The software may not be
they will ask for the software to be written for them. software will ensure compatible with existing
This is known as custom-written software because it is that the software is hardware, software
customised to the needs of the client and will meet the compatible with the and data used by the
requirements of the client. hardware, software and customer.
data used by the client.
KEY WORDS
custom-written software: software that is written
especially to meet the requirements of a client

37

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Custom-written Off-the-shelf software Open source software


software Open source software has the source code freely
As the software will not The software will have available. This means that the source code used to create
have been used before, been used by thousands the software must be distributed with the executable
apart from testing, it of customers and bugs version of the software. It can be freely accessed,
is likely that bugs will will have been identified used, changed or shared. There is often a community
be found within the and fixed, and patches of developers that contribute to the development of
software as it gets used will be released as more open source software. Whilst open source software is
by the client. bugs are found so that often free of charge, it is not a requirement because
the software runs as the installation, distribution or customisation of open
expected. source software can be charged for.

The client will have Customers will be able


access to support from to get support from a REFLECTION
the company that wide range of sources
developed the software. including telephone Visit the Open Source Initiative website and find
support, discussion out what defines open source software.
forums and online
training.
Questions
Table 2.3: Custom-written software versus off-the-shelf
software. 11 Describe off-the-shelf software.
12 Describe two disadvantages of custom-written
software.
Proprietary software
Proprietary software is owned by a single person
or organisation who sells it for use under an agreed 2.5 User interfaces
licence. Only the files needed to run the software are An interface is the boundary between two systems. A
made available, with the source code used to create the user interface is the boundary between the user and
software remaining with the owner. Different licences the computer system. A user interface represents the
can be granted for the use of the software including communication between a user and the computer
freeware, shareware, single user, multi-user and site system. This communication can take many forms.
licence. For example, an office suite of software could be
sold for use for business purposes on a single computer
or it could be sold for use for personal purposes and KEY WORDS
allowed to be installed on up to five devices. Freeware
can be used free of charge whereas Shareware can user interface: communication between the user
be used free of charge, but some features might be and the computer system
restricted or it might stop working after a trial period
until payment is made.

REFLECTION Command line interface


Explore examples of shareware software and A command line interface (CLI) allows a user to
discover what restrictions are in place if it’s used enter text commands to which the computer system
without making a payment. will respond. The computer system will respond by
producing results in a text format.
For example, in Figure 2.16, the user has changed
the directory (folder) to the logs directory (‘cd logs’).

38

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

Then the user has requested a listing of the directory televisions, set-top boxes, photocopiers and some in-car
(‘dir’). Finally the user copies the file directx.log to entertainment systems.
the root directory of the f drive (‘copy directx.log f:\’).
GUIs can include some or all of the elements shown in
The user gets a confirmation message that one file has
Table 2.4.
been copied. The only prompt that the user gets is
information about which directory is currently active The acronym WIMP is commonly used to remember
(‘C:\Windows\Logs>‘) these elements.
Complex GUIs require a lot of memory to operate, but
simpler GUIs can be used where memory is limited.
Although CLIs don’t require much memory, simple
GUIs can be used instead of a CLI in small systems
such as embedded systems. It is commonplace to find
simple web-based GUIs for the maintenance of devices
such as routers, switches and printers.
GUIs are intuitive to use which means they are easy to
learn because commands are represented by pictures and
menus provide options that can be selected. However,
they can be restrictive for some technical users who need
to carry out unusual tasks.
Within a GUI, form controls can be used. These include
labels, text boxes, tick boxes, option buttons, drop-down
boxes and buttons.

Figure 2.16: Command line interface.


Windows An area of the screen devoted
to a specific task, for example a
CLIs use very little memory so they are useful in old software application, a file within
systems or for maintenance of very small systems/ a software application or a print
devices (for example, engine management systems). They dialog box.
are also useful for technical users who need to carry out
complex operations which cannot be performed using Icons An image that is used to represent
more user-friendly interfaces. However, CLIs can be a program, file or task. The icon
difficult to learn and use because users have to learn and can be selected to open the
remember all the commands, and errors are easily made program, file or task.
when entering those commands. Menus Menus are words on the screen
which represent a list of options
that can be expanded into further
Graphical user interface sub-menus.
Pointers This is the method of representing
File Edit View Window Help
movement from a pointing device
Open... Ctrl+O
Open From Acrobat.com...
26 / 29
such as a mouse or the human
Create PDF Online...
finger on a touch screen. The
Save Ctrl+S pointer is also used to select and
Save As... Shift+Ctrl+S manipulate objects on the screen.

Figure 2.17: Graphical user interface.


Table 2.4: Graphical user interface elements.
The most common type of interface that we use is a
graphical user interface (GUI). GUIs are found on
desktop computers, tablet computers, mobile phones,

39

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Control Description Example


Labels Labels are used as prompts or instructions to enter data. They Form1
are text and cannot be edited by the user.

label1

label2

label3

Figure 2.18: Label.

Text Text boxes are an area where the user can enter text such Text box _ ×
boxes as their surname or credit card number. Errors can easily be Text

made by the user when entering data into a text box, such as
spelling things incorrectly.

Figure 2.19: Text6 box.

Tick Tick boxes (also known as check boxes) allow the user to
Checked
boxes select from a set of options. The user can choose as many
options that apply. For example, when printing, a user can Tristate / Indeterminate
choose to collate documents and to print on both sides. Unchecked

Figure 2.20: Tick box.

Option Option buttons (also known as radio buttons) differ from tick
buttons boxes in that only one option in a group can be selected at Yes
once.
No

Figure 2.21: Option button.

Drop- Drop-down boxes allow a user to select from a list that


List item 3
down appears when the drop-down box appears on screen. Only
List item 1
boxes one option can be chosen. The user can usually start typing List item 2
the option so that it is found more quickly. Drop-down boxes List item 3
List item 4
are more appropriate than option buttons when there are a
large number of options to choose from, as the drop-down Figure 2.22: Drop-down box.
box doesn’t take up as much space on the screen.
Buttons Buttons can be used to navigate through an interface Confirm
(forwards and backwards), to confirm that inputs have been
completed, to clear inputs, to gain help and to access any
other area of an interface. Figure 2.23: Confirm button.

Table 2.5: Form controls.

40

Copyright Material - Review Only - Not for Redistribution


2 Hardware and software

Dialogue interface There are many applications of gesture-based interfaces,


including gaming, which have led to the development of
A dialogue interface refers to using the spoken word to other gesture-based interfaces. The original Nintendo
communicate with a computer system. A user can give Wii® enabled gamers to move their hands while holding
commands using their voice and the computer system a remote controller and that movement would be
can respond by carrying out an action or with further mimicked in games such as ten pin bowling and boxing.
information using a synthesised voice. Microsoft’s Xbox® took this a stage further and was
able to track whole body movement without any devices
Dialogue interfaces are very popular with mobile being held or worn by the user. This enabled gamers
devices, including mobile phones and in-car to fully engage with a game using their whole body,
entertainment systems. Some cars will accept commands so boxing could now become kick-boxing and ten pin
such as ‘Temperature 20’ or ‘Call John Smith at home’. bowling could include a run-up.
Mobile phones will accept commands and questions
Many computer systems, including mobile devices,
such as ‘What is the time in Islamabad?’ or ‘Give me
are now starting to accept hand gestures as a way of
directions to get home’. Some automated telephone
controlling objects on screen. For example, a swipe of
systems will recognise voice, too, so that the user doesn’t
the hand across a screen may close a program, while
have to use the dial pad to input information.
pinching fingers together in front of a screen may
A big advantage of dialogue interfaces is that no hands zoom out on an image. This can avoid greasy screens
are required, which makes them suitable for use in cars and could help with infection control in hospitals,
or when holding a telephone. In many circumstances, specifically in operating theatres.
words can be spoken by a user more quickly than a user
Gestures can be an essential form of interaction for
can type them. There is no need for a physical interface
some disabled users who cannot use conventional input
with dialogue interfaces, so they are suitable for systems
devices. A person who has no control from the neck
such as home automation where voice commands can
downwards could control a computer system with their
be given from anywhere to control equipment such
eyes because the computer can track the movement
as lights, entertainment systems and curtains. With
of each eye.
entertainment systems such as televisions, the user does
not have to find a remote control to use and anybody in One of the biggest problems with gesture interfaces is
the room can give the command to increase the volume accuracy. In order for a gesture interface to be effective,
or change the channel. it needs to interpret the movements made by the human
user accurately. Tracking individual fingers, arms,
The main problem with this type of interface is the
eyeballs and legs requires highly accurate cameras or
computer system’s ability to recognise the spoken word.
sensors. This is why many virtual reality applications
Many things can make it difficult for the computer
still use sensors attached to various parts of the body in
to understand, including accents, different voices,
order to improve accuracy. It can also be very difficult to
stammers and background noise (for example, a car’s
control a pointer when a finger is in mid-air rather than
engine). Dialogue interfaces also require the user to
when firmly fixed to a touch screen or holding a mouse.
know what commands are understood by the computer
system as otherwise the system will not know how to
respond. Some dialogue interfaces will give prompts Questions
telling the user from which options they can choose.
Systems are not intelligent enough to simply understand 13 Give two reasons why a CLI might be used
requests in any format that the user chooses. instead of a GUI. [2]
14 Give two disadvantages of a CLI. [2]
15 Define the term WIMP. [1]
Gesture based interface 16 Explain two advantages of dialogue interfaces. [2]
Gesture-based interfaces will recognise human motion.
This could include tracking eyes and lips, identifying
hand signals or monitoring whole body movement.

41

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
A local council uses a mainframe computer to host its databases and web-enabled applications.
1 a State one measurement of processor speed used for mainframe computers or supercomputers. [1]
b Explain the importance of reliability, availability and serviceability for mainframe computers. [6]
[Total 7]
Geraldine in the accounts department has been issued with a new printer.
2 Explain why Nadia needs a device driver for her printer. [2]
Nadia has discovered that her laptop computer is running slower than usual. The IT Support
team have run disk defragmentation software which has identified her hard disk is 70% fragmented.
3 a Explain how data is stored on a hard disk. [4]
b Explain how the data on Nadia’s hard disk may have become fragmented. [4]
[Total 8]
The council needs some new software for waste management that will link in with their website
where residents can log problems such as missed collections.
4 Evaluate the use of a custom-written software solution for this purpose. [6]
The waste management software will use a Graphical User Interface (GUI).
5 a Identify and describe three different form controls that could be used in the GUI, giving
examples of how they could be used. [6]
b Identify two other types of user interface. [2]
[Total 8]
The development team will use an interpreter for testing during development of the software
and a compiler to translate the final version of the software to machine code for the council.
6 Describe two differences between a compiler and an interpreter. [4]

SUMMARY CHECKLIST
I can describe the characteristics of mainframe computers and supercomputers.
I can give examples of the use of mainframe computers and supercomputers.
I can explain the advantages and disadvantages of mainframe computers and supercomputers.
I can describe types of system software and how they are used.
I can explain the advantages and disadvantages of system software.
I can understand the need for utility software.
I can describe types of utility software and how they are used.
I can explain the advantages and disadvantages of utility software.
I can describe the uses of customer written software and off-the-shelf software.
I can explain the advantages and disadvantages of custom written and off-the-shelf software.
I can describe different types of user interfaces and their uses.
I can explain the advantages and disadvantages of different types of user interfaces.

42

Copyright Material - Review Only - Not for Redistribution


Chapter 3

Monitoring
and control
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• recognise a range of sensors and understand how they are used in monitoring systems
• know what is meant by calibration and understand why sensors are calibrated
• recognise a range of sensors and actuators and understand how they are used in control systems
• write an algorithm to represent the process involved in a control system
• draw a flowchart to represent the process involved in a control system
• explain the advantages and disadvantages of different control technologies.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know that a sensor is a type of input device?


• Do you know that a monitoring system is different from a control system?
• Do you know the difference between analogue data and digital data?

There are several advantages of using sensors to


Introduction collect data.

You use monitoring systems and control systems every 1 Data can be repeatedly collected 24 hours a day.
day. They are an important part of your life. These This means that a human does not need to be
systems help with tasks such as keeping the temperature present all the time and can rest.
of your fridge at the correct level. They also help 2 Data can be collected in harmful and dangerous
keep you safe in workplaces that may be dangerous. environments, without the need for a human to be
A monitoring system could collect data about the present. This means that the lives of humans are
temperature in your local area so this can be reported. not endangered to collect the data.
A control system could help keep a chemical factory 3 A sensor may be more consistent in the data that it
worker safe as it will make sure that the production samples as it is a mechanical device. It is therefore
process is working correctly, so that the worker is not likely to be accurate. A human may be inconsistent
exposed to chemicals for a dangerous amount of time. and this could lead to errors in data samples.

KEY WORDS
monitoring system: a system that observes and
often records the activities in a process
control system: a system that manages or
regulates a process by physically changing aspects
of the system depending on collected data

It is important for you to learn how these important


systems operate and how they help many aspects of
daily life.

3.1 Sensors
A sensor is a type of input device. It is used to collect
data about a physical environment automatically.
This removes the need for a human to collect the data
manually. The data collected from a sensor is input into
a system and any necessary action required is taken.

KEY WORD
Figure 3.1: Collecting data.
sensor: an input device that collects data from
the surrounding physical environment If you look at the environment around you, you will see
that it has many different elements to it.

44

Copyright Material - Review Only - Not for Redistribution


3 Monitoring and control

Question Question
1 What kind of things can you see, hear and feel in 3 a Think of two situations where a sensor may
your environment? start to provide incorrect readings.
b What detrimental effect could this have?
When answering Question 1, you may have noticed
things such as: For this reason, sensors can be regularly put through a
• the temperature • the level of light process of calibration, to make sure the readings they
take are accurate.
• the level of sound • movement.
There are also many more things that are changeable
about the environment, such as:
• moisture
3.2 Calibration
An inaccurate set of data is useless. It could also be very
• electromagnetic fields
dangerous if the data is used in a control system that
• pressure. takes vital action based upon the data. To make sure
If you attempted to create a sensor to collect data about that the data collected by a sensor is accurate it can be
all these different aspects of the environment, it would put through a process of calibration. No sensor will be
probably need to be quite large. When you are trying absolutely perfect, but it is important to make sure that
to collect data, it is important that the sensor is quite the readings that are taken are as accurate as possible.
small so that it can fit into convenient places. There are
different sensors that collect data about different aspects KEY WORD
of the environment. There are sensors for:
• light/UV • infrared calibration: the process of testing and modifying
a device to make sure that it is taking the
• temperature • touch correct readings
• pressure • electromagnetic field
• humidity • proximity. To calibrate a sensor, you need a calibration reference.
• sound This is a standard that you can calibrate against. A
simple method of calibration is to test readings against
another sensor that you know is calibrated, to see if the
Question same readings are produced by both sensors. Another
way to calibrate a sensor is by using another physical
2 It may be obvious what some of the sensors collect
reference. For example, a ruler or measuring tape could
data about, for example, light and sound. What
be used to find out if an item that should trigger the
sort of data do you think some of the less obvious
proximity sensor does so from the correct distance set.
sensors collect, for example:
• infrared Each sensor has a characteristic curve. This curve maps
the sensor’s response in comparison to an ideal response.
• electromagnetic field There are three main categories of result that can be
• touch given by a sensor. These are:
• proximity? • Offset – this means that the readings are higher or
lower than the ideal reference
You have learnt that there are advantages to using
sensors, but there can also be disadvantages too. The • Sensitivity – this means that the readings change
biggest disadvantage is that a sensor can be subject to over a range at a different rate to the ideal reference
wear and tear and may become faulty. This might make • Linearity – this means that the readings are directly
it start to provide incorrect readings. This could be proportional to the ideal reference.
detrimental to the whole system.

45

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

offset
There are three different types of calibration that can be
ideal reference used for a sensor. These are:
• one point calibration
• two point calibration
• multipoint calibration.
One point calibration is the simplest form of calibration.
It can be used to correct an offset calibration curve.
This is because the sensor is reading partly correct, as
offset
it is changing at the same rate, but it is just consistently
error measuring too high or too low. The sensor can be
actual calibrated based on a single reading to be brought closer
Ideal to the ideal reference.
Figure 3.2: Offset. There are different methods for performing a one point
calibration check depending on the sensor. One simple
method could be:

ideal reference
1 Take a reading with the sensor.
0.100
2 Compare the reading with a device measuring at
the ideal standard.
0.075 3 Subtract the reading from the reference to get
actual the offset.
4
OD

0.050 Add the offset to every reading to get the


calibrated value.
0.025 For example, if a thermometer tells you the
temperature of a room is 22 °C, but the reading from
your sensor tells you that the room is 20.5 °C, the
0.000
0.0 0.5 1.0 1.5 2.0 calculation would be:
[BSA] mg/mL
22 – 20.5 = 1.5
Figure 3.3: Sensitivity. This means the offset that needs to be added to each
reading from the sensor is 1.5.
Actual value

Displayed value

Figure 3.4: Linearity. Figure 3.5: Calibration curve.

46

Copyright Material - Review Only - Not for Redistribution


3 Monitoring and control

Two point calibration can be used to correct a data the sensor of 37 °C. You can use a set of common ideal
set suffering both offset and sensitivity. It rescales standard readings for iced water (0.01 °C) and boiling
the output to do this. It can often be a more accurate water (100 °C).
method of calibration than one point calibration.
SensorRangeValue = 97.25
There are different methods, to perform a two point
IdealRangeValue = 99.99
calibration check depending on the sensor. One
method could be: CorrectValue = (((37 – 0.75) * 99.99) / 97.25) + 0.01
= 37.28 (2dp)
1 Take two different readings with your sensor. It
works best if you take a reading at the lower end This means that the correct value for the sensor reading
of the scale and a reading at the higher end of of 37°C is 37.28 °C.
the scale. Multipoint calibration is similar to the other calibration
2 Compare the readings to readings from a device methods but is performed using many different readings,
measuring at the ideal standard. at least three. This further increases the accuracy of
3 Calculate the range value for the sensor readings by the calibration and can help calibrate sensors that
subtracting the low reading from the high reading. would produce readings that do not naturally form a
4 Calculate the range value for the ideal standard by linear line.
subtracting the low reading from the high reading. When a sensor has collected the data, this data will be
5 Use a formula to calculate the correct value for sent to a computer system. What happens to the data
each reading such as: at this stage will depend on whether the system is a
6 CorrectValue = (((SensorCurrentValue – monitoring system or a control system.
SensorLowValue) * IdealRangeValue) /
SensorRangeValue) + IdealLowValue.
For example, if a temperature sensor measures the
temperature of an iced water bucket as 0.75 °C and
3.3 Monitoring systems
a boiling kettle as 98 °C, you can use this two point A monitoring system is designed to collect the data and
calibration method to get a correct reading for the then store it so that it can be used at a later stage. For
temperature sensor. You can use a current reading from example, data may be collected about the temperature in
a garden over a period of 24 hours, for a week. The data
could then be analysed at a later stage to see which day
was the warmest and what time of the day the warmest
temperature was recorded.
The main technologies used in a monitoring system are
sensors. Other technologies that may be used are storage
devices to store the data collected. Graphing software
could also be used to create visual representation of the
data to make it easier to interpret.
An example of this type of system could be a
monitoring system for the level of chlorine in the water
of a swimming pool:
• a pH sensor is placed in the swimming pool
• the pH sensor takes readings at regular intervals,
such as every minute
• the readings are sent to a storage device
• the readings are put into a graph by the manager
so that she can see the level of chlorine in the water
Figure 3.6: Thermometer. throughout the day.

47

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 3.7: Monitoring chlorine levels. Figure 3.8: Weather station.

A real-world example of a PRACTICAL ACTIVITY 3.01

Research how a weather station makes use of


monitoring system – weather sensors. Draw an infographic, using the software
of your choice, to inform your classmates how a
stations weather station makes use of different sensors.
Weather stations use many monitoring systems to
provide everyone with daily information about the
weather in their area, and all over the world. On an
individual level, this daily information is important in Question
knowing how to plan your day: how you should dress 4 A textile factory is about to open. The factory is
or how it will affect your activities. On a wider scale, near a river. The local authority is worried that
industries such as the farming industry heavily depend chemicals used to colour the textiles may leak into
on weather reports to make sure they task the right the nearby river. They decide to set up a monitoring
actions for their crops. system to check the pH level of the river at regular
A weather station uses lots of temperature sensors that intervals. Explain what sensors could be used and
are spread across a region or country. These temperature how they could be used in this system.
sensors take data samples of the ambient temperature in
that area. The data samples are sent back to the weather
station. This data can then be used in many ways, for
example, to report the current temperature. The weather
3.4 Control systems
station could also analyse lots of samples of data and A control system is designed to collect data and then
predict what the weather may be in the future. send this to a computer system so that it can be analysed
(and any resulting action taken).
A weather station may also use pressure sensors,
humidity sensors and light sensors. The main technologies used in a monitoring system are
sensors, microprocessors and sometimes actuators. You
have looked at the different kind of sensors that can be
used and what the advantages and disadvantages are of
using sensors. You also need to understand the use of
microprocessors and actuators, and the advantages and
disadvantages of each.

48

Copyright Material - Review Only - Not for Redistribution


3 Monitoring and control

A microprocessor is an electronic component that An actuator is used to move and operate other different
can perform similar functions to a central processing mechanisms or devices. Actuators can be based on
unit (CPU). It can process instructions and perform different methods of operation such as hydraulic,
mathematical comparisons and calculations. pneumatic or electric. Actuators could control
Microprocessors also have small areas to hold data operations such as opening and closing a valve, turning
called registers. Microprocessors are normally a single a switch on and off or driving a mechanism to open
integrated circuit. a door. They can also be used to drive each of the
individual parts in a robot.

KEY WORD
KEY WORD
microprocessor: an integrated circuit that is used
in monitoring and control systems actuator: a type of motor that is used to move
and operate another mechanism or device

An actuator is vital in a control system because it is the


element that drives the action to be performed to control
the element of the environment that is at the focus.

Figure 3.9: Microprocessor.

There are both advantages and disadvantages to using a


microprocessor in control systems. Figure 3.10: Robot arm.

Advantages Disadvantages There are both advantages and disadvantages to using


actuators in control systems.
They can be There is a limit on the
programmed to execute size of the data they are
Advantages Disadvantages
several different tasks. able to handle.
Hydraulic and electric Pneumatic actuators can
They are small in size so They are only small in actuators are fairly quiet. be quite noisy.
can be easily built into size and can overheat
The cost of pneumatic The cost of hydraulic
different technologies. if too much demand is
actuators is relatively and electric actuators is
placed on them.
low. relatively high.
They are relatively Most actuators have Fluid leaks can be a
fast at moving data moderate to high speed problem in hydraulic
between different abilities to perform an actuators.
memory locations. action.

Table 3.1: Advantages and disadvantages of microprocessors. Table 3.2: Advantages and disadvantages of actuators.

49

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Sensors, microprocessors and actuators are programmed 6 If the data sample is greater than 22 degrees,
to interact with each other to create a control system. the microprocessor sends a signal to an
actuator, triggering the system to increase the
There are several stages in the process of a
cooling function.
control system.
7 If the data sample is less than 22 degrees, the
1 The sensor collects the data at set-time intervals, for microprocessor sends a signal to an actuator to
example once every minute. trigger the system to increase the heating function.
2 The data is sent to a microprocessor. 8 If the data sample is equal to 22 degrees, no
3 The microprocessor will analyse the data. This action is taken.
could involve comparing it to a pre-stored value, or 9 The whole process is then repeated at a set time
range of values. interval, for example, once every minute.
4 If the data does not match the pre-stored value, the
This list represents an algorithm, which is a set of
microprocessor will send a signal to an actuator
instructions or steps to be followed to achieve a certain
or device.
outcome, for this example of a control system.
5 The actuator or device will trigger any action that
needs to be taken.
An example of this type of system could be an air- KEY WORD
conditioning system.
algorithm: a set of instructions or steps to be
followed to achieve a certain outcome

This system could also be represented as a flowchart:

Start

User sets temperature


for room

Temperature
is stored

Temperature sensor
collects data sample

Data sample is analysed


by microprocessor
Figure 3.11: Air conditioning.

1 The user sets the temperature to 22 degrees Celsius. Is data = 22


Yes

2 This value is stored.


3 A temperature sensor collects data about the No

ambient temperature in the room.


Yes No
Is data > 22
4 The data collected by the sensor is sent to the
microprocessor. The data is converted from
analogue to digital.
Microprocessor sends Microprocessor sends
5 The microprocessor analyses each data sample signal to actuator that triggers signal to actuator that triggers
cooling function heating function
sent to see if it is equal to the stored value of
22 degrees Celsius.
Figure 3.12: Temperature control flowchart.

50

Copyright Material - Review Only - Not for Redistribution


3 Monitoring and control

A real-world example of a
control system – growing
crops
A farm that grows fruit and vegetables makes use of
many different control systems. It relies on these systems
to make sure that the produce it grows are kept in the
correct conditions to make sure that they do grow.
It would be a huge task for a farmer to constantly
check his produce, so he relies on these systems to do
this for him.
One control system that he could use is to control the
conditions within his greenhouses. The correct level
of light and temperature will need to be maintained.
The control systems will incorporate light sensors,
temperature sensors, microprocessors and actuators to
maintain the correct conditions. The farmer wants to
make sure the temperature is between 22 °C and 25 °C.
1 The control system uses a temperature sensor to
Figure 3.13: Environment control.
read the temperature within the greenhouse on a
regular basis.
2 The readings are sent to a microprocessor. They PRACTICAL ACTIVITY 3.02
will need to be converted from analogue data to
digital data to be processed by the microprocessor. Discuss with a partner how the control system
might work to control the correct level of light.
3 The microprocessor compares the reading to the
set range.
4 If the reading is within the range, no further
action is taken. A real-world example of a
5 If the reading is greater than 25 °C, the
microprocessor sends a signal to an actuator that
control system – protecting
could drive an action, such as open a window to the against intruders
greenhouse.
A jewellery store uses three main control systems to keep
6 If the reading is less than 22 °C, the microprocessor the jewellery they sell safe and secure. These systems are
sends a signal to an actuator that could drive an vital to the security of the jewellery and the store heavily
action, such as turn on a heater in the greenhouse. relies on them.
7 The whole process is repeated. Their first security control system detects if an intruder
enters the store through a door or window. Infrared
beams of light are run across each doorway and
Question window. If one of these beams is broken, an alarm will
5 a Draw a flowchart to demonstrate how this sound and metal bars will close every door and window,
environment control system will operate. trapping the intruder inside the room.

b The control is missing two vital processes, can


you identify what they are? Question
6 Write an algorithm to demonstrate how this entry
detection control system will operate.

51

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Their second security control system detects if a window The jewellers’ third security control system detects if any
is broken by an intruder trying to enter. The sound of of the jewellery glass cabinets are opened by an intruder.
any breaking glass is measured. If the sound of breaking The weight of the glass for each cabinet is 5 kg. If any
glass is detected, the alarm will sound again. of the glass is lifted up the alarm will sound and the
bars will close every door and window.

Question
7 Draw a flowchart to demonstrate how this broken
Question
glass detection control system will operate. 8 Either write and algorithm or draw a flowchart to
demonstrate how this glass cabinet control system
will operate.
REFLECTION

Look at your flowchart. Can you see any way that REFLECTION
you can improve it? Is it easy to follow? Have you
used the correct symbols? How did you work out which sensors would be
used in each system?

EXAM-STYLE QUESTIONS
1 Define the role of a sensor. [1]
2 Define the role of a microprocessor. [1]
3 Define the role of an actuator. [1]
4 Describe how a sensor is calibrated using two point calibration. [3]
5 State two advantages of using a microprocessor in a control system. [2]
6 Explain the difference between a monitoring system and a control system. [4]
7 Describe how a control system using touch sensors can be used to make sure the level of cooling liquid
in a nuclear power plant is maintained at a certain level. [5]
8 Draw a flowchart to represent a control system with the following requirements:
• A proximity sensor is used in a mobile phone.
• The proximity sensor measures the immediate environment, using infrared (IR), to see if it is close to
a human ear.
• If an IR level of 12 micron is detected, the screen on the mobile turns off. The screen will
immediately turn back on again when the IR level reduces. [6]

SUMMARY CHECKLIST
I can identify a variety of different sensors and explain how they are used in monitoring systems.
I can identify a variety of different sensors and actuators and explain how they are used in control systems.
I can explain how sensors are calibrated, using different types of calibration.
I can draw a flowchart to represent a control system.
I can write an algorithm to represent a control system.
I can explain at least two different advantages and disadvantages of control technologies.

52

Copyright Material - Review Only - Not for Redistribution


Chapter 4

Algorithms
and flowcharts
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• edit a given algorithm
• write an algorithm using pseudocode to solve a given problem
• edit a given flowchart
• draw a flowchart to solve a given problem.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you have experience of following instructions and creating sequences of instructions for someone to
follow?
• Do you have any experience of block programming in languages such as Scratch, or of controlling a
turtle on screen such as through Logo?

Introduction Start

In this chapter you will learn how to develop algorithms


to solve problems in a form that a computer could
follow. All computer programs are simply a series of
algorithms that are written in a specific way that the
computer’s processor can then follow one at a time.

Finish
4.1 Algorithms
An algorithm is a series of steps that are followed. Figure 4.1: Maze 1, start.
You follow lots of algorithms without even realising
it, for example, following a recipe or following a list of To get to ‘Finish’ you would need to follow these steps:
instructions. These are both examples of algorithms.
Step 1: FD7 Step 5: FD2
Before you write algorithms on a computer, you can
design them using a flowchart and/or using pseudocode. Step 2: RT90 Step 6: RT90
Pseudocode simply means there is no specific syntax that
Step 3: FD6 Step 7: FD1
you have to use. It doesn’t have to follow a set format,
but it is more structured than English sentences. Step 4: LT90

KEY WORDS WORKED EXAMPLE 4.01

flowchart: a set of symbols put together with You are on Start, facing to the right.
commands that are followed to solve a problem
Write an algorithm to move from Start to Finish.
pseudocode: a language that is used to display
an algorithm Finish

A simple form of an algorithm is a series of steps to


move someone (or something) through a maze. The
instructions you can use are:

FD5 Move forward 5 spaces


BK2 Move backward 2 spaces
Start
RT90 Turn right 90 degrees
LT90 Turn left 90 degrees Figure 4.2: Maze 2, start.

You start in the space labelled ‘Start’ in this maze, facing


to the right.

54

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED
You are facing to the right so need to count how many You need to face to the right again, so:
grey spaces there are until you need to turn. There are
RT90
4 spaces, so the command is:
To the next turn is 3 spaces:
FD4
FD3
Finish
Finish

Start
Start

Figure 4.3: Maze 2, FD4.


Figure 4.5: Maze 2, FD4, LT90, FD2, RT90, FD3.
You need to turn so you are facing up, this means
turning to the left, 90 degrees. The command is You need to face up, so you are turning left again:
LT90 LT90
How many spaces forward? 2 Now you need to move forward 5 spaces:
FD2 FD5

Finish Finish

Start Start

Figure 4.4: Maze 2, FD4, LT90, FD2. Figure 4.6: Maze 2, FD4, LT90, FD2, RT90, FD3, LT90, FD5.

55

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED 4.2 Flowcharts and


To get to the Finish you need to turn left:
LT90 pseudocode
Then move forward 7 spaces: A flowchart is a diagram that uses specific shapes and
arrows to produce an algorithm that someone can
FD7
then follow.
Finish Pseudocode does not use symbols, but structured
statements. There is no specific syntax (rules) that it
must follow, but it should use key words (as in the flow
diagrams) such as INPUT, OUTPUT, and so on.

Flowchart structure
There are set symbols throughout a flowchart. You will
Start be introduced to these in each section. Every flowchart
begins and ends with a terminator box (a Start box at
the beginning and a Stop box at the end).
Figure 4.7: Maze 2, finish.

Together, the algorithm becomes: Start

FD4, LT90, FD2, RT90, FD3, LT90, FD5, LT90, FD7


Stop

Questions Figure 4.9: Start/Stop box.

1 What is meant by an algorithm?


The arrow is the flow line. When following a flowchart
2 How can an algorithm be represented? you follow the arrows. Algorithms don’t go straight
from start to stop. They also need input, output,
PRACTICAL ACTIVITY 4.01 processes, decisions and loops.

Write an algorithm to move from Start to Finish


in this maze: KEY WORDS
input: putting data into an algorithm
output: displaying data from an algorithm
to the user
process: an action performed to some data to
Start
make a change
Finish decision: a comparison is used to decide if code
is run, or not
loop: code that is repeated

Figure 4.8: Maze 3, Start.

56

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

Input and output KEY WORDS


Algorithms often need to output messages (such as text) variable: a space in the memory of a computer,
to the screen, and therefore to the user. They may also that has an identifier where you can store data;
need to take in data from the user, for example from this data can be changed
the keyboard.
identifier: the name given to a variable,
Flowcharts subroutine or function
If you want the algorithm to output something to the concatenate: to join two strings together
user, for example a word, a sentence or a number, then
you will need an output box.
Here’s the symbol for inputting a value into myNumber.
OUTPUT

INPUT myNumber

Figure 4.10: Output box.


Figure 4.13: Input box with identifier.
After the word OUTPUT you put the text you want
to display. If you want to output "Hello World", Put these together with the Start and Stop to create a
you use this, flowchart.

OUTPUT "Hello World" Start

Figure 4.11: Output box with text.


OUTPUT "Hello World"

Notice how the words being output are in speech


marks. This is because you want those actual words
INPUT myNumber
output, without them “Hello” could be a variable, or a
command word.
If you want to input (or read) data from the user into Stop
the algorithm, you use an input box.
Figure 4.14: Flowchart "Hello World".
INPUT

Once you have a variable, you can output this by


Figure 4.12: Input box. using its name.

When data is input into an algorithm it needs to be OUTPUT myNumber


stored somewhere. This is done using a variable. A
variable is a name (identifier) that is given to a space in a
computer’s memory that stores a value. Think of it like Figure 4.15: Output box with identifier.
a box, with a name. You could call the box myNumber.
You can then put data into myNumber. You can get data You might want to output a variable and some text. You
out of myNumber, and so on. can combine them by using an ampersand (&). This is to
concatenate (join) the values together. For example,

57

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

OUTPUT "My number CONTINUED


is" & myNumber
Step 2: Take their name as input.
Figure 4.16: Output box with concatenation. Input and store in variable
Step 3: Welcome them by their name.
Pseudocode Output including variable
An output in pseudocode can use a command word such Draw the flowchart following the steps identified.
as OUTPUT, WRITE or PRINT, for example,
OUTPUT "Hello World" Start

The words "Hello World" are a string as in the


flowcharts, so are still in speech marks. There are many
different words that you can use to output data, but they OUTPUT "Enter
all perform the task, for example all of these have the your name"
same result.
OUTPUT "Hello"
WRITE "Hello"
INPUT name
PRINT "Hello"
An input in pseudocode can use a command word such
as INPUT. As with the flowcharts, this will need to be
stored somewhere such as in a variable, for example,
OUTPUT "Welcome"
num = INPUT & name

or you could combine the input and output, for example,


num = INPUT("Enter a number")
Stop

WORKED EXAMPLE 4.02 Figure 4.17: Flowchart-"Welcome".

An algorithm needs to ask a user to enter their


name. It should take their name as an input and then
welcome them by name, for example, "Welcome
Sasha". WORKED EXAMPLE 4.03
Draw a flowchart for the algorithm. Convert the flowchart into pseudocode.
Start by identifying the steps required. Take each statement from within the flowchart and
write it on its own line.
Step 1: Ask them to enter their name.
OUTPUT "Enter your name"
Step 2: Take their name as input.
INPUT name
Step 3: Welcome them by their name.
OUTPUT "Welcome" & name
Then identify what type of symbols these steps need.
Step 1: Ask them to enter their name.
Output Questions
3 Identify the symbol for Start and Stop in a
flowchart.
4 Describe the stages in this flowchart.

58

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

There are different types of processes.


Start
Table 4.1 shows the different mathematical processes
that be performed.
OUTPUT "Enter
a number" Operator Description Example
+ Addition myNumber = 10 + 3
– Subtraction myNumber = 10 – 3
INPUT number
* Multiplication myNumber = 10 * 3
/ Division myNumber = 10 / 3
^ Power of myNumber = 10 ^ 3
OUTPUT "Your MOD 10 MOD 3 = 1
number is" &
Modulus
number division (gives
the remainder) 20 MOD 8 = 4
DIV Integer 10 DIV 3 = 3
division (gives
Stop the whole 20 DIV 6 = 2
number)

Figure 4.18: Flowchart-Enter a number. Table 4.1: Mathematical (arithmetic) operators.

PRACTICAL ACTIVITY 4.02 KEY WORDS


1 Convert the flowchart in Question 4 into modulus division: when the remainder is given
pseudocode. from a division
2 An algorithm needs to take a word as an integer division: where only the whole number is
input, and then output the same word. given from a division
Draw a flowchart for this algorithm.
3 An algorithm needs to tell a joke. It should
output the joke, and let the user give an Flowcharts
answer, before outputting the actual answer. Processes are in rectangular boxes.
Create a pseudocode algorithm for the
problem.
Process

Figure 4.19: Process box.


Processes
A process is an action that is performed. In a program
it usually means that a change is being made to
something. If you have a number stored in a variable,
you could change this; you might add something to it,
or subtract from it.

59

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The mathematical calculations can make use of Notice that a new symbol has been introduced here, a
numbers, and/or variables. For example, circle with a letter inside. This is a connector symbol.
myNumber = 10 + 3 myNumber now stores 13 Sometimes, if a flowchart is long, then it is convenient
to split it into smaller portions (perhaps to show it all
myNumber = myNumber + 3 myNumber now stores 16
on one page). The connector letter shows where the
(it already had 13 in and
flowchart continues.
now has another 3)
myNumber = myNumber myNumber now stores The algorithm takes in two numbers (num1 and num2),
+ myNumber 32 (it already had 16 in divides num1 by num2 and stores the result in answer.
it, and it was added to It then outputs the message "The result is" and the
itself, so 16 + 16 = 32) value in answer.

Putting a value into a variable is called assignment.


Pseudocode
Processes use the same structure as in a flowchart, but
KEY WORD without the box. Therefore this:

assignment: giving a variable a value


newNumber = 3 * 8

In this process box two numbers are multiplied together


and stored in a variable. Figure 4.22: Assignment in process box.

newNumber = 3 * 8
would become this:
newNumber = 3 * 8

Figure 4.20: Assignment in process box.


WORKED EXAMPLE 4.04
Follow this flowchart. What does it do? A program needs to ask a person’s age, then tell them
how old they will be in 50 years.
A
Start
Draw a flowchart for the algorithm.
Start by identifying the steps required.
OUTPUT "Enter a INPUT num2 Step 1: Ask them to enter their age.
number"
Step 2: Take the age as input.
Step 3: Add 50 to their age.
INPUT num1 answer = num1 / num2 Step 4: Output the new age.
Identify what type of symbols these steps need;
Step 1: Ask them to enter their age.
OUTPUT "The result
OUTPUT "Enter a
is" & answer
Output
second number"
Step 2: Take the age as input.
Input and store in a variable
A Stop
Step 3: Add 50 to their age.
Figure 4.21: Flowchart-Arithmetic calculation.
Add 50 to the variable and store the result
Step 4: Output their new age.
Output variable

60

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED Start

Draw the flowchart following the steps identified.


INPUT num1
Start

OUTPUT "Enter INPUT num2


A
your age"

INPUT age total = num1 + num2

newAge = age + 50 OUTPUT num1 & "+"


& num2 & "=" total

OUTPUT "In 50
years you will be" total = num1 – num2
& newAge

Stop OUTPUT num1 & "–"


& num2 & "=" total
Figure 4.23: Flowchart-New age calculator.

Stop

WORKED EXAMPLE 4.05


Figure 4.24: Flowchart-Arithmetic calculation.
Convert the flowchart into pseudocode.
Take each line and write it on a separate line.
OUTPUT "Enter you age" PRACTICAL ACTIVITY 4.03
INPUT age 1 Convert the algorithm in Question 8 into
newAge = age + 50 pseudocode.
OUTPUT "In 50 years your will be" & newAge 2 An algorithm needs to take 3 numbers as
input. Add them together and output the
result. Then divide the total by the quantity
of numbers and output the average.
Questions Draw a flowchart for this algorithm.
3 Convert your algorithm from part 2 into
5 What is a process?
pseudocode.
6 What action does the operator ^ process?
7 Write a statement to multiply 3 by 7.
8 Describe the stages in this flowchart.

61

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Decisions Flowcharts
A decision is also known as comparison and selection. It Single selection
is a statement that involves a comparison and is either The selection must be in the form of a question, for
true or false. If the result is true, then some code is run, example ‘is 10 > 5?’ This is because it has two results:
if it is false then either different code is run or some true and false.
code is skipped. The selection flowchart symbol is a diamond.

KEY WORDS
DECISION
comparison: comparing two items of data
resulting in true or false
selection: use of a conditional statement to Figure 4.25: Selection box.
decide a course of action or which section of
code to run There are two options from a selection box: True
and False, or Yes and No. This means selection has
two arrows (two flow lines), that need to be labelled,
A comparison needs two sides of the argument, and for example.
a comparison symbol. Table 4.2 shows common
comparison operators.
Yes
DECISION
Operator Description Example
> Greater than 10 > 5 is true
No

5 > 10 is false
< Less than 10 < 5 is false Figure 4.26: Selection box with options.

5 < 10 is true Follow this flowchart. What does it do?


>= Greater than 10 >= 5 is true
or equal to Start
10 >= 10 is true

5 >= 10 is false INPUT age


<= Less than or 10 <= 5 is false
equal to
10 <= 10 is true

5 <= 10 is true Is age >= Yes OUTPUT "You are old


18? enough"
= Equals to 10 = 5 is false

10 = 10 is true No
!= Not equal to 10 != 10 is false
OUTPUT "You are too
or 5 <> 10 is true young"

<>
Stop
Table 4.2: Comparison operators.

Figure 4.27: Flowchart with selection box.


Either side of the operator can be a number or
a variable.

62

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

This flowchart starts by the user inputting an age. The Multiple conditions
decision statement asks if age is greater than, or equal These can be created using ELSEIF statements. Each
to, 18. If the result is Yes, then it outputs “You are old condition has its own ELSEIF. You can even put an
enough”, if it is No it outputs “You are too young”. ELSE on the end in case none of the conditions are
true. For example, each of the conditions are checked
Multiple selection
in the order they are written. If one of the conditions is
If you have multiple options, then you will need multiple found to be true, then the code within it runs, and then
decisions. For example, it jumps to the ENDIF; the other conditions after it are
not checked.

Yes
IF cost >= 100 THEN
Is age <
10? OUTPUT "That is far too expensive"
ELSEIF cost >= 80 THEN
No OUTPUT "That’s a bit too expensive"
ELSEIF cost >= 60 THEN
OUTPUT "That is reasonable"
Yes ELSEIF cost >= 40 THEN
Is age <
20? OUTPUT "That looks like a good deal"
ELSE
No OUTPUT "I think that is too cheap"
ENDIF
Figure 4.28: Flowchart with multiple selection boxes.
CASE…END CASE
The first decision is ‘If age is less than 10?’ If it is not, This is a different selection statement. This is used when
then it goes straight to another decision, and asks you are checking the value of one variable and you have
whether age is less than 20. many different values you want to check it against.

Pseudocode Pseudocode
Selection uses the keyword IF and THEN. The question CASE uses the keyword SELECT, followed by the
‘Is’ in the flowchart is replaced with IF, and the ‘?’ with identifier of the variable you are checking. Then it has
THEN. All the code that runs when the condition is true the keyword CASE followed by the condition.
goes beneath the IF and this is finished with an ENDIF For example, if you are checking if a menu choice is
to show where it ends. 1, 2 or 3:
For example, if the value in age is more than 18, then SELECT menuChoice
the output message will be displayed. CASE 1: OUTPUT "You chose 1"
IF age > 18 THEN CASE 2: OUTPUT "You chose 2"
OUTPUT("You are old enough") CASE 3: OUTPUT "You chose 3"
ENDIF A CASE statement can perform comparisons other than
An IF statement can have an ELSE. This is what happens equals to, but this time you need to include the variable
if the condition is true. For example, if the age is not name to make it clear what the comparison is.
more than 18, then "You are not old enough" will be SELECT age
displayed.
CASE age < 12: OUTPUT "You can watch PG
IF age > 18 THEN films"
OUTPUT("You are old enough")
CASE (age >= 12 and age < 15): OUTPUT "You
ELSE can watch PG and PG12 films"
OUTPUT("You are not old enough")
CASE (age >= 15 and age < 18): OUTPUT "You
ENDIF can watch PG, PG12 and 15 rated films"

63

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CASE age >= 18: OUTPUT "You can watch all CASE "-": result = value1 – value2
films" CASE "*": result = value1 * value2
CASE "/": result = value1 / value2
There is also a default keyword for CASE, the code in
CASE DEFAULT:OUTPUT "Invalid symbol"
this will run if none of the conditions have been met. ENDCASE
SELECT symbol OUTPUT RESULT
CASE "+": result = value1 + value2

WORKED EXAMPLE 4.06

An algorithm needs to take two numbers as input, and Step 5: Output the second number if it isn’t.
output which is the largest. Output second number
Draw a flowchart for the algorithm.
Start
Start by identifying the steps required.
Step 1: Ask the user to input two numbers.
OUTPUT "Enter
Step 2: Input two numbers.
two numbers"
Step 3: Check if the first number is larger than the
second.
Input num1,
Step 4: Output the first number if it is. num2

Step 5: Output the second number if it isn’t.


Identify what type of symbols these steps need.
Yes
Step 1: Ask the user to input two numbers. Is num1 OUTPUT num1
> num2?
Output
Step 2: Input two numbers. No
Input the store in a variable
Step 3: Check if the first number is larger than the OUTPUT num2
second.
If first > second
Step 4: Output the first number if it is.
Stop
Output first number

Figure 4.29: Flowchart-Compare two numbers.

64

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

WORKED EXAMPLE 4.07 CONTINUED

Convert the flowchart into pseudocode.


Start
Write each line separately. Only one value can be input
at a time.
OUTPUT "Enter
Replace Is with an IF statement. mark out of 100"

OUTPUT "Enter two numbers"


INPUT num1
INPUT mark
INPUT num2
IF num1 > num2 THEN
OUTPUT num1
Is mark Yes
ELSE OUTPUT "Distinction"
>75?
OUTPUT num2
ENDIF No

Is mark Yes
OUTPUT "Merit"
>60?
Questions
No
9 How many arrows must come out of a selection
symbol in a flowchart?
Is mark Yes
10 Define selection. >45?
OUTPUT "Pass"

11 Is 956 >= 856?


No
12 Is 123 != 123?
13 Is 55 = 66? OUTPUT "Fail"

PRACTICAL ACTIVITY 4.04


Stop
1 Describe the stages in the flowchart opposite.
2 Convert the flowchart in part 1 into Figure 4.30: Flowchart with comments.
pseudocode.
3 An algorithm needs to take three numbers
as input, and output the smallest.
Draw a flowchart for this algorithm.
Loops
A loop means repetition; doing the same thing several
4 Convert your flowchart from part 3 into times. Its technical term is iteration.
pseudocode.
5 An algorithm needs to take two numbers
KEY WORD
as input, then subtract the smallest from
the largest. iteration: a loop to repeat a section of code
for a fixed number of times or until a required
Create a pseudocode algorithm for the
outcome is achieved
problem using an IF statement.
6 Replace the IF statement in task 5 with a
SELECT CASE statement.

65

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Loops are mainly used in two scenarios: Pseudocode


1 You know how many times you want to repeat the A FOR loop is a count-controlled loop. You need to
code. This might be 10 times, or age times (where know what number to start with, and when you will end.
age is a variable that stores a value). This is a The loop increments the number each time through.
count-controlled loop.
2 You don’t know the number of times, but want KEY WORDS
to keep going until something happens. This is a
condition-controlled loop. increment: add 1 to something
FOR loop: a count-controlled loop
KEY WORDS
count-controlled loop: a loop where you know In this example, the variable counter starts at 0 and
the number of times it will run continues until it is 9.
condition-controlled loop: a loop that runs FOR counter = 0 to 9
based on a condition, not the number of times OUTPUT counter
it will run
NEXT counter

Count controlled WORKED EXAMPLE 4.08


Flowcharts An algorithm needs to ask the user to input the 10
This type of loop needs a counter to keep track of the marks of its students, and then output the average.
number of repetitions you have done (the number of
Draw a flowchart for the algorithm.
loops). The counter will be a variable. Before you start
the loop, the counter needs to be set to the starting value Start by identifying the steps required.
(usually 0 or 1). Then inside the code that loops, you Step 1: Repeat 10 times.
need to increment the counter (this means add 1 to it).
Step 2: Ask the user to input a mark.
Step 3: Input the mark.
Start
Step 4: Add the mark to a total.
Step 5: After all the marks are entered, calculate
num = 0
the average.
Step 6: Output the average.
Identify what type of symbols these steps need.
No OUTPUT
Is num > 5?
num
num = num + 1 Step 1: Repeat 10 times.
Loop 10 times
Yes
Step 2: Ask the user to input a mark.
Stop Output
Step 3: Input the mark.
Figure 4.31: Flowchart with counter. Input and store in variable
Step 4: Add the mark to a total.
In this example, the counter variable is num. num is set to
Add input to total
start at 0. Following the arrows, it keeps increasing by 1
until num is greater than 5, at which point the algorithm Step 5: After all marks are entered, calculate the
stops. average. Total divided by 10
Step 6: Output the average.
Output

66

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED PRACTICAL ACTIVITY 4.05

1 Describe the stages in this flowchart.


Start

Start
count = 0
total = 0

count = 10

Is count No OUTPUT "Enter a


= 10? mark"

Is count No
Yes OUTPUT counter
< 0?
INPUT mark
average = total / 10 Yes

counter = counter – 1

total = total + mark Stop

OUTPUT average
Figure 4.33: Flowchart with counter.

count = count + 1
2 Convert the flowchart from part 1 into
Stop
pseudocode.
Figure 4.32: Flowchart-Calculating average. 3 An algorithm needs to output the 12-times
table using iteration.
Create a flowchart for the algorithm.
WORKED EXAMPLE 4.09 4 An algorithm needs to ask the user how
many numbers to output. The algorithm
Convert the flowchart into pseudocode.
should then print out the numbers from 1 to
Write each line separately. Replace the count and that number input.
selection with a FOR loop.
Create a pseudocode algorithm for
total = 0 the problem.
FOR count = 0 TO 10
OUTPUT "Enter a mark"
INPUT mark
Condition controlled
total = total + mark
A condition-controlled loop has the same structure as
NEXT count
a count-controlled loop, but it doesn’t need a counting
average = total / 10
variable, because something else is controlling it. This
OUTPUT average could be controlled by an input from the user (you could
loop until it is a valid input), or until a specific number
is greater than another.
Questions
Flowchart
14 What is iteration?
The flowchart looks similar to a count controlled due
15 What is a count-controlled loop? to the condition, but it would be missing the variable
16 When is it appropriate to use a count- counter and does not run a set number of times.
controlled loop?
17 What three elements do you need in a count-
controlled loop?

67

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Pseudocode
Start
A WHILE loop is a condition-controlled loop. It keeps
looping while the condition is true.
INPUT age

KEY WORDS
REPEAT UNTIL loop: a condition-controlled loop
that runs until the condition is true
IS age >= No OUTPUT "You are too
young"
18? WHILE loop: a condition-controlled loop that
runs while the condition is true
Yes

OUTPUT "You are In this example the loop will continue until the user
old enough" enters an age greater than or equal to 18.
age = 0
Stop WHILE age < 18
INPUT age
Figure 4.34: Flowchart with condition-controlled loop 1.
ENDWHILE
The following flowchart is an example of a REPEAT In this example, the loop continues until loop is
UNTIL loop. This is a type of condition controlled loop. greater than 100.
The code inside the loop will always run once because
the condition is at the end of the code. So the statement value = 1
value = value * 2 repeats until the value is >= 100. WHILE value <= 100
value = value + value
Start
ENDWHILE

value = 1
WORKED EXAMPLE 4.10
An algorithm needs to continually ask the user to
input numbers, and add them to a total, until the total
value = value * 2 is more than 100, then output the total.
Draw a flowchart for the algorithm.
Start by identifying the steps required.
Step 1: Repeat until the total is more than 100.
Is value >= No
100? Step 2: Ask the user to input a number.
Step 3: Input the number.
Yes
Step 4: Add the number to the total.
Stop Step 5: When total is more than 100, output the
total.
Figure 4.35: Flowchart with condition-controlled loop 2.
Identify what type of symbols these steps need.
In this example, the loop keeps on going until the number Step 1: Repeat until the total is more than 100.
in the variable value is greater than or equal to 100. Loop until total > 100

68

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED Question
Step 2: Ask the user to input a number. 18 When should a condition-controlled loop be used?
Output
PRACTICAL ACTIVITY 4.06
Step 3: Input the number.
Input 1 Describe the stages this flowchart follows.
Step 4: Add the number to the total.
Start
Process – add number total
Step 5: When total is more than 100, output the
total = 100
total.
Output
counter = 0
Start

total = 0 Is total NO OUTPUT "Enter a


< 0? number"

YES
INPUT number
Is total > No OUTPUT "Enter a
100? number" OUTPUT "It took"
& counter &
Yes "numbers" total = total – number

INPUT number
OUTPUT total
counter = counter + 1
Stop

total = total + number


Stop
Figure 4.37: Flowchart with control loop.
Figure 4.36: Flowchart-Totalling number with control
loop. 2 Convert the flowchart into pseudocode.
3 An algorithm needs to ask the user to
input a number between 100 and 200.
Keep asking the user for the number until
WORKED EXAMPLE 4.11 it is valid.

Convert the flowchart into pseudocode. Draw a flowchart for the algorithm.
Replace the selection condition with a WHILE loop. 4 An algorithm stores a number. The user
total = 0 has to guess what this number is. They
keep guessing until they get it correct.
WHILE total < 100
The algorithm then outputs the number of
OUTPUT "Enter a number" guesses the user took.
INPUT number
total = total + number Write a pseudocode algorithm for
this problem.
ENDWHILE
OUTPUT total

69

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

String manipulation In this example, the four digits of the year (1999) are
extracted from the string and output.
Strings are collections of letters, characters and
numbers. They are represented by speech marks; this Start
is because the variable value is different from the
word “value”.
date = "01/01/1999"
You may need to manipulate strings, for example get
one or more characters from it or find its length.
These are all processes, so would go inside a process box year = substring(date,
6, 4)
(apart from concatenation which can also be in an input
or output box).
OUTPUT year
Table 4.3 shows some common string manipulators.

Command Description Example Stop

length(string) Returns the length("Hello")


length of the would give 5 Figure 4.38: Flowchart to extract year from a date
string pseudocode.

char(string, Returns the char("Hello",0) The statements are the same in pseudocode, they are just
characterNum) character at would give "H" written without the boxes.
characterNum
in the string.
WORKED EXAMPLE 4.12
mid(string, Returns mid("Hello",1,2)
startingChar, numChars would give "el" A program is needed to input a word from the user,
numChars) or number of and then output alternate letters starting with the first
substring(string, characters letter.
startingChar, from
Draw a flowchart for the algorithm.
numChars) startingChar
in the string Start by identifying the steps required.
upper(string) Converts upper("Hello") Step 1: Ask the user to input a word.
string to would give Step 2: Input a word and store it in a variable.
capitals "HELLO"
Step 3: Count the number of letters in the word.
lower(string) converts lower("Hello")
string to would give Step 4: Set a counter to start with the letter at
lowercase "hello" position 0.
Step 5: Increase the counter by 2 each time through
Table 4.3: String manipulators. the loop.
Step 6: Output the letter of the counter in the loop.
Step 7: Loop until the counter is greater than or
equal to the number of letters

70

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED WORKED EXAMPLE 4.13


Identify what type of symbols these steps need. Convert the flowchart into pseudocode. Replace the
loop with a FOR loop (from 0 to wordlength) but it
Step 1: Ask the user to input a word.
needs to add 2 each time.
Output
OUTPUT "Enter a word"
Step 2: Input a word and store it in a variable. INPUT word
Input and store in a variable wordLength = length(word)
Step 3: Count the number of letters in the word . FOR counter = 0 TO wordLength
OUTPUT mid(wordLength, counter, 1)
Find length of the word
counter = counter + 1
Step 4: Set a counter to start with letter 0.
NEXT counter
Process set counter to be 0
Step 5: Increase the counter by 2 each time through
the loop.
Process, counter = counter + 2
Question
19 What number is the first character in a string?
Step 6: Output the letter of the counter in the loop.
Get mid at position counter
PRACTICAL ACTIVITY 4.07
Step 7: Loop until the counter is greater than the
number of letters. 1 Describe the stages in the flowchart in
Loop until counter > length Figure 4.40.
2 An algorithm is needed to ask the user
Start
how many letters they want to enter. The
program should then ask the user to enter
OUTPUT "Enter a that many letters, concatenate them and
word"
output the result.

INPUT word Draw a flowchart for the algorithm.


3 An algorithm takes the date of a month a
user was born, the name of the month, and
wordLength = length(word)
the year. It creates a date of birth in the form
DD/MM/YYYY and outputs this.
counter = 0
Create a pseudocode algorithm for
the problem.

Is counter > No OUTPUT


wordLength? mid(wordLength,counter,1)

Yes
counter = counter + 2
Stop

Figure 4.39: Flowchart with mid command.

71

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

control back to the program that called it. A function


CONTINUED can return a value to the program that called it. You do
not need to know about functions, or use them in this
Start
chapter, but it is useful to understand that a procedure is
not the only form of a subroutine.
OUTPUT "Enter a
name"
KEY WORDS

INPUT name procedure: a type of subroutine that does not


return a value to the main program
function: a separate piece of code that has an
first = mid(name,0,1) identifier and performs a task; it can be called
from elsewhere in the code and returns a value

first = upper(first)
Flowcharts
Each subroutine is a separate flowchart, and instead of
restOfName = mid(name,1, length–1) having a Start box, it has the name of the subroutine,
for example,

Identifier
word = first & restOfName

OUTPUT word
Figure 4.41: Subroutine identifier.

Stop
In this example, the subroutine is called OutputText.
Note that the symbol for a subroutine is similar to a
Figure 4.40: Flowchart. process box but has a pair of parallel vertical lines at
each side. The algorithm starts at Start, the process box
tells the flowchart to go to Output. The output “Hello”
runs, and Stop tells the algorithm to go back to the first
Subroutines flowchart, where it runs Stop.

A subroutine is a set of instructions that are independent. Start Output


They have an identifier (a name) and can be called from
other parts of the program. When it finishes running,
control passes back to where it was called from.

Sub: Output OUTPUT


Sub: Output
"Hello"
KEY WORD
subroutine: a set of instructions that have
an identifier and that are independent from
the code; it is called from another part of the Stop Stop
program and returns control when it was finished
Figure 4.42: Flowchart calling subroutine.
There are two types of subroutine, a procedure and
a function. A procedure performs a task and returns

72

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

Pseudocode
Start calculate(value)
In pseudocode, a subroutine still has an identifier. It
starts with the command PROCEDURE and ends with
ENDPROCEDURE.
In this example, the procedure is called total = total +
INPUT number
outputMessage(). The brackets identify it as a value
subroutine. The procedure outputs the words "Hello
World" and then returns control.
PROCEDURE outputMessage()
OUTPUT "Hello World" Sub:
OUTPUT total
calculate(number)
ENDPROCEDURE
A procedure is called by using the name of the
procedure, for example,
INPUT x Stop Stop

outputMessage()
Figure 4.43: Flowchart calling calculate subroutine.
OUTPUT "Finished"
Procedures are declared at the top of the program, and
Start calculate(value)
the main program beneath all the function calls.

Parameters
You can send data to a subroutine; this data is called a
total = total +
parameter. INPUT number value

KEY WORD
parameter: a piece of data that is sent to a
subroutine Sub: OUTPUT total
calculate(number)

Flowchart
In this example, the main flowchart (in Figure 4.44) calls
the subroutine (in Figure 4.43), calculate and sends it Stop
the value in number. The function calculate renames
this as value. It adds this to total and outputs it
Is number No
before returning control to the main program.
> 10?

Yes

Stop

Figure 4.44: Flowchart with condition loop calling calculate


subroutine.

73

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Pseudocode PROCEDURE calculate(value)


Parameters are identified within the brackets. total = total + value
OUTPUT total
In this example, the main program (beneath the
ENDPROCEDURE
procedure), inputs a value into the variable number and
then sends this to the procedure calculate. This is then INPUT number
named value and added to total before being output. calculate(number)

WORKED EXAMPLE 4.14


A program asks the user to input a number. It loops b Output the result.
that a number of times. Each time through the loop, Output result
if the number is even it calls a subroutine to output Create a subroutine taking number as parameter.
the number multiplied by itself. If the number is odd it
calls a subroutine to output the number to the power powerOf(number)
of itself. a Calculate the parameter to the power of itself
Draw a flowchart for this algorithm. Process number ^ number
Start by identifying the steps required. b Output the result.
Step 1: User inputs a number. Output result
Step 2: Set the counter to 1. Draw the flowchart for the subroutines.
Step 3: Loop until the counter is the number
multiply(number) powerOff(number)
entered.
Step 4: If the number is even, call subroutine.
Step 5: Else if the number is odd, call subroutine. result = number * number result = number ^ number

Create a subroutine taking number as parameter.


a Multiply the parameter by itself.
OUTPUT result OUTPUT result
b Output the result.
Create a subroutine taking number as parameter.
a Calculate the parameter to the power of itself. Stop Stop
b Output the result.
Figure 4.45: Subroutine flowcharts.
Identify what type of symbols these steps need.
Step 1: User inputs a number Draw the flowchart for the main program.
Input number store in variable
Start
Step 2: Set counter to 1.
Process counter = 1 INPUT number

Step 3: Loop until counter is the number entered.


counter = 1
Loop until counter = number
counter = counter + 1
Step 4: If the number is even call subroutine
If counter is even call multiply()
Is counter > No Is counter No
powerOf(number)
Step 5: Else if the number is odd call subroutine number? mod 2 = 0?
else call powerof()
Yes Yes
Create a subroutine taking number as parameter.
Stop multiply(number)
multiply(number)
a Multiply the parameter by itself.
Process number * number Figure 4.46: Flowchart calling multiple subroutines.

74

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

WORKED EXAMPLE 4.15 CONTINUED


Convert the subroutines and main program to
sub1
pseudocode.
Write each subroutine first, then the main program.
PROCEDURE multiply(number)
OUTPUT "Choose 1
result = number * number or 2"

OUTPUT result
ENDPROCEDURE
PROCEDURE powerOf(number)
result = number ^ number Input choice

OUTPUT result
ENDPROCEDURE
INPUT number
Counter = 1
WHILE counter < number
Is choice Yes
IF counter MOD 2 = 0 THEN sub2
= "1"?
multiply(number)
ELSE
powerOf(number)
ENDIF No
ENDWHILE

Is choice Yes
sub3
= "2"?
Yes
Questions
20 What is a subroutine? No

21 Why are subroutines used in programs? Stop

22 What is a parameter?
Figure 4.48: Flowchart b.

PRACTICAL ACTIVITY 4.08


sub2

1 Describe what the flowcharts a to d show.

Start

OUTPUT "You
chose 1"

sub1

Stop

Stop Figure 4.49: Flowchart c.

Figure 4.47: Flowchart a.

75

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED KEY WORDS

sub3
construct: a control structure, such as a loop or a
conditional statement
nested loops: one construct that is inside
INPUT num another construct

In this example (see the flowchart and the pseudocode)


result = num * 2 there is a nested loop; a WHILE loop inside a
WHILE loop.

Start
OUTPUT result

Yes
Is continue
continue = False
= "YES"?
Stop
No
Figure 4.50: Flowchart d.

Is continue Yes
OUTPUT "loop
2 Convert the flowcharts in part 1 into = False? again?"
pseudocode.
No
3 Create a program that asks the user whether
they want to make word uppercase or continue =
Stop upper(INPUT)
lowercase. Create a procedure to turn a
word uppercase and output it, and a second
procedure to turn a word into lowercase and
output it. Call the appropriate procedure for Is continue
No OUTPUT "Invalid option.
= "YES"? or
which choice the user inputs. continue ! = Loop again?"
"NO"?
Draw a flowchart for the algorithm. Yes

4 Convert the flowchart from part 3 into


pseudocode. Figure 4.51: Nested loop.

continue = False
WHILE continue = False
Nested construct OUTPUT "Loop again?"
A nested construct is one construct (selection or iteration) continue = upper(INPUT)
inside of another construct (selection or iteration). For
WHILE continue != "YES" or continue !=
example, this could be a loop inside another loop, or a
"No"
selection statement inside a loop, or a selection statement
inside another selection statement. You can even have OUTPUT "Invalid option. Loop again?"
multiple nested loops, with several selection statements continue = upper(INPUT)
inside one loop. There is no end to the possibilities. ENDWHILE
ENDWHILE

76

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

WORKED EXAMPLE 4.16


A program needs to input the results for 100 students.
Start
Each student has 10 different results and the total
needs to be output for each student.
Create a flowchart for the algorithm. studentNumber = 1

Start by identifying the steps required.


studentNumber = studentNumber + 1
Step 1: Loop through all 100 students.
Step 2: Loop through all 10 results for each student.
Is
Step 3: Ask for the student’s result. No result = 0 Is result
Yes
studentNumber
total = 0 > 10?
Step 4: Input the student’s result. > 100?

Step 5: Add the result to their total.


Yes No
Step 6: Output the total at the end of each student’s
results. OUTPUT "Enter" &
Stop studentNumber & "Is
Identify what type of symbols these steps need. result" result

Step 1: Loop through all 100 students.


Count-controlled loop INPUT
studentResult
Step 2: Loop through all 10 results for each student.
Count-controlled loop
Step 3: Ask for the student’s result.
total = total + studentResult
Output
Step 4: Input the student’s result.
Input and store the result
result = result + 1
Step 5: Add the result to their total.
Process total = total + result
Step 6: Output the total at the end of each student’s Figure 4.52: Flowchart-Totalling results.
results.
Output

WORKED EXAMPLE 4.17


Convert the flowchart into pseudocode.
Each loop is count controlled so replace with FOR loops.
FOR studentNumber = 1 to 101
total = 0
FOR result = 1 to 11
OUTPUT "Enter " & studentNumber & "'s result " & result
INPUT studentResult
total = total + studentResult
NEXT result
OUTPUT "Total is" & total
ENDWHILE

77

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Question WORKED EXAMPLE 4.18


23 What is a nested statement?

PRACTICAL ACTIVITY 4.09

1 An algorithm should ask the user if they Start


want to perform a calculation, and should
continue asking this until they say Yes.
Then the program should ask them how
many numbers they want to add together.
The program should input that quantity of
numbers, add them together and output
Finish
the result.
Draw a flowchart for the algorithm. Figure 4.53: Maze 4.
2 An algorithm should take a word as input
from the user. Then take each letter in turn, The following algorithm visits the yellow box, then the
and output it the number of times of its green before moving to finish. Start facing up.
position in the alphabet. For example, ‘a’
FD2
would be output once, ‘b’ would be output
RT90
twice, and so on.
FD4
Create a pseudocode algorithm for RT90
the problem. FD5
LT90
FD1
RT90
Editing an algorithm/flowchart FD2
LT90
You need to be able to read an algorithm, or flowchart, FD4
and be able to identify how to make changes to it.
Edit the algorithm so it visits the yellow box and then
To do this, you need to work out what the algorithm the Finish without visiting the green box.
does first. Do this by using test data to run the
algorithm, follow each step and write down what The algorithm can stay the same up to the yellow box,
happens. Then look at the difference between what the so repeat this:
algorithm did, and what you need to make it do. FD2
RT90
FD4
Continue the algorithm from this point. There are
many different ways you could go, for example:
RT90
FD7
LT90
FD5

78

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

WORKED EXAMPLE 4.19 Questions


This flowchart takes in a user’s first name and 24 This flowchart takes 10 numbers as input, adds
favourite colour. It takes the first three letters of the them together and outputs the total.
first name, and the first three letters of the colour to
Start
create and output a username.

Start
counter = 0
total = 0

INPUT firstname

No total = total +
Is counter
INPUT number
INPUT colour = 10? number

Yes

username = Stop
mid(firstname,0,3)

Figure 4.55: Flowchart-Total 10 numbers.


username = username &
mid(colour,0,3) Change the flowchart so it inputs 20 numbers and
adds them together.
OUTPUT
25 This algorithm asks the user to input 50 numbers. It
username finds the smallest number and multiplies it by itself
before outputting it.
smallest = 9999
Stop
FOR counter = 0 to 50
Figure 4.54: Flowchart-Create a username. INPUT number
If number < smallest THEN
Change the algorithm so that is gets the last three
letters of the colour instead of the first three. smallest = number
ENDIF
The algorithm can stay the same up to where the
letters are taken from the colour. This box was NEXT counter
originally: username = username & mid(colour,0,3) answer = smallest * smallest
Instead it needs to get the last three, so it needs OUTPUT answer
changing to:
Change the algorithm so it finds the largest number
username = username & mid(colour, and multiplies this by itself before outputting it.
length(colour)–4,3)

Correcting an algorithm/
flowchart
You may need to find an error in an algorithm such as
a flowchart. To do this, you need to follow each step of
the algorithm, performing the actions it instructs to find
where it goes wrong.

79

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 4.20

An algorithm should take three numbers as input, it should add together the two largest, and output the result.
Find the error in the algorithm.

Start

INPUT num1,
num2, num3

Is num1> Is num2>
No No
num2 and num3 and
num1 > num3? num2 > num1?

Yes Yes

Yes Is num1
No No > num2?
Is num2 Is num1
> num3? > num3?

No
Yes Yes

total = num1 + total = num1 + total = num3 + total = num3 +


num2 num3 num2 num1

OUTPUT total

Stop

Figure 4.56: Flowchart with error.

80

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED
Run the algorithm with all possible different types Test 2
example data, for example, Is num1 > num2 and num1 > num3? No
Test 1: num1 = 10, num2 = 5, num3 = 3 (num1 and Is num2 > num3 and num2 > num1? No
num2 are the largest), Output should be 15 Is num1 > num2? Yes, total = num3 + num2 = 10 + 3
Test 2: num1 = 5, num2 = 3, num3 = 10 (num1 and OUTPUT 13 – This is incorrect. It should have carried
num3 are the largest), Output should be 15 out total = num3 + num1.
Test 3: num1 = 3, num2 = 10, num3 = 5 (num2 and The yes and no from the Is num1 > num2? Box are in the
num3 are the largest), Output should be 15 wrong order, they need swapping.
Test 1 Test 3
Is num1 > num2 and num1 > num3? Yes Is num1 > num2 and num1 > num3? No
Is num2 > num3 Yes this is true, total = num1 + num2 Is num2 > num3 and num2 > num1? Yes
= 10 + 5 Is num1 > num3? No total = num3 + num2 = 5 + 10
OUTPUT 15 – correct OUTPUT 15 – correct

PRACTICAL ACTIVITY 4.10

1 The algorithm should ask the user how many letters they want to enter, then let them enter that many
letters. All the letters should be concatenated and output.
Find the error(s) in this algorithm.

Start

OUTPUT "Enter the


number of letters"

INPUT number

counter = 0

Is count > No word = word


INPUT letter
number? & letter

Yes

OUTPUT word

Stop

Figure 4.57: Flowchart with errors.

81

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

2 The algorithm should repeatedly ask the user to input a number. The difference between that number
and the previous number should be added to the total. This should continue until the total is more
than 1000.
Find the error(s) in the algorithm.
total = 1
previousNumber = 0
WHILE total < 1000
INPUT number
total = total + (number – previousNumber)
previousNumber = number
ENDWHILE

REFLECTION

1 What steps did you follow to plan an algorithm?


2 How did you find errors in an algorithm?
3 How did you work out how to edit an algorithm?

EXAM-STYLE QUESTIONS
1 Identify two ways that an algorithm can be expressed. [2]
2 Name the actions for these flowchart shapes.

Figure 4.58: Flowchart symbols.

[3]

82

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED
3 State what the output will be when this algorithm is run when the data input is 10. [1]

Start

INPUT num

Is num > Yes


OUTPUT num * num
10?

No

Is num > Yes


OUTPUT num + 10
5?

No

OUTPUT num

Stop

Figure 4.59: Flowchart.

4 Change this algorithm so it outputs the 9-times table.

Start

count = 1

Is count > No
answer = count * 5 OUTPUT answer
12?

Yes

Stop

Figure 4.60: Flowchart.

[3]

83

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
5 This algorithm should loop until the user enters something other than ‘Yes’ or ‘yes’.
Each time through the loop, it adds the two numbers the user inputs to the total.
Find and correct the error(s) in the algorithm. [1]

Start

INPUT num1, num2

total = 0
continue = False

Is continue Yes total = total + num1 +


= True? num2

No

Stop OUTPUT "continue?"

INPUT response

Is
response = "Yes" No
or response =
"yes"?

No

continue = False

Figure 4.61: Flowchart.

84

Copyright Material - Review Only - Not for Redistribution


4 Algorithms and flowcharts

CONTINUED
6 Follow this algorithm.

Start generate1(value1, value2)

INPUT symbol count = 0

Is count = No
INPUT number outputS = outputS & value1
value2?

Yes
generate1(symbol, count = count + 1
number) OUTPUT outputS

Stop Stop

Figure 4.62: Flowchart.

a State the name of the procedure in this algorithm. [1]


b State the number of parameters that are passed to the subroutine. [1]
c State the name of two variables in the algorithm. [2]
d State what will be output from the program if the inputs are: "*" and then 5. [1]
[Total 5]
7 An algorithm is needed to output the odd numbers from 0 to 100.
Draw a flowchart for this algorithm. [6]
8 Write an algorithm for a calculator. The user should be able to input two numbers and a symbol
(+ or –, or * or /). The algorithm should use subroutines for each of the calculations and output
the result. [9]

85

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

SUMMARY CHECKLIST
I can edit a given algorithm.
I can write an algorithm to solve a given problem.
I can edit a given flowchart.
I can draw a flowchart to solve a given problem.
I can identify errors in an algorithm/flowchart for a given scenario.
I can use conditional branching.
I can use looping.
I can use nested loops.
I can use procedures/subroutines.
I can use input/output in a flowchart.
I can use decisions in a flowchart.
I can use start, stop and process boxes in a flowchart.
I can use connecting symbols/flow arrows in a flowchart.

86

Copyright Material - Review Only - Not for Redistribution


Chapter 5

eSecurity
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• know and understand what is meant by personal data, how to keep it secure and prevent its misuse
• recognise types and uses of malware, their consequences for organisations and individuals and methods
of prevention.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know that personal data includes data such as your name, your address, your telephone number
and your email address?
• Do you have a basic understanding of a cyber attack and what is meant by cyber security?

unsafe areas. However, when many people go online,


Introduction they relax their safety measures, perhaps because they
are in the comfort of their own home, so do not think
The world of Information Technology can be a fun and
anything negative will happen. Many people that use the
exciting experience. It also comes with its dangers and it
internet are genuine, but knowing how to detect the few
is important that you are aware of these, so that you can
that aren’t is important.
safeguard against them.
There are several guidelines for you to be aware of to
Sadly, there are people with malicious intentions online,
keep your personal data confidential:
and the more you are aware of the actions that they
could take, the more protection you can put in place. • Have strong passwords set on any account that
This increased awareness and preventative measures can holds personal data. Stronger passwords include
make sure that your time spent online, and further afield characters, numbers and symbols and are not a
with technology, does not endanger you, your data or recognisable word.
your identity.
• Encrypt (scramble text so that it cannot be read
without a decryption key) any personal data that
you store on your computer.
5.1 Personal data • Have a firewall present, scanning incoming and
Personal data is any data that relates to you and your outgoing data from your computer system.
identity. This includes data such as: • Regularly scan your computer with preventative
• Name • Bank details software, such as an anti-virus package, that is used
to identify a virus on a computer and remove it.
• Address • Medical records
• Make use of any biometric devices (devices that
• Telephone number • Salary measures a person’s biological data, such as
• Email address • Political opinions thumbprints), that are built into technology.

You should be very careful about revealing any of your


personal data! By revealing personal data to another, KEY WORDS
especially online, you are exposing yourself to dangers
such as identity theft, fraud, bullying and blackmail. firewall: a security measure that can be
These types of dangers can be issues that arise as a implemented to monitor traffic into and out of
result of revealing more personal thoughts and feelings a computer and prevent external users gaining
to those that can use them against you. It is a more unauthorised access to a computer system
sinister viewpoint to take, but the moment you reveal anti-virus: software that is used to identify a virus
any personal data to another, you are providing them on a computer and remove it
with the potential to harm you or your identity. This
isn’t to say you should never speak to another, especially biometric: unique physical characteristic of
those unknown online, just understand how to recognise a person that can be used by a computer for
a danger and how to keep your identity secure. identification purposes
To keep yourself safe in your daily life, you are likely
to have been taught to take measures such as locking • Only visit and provide data to websites that are a
doors, not talking to strangers and not venturing into trusted source.

88

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

• Do not open any email attachments from a sender


you do not recognise.
How is personal data
• Check the URL attached to any link requesting collected?
data to see if it is genuine. There are several ways that an unauthorised person can
• Be cautious about any pictures or opinions that you try and collect your data. These include:
post or send to people. • phishing • vishing
• Remove data about your location that is normally • smishing • pharming.
attached to your photos and videos that you may
post, such as geotags.
Phishing
• Do not become friends on social networking sites
Phishing is when a person sends a legitimate looking
with people you do not know.
email to a user. The email contains a link to a website
• Set all the privacy controls to the most secure that also looks legitimate. The user is encouraged to
setting that are available on social media accounts. click the link and to input personal data into a form on
the website. The email could also simply ask the user to
• Report and block any suspicious user.
reply to the email with their personal data. The user is
• Use a nickname or pseudonym when using tricked into giving their personal data to a source that
the internet for entertainment, for example, they believe is legitimate. However, both the email and
playing games. the linked website are from a fake unauthorised source.
• If it is possible, use a virtual private network (VPN), The personal data that is input is then collected by an
an encrypted connection that can be used to send unauthorised person. This person can then use this data
data more securely across a network. for criminal acts, for example, to commit fraud or steal
the person’s identity.
KEY WORDS Intimidation has become a common feature of phishing
emails, threatening the user that they must click the link
geotag: an electronic tag that assigns a and rectify a situation immediately, or there will be a
geographical location further issue.
virtual private network: an encrypted The aim of a phishing attack is to steal the user’s
connection that can be used to send data more personal data.
securely across a network

The ways in which some of these guidelines can be used


in more detail will be explored throughout this chapter.

REFLECTION

How many of the guidelines do you follow at the


moment to keep your personal data confidential?

PRACTICAL ACTIVITY 5.01

Create a plan to implement any of the guidelines


that you do not currently have in place to keep Figure 5.1: Phishing.
your data confidential.

89

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

A real-life example of phishing • Legitimate companies will send an email that uses
PayPal have been the subject of several different their domain name. If you hover your mouse over
phishing emails. Users receive an email that looks as the sender’s name, it will show the email address
though it has been sent from PayPal, as it has the PayPal that the email is sent from. If this does not look
branding. The email normally warns of an issue such as legitimate, for example, does not contain the correct
unexpected activity on their account, or that some kind domain name, then it is probably fake. For example,
of verification of their account is required. The user is if the sender’s email is [email protected] rather
then asked to click a link to log into their account and than [email protected], this is from an incorrect
resolve the issue. domain name.

The link takes them to a webpage that looks like the • Legitimate companies are protective of their
PayPal login page. If the user inputs their login details professional reputation and thoroughly check
into this page, they will not be taken to their account. any communications. They will make sure that all
It is often at this stage that the user may realise that the information given is grammatically and correctly
email and webpage are fake. However, they have already spelt. Be suspicious of any email that contains bad
given the unauthorised person their PayPal login details. grammar or spelling mistakes.
• A link in an email from a legitimate company
will also normally contain the domain name of
the company. You can sometimes hover over the
link, or right click and inspect the link, to see the
address of the URL that is attached. If the URL
does not contain the domain name, or also contains
typical errors such as spelling mistakes, then be
suspicious of this.

PRACTICAL ACTIVITY 5.02

Ask a friend or a member of your family if they


have ever received an email that they believed
was a phishing email.
Ask them how they identified it was phishing.
Ask them if they know all of the given guidelines
for identifying phishing emails.
Figure 5.2: An example of a phishing email claiming to be
from PayPal.
Smishing
How to recognise phishing Smishing (or SMS phishing) is a variant of phishing that
uses SMS text messages to lure the user into providing
There are several guidelines to be aware of regarding emails
their personal details. The user is sent an SMS text
to avoid being subjected to phishing. These include:
message that either contains a link to a website, in the
• Don’t even open an email that is not from a sender same way that phishing does, or it will ask the user to
that you recognise or a trusted source. call a telephone number to resolve an urgent issue.
• Legitimate companies will never ask you for The same advice can be followed for smishing as given
your personal data using email. Be immediately for phishing. The user must question at all times any
suspicious of any email that requests your links that are sent from an unknown or suspicious user.
personal data. It is advisable that if a user believes the message may be
legitimate, to type in the domain name for the legitimate
• Legitimate companies will normally address
company website into their web browser, rather than
you by your name. Be suspicious of any email
following the link in the message.
that addresses you as ‘Dear Member’ or ‘Dear
Customer’.

90

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

Users should block any numbers that they believe are


suspicious to prevent any further risk of smishing from
that number.

Figure 5.3: Smishing.

Vishing
Vishing (or voice phishing) has the same aim as
phishing, to obtain a user’s personal details. The
user receives a telephone call that could either be an
automated system or could be a real person.
An automated voice could speak to the user and advise Figure 5.4: Vishing.
them that an issue has occurred, such as there has been
suspicious activity regarding their bank account. The
user may then be asked to call another number, or Pharming
just to simply press a digit and be directed to another Pharming is when an unauthorised user installs
automated system. This system will ask them to provide malicious code on a person’s hard drive or server. The
their bank account details to resolve the issue. The malicious code is designed to redirect a user to a fake
bank account details have then been obtained by the website when they type in the address of a legitimate
unauthorised user and can be used to commit a crime one. The fake website is designed to look like the
against the user. legitimate one, to trick the user and make sure they
are not aware that their request has been redirected.
The automated system could be replaced by a real The user will then enter their personal details into the
person who will try to do the same thing. They will try fake website, believing it is the legitimate one, and the
to convince the user that there has been an issue with an unauthorised person will now have their personal data.
account they have and to provide the log-in details or
PIN for the account to verify who they are so the issue A common technique used in pharming is called domain
can be resolved. name server (DNS) cache poisoning. This technique
exploits vulnerabilities in the DNS and diverts the
The precaution to take for vishing is that no company internet traffic intended for a legitimate server toward a
will ever call you and ask you to provide any log-in fake one instead.
details or PIN details over the telephone. They may
ask you to provide other personal information, and if The unauthorised user needs to find a way to install the
you are in doubt that the person on the other end of malicious code on the computer. They often hide the
the phone is legitimate, it is always advisable to put the malicious code in an email attachment or link. When the
phone down and call the company back on a legitimate user opens the email attachment or clicks the link, the
number that you may already know or can obtain. malicious code is downloaded also.

91

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• Have an anti-virus program installed that is


designed to detect malicious pharming code. You
need to scan your computer on a regular basis to
check for any malicious code. It is advisable to set
up an automatic scan on a daily basis at a time
when your computer will normally be switched on.
• Be aware when using public Wi-Fi connections. A
hacker could look to directly access your computer
and install the malicious code if you are connected
to a public Wi-Fi connection. It is often advisable
to use a VPN when using public Wi-Fi. This will
help shield your internet activity and personal
details from a hacker, making it more difficult for
Figure 5.5: Pharming.
them to access your computer.

The aim of a pharming attack is also to steal a user’s Smishing can also be used as a form of pharming. A
personal data. user is sent a link, that when they click is designed to
download malware onto their mobile device. Therefore,
A real-life example of pharming it is advisable to have security software installed on your
In 2007 50 different companies all over the world were mobile and also scan it regularly to detect any presence
subject to a pharming attack, these included PayPal, of malware.
eBay, Barclays bank and American Express. Over a
three-day period, hackers managed to infect over 1000
PCs a day with a malicious pharming code.
Question
1 Investigate the use of a VPN. Find out what
When users who had been infected visited the websites security benefits it may have.
of the different companies, they were redirected to a
legitimate-looking version of the site that was designed
to steal their personal data.
The original email, containing the malicious code, was 5.2 Malware
set up to look like a shocking news story. Users were Malware (or malicious software) refers to any software
encouraged to click a link in the email to find out more that is designed to disrupt or damage a computer system
information. The code was downloaded when the user or sometimes a user.
clicked the link.
This was quite a sophisticated attack that required
legitimate looking websites to be set up for a large
KEY WORD
number of companies. It is not known how much money malware: software that is malicious
the hackers were able to retrieve as a result.

How to prevent pharming There are various types of malware. These include:
All of the guidelines to avoid being subjected to
phishing are also relevant for recognising pharming. • virus • adware
There are also several other precautions that can be • trojan • rootkit
taken to check for pharming attacks. These include:
• worm • malicious bots
• Have a firewall installed and operational. A firewall
monitors incoming and outgoing traffic from your • spyware • ransomware.
computer. It checks this traffic against set criteria It is important that you understand how each of
and will flag and stop any traffic that does not the given malware operates and what you can do to
meet the criteria. A firewall could detect and block minimise the risk from each.
suspicious traffic, such as a malicious code trying to
enter your system.

92

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

The consequences to the individual or to a business will Minimising the risk of a virus
depend on the type of malware. Some malware may
If a virus manages to infect a computer system, it can be
just cause a minor irritation, such as slowing down a
very difficult to eradicate. A robust anti-virus software
computer, but it could be much more serious, leading
is needed to minimise the risk of a virus. You should
to identity theft, corruption of data or blackmail
install an anti-virus program and regularly scan your
(either to do with personally collected data or to restore
computer. It is best to set up a daily automatic scan
blocked data).
of your computer at a time when you know that your
computer is likely to be switched on.
Virus Anti-virus software scans a computer system and finds
any files that it thinks contain a virus. It will quarantine
A virus is the most commonly known type of malware. these files and alert the user of their presence. The user
A virus is the only type of malware that infects new files can then select to delete these files. It is possible to
in the computer system. It attaches itself to a clean file, remove this stage and set the software to automatically
replicates itself, then attaches itself to another clean file. delete all quarantined files.
It is designed to spread, much like a human virus. The anti-virus software can detect the presence of a
Once a virus has infected a file, it may begin to replicate virus in a file by comparing the code to a database of
immediately, or it can lay dormant until actions known virus codes. If it finds a code that matches it will
performed by the computer cause the code to be quarantine the file.
executed. If an infected computer is part of a network, One weakness of anti-virus software is that it is
it can then begin to infect other computers on the dependent on the database it holds. Therefore, if a
network. A virus can be especially dangerous if it infects perpetrator manages to hack a system with a virus
files on a server that are accessed by many different that is not in the database, it will not be recognised
computers. and removed. This could leave it to do a great deal of
There are several signs that your computer has been damage. For this reason, it is also important to update
infected with a virus. These include: your anti-virus software to make sure that it includes the
latest known viruses.
• slower system performance
Some anti-virus software can be set for real-time
• files multiplying or duplicating on their own checking. This means that all programs that are
• files being deleted without your knowledge. requested for download are immediately checked for
viruses. If the anti-virus detects the presence of a virus,
The aim of a virus is to corrupt and disrupt data in a
it will alert the user and tell them not to download the
computer system. It is mainly a method of sabotage for
file as it contains a virus.
this reason.
A firewall can be used to minimise the risk of a virus.
A firewall acts as a filter, monitoring incoming and
outgoing traffic from a computer system. Therefore, if
it detects malicious software trying to enter the system,
it can stop it before it is able to enter. A firewall again
relies on the necessary criteria to be set in order to detect
the malicious traffic in the first place.
You should also be very careful when sharing any
resources using portable storage devices such as a USB
memory stick. You should immediately scan any USB
memory stick that is inserted into your computer, even
if it is your own storage device. It is very common
for viruses to be spread through the use of portable
storage devices.

Figure 5.6: Virus.

93

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 5.03

Discuss with your teacher what measures your


school has in place to make sure that a virus is
not installed on the school’s computers.

PRACTICAL ACTIVITY 5.04

Your friend does not have any security measures


in place for their computer. They think that
they will never get infected with a virus as a
hacker will just never bother to do this to their
computer. They do not realise that they could
download a virus at any time. You have one
minute to convince them they need to take
security measures, and what security measures
they can take to prevent a virus being installed
on their computer.
Figure 5.7: Trojan.
Write a one-minute speech to convince your
friend. Practise the speech with a partner in
your class. Minimising the risk of a Trojan
It is difficult to minimise the risk of Trojans because
they mask themselves as legitimate software. They also
require the user to make them run, so rely on the error
Trojan of a user to operate, rather than detection by anti-virus
or a firewall. It is more likely that a user would make
A Trojan is a type of malware that disguises itself an error and be tricked into running the software than
as legitimate software, or is included in legitimate malware going undetected by a firewall and anti-virus.
software that may have been infiltrated. They are mostly
downloaded from an infected email or website. The main way to minimise the risk of a Trojan is to
only open files and click to run software that you know
The term Trojan comes from Greek mythology. The is from a trusted source, for example, trusted software
Greeks gave a wooden horse as a peace offering to the companies and trusted websites. If you are in any doubt
people of the city of Troy. The ‘Trojan’ horse was in fact about the program, do not run it!
a container that held several Greek soldiers who, when
night fell, climbed out of the horse and opened the city
to the rest of the soldiers, who were then able to conquer Question
the city of Troy.
2 Find out what is meant by a backdoor Trojan.
A malware Trojan works in a similar way. It looks
harmless, but it hides a malicious program. When the
Trojan file is opened, it will normally release another Worm
type of malware, such as a virus. A Trojan needs the
user to run the program for it to release other malicious A worm is a type of malware that acts in a similar way
software. Therefore, it will usually encourage the user to a virus, but with a fundamental difference. A worm
to run the program, for example, it will tell the user is a program that replicates itself, like a virus but, unlike
another program needs to be updated, and to click to a virus it does not need to attach itself to another
run a program to update it. This then runs the Trojan program or file to cause damage. Worms exploit security
and allows it to release further damage. holes and issues in a computer. These normally exist in
the operating system.

94

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

A worm replicates itself and aims to fill up all the free can be set to automatically occur, then this can remove
space on a computer to slow it down and bring it to the need for you to remember to do it.
a halt. Therefore, the first signs for a user that their
The same guidelines about minimising phishing
computer has been infected with a worm is that it starts
should also be taken. This can help to reduce the risk
to run slowly and the space on their hard drive begins to
of downloading a worm that is attached to an email
rapidly decrease.
attachment or a link.
A worm also tries to spread to different computers on a
Anti-virus software can normally check for a worm too.
network. For this reason, worms are often used to infect
Therefore, regularly scanning your computer with anti-
a large number of computers on a network. If a worm
virus software can help identify a worm that has infected
is able to spread throughout a network, it can clog up
your computer.
bandwidth and slow the whole network down.
Worms can be spread by network connections.
Worms are normally downloaded and spread through
Therefore, disconnecting your computer from a
email attachments, peer-to-peer file sharing networks or
network, when the network resources are not required,
using a link to a website or resource. Once downloaded,
can keep it safe during this time.
they do not need any other human interaction to
replicate themselves.
A well-known example of a computer worm is Stuxnet. Question
Stuxnet was a computer worm that was used as a cyber 3 Find out about another well-known example of a
weapon in 2010. It was discovered by two security worm called Confiker.
researchers who recognised that the worm was a great
• What issues did Confiker cause?
deal more complex than any they had seen at the time.
The worm was being used to attack a power plant and • Who did Confiker affect?
security experts believed the aim was to sabotage nuclear • How was Confiker dealt with?
weapon production.

Spyware
Spyware is a global term that is used to describe
malware that is designed to gather information about
your interactions with your computer. As the name
suggests, the aim of spyware is to spy on the user.
Spyware is normally used to gather personal and
sensitive data that can be used in fraudulent and
criminal activity.
A common example of spyware is a key logger. A
key logger is installed on a user’s computer, normally
without their consent. The key logger will then record
any key presses that are carried out by the user. All
this data is sent to a third party, normally the person
who created the spyware, to be analysed. The data is
Figure 5.8: Worm. analysed, normally by another computer, but can be
done manually, to establish any patterns in the data.
The patterns are then analysed to see if any of them
Minimising the risk of a worm look as though they could be personal or sensitive data,
Worms often aim to exploit software vulnerabilities for example, a password.
in a computer. These will normally be located in the Spyware can perform actions beyond just key logging.
operating system or applications. Therefore, you A user can sometimes unknowingly allow a commercial
should regularly check for, and install, updates for your company to use spyware for several purposes, including:
operating system and your applications. If this process

95

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• targeted marketing from tracking browsing habits in the small print that you are consenting to allowing
spyware to be downloaded to track information such as
• sending unwanted and often irritating
your browsing habits. Look for clauses about sharing
pop-up adverts
your data with third parties.
• installing add-ons and redirecting to
Cookies are a type of spyware that you may consent to
advertising websites
be used to track your internet surfing habits. Even with
You can often unknowingly download spyware whilst cookies, you should always check what you are allowing
using the internet. It can be embedded into enticing the company to do with the cookies that you consent to
opportunities, such as a pop-up advert offering a prize being used to track your actions.
or a free product. It can also be embedded into the
Anti-malware software can be used to scan your
download of a video, music or application file, often
computer to see if any key logging software is present.
those that are free of cost. Sometimes, this may involve
This type of software will normally remove any key
you consenting to the download of the spyware as the
logger if it is found. If it does find a key logger it is
consent is buried in the small print and can go unread
advisable to change all your passwords immediately, in
and unnoticed.
case your data has been gathered an analysed. Do not
wait to see if any issue occurs in the future, be proactive!

KEY WORD
anti-malware: software that is used to identify
malware on a computer and remove it

Questions
4 How has the General Data Protection Regulation
(GDPR) in the European Union (EU) affected the
use of spyware?
5 Find out about mobile spyware.
Figure 5.9: Spyware. a How are mobile phones infected?
b How is spyware used in mobile devices?
Minimising the risk of spyware
Spyware is always roaming around the internet, so it is Adware
important to understand how you can minimise the risk
of allowing it to be used to monitor your actions. Adware is a type of software that is designed to display
targeted advertising on your computer. It does this by
As always, be very careful about what you download, collecting data about your internet browsing habits.
especially when downloading software that is free of Adware can be legitimate, but it can also be illegitimate.
cost, and downloading from video and music sharing Some program developers will justify the inclusion of
sites. Make sure that this is only done from very adware in their product by claiming that it will generate
trustworthy and reputable sources. revenue for them, keeping the cost of the product lower.
Do not click on any links or offers in pop-up adverts, Adware can be bundled in with legitimate software
no matter how enticing they may seem. If you find downloads. This means that you may end up with adware
that there is no obvious way to close a pop-up window, on your computer without actually asking to download
you can press ALT and F4 and this will close your it. This can happen when you are given the chance to
internet session. customise what is downloaded. For example, there may
Always read the small print when consenting to any user be a hidden addition to the download of a task or search
agreement. Commercial companies can sometimes list bar that is added into your current internet browser. You

96

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

can customise the download and uncheck the box so


that you do not get the adware, but if you do not know
Rootkit
to do this you may download it unknowingly. Once A rootkit is a computer program that enables a person
downloaded, the adware can prove difficult to delete as to gain administrator access to a victim’s computer.
they do not normally have any uninstall feature. It may They are designed to stay hidden on a user’s computer
not act maliciously, but will often serve as a method of and allow the computer to be controlled from a remote
advertising for the company, or try to get you to use their location. A rootkit allows the unauthorised user to do
search function. several criminal acts with the computer, such as hide
illegal files on the computer, use the computer as part
Adware as malware will present adverts when a user is
of a larger cyber attack or to steal personal data and
browsing the web that are often shown constantly. They
information.
are normally in the form of pop-ups or windows that
cannot be closed. They can often be very irritating. Rootkits can get installed because a victim’s password is
cracked or a vulnerability in the security of a computer
system is exploited. The person installing it can then
use the access to stop the computer recognising that
the rootkit is there, so the victim will not know that
someone else has complete access to their computer
system. The rootkit will normally be buried deep within
the operating system. This is so that it can try to avoid
any detection by anti-malware software. Other malware
can be incorporated into a rootkit that can then be
concealed on the computer to cause harm.
One very sneaky way that an unauthorised person can
use to install a rootkit on a computer is by leaving USB
memory sticks, infected with a rootkit, in places that
they believe they will be found. They are relying on the
curiosity of another user to insert the USB memory
Figure 5.10: Adware.
stick that they have found into their computer and
therefore download the rootkit.
An early rootkit example is NTRootkit. This was a
Minimising the risk of adware rootkit that appeared in 1999 and was designed to
You may be happy to allow some adware to track your infiltrate Windows operating systems. A rootkit that was
browsing habits online. This will allow you to see adverts designed to do the same with Mac operating systems
for products that you might be interested in. You may didn’t appear until 10 years later.
not be happy to allow adware to make your browsing
experience become very irritating by having too many
adverts popping up on a constant basis. Therefore, you
may want to be careful about what adware you allow to
be installed on your computer.
The most proactive measure you can take with adware
is to make sure that you check exactly what is being
downloaded onto your computer. Look at the list of
component parts that will be downloaded and make
sure that any that look like they could be adware (for
example, a search bar or task bar addition to your
browser) are not ticked. If they are present, untick them
immediately before allowing the download to go ahead.
Once downloaded, unwanted adware can be very
difficult to remove. It may take several scans with an Figure 5.11: Rootkit.
anti-malware software to detect and remove the adware.

97

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Minimising the risk of a rootkit is launched. The computer will then be connected
with lots of other computers that have been
Rootkits are often installed through your computer
compromised by zombie bots to launch a large-
password being cracked, or by another means such as
scale attack on an organisation. Bots connected in
embedded in a software download or installed on a USB
this way can be known as a botnet.
memory stick.
• Chatter bots will pretend to be humans on sites
It is advisable to have a strong password set for your
such as social networking and dating sites. They
computer to minimise the risk of it being cracked. A
try to emulate human interaction with the goal of
strong password should contain a random mixture of
obtaining personal data.
characters, numbers and symbols. It should not contain
any data that could be connected to you or your likes • File-sharing bots will provide a search result
and dislikes. It is also advisable to change your password for a user’s search request and offer a link for a
on a regular basis in case it has been discovered. file download.
Previous advice should also be followed about making Bots often have worm-like capabilities because they can
sure that software is only downloaded from trusted replicate and spread themselves.
and reputable sources. You should also, under no
circumstances, insert a USB memory stick that you find
into your computer system. It may be tempting to see
what it contains, but the risks that could be attached
to inserting it into your computer are not worth the
temptation.
Removing a rootkit from a computer once it has been
installed can be extremely difficult. It is software that is
designed to be hidden and heavily relies on this feature.
A rootkit may be detected by anti-malware, but this
is highly unlikely. Often, one of the only ways to rid
a computer of a rootkit is to completely uninstall the
operating system.

Question
6 Rootkits can also be used a positive way. Find out
how rootkits are used in connection with Digital
Rights Management (DRM).
Figure 5.12: Bots.

Malicious bots Minimising the risk of bots


A bot, short for robot, is an application that is Bots are often embedded into links or software
automated and used to carry out simple and repetitive downloads and are often spread in the same way that
tasks. These are normally tasks that a human would phishing is carried out. Therefore, the same measures
find mundane and time-consuming. Bots can be used that can be taken to minimise phishing can be applied to
for very productive reasons, such as indexing a search bots. The best advice is not to click on any links without
engine, but they can also be used as a form of malware. knowing who they are from and that they will link you
Malicious bots are used by cybercriminals in a to a trusted and reputable source.
variety of ways: As bots can often be used in a chat situation, you should
• SPAM bots are used to bombard people’s email never give out any personal data when chatting online.
inbox with SPAM emails. Even if you feel this is in a private environment, one on
one with a person, you should still never provide any
• Zombie bots are used to create a bot network. The personal data. If you are chatting to friends, you should
bot will lay dormant on a computer until an attack agree to never request any personal data from each

98

Copyright Material - Review Only - Not for Redistribution


5 eSecurity

other online. If you are chatting to what you believe is


as friend, if you feel they ask you an odd question, or
for personal data, then contact them by another means,
such as calling them, and double check that you are
speaking to your friend.
If you suspect that you have downloaded a bot, anti-
malware software can be used to detect and remove it.
A firewall can also be used to detect the activity of a bot
as it may recognise suspicious traffic created by the bot.
However, if a bot is sophisticated and can disguise its
communications as legitimate traffic, it will go unnoticed
by a firewall.

Question Figure 5.13: Ransomware.

7 Bots can be used in both positive and negative ways.


a How are bots used in a positive way as Minimising the risk of ransomware
web crawlers? As ransomware is distributed in a similar way to
b How are bots used in a negative way in Trojans, the same guidelines for minimising the risk of
distributed denial of service (DDoS) attacks? Trojans can also be followed.
In addition to this, you can counteract the risk of losing
your data in this type of attack by making sure that
Ransomware you have a copy of your data. If you create a separate
back-up of your data, and keep this up to date, then the
Ransomware is a type of malware that restricts a
risk of losing your data in a ransomware attack becomes
user’s access to their computer system and files. The
greatly reduced. This means that you can reinstate your
ransomware will normally demand that the user pays
data, if it is deleted.
a ransom in order to regain access to their computer
system. Some ransomware programs will completely The risk of losing data can also be reduced by storing
lock a user’s system, and some will encrypt all of the data in the cloud. Cloud systems often have a facility
files on their system in a way that renders them useless. that can allow the user to roll back to a previous version
Ransomware will normally try to enter a system in of the data, so it can be reinstated if lost.
a similar way to a Trojan. If the user doesn’t pay the
ransom in a set amount of time, they risk losing their
data forever. Question
A well-known example of Ransomware is WannaCry. 8 A company can use a practice called principle
The unauthorised user demands that the infected user of least privilege (POLP) to help keep data safe
pays a $300 ransom. If the user does not pay within and secure.
three days, the amount is doubled. If payment is not Find out what POLP is and how it can help keep
made within a week, the unauthorised user will delete data safe and secure.
the infected user’s files forever.
The success rate of a person paying the ransom relies REFLECTION
on the user’s attachment to the data that is stored on
their computer. Users that do pay the ransom can often What kind of resources did you use for the
be exploited further and asked for a further payment to research questions?
release their data. If you used the internet, what kind of measures
did you take to minimise the risk of malware?

99

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
1 Identify three guidelines that can help keep personal data safe. [3]
2 Explain one difference between phishing and pharming. [1]
3 Explain two similarities between phishing and pharming. [2]
4 Identify four different types of malware. [4]
5 Describe how a firewall can be used to help prevent a virus infecting a computer system. [5]
6 Describe how spyware can be used to obtain a user’s password for an online account. [5]
7 Rootkits can be used to allow an authorised person to hide illegal files on a user’s computer.
a State what is meant by a rootkit. [1]
b Explain how the risk of rootkits can be minimised. [2]
c Identify two other malicious ways that rootkits can be used. [2]
[Total 5]
8 Ransomware can be used to prevent a user gaining access to their data.
a State how ransomware prevents the user gaining access to their data. [1]
b Explain two measures that can be taken to minimise the risk of ransomware. [2]
[Total 3]

SUMMARY CHECKLIST
I can identify what is meant by personal data.
I can understand the importance of keeping personal data confidential.
I can describe several guidelines that can help keep personal data confidential.
I can explain how personal data is collected by unauthorised people, using practices such as phishing,
smishing, vishing and pharming.
I can describe how a range of malware operates.
I can identify a range of consequences of malware to organisations and individuals.
I can explain what measures can be taken to minimise the risk of each type of malware.

100

Copyright Material - Review Only - Not for Redistribution


Chapter 6

The digital
divide
LEARNING INTENTIONS
In this chapter you will learn how to:
• recognise what is meant by the digital divide
• recognise what causes the digital divide
• identify the effects of the digital divide and how these can be reduced.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know a range of digital technologies?


• Do you understand that people have different living conditions that can depend on several factors,
including location, demographics and the economy?

Introduction REFLECTION

You live in an ever-increasing digital world. The Do you think there is anything that can cause a
digital divide is therefore a complex and growing issue. digital divide in your country?
The term refers to the technology divide between
countries, demographic groups (particular sections of
the population) and economic areas (areas defined by The digital divide matters because those without access,
their production and use of goods and services). A lack and those without developed skills, are missing out on
of access to technology, such as mobile telephones, the many advantages the digital world can offer.
personal computers and the internet, is seen as an issue
and a disadvantage because of the range of benefits that
technology can provide. The digital divide that people
experience can depend on several aspects, such as age,
status and location.

KEY WORDS
demographic: a particular section of a population
economic: considering a country in terms of
their production and consumption of goods
and services

Figure 6.1: The digitally-connected world.


Groups affected by the digital divide:
• people living in cities versus people living in
rural areas
• people educated in using technology versus people
6.1 City versus rural
uneducated in using technology
• older people versus younger people
living
The geographical location of where a person lives can
• areas that are more industrially developed versus have an affect on their access to technology services.
areas that are less industrially developed One aspect of this is whether they live in a city or a
• different socio-economic groups. rural location.
All countries experience a digital divide at one level One of the main services that can be affected by
or another. At a national level, the digital divide geographical location is access to the internet. The
describes the difference between those who have regular infrastructure for the availability of broadband (a method
access to modern technology, and those who have the of data transmission that is capable of transmitting a
necessary skills to make good use of the technology. At high level of traffic) and high-speed internet connections
an international level, the digital divide describes the is much more developed in city locations than it is in
difference between developed and developing countries. rural locations. Why has this happened?

102

Copyright Material - Review Only - Not for Redistribution


6 The digital divide

b How could this affect the digital divide


KEY WORDS between those living in a city and those living
infrastructure: the facilities that are needed in a rural location?
for the operation of a society, such as roads,
buildings and utilities The issue of a lack of access to high-speed internet
access can extend to mobile telephone internet services.
broadband: method of data transmission that is In a rural location, a person may find that they have
capable of transmitting a high level of traffic limited connection to 3G or 4G connections, or may not
get any connection at all.

Question
2 a How could a lack of mobile telephone
internet services affect a person’s ability to
communicate with others?
b What kind of services may they not be
able to use?
c How might this lack of ability to communicate
in certain ways make them feel?

Real-life example
Sofia lives in a rural area of Spain. Access to high-speed
Figure 6.2: Countryside and rural. internet in her rural village is very limited. She is a
furniture designer who works from home.
The most likely cause is linked to the higher
Sofia currently creates her designs and sends them to clients
concentration of people that live in a city, compared
using the internet. She would like to be able to video-
to a rural area. This means that the potential customer
conference with her clients because she feels this would
base for broadband providers is much greater in a
provide her with a better platform to explain her vision.
city. This may mean that both the government and an
The internet speeds available to her, because of her rural
internet provider are able to recuperate the costs of
location, will not allow her to use video conferencing
implementing more advanced infrastructure far quicker
technologies effectively. Sofia feels that this reduces her
in urban areas than in rural areas.
competitive advantage in comparison to other designers
One issue that could be caused by a lack of high-speed that live in the city, who have access to internet speeds
internet access is a reduced level of enjoyment of online that allow them to video-conference with their clients.
entertainment. People in rural areas may not be able
to use the services offered by some online television
broadcasting companies. Therefore, they may find they
have other friends and family that are able to watch
television shows and films they do not have access to,
due to their rural location. This could result in a person
feeling isolated, as they cannot have a conversation with
friends and family about the television shows and films
they are currently watching.

Question
1 a How could a lack of high-speed internet access
affect a person’s ability to use online learning
platforms? Figure 6.3: Video-conferencing.

103

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Reducing the digital divide in PRACTICAL ACTIVITY 6.01

rural areas Imagine you are a government technology


representative for your country. You have been
The quality of the infrastructure in rural areas could
tasked with improving internet access in rural
be improved. Many governments around the world are
areas of your country.
working with internet providers and offering incentives
to improve the infrastructure in rural areas. Work with a partner and create a presentation
In certain rural locations, the practicality of building that highlights your plan for improving internet
infrastructure capable of high-speed internet, or even access in rural areas of your country. Your
any internet access at all, can be very challenging. This presentation should also include the advantages
is normally because the task and cost of building the that such acess will provide.
infrastructure needed is just so large. One solution
to this is to use satellite technologies. This limits the
amount of infrastructure that needs to be developed,
whilst still providing access to the internet.
6.2 Technology educated
Real-life example
A report released at the India Mobile Congress 2017
versus technology
highlighted that only 16% of people in rural areas of
India have internet access. The India government are
uneducated
looking into ways to improve this figure. Using technology can be complex. Different types
of technology have different interfaces and different
BharatNet is an initiative of the government of India
methods for use. Without a certain level of education in
that focuses on developing infrastructure in rural India
how to use technology, it can often seem very daunting.
in order to provide affordable internet connectivity
This can begin to make those who are not educated in
up to 20Mbps. They are planning to do this through
using technology very uncomfortable.
increasing the infrastructure based on fibre optic
cabling. They are also planning to deliver access through Many companies now have online systems that allow
satellites in approximately 5300 locations. people to buy products, book tickets or book services.
This may seem simple and convenient for people who
are educated in using technology and are confident in
navigating the systems. However, for those who are not
educated in using these systems it can seem frustrating
and people may miss out on opportunities.
There may be several different reasons why people are
not technologically educated. It may be that they do not
have much access to technology and therefore do not
have much experience in using it. Some people simply
do not have an interest in using technology, but they are
sometimes forced to use it to be able to access certain
products and services.

REFLECTION
Figure 6.4: Building digital infrastructure.
Have you ever had to help someone who has
little or no experience or education in using
technology to use it? What did you notice about
their manner and reaction to the technology?

104

Copyright Material - Review Only - Not for Redistribution


6 The digital divide

Question offered as a service by colleges, schools and libraries.


Courses can be offered for free, or at a low cost, that
3 Think of two advantages that people who are people can attend to improve their education in the
educated in using technology may have over those use of technology. This will allow people to learn with
who are not educated in using technology. others who are of a similar level to them, so they do not
feel too uncomfortable. They can also have a teacher
Real-life example or leader who will help them with any problems they
Zhen wants to buy tickets to see her favourite band in have. People can then use the skills they learn to use
concert. Tickets go on sale on a Friday morning and technology to their advantage in the future.
are only available online. Zhen has never used an online
ticket booking system before and feels very nervous Real-life example
about doing so. She would much rather be able to ring Pakistan are offering a 12-week course to its citizens
the venue and purchase tickets over the telephone, but for learning skills in everyday software. The course is
this option is not available. provided as a collaboration with the Virtual University.
Zhen doesn’t have a computer, so she goes to use one The course will provide people with basic knowledge on
in a local coffee shop, to purchase tickets online on the everyday software and also a better understanding of
Friday morning. Zhen struggles to navigate the booking using the internet for communication.
system and by the time she has managed to get to trying This education will provide Pakistani citizens with a
to pay, all the tickets have sold out and there are no basic education in the use of technology and allow them
more tickets available. to feel more comfortable and confident in their skills.
Zhen was unable to buy the tickets to see her favourite The country believes this will help its people be more
band because she did not have the education in competitive in an advancing digital world.
technology and experience needed to navigate the
ticket system.

Figure 6.6: Virtual education.

Figure 6.5: Buying online.

6.3 Older people versus


Reducing the digital divide
younger people
with the technologically Technology has developed a huge amount over the last
50 years. This means that some people have grown up
uneducated with technology as an integral part of their life, and
One effective way of reducing the digital divide with others have witnessed the development of technology,
the technologically uneducated is to provide accessible along with experience of a world without it.
technology courses in local communities. This is often

105

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Some younger people have only ever known the use Task Pre-technology Post-
of smart phones and the internet. This means that technology
social media has been their main understanding of
communication with the outside world. Some older Sending a list Writing them
Sending
people have known other methods of communication of places you a letter and
them a text
and may have preferred those, but this group are now want to visit, to sending it by
message.
finding that older methods of communication are a friend. post.
becoming increasingly dated. This can cause a divide Arranging to
in the ability of a younger and an older generation to meet a friend
communicate. for lunch.
Younger people may feel much more confident using Buying a
technology as they have far more experience with it. It cinema ticket.
is often just their ‘go to’ resource for many aspects of Researching
their life, including communication, entertainment and recipes for your
research. Older people may feel less confident about favourite food.
using technology because they have experienced a world Finding out how
before smart phones and the internet and have used much money is
alternative methods. These include a landline telephone left in your bank
for communications, written letters using the postal account.
service and using libraries for research.
As older people have known other methods, this can
cause resentment if they are presented with the need PRACTICAL ACTIVITY 6.03
to use technology to complete a task. They may feel
that the use of technology makes the task much more Think of three ways that you could pitch using
difficult and this can also affect their confidence in using technology to an older person. Think of how the
technology for other tasks in the future. technology would benefit them and how you
would gain their confidence in its use.

PRACTICAL ACTIVITY 6.02


Real-life example
Make it your mission to help an older member
Jack is an elderly gentleman who needs to attend several
of your family, or an older family friend, do
hospital appointments. The hospital has a brand-new
something that they have never done using
technology that collates all the data about appointments
technology. This could be as simple as sending
at the hospital and sends out reminders to people who
a message, watching a video online, or showing
need to attend appointments. The previous system
them how to research a topic they love, using the
was to send a letter to people reminding them of their
internet. Ask them why they have never used the
appointment.
technology before and ask them how they felt
about using it to complete the task. Jack has a mobile telephone that his daughter bought
for him. He doesn’t know how to use it though, other
than to make a telephone call to his daughter. Jack
keeps receiving text messages from the hospital about his
Question appointments. The messages ask him to reply if he will
4 To gain an understanding about how younger still be attending the appointment. Jack doesn’t know
and older people may complete tasks, copy and how to reply to the messages and this makes him very
complete the following table about pre-available worried that he will lose his hospital appointment. Jack
technology and post-available technology for doesn’t know who to call at the hospital to say he will
completing these tasks. still be coming to his appointment, there is no telephone
number to do this. Jack is already worried about needing
to go to the hospital and now he is even more worried
because of the messages. He wishes they would just go
back to the old system and write to him.

106

Copyright Material - Review Only - Not for Redistribution


6 The digital divide

Reducing the digital divide


between younger and older
people
One of the biggest barriers to older people using
technology is likely to be their fear of it. They will have
more familiar ways to do things with which they are
comfortable. They may feel that they are too old to
learn how to use technology and see it more of a young
person thing.
What they may not see is that the use of technology can
be hugely beneficial to older people. One of the things
that can happen with older people is that as they become
less mobile and are able to go outside their home less Figure 6.7: All-age technology.
frequently they can start to become cut off and feel
isolated. By being able to use platforms such as social
media, they can improve their feelings of isolation and
have regular contact with their friends and family.
6.4 More industrially
Incentives to get older people to see the advantages of
technology are developing in many countries. developed areas
Real-life example versus less industrially
Singapore is a country that are trying to encourage their
older generation to see the advantages of technology. developed areas
Retirement villages are built incorporating several
The parts of the world that have greater access to
different technologies so that older people who live there
modern technology are the USA, Europe and northern
can experience how the technology can benefit their
Asia. These areas mostly consist of developed countries.
lives. Sensors can monitor a patient’s health and doctors
Areas where access is more restricted are in some parts
can take advantage of the high-speed broadband to
of Africa, India and southern Asia. These are areas
make video-conference calls to check in and look over
that have countries that are less industrially developed.
the elderly, who find travel to a clinic difficult.
Access to technology may be less in these areas because
Additionally, initiatives have seen many public buildings, the countries are having to use their financial resources
such as libraries and community centres, offering free to provide more important services and do not have the
internet access to the elderly in the hope of encouraging funds available to concentrate on the development of
them to get online. The country sees the internet as their technology services.
integral to economic and social success and is striving to
The start-up costs for these countries to build the
reduce the gap for all its population.
infrastructure would be very great. However, not having
the same access to technology and the internet could put
them at both a competitive and economic disadvantage.
They may not have the ability to trade using modern
technologies and therefore cannot access the same
customer and supplier base as businesses in developed
countries. It may also affect the level of education that
can be provided as there may be a wealth of information
unavailable to them that is accessed using the internet.
This can have an impact on both the education and the
skill level of people in those countries and prevent them
from competing on an international level.

107

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Governments in many less industrially developed areas


PRACTICAL ACTIVITY 6.04 try to promote the business and products that they could
Business and education are two areas that could offer if they had better infrastructure and access to the
be affected by a digital divide in respect of the internet. They hope that other countries will invest and
industrial development of a country. With a help the country to build the necessary infrastructure.
partner, think of one other area that could be These coordinated efforts can benefit the world on a
affected and discuss what impact this could have global scale.
on the country.
Real-life example
A developing method of accessing the internet is called
PRACTICAL ACTIVITY 6.05 TV white space. This technology uses unused channels
in radio frequencies within the range that is normally
How aware are you of the infrastructure in your used for broadcasting television.
country? Make a list of the facilities that you think Microsoft have an initiative called the Affordable Access
your country provides. Use the internet to see if Initiative that is making use of the TV white space
you are correct and to see what other facilities it technology to provide internet access to developing
provides. Do further research using the internet parts of the world. One example of this is to provide
to find out what future plans your country has to access to the internet in solar powered internet
improve its infrastructure in terms of technology. cafes in Kenya.
This technology is allowing more access to be developed
Real-life example in countries that lack the infrastructure, because it is
removing the need for the traditional infrastructure to
Elinah lives in a village in Kenya. She makes beautiful
be put in place.
woven baskets that can be used for a range of purposes,
including storage of items and as a plant holder. Elinah
sells her products to local customers and tourists. The
tourists often say to her that they wish they could buy
her products online.
Elinah would like to be able to sell her products online.
She knows how to set up a website and distribution
channel, but the internet access to her village is very
limited, meaning that she cannot be effective in running
an online business. Even if Elinah moved to a different
location, access to the internet in her country is limited
in many places, although it is improving.

Reducing the digital divide


Figure 6.8: Access to technology.
in less industrially developed
areas
The internet has become one of the most fundamental 6.5 Different socio-
global infrastructures. Those with limited access to the
internet often find it difficult to access the benefits of
the internet.
economic groups
The digital divide between different socio-economic
Satellite technology may assist remote areas to access groups often revolves around cost. Richer people can
the internet. Large companies plan to implement afford higher-speed internet connections and expensive
satellite technologies that allow such areas better access advancements in technology. This can mean they have
to the internet. a better standard of living, due to an increased level

108

Copyright Material - Review Only - Not for Redistribution


6 The digital divide

of experience, as they have access to higher quality telephone. She feels that she could produce much better
entertainment, a wealth of information and the level of work, and enjoy her studies much more, if she had
convenience that technology can bring. access to a better computer system to edit her work.
The lack of access to information can greatly impact
the poor. It is often people in poorer circumstances
that would benefit from the education that access to Reducing the digital divide
services such as free online learning platforms would
provide. The lack of access to this kind of service can
in different socio-economic
create a greater digital divide between the rich and the
poor. Education in poorer communities can often be
groups
an important way of improving the socio-economic Many countries are developing initiatives that provide
circumstances. Therefore, greater access to online technology at a subsidised rate or even for free to those
learning platforms could help rectify this. in poorer communities. This is helping close the digital
divide by giving those who would not normally be able
to afford those technologies access to the advantages
Questions that the technologies can provide.
5 How could the ability to access free online learning Many organisations are starting to work together to
platforms improve circumstances for those in provide the internet in developing countries. Large
poorer communities? organisations, such as Facebook and Google, are
6 How could access to high-speed internet working with internet service providers to implement
connections for entertainment purposes improve facilities, such as Wi-Fi hotspots, that can be used to
the lifestyle of a person? bring internet access to these countries at a lower cost.
The larger organisations will collaborate in this way
Real-life example as it can help bring them a wider customer base and
therefore generate more profits.
Taliya is a film studies student. She has high quality
recording equipment, a 4K monitor and a high spec
computer system at home. She really enjoys recording Real-life example
scenes for her movie projects and editing them on her One Laptop Per Child is an initiative that helps provide
computer system at home. technology to poorer and developing communities. Its
primary goal is to improve the education for children
Jane is also a film studies student. She is becoming
by enabling those in low-income communities to have
increasingly frustrated by her course as she has to film
access to a laptop and the benefits that brings.
and edit all her movie projects on her low spec mobile
The initiative has been running since 2005 and continues
to provide laptops to low-income communities around
the world, including the USA, Rwanda, Paraguay,
India, Nepal, Kenya and Peru. Some of the original
organisations that funded the initiative are AMD,
Google and Quanta.

REFLECTION

How does the existence of a digital divide make


you feel? What do you think you can do about
the digital divide?

Figure 6.9: Video recording.

109

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
1 Define the term ‘digital divide’. [1]
2 Identify two aspects that can create a digital divide. [2]
3 Explain the impact of the digital divide on a person’s geographical location. [4]
4 Explain how a person’s education can be affected by the digital divide. [4]
5 Explain two strategies that can be implemented to reduce the digital divide. [4]

SUMMARY CHECKLIST
I can explain what is meant by the digital divide.
I can explain what kind of aspects can affect the digital divide, such as age, socio-economic status and
geographical location.
I can discuss what measures can be taken to reduce the digital divide.

110

Copyright Material - Review Only - Not for Redistribution


Chapter 7

Expert systems
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• recognise and understand how expert systems are used to produce possible solutions for different
scenarios.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know that computers can be used to aid decision making?


• Do you know what is meant by a database?

An expert system operates by prompting the user to


Introduction enter certain data using the user interface, referring to
the knowledge base and using the inference engine to aid
You spend your life developing your knowledge,
the decision-making process it is designed to simulate.
thinking and making decisions. Decisions are
fundamental parts of life. It is also possible to Expert systems are versatile and can be used in a range
develop systems to aid this process and they are called of different applications. Expert systems can be used as
expert systems. a diagnostic tool, in financial planning and risk analysis.
Expert systems can even be used for a more fun purpose,
An expert system is a computerised system that attempts
such as a challenging chess opponent. They are also a
to reproduce the decision-making process of an expert
form of artificial intelligence which is a computer system
human being. The person who designs and develops an
designed to simulate human intelligence.
expert system is called an expert system engineer. They are
designed to try and replicate the judgement of a human
that has expert knowledge in a certain field. By doing this KEY WORDS
they can be used to replace or assist a human expert.
artificial intelligence: a computer system
designed to simulate human intelligence

7.1 Components of an
expert system
User interface
The user interface is the way that a user interacts with
the expert system. This could include using a keyboard
to enter criteria into text query boxes, or choosing
options by pressing offered choices on a touch screen.
Figure 7.1: Thinking about decisions. The user interface will guide the user about what data
they need to input into the expert system and will then
An expert system consists of several components. display any output from the expert system.
These components include: Without the presence of a user interface, a user would
• a user interface need to know how to program each of the interactions
they want to make with the expert system. The quality
• a knowledge base of the design of a user interface is very important.
• an inference engine
• a knowledge base editor Question
• an explanation system 1 What could happen if the user interface design for
• method of output, e.g. screen. the expert system is poor?

112

Copyright Material - Review Only - Not for Redistribution


7 Expert systems

A simple example of a rule could be:


IF a > b AND a > c THEN highest = a

Figure 7.2: Touch screen interface.

Knowledge base Figure 7.3: Experts pooling knowledge.


The knowledge base is a database of related information
about a particular subject. It allows the storage and The knowledge base should be a dynamic resource,
retrieval of the knowledge required for an expert system therefore the expert system needs to have a knowledge
to operate. base editor. The knowledge base editor allows the
When an expert system is developed, several experts will knowledge base to be edited and updated when
be interviewed and asked to contribute the knowledge necessary.
they have of a given field. This knowledge is then used
to build a database that is the knowledge base for the
expert system. The developers will want two types of KEY WORDS
knowledge from the experts, factual knowledge and knowledge base editor: a component of an
heuristic knowledge. Factual knowledge is knowledge expert system that is used to amend or update
that is definitive and widely shared amongst experts the knowledge base
in the field. Heuristic knowledge is knowledge that is
acquired through personal experiences and built on
reasoning.
Part of the knowledge base is the rules base. The rules
Question
base is a set of rules that will be used to produce an 2 What could happen if the expert system did not
output or decision by the expert system. These rules are have a knowledge base editor?
used by the inference engine as a base for reasoning, to
obtain a solution to a problem or a decision. Each rule
will contain two parts, the IF and the THEN. A rule can Inference engine
also have multiple IF parts that will be joined together The inference engine is the part of the expert system that
by Boolean operators including AND and OR. makes judgements and reasoning using the knowledge
base and user responses. It is designed to produce
KEY WORDS reasoning based on the rules and the knowledge base.
It will ask the user questions and, based on their answer,
knowledge base: a component of an expert it will follow a line of logic. This may then lead to
system that stores the knowledge provided further questions and, eventually, to a final result.
by experts
The inference engine is mostly a problem-solving tool. It
rules base: a part of the knowledge base that organises and controls the steps to providing the desired
contains all the rules to be analysed by the output. There are two main methods that an inference
expert system engine can use to simulate reasoning, these are backward
chaining and forward chaining.

113

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Backward chaining is based on goal driven reasoning,


i.e. is dependent on a finding a desired goal. This type
Explanation system
of chaining is used when the possible outcomes are The conclusion or decision the expert system provides
limited and definitive in nature. In backward chaining, may not always be an obvious choice to a user. The
the system tries to take a goal and repeatedly split it into user may want to gain an understanding of how the
sub-goals that are simpler to achieve. The nature of this conclusion or decision was determined. In order
type of system is that it moves backward from the goal to to allow this facility, some expert systems have an
be achieved, using the sub-goals to inform the next piece explanation system built into them. This will provide an
of data that is needed by the system, to reach a goal. explanation of the reasoning process and show how the
output given by the system was achieved.
A simple diagram that represents the process of
backward chaining would be:
KEY WORD
Sub-goals Rules Goal
explanation system: a component of an expert
Figure 7.4: Backward chaining. system that provides an explanation of how an
outcome was achieved
Forward chaining is based on data driven reasoning and
is dependent on the data that it is provided with. This
type of system is used when a problem is more open
ended, and the outcome is not necessarily definitive in Method of output
nature. The system will take data input by the user and The output method is the method the user will use to
move forward from rule to rule to suggest a possible view any results produced by the expert system. This
outcome. It will take the data input by a user, then move will often be in the form of a display screen that will
from rule to rule to find one where the clause for the allow them to see the results on screen, or may include
data input is true. It will then ask the user for more data an output, such as a printer, that allows the results to be
and repeat this process until it can suggest an outcome. printed and viewed.

KEY WORDS
7.2 Are expert systems
backward chaining: breaking a goal down
into sub-goals that allow the system to work
backward from the goal
useful?
There are several advantages that can be gained from
forward chaining: a system that moves using an expert system.
forward from rule to rule until it reaches a
Expert systems:
possible outcome
• can provide answers to questions that are outside
goal driven: a system that is dependent on a the knowledge that you currently have
finding a desired goal • can aid professional people by prompting them and
data driven: a system dependent on the data guiding them to look at areas of knowledge they
that it is provided with may not have considered or remembered
• are consistent in the responses they produce as they
are arrived at in a logical way
A simple diagram that represents the process of forward • can be used at any time, so you do not need
chaining would be: to contact another person who may have the
knowledge at an unsuitable time
Data Rules Outcome
• can sometimes arrive at a solution to a problem
Figure 7.5: Forward chaining. quicker than a human would.
There are clear advantages to using an expert system,
however there are also disadvantages to using
them as well.

114

Copyright Material - Review Only - Not for Redistribution


7 Expert systems

Expert systems: and then provides possible conditions that match the
• do not have the intuition that humans have. This symptoms. It lists the possible conditions in order,
means that their response can only be a logical one starting with the one it finds to be the closest match.
and may not be useful.
• are only as good as the rules and data they are
provided with. If there are errors in the data or
rules, then this will produce incorrect results.
• are expensive to create. Many experts need to be
consulted and a high level of skill is required to
build the component parts.
• cannot adapt a great deal to their environment and
may require the knowledge base to be edited in
order to do this.

Questions Figure 7.6: Medical diagnosis interface.


3 Think of a scenario in which an expert system
would be an advantage.
4 Think of a scenario where an expert system would PRACTICAL ACTIVITY 7.01
not be very suitable.
Do you think a medical expert system will be
a data driven or goal driven expert system?
REFLECTION Discuss with a partner your thoughts about which
it could be and why.
Do you think you have ever used an expert system?

Question
7.3 How are expert 5 What could be the benefits and the disadvantages
of people using online self-diagnosis systems?
systems used?
Expert systems are used by many individuals and Car engine fault diagnosis
organisations for a variety of different reasons. Most modern cars have an abundance of technology
These include: built into them. Car mechanics will often be very
• medical diagnosis knowledgeable about the mechanical parts of the car,
• car engine fault diagnosis but they may not have as much knowledge about the
modern technology.
• a digital opponent in games such as chess
• providing financial planning and investment advice The cars often have a system of symbols on their
dashboard that light up when an issue is detected in the
• providing insurance planning advice
car, such as a problem with the engine. The driver of the
• plant and animal identification car sees the engine symbol light up and this shows that
• planning and scheduling routes for delivery vehicles the car may need to be taken to a garage.
• mineral prospecting. When the driver takes the car to a garage, the mechanic
plugs the expert system into the car engine. The expert
system then interrogates the engine management system
Medical symptoms to discover all the information available about the fault,
The organisation WebMD have a website that offers a so that it can provide a diagnosis. The expert system
medical expert system called ‘symptom checker’. It asks provides a list of possible diagnoses to the mechanic,
the user a series of questions about the user’s symptoms who can then use their knowledge to fix the car.

115

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 7.02

Find out what Deep Blue was developed to do


after its chess victory.

PRACTICAL ACTIVITY 7.03

Find out about another chess playing system


called AlphaZero.

Figure 7.7: Car fault warnings. Financial planning


Expert systems can be a very useful tool in financial
planning. They can help individuals on a small scale or
Chess player companies on a large scale. They can create a financial
plan or assess what financial actions need to be taken to
One of the most famous examples of an expert system achieve a desired outcome.
used as a chess player is a computer called Deep Blue.
Deep Blue was developed by the organisation IBM. They can help people to:
On 11 May 1997, Deep Blue beat the world champion • manage their debt
chess player Garry Kasparov. The victory received press
• organise their investments
coverage around the world, as people were amazed
at the abilities of the computer. The success of Deep • reduce their taxes
Blue inspired computer scientists around the world to
• plan for retirement.
develop the abilities of expert systems much further.
A user enters information about their financial situation
People were quite sceptical about the victory of Deep
and personal circumstances. The expert system will then
Blue. They could not believe that a computer could play
produce a financial plan, or a list of possible outcomes,
with the capabilities that it showed. It was one of the first
based on this information.
realisations that computers had great capabilities when it
came to simulating thinking. This scared some people.
Deep Blue is now stored in the Smithsonian Museum in
Washington DC.

Figure 7.9: Financial planning.

Figure 7.8: Computer chess master.

116

Copyright Material - Review Only - Not for Redistribution


7 Expert systems

PRACTICAL ACTIVITY 7.04

Find out how investment companies use expert


systems for investment analysis.

Insurance planning
Many insurance company websites use an online expert
system so that users can quickly see if the company has
a policy that would be suitable for them. The system
will ask a user for their circumstances and it will then
provide a result to say whether the insurance company
would be willing to give the user an insurance policy.
Figure 7.10: Identifying plants.
If the expert system is able to match their data to a
possible policy, it will inform the user with details about
the policy, such as how much it will cost and what
benefits it will provide. Question
7 What kind of questions would an expert system ask
in order to identify a type of animal?
Question
6 An insurance company offers life insurance policies.
What kind of questions do you think the expert Planning a route for a delivery
system will ask in order to establish whether an
insurance policy would be issued to a user? company
Delivery companies can use expert systems to find out
Plant identification the best route for a delivery driver for all the deliveries
the driver needs to make on a given day.
A website called Botanical keys allows users to enter a
Each of the deliveries the driver needs to make is put
range of characteristics about a plant. It mostly covers
into the system. The system then outputs a route that
plants in the UK and Ireland area.
will be the most efficient route for the driver to follow,
The website takes the data input about the plant and in terms of time or fuel used, etc. to make each delivery.
analyses it against its rules and knowledge base. It then It may request further information, such as the type of
tells the user what kind of plant it could be. delivery vehicle and how long each delivery will take.
A user could find out what kind of plant is growing in The system may make further recommendations about
their garden, or try to discover the type of plant they how many drivers are needed to deliver all the parcels
have seen when on a walk. that day and what kind of vehicle each driver will need
to take for the parcels they need to deliver.
It is likely that an expert system could work out this type
PRACTICAL ACTIVITY 7.05 of outcome quicker than a human, due to the amount
of data it is likely to handle, especially in large delivery
Try using the ‘Identify a plant’ expert system on
companies.
the Botanical Keys website. You can think about
a particular plant, or just enter some random
criteria, and see what the systems suggests.

117

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

called PROSPECTOR was one of the first expert


PRACTICAL ACTIVITY 7.06 systems developed to aid geologists in exploring for
Do you think route planning will be a data driven minerals. Digging for minerals can be very expensive, so
or goal driven expert system? Discuss with a companies want to be sure that minerals will be present
partner your thoughts about which it could when they break ground. PROSPECTOR can be used to
be and why. calculate the probability of minerals being present in a
certain location.

Figure 7.12: Prospecting.

Figure 7.11: Route planning.


REFLECTION

How do you feel about the use of expert systems


Mineral prospecting to make decisions, or for planning, in your life?
Minerals can be very precious, and geologists can spend
a long time trying to source them. An expert system

EXAM-STYLE QUESTIONS
1 Identify the name of the component in an expert system that stores the data required for the system
to use in decision making. [1]
2 Identify the name of the component in an expert system responsible for reasoning and judgement. [1]
3 Explain the role of an expert system. [2]
4 Describe the concept of forward chaining. [3]
5 Identify the type of problem for which backward chaining would be more suitable. [1]
6 Explain two scenarios where an expert systems can be used. [4]

118

Copyright Material - Review Only - Not for Redistribution


7 Expert systems

SUMMARY CHECKLIST
I can identify the different components in an expert system including the user interface, the inference engine,
the knowledge base, the knowledge base editor and the explanation system.
I can explain the role of each component in an expert system.
I can describe the concept of backward chaining and understand it is goal driven reasoning.
I can describe the concept of forward chaining and understand it is data driven reasoning.
I can understand how expert systems are used in a range of different scenarios.

119

Copyright Material - Review Only - Not for Redistribution


Chapter 8

Spreadsheets
LEARNING INTENTIONS
In
Bythis
the chapter youchapter,
end of this will learnyou
howwillto:be able to:
• Cillaut
create laccatiis
structureaut ea consequi aut ut optatius consequiae nati quis entioria qui volore etur?
• • dolupic
Si createiasimolut
page/screen structures
apiduciani to ismeet
aliquas the requirements
ut autemodis of an
et ped ullori audience
con et ad miland/or
eosamtask
asini corerch
specifi
ictur? cation/house style
• create/edit spreadsheet structures
• Exped etur, il moluptae exceat.
• protect cells and their content
• Eveleceatus
• freeze-panesvolutas
andpelenducia
windows con pro consenimpos aliqui ommossimod exerchiliquo cuptaernamet
optatur?
• create formulas and use functions
• El
• etuse
am formulas
fuga. Ignam ipsumet erum sam dera porepudam con etur rerchil loriatur abo. Itatur? Em rem
vidis aborrum doleseq uodigendae etur aute vellupta est, ute nonsectius evellup idestis inciet percimetur
• use absolute
simustia audis aut reference,
idest, omnirelative reference,
quid eati named
soluptatque cells, named
rendistio ranges eium ium, nulparu
optat intiorem
• know and understand why absolute and relative referencing are used
• use functions
• use validation rules
• create formatting
• format cells
• format cell emphasis
• test a spreadsheet structure

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED
• extract data
• sort data
• summarise and display data using pivot tables and pivot charts
• import and export data
• create macros
• create a graph or chart appropriate to a specific purpose
• apply chart formatting.

BEFORE YOU START

• Do you know that spreadsheets can be used to manipulate numbers, perform calculations, present
summary data and make predictions?
• Are you able to create a basic spreadsheet structure using cells, rows and columns?
• Do you understand the purpose of cells, rows, columns and ranges within worksheets?

consider hiding columns or rows. If fitting all the data


Introduction onto one page will make it too small to read, then
consider fitting the data to spread across more pages.
A spreadsheet is a software package that organises
Reducing margins can enable more data to fit on one
data in rows and columns. There are many actions that
page, but consider whether a space is needed for hole
a spreadsheet can perform on the data, these include
punches, making notes or binding in a book. If a
carrying out calculations and creating charts and graphs.
spreadsheet is to be printed across several pages, then
including the title of the document and the page number
KEY WORD in a header or footer will help the audience to follow the
document in the correct order.
spreadsheet: software that can organise, analyse
and manipulate data that is organised in a grid of
PRACTICAL ACTIVITY 8.01
rows and columns
Open 8.01 Page Formatting.xls which currently
requires 20 pages to print.
1 Add a header of ‘Chapter 8 figure list’.
8.1 Create a spreadsheet 2 Remove gridlines from printing and also on
the sheet view.
structure 3 Remove row and column headings
from printing.
Page and screen structures 4 Add a footer of ‘Page # of n’ where # is
Pages within a spreadsheet can be formatted in a variety the current page number and n is the total
of ways as shown in Table 8.1. number of pages.
You need to consider the needs of the audience when 5 Change the settings described so that the
formatting pages or screens. If the person reading document fits onto just three pages.
the document doesn’t need to view all the data, then

121

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Page setup The size of paper to print on (e.g. A4, Letter) can be set as well as the orientation (portrait or
landscape). It’s also possible to decide whether to print gridlines for all the cells (rectangles within
a spreadsheet where data can be positioned), whether to include row and column headings and
whether certain rows will be repeated at the top of each page.
Fit to page Sometimes large spreadsheets cover several pieces of paper. In order to make it easier to follow
the data and save paper, it is possible to set the spreadsheet to fit a specific number of pages.
Options include, fit all columns on one sheet, fit all rows on one sheet, fit the sheet to one page
or fit the sheet to a specified number of pages across and down.

Margins The top, bottom, left and right margins can be adjusted to provide space at the edges (e.g.
for hole punches) or to reduce the space at the edge and provide more space on the paper for
printing.
Header and Information can be included at the top and bottom of each printed spreadsheet. This could
footer include the title and author of the document, page number, file name and date.

Table 8.1: Formatting pages.

KEY WORD Create and edit spreadsheet


cell: a single unit/rectangle of a spreadsheet structures
formed at the intersection of a column and a
It is possible to add rows and columns by inserting
row where data can be positioned; its reference
them. Rows are inserted above existing rows and
(name/address) is based on its column and row
columns are inserted to the left of existing columns.
Rows and columns can also be deleted.

WORKED EXAMPLE 8.01


In this example, you can see the option to insert a row Now you can see the effect of having added the
which will be inserted above row 3. new row.
A B C D
A B C D
1
1
2
2
Insert ? 3
3 Insert 4
4 Shift cells right
Shift cells down 5
5 Entire row
Entire column 6
6 OK Cancel 7
7 8

Figure 8.1: Inserting a row. Figure 8.2: An inserted row.

Rows and columns can be resized. Rows can be made taller or shorter and columns can be made wider or narrower.
Rows are resized to enable different sizes of text to fit or to allow multiple lines of text within one cell or row. Columns
are resized to allow more data to fit in the column or to save space by narrowing the column.

122

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Sometimes it can be useful to merge two cells together.


WORKED EXAMPLE 8.02
Merging multiple cells will create a single cell with the
The rows and columns in this spreadsheet have been cell reference being the original upper-left cell of the
resized. merged cells.

A B C D
1 WORKED EXAMPLE 8.04
2
3 8.02 Merging.xlxs cells has a title of ‘Staff Hourly
4 Rates’ in cell A1.

5
6
7
8

Figure 8.3: Height and width resized.

It is possible to hide a row or column. Rows or columns are Figure 8.6: Hourly rates.
hidden because they may contain information that does not
need to be seen by the user or they may contain private or The data is in cell A1 but overflows into cell B1. Cell
confidential data that should not be seen by the user. A1 has been shaded. Cells A1 and B1 can be merged
so that it is one single cell as shown in Figure 8.7.
WORKED EXAMPLE 8.03
Here you can see the process of hiding column C.

A B C Cut D
1 Copy
Paste Options:
2
Paste Special...
3 Insert

4 Delete
Clear Contents
5 Format Cells...

6
Column Width... Figure 8.7: Hourly rates merged.
Hide

7 Unhide

8 Cell B1 no longer exists as the space is used for the


larger cell A1.
Figure 8.4: Hiding a column.

Now you can see that column C has been hidden.


PRACTICAL ACTIVITY 8.02
A B D
1 Open 8.03 Rows and Columns.xls.
2
1 Insert a row above row 5.
3
4 2 Delete column C.
5
6 3 Increase the height of row 1.
7
4 Decrease the width of column B.
8
5 Hide rows 2 and 3.
Figure 8.5: Hidden column.
6 Merge cells A4:C4 to become a single cell.

123

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Protect cells and their content It is also possible to protect a worksheet but allow the
user to change certain cells within that worksheet. This
Depending on the software being used, different parts enables a developer to protect all the formatting, titles
of spreadsheets can be secured in a variety of ways. The and structure but allow the user to enter and change
simplest form of security is to protect a whole workbook input data. To do this, cells that may be edited must be
from having any new worksheets added or existing unlocked prior to protecting the worksheet. It is then
worksheets removed. necessary to protect the sheet but allow unlocked cells to
be selected.

WORKED EXAMPLE 8.06


In this example, the commission and prices can be
changed by the user so those cells have been set to be
unlocked.

Figure 8.8: Workbook protection.

Following on from this, it is possible to protect a


worksheet from having any changes made to it.

WORKED EXAMPLE 8.05


In this example, the worksheet is protected to the
extent that no changes can be made to any data and
no data can be selected. No columns can be added
and no rows can be added. Cells and rows cannot
be formatted. This is useful if the whole worksheet Figure 8.10: Unlocked cell.
contains just output data or a data table.
Now that those cells have been unlocked, the sheet can be
protected and only the unlocked cells can be selected.

Figure 8.9: Worksheet protection.

Figure 8.11: Worksheet protection with unlocked cells.

124

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Cells can also be protected so that the formula cannot be


WORKED EXAMPLE 8.08
seen by a user. This may be used to prevent users from
seeing how certain confidential calculations are made In this example, the prices cells are left unlocked but
but still letting them see the results of the calculation the commission cell (B2) has been locked. In order to
based on changing input data. allow some users to edit the commission, a password
has been set on that cell so that anybody with the
password can edit the cell.
KEY WORD
formula: a mathematical calculation using +,
−, × or ÷

WORKED EXAMPLE 8.07


In this example, there is a formula in cell C2. It is
currently visible.

IF ƒx =A2 + B2

A B C D
1 A B A+B
2 5 6 =A2 + B2
Figure 8.14: Range protection.
Figure 8.12: Formula visible.

After the cell has been set to hidden, the formula is


now hidden from the user.
Freezing panes and windows
C2 ƒx Spreadsheets can sometimes become so large that they
cannot fit visibly onto a single screen. It’s possible to
A B C freeze panes so that the top row remains on the screen as
1 A B A+B the user scrolls down the spreadsheet. Similarly, the first
2 5 6 column can be frozen so that it remains on screen as the
user scrolls across the spreadsheet.

Figure 8.13: Formula hidden.

There will be occasions when some users will be allowed


to change some data but not all data. In this case, it is
possible to protect a worksheet but allow a specific set or
range of cells to be edited by users who have knowledge
of the correct password, or by selected users within the
computer network.

KEY WORD
range: a selection of cells
Figure 8.15: Freeze pane options in Microsoft Excel.

125

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To freeze more rows or more columns, the user can


select the first cell that should not be frozen and then PRACTICAL ACTIVITY 8.03
freeze the panes. This will freeze all rows above and all 1 Open 8.05 Worksheets.xls.
columns to the left of the selected cell.
a Try to add or delete a worksheet.
The workbook has been protected to
WORKED EXAMPLE 8.09 prevent this from happening.

This example from 8.04 Freezing panes.xls shows b Unprotect the workbook using the
which cells will be frozen when cell B4 is selected and password ‘openme’. Now try to add a
freeze panes is applied. new worksheet.
2 Select the Invoice worksheet.
a Try to select any cell. This worksheet has
been protected completely to prevent
this from happening.
b Unprotect the worksheet using the
password ‘payment’. Now try to select
cells and make changes to data.
3 Protect the Breakdown worksheet so that no
changes can be made at all.
4 Open the Prices worksheet.
a Try to change one of the titles in column
A. These cells are locked so that you
cannot edit them.
Figure 8.16: Cell selected for freezing panes.
b Now try to change the prices of the
As the user scrolls down and across the screen, rows photos. These cells have been unlocked
1 to 3 and column A remain visible as shown in so the prices can be changed.
Figure 8.17.
c Now try to change the commission
rate in cell B2 (10%). Notice how an
additional password is required to do
this. This is because this cell has been
set to allow users with that password to
change it.
d Enter the password ‘special’ and then
change the rate of commission.
5 Open the Purchases worksheet.
a Lock the cells in columns A, B and C.
Unlock the cells in columns D and E.
Then protect the worksheet and see
what you can and cannot change.
b Scroll down the purchases worksheet
Figure 8.17: Panes frozen as user scrolls down and and across to the right and notice
across. how the top row and first 2 columns
remain in place.

126

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED WORKED EXAMPLE 8.10

c Unfreeze the panes and then try These examples from 8.06 Data Types.xls show
scrolling again. Notice how all of the different ways in which data can be formatted
data moves, including the top row and according to the data type. Notice how C4 contains
left hand columns. text. This is because, although it looks like a number,
it starts with zero and numbers do not include
d Freeze the top row. Scroll down leading zeros.
and across. Which cells remain on
the screen?
A B C
e Freeze the first column. Scroll down
and across. Which cells remain on 1 Data Type Example 1 Example 2
the screen? 2 Date 02/05/2015 02 May 2015
f Freeze the panes so that columns 3 Time 3:44 PM 15:44
A, B and C and row 1 remain on the
4 Text abcdefg 09876
screen. Which cell did you click on to
achieve this? 5 Numeric 25 25.33
6 Currency $15.45 P15.45
7 Percentage 25% 0.30%
8 Fractions 1/4 4/5
8.2 Create formatting
Figure 8.18: Data types.
Format cell contents
Format data type
Cells within a spreadsheet can be formatted for an
PRACTICAL ACTIVITY 8.04
appropriate data type. Dates can be formatted to be
dd/mm/yyyy where dd is the day, mm is the month and Open 8.07 Data Types Task.xls.
yyyy is the year. In countries like the USA, the date
would be formatted mm/dd/yyyy. It is also possible to 1 Change cell B2 to be a date with no leading
display the whole month, use leading zeros for days and zeros for the day and month and two digits
months and use four digits or two digits for the year. for the year.
Times can be formatted to include hours, minutes and
2 Change cell C2 to be a date with leading
seconds or just hours and minutes. Some times may have
zeros for the day, the full name of the month
a.m. or p.m. whereas others will use a 24-hour clock.
and four digits for the year.
Cells can be set to contain text. This is particularly
useful if a set of numbers need to be entered that start 3 Change cell B3 to be a time with a.m./p.m.
with zero. Numeric cells can be set to include a specific 4 Change cell C3 to be a time with hours,
number of decimal places including no decimal places. minutes and seconds.
Currency can also be set to include a specific number
of decimal places, and the currency symbol can also 5 Enter the value 0382 in cell B4.
be chosen. What happens?
A number can be set as a percentage, in which case the
number is divided by 100. For example, 58% is used in
calculations as 0.58. Decimals can be entered into a cell
and turned into fractions. For example, entering 0.25
would give a fraction of ¼.

127

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED WORKED EXAMPLE 8.11

6 Change cell C4 to be text and then enter the This spreadsheet shows the scores between
value 0382. What is different from B4? international football teams. The number of goals
scored by the team is shown in each row and the
7 Change cell B5 to have two decimal places. number of goals scored against a team is shown in each
What happens? column. You will notice that in the first version the
8 Change cell C5 to have one decimal place. columns are too narrow to fit in the full team name and
What happens? in the second version the columns are too wide.

9 Change cell B6 to be currency in euros with A B C D E F


two decimal places. What happens? 1 JapanMacedonia
UnitedPakistan
Ukrai
2 Japan 3 2 4 1
10 Change cell C6 to be currency in Japanese
3 Macedonia 2 3 0 0
yen with two decimal places. What happens?
4 United States of America 1 0 0 2
11 Change cell B7 to be a percentage. 5 Pakistan 2 3 2 0
What happens? 6 Ukraine 0 1 2 5

12 Change cell C7 to be a percentage. Figure 8.19: Columns too narrow.


What happens?
13 Change cells B8 and C8 to be fractions up A B C D E F
1 Japan Macedonia United States of America Pakistan Ukraine
to one digit. Are they both correct? What do 2 Japan 3 2 4 1
you think needs to be done to fix this? 3 Macedonia 2 3 0 0
4 United States of America 1 0 0 2
5 Pakistan 2 3 2 0
6 0 1 2 5

Text orientation
Figure 8.20: Columns too wide.
Often it is difficult to fit all the necessary text into a
column title without the column becoming too wide. In
these circumstances, the text orientation can change so it To overcome this problem, the text can be orientated
is diagonal or vertical. vertically.

A B C D E F
KEY WORD
orientation: the direction of text, for example
United States of America

horizontal or vertical
Macedonia

Pakistan
Ukraine
Japan

1
2 Japan 3 2 4 1
3 Macedonia 2 3 0 0
4 United States of America 1 0 0 2
5 Pakistan 2 3 2 0
6 Ukraine 0 1 2 5

Figure 8.21: Columns rotated vertically.

128

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Alignment PRACTICAL ACTIVITY 8.05


By default, the alignment of text is to the left and
numbers are aligned to the right. However, it is possible Open 8.08 Alignment.xls. This shows the
to change the way that data is aligned within columns. election results for three areas of the UK in 2015.
Data can be aligned to the left, right or centre.
1 Change the names of the parties in C2 to P2
to be vertical orientation.
KEY WORD 2 Increase the height of row 2 if necessary.
alignment: positioning text so that it is in line, for 3 Change the names of the parties to
example on the left, right or centre be centred.
4 Change the number of votes in C3 to I5 to
be right aligned.
WORKED EXAMPLE 8.12 5 Change the number of decimal places
One problem that often occurs is when different for the percentages in K3 to P5 to be one
numbers of decimal places are used in the same decimal place.
column. The numbers are aligned to the right of the 6 Change the titles in B2 to B5 to be
cell rather than by the decimal point. right aligned.

D
3 87.23
4 18.5
Format cell emphasis
5 23.56 Cell emphasis is about changing a cell so that it stands
out from the others. There are lots of ways this can
6 34.23472 be done, including changing data to be bold, italic,
underlined, in a different font and in a different font size.
Figure 8.22: Decimal point alignment problem.

Unlike a word processor, it is not possible to change WORKED EXAMPLE 8.13


the alignment to be by the decimal point. Therefore, The cells in figure 8.24 have been emphasised as
the number of decimal places needs to be made equal. indicated.

D
3 87.230
4 18.500
5 23.560
6 34.235

Figure 8.23: Decimal point alignment solved.

Figure 8.24: Cell emphasis.

129

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Comments Conditional formatting


Spreadsheets can contain a lot of data and some of it Cells can be formatted based upon certain conditions
may need additional information to explain what it is. being met. This is known as conditional formatting.
However, there may not be space for that information or Conditions can include:
it may be too confusing to include the information with • values in a cell that are equal to a set criterion
the data. In this case, comments can be added to cells (e.g. = ‘Good’)
that can be seen when selected.
• values in a cell that are greater or less than a set
criterion (e.g. >5)
WORKED EXAMPLE 8.14 • values in a cell that are between set criteria (e.g.
between 2 and 10)
Comments have been added to cells B5 and E2 for
• values in a cell that are duplicated elsewhere in
the Japan versus Pakistan game. Cell B5 has been
the worksheet
selected and so the comment is showing. A comment
is indicated in cell E2 by the red triangle. • values that are above or below average
• a scale of values from lowest to highest.
A B C D E F

WORKED EXAMPLE 8.15


United States of America

In 8.10 Conditional Formatting.xls, a questionnaire


has been sent out and respondents have had to give
a priority to each question from 1 to 5 or x if they
disagree completely.
Macedonia

Pakistan
Ukraine

The average response, total x responses and total


Japan

1 blank responses has been calculated. The following


2 Japan Paul Long: 3 2 4 1 conditional formatting rules have been used:
After extra time
3 Macedonia 2 3 0 0 • Respondent reply = 1: white text with green shading
4 United States of America 1 0 0 2
5 Pakistan 2 3 2 0 • Respondent reply >= 4: white text with red shading
6 Ukraine 0 1 2 5 • Respondent reply = x: white text with red shading

Figure 8.25: Comments. • Respondent reply between 2 and 3: yellow shading


• Average response < 2: white text with green shading
• Average response >= 4: white text with red shading

PRACTICAL ACTIVITY 8.06 • Average response between 2.0 and 2.9: yellow
shading
Open 8.09 Emphasis.xls. • Total x >= 4: red text with light red shading.
1 Change cells A2, A4, A11 and A15 to be
bold and font size 14.
2 Add borders to the bottom of cells B4, C4,
B11, C11 and D11.
3 Add a thick blue border around cells
A1 to D19.
4 Shade A1:D1 and A1:A19 in yellow.
5 Shade C13 and D13 in black.
6 Add a comment to cell B2 to read ‘This is
the commission a school will earn’.

130

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.07 Referencing cells and ranges


Open 8.11 Member List.xls and conditionally Relative cell references
format cells according to the following rules: Relative cell referencing is used when you want the
1 Female members: pink shading content of a cell to change based on its relation to its
2 Male members: white text, blue shading row and column position. Often the formulas being used
3 Full, junior or patron members: green text are performing the same calculation for a whole row or
4 Lapsed members: red text column. When this happens, it is possible to replicate the
5 Do not email = TRUE: yellow shading with formula rather than typing it in each time.
red border
6 Number of years >=10: green text
7 Number of years between 5 and 9: purple text.
KEY WORDS
relative cell reference: a cell reference that
changes when it is copied into other cells

8.3 Create formulas and


use functions WORKED EXAMPLE 8.17

Use formulas This spreadsheet lists the number of hours it takes to


produce a promotional leaflet, the cost to be charged
A formula uses basic arithmetic calculations. These
for the leaflet and the quantity to be produced. The
are plus, minus, divide and multiply, for example,
total to be charged is then calculated by multiplying
=B5+B6. There is no limit to the number of
the cost (C4) by the quantity (D4).
arithmetic calculations that can be used, for example,
=(B5+B6)*3/100-(D1-D2).
A B C D E
3 Job Hours Cost Quantity Total
WORKED EXAMPLE 8.16 4 1 $ 12.50 3 =C4*D4
This spreadsheet is used to calculate the cost of 5 1.5 $ 18.75 1
broadband, TV and phone packages. The formula in 6 2.5 $ 25.00 2
cell B9 adds up the monthly costs of line rental (B6),
TV (B7) and broadband (B8) then multiples the result Figure 8.27: Replication 1.
by 6. Finally it adds any setup costs from B3.
One way of entering the formula in E5 for the total
A B C cost of A4 leaflets is to type it in again but changing
1 Broadband 1 Broadband 1 row 4 to row 5 so the formula would be =C5*D5.
2 Original Family However, it is much quicker and more accurate to
3 Initial cost $ 15.00 replicate the formula by copying it from E4 and
4 pasting it into E5 and E6.
5 1st 6 month
6 Line rental $ 15.40 $ 15.40 A B C D E
7 TV $ 10.75 $ 16.50 3 Job Hours Cost Quantity Total
8 Broadband $ 20.00 $ 20.00 4 1 12.50 3 =C4*D4
9 Total 6 months =6*(B8+B7+B6)+B3 5 1.5 18.75 1 =C5*D5
6 2.5 25.00 2 =C6*D6
Figure 8.26: A formula.
Figure 8.28: Replication 2.

Indices can be used within formulas to raise a number to


a power. For example =4^3 would raise 4 to the power
of 3 which is 43 = 64.

131

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The cell references used in the formula in the previous Absolute cell references
example were relative cell references. This is because
they point to another cell in a position relative to the PRACTICAL ACTIVITY 8.08
current position. When referring to C4, it is pointing to
a cell that is two columns to the left of column E. When Open 8.12 Absolute References.xls and use
referring to D4 it is pointing to a cell that is one column the worksheet Absolute 1, which is similar to the
to the left of column E. Therefore, when the formula is example used for relative cell references. The
replicated down to rows 5 and 6, the references continue cost is calculated by multiplying the hourly rate in
to point to the same columns but the row reference is B1 by the number of hours in B4.
incremented.
1 Replicate (copy) the formula from C4 to
C5 and C6.
WORKED EXAMPLE 8.18
2 What has gone wrong?
The same process happens when copying formulas
across a spreadsheet. The formula in B3 calculates 3 Why has it gone wrong?
the number of kilometres travelled. When it has
been replicated to columns C and D, instead of the Absolute cell referencing is used when you do not want
row numbers changing, the column letters change. a cell reference to change when other cells are filled in,
B2 is referring relatively to one row above and B1 is or when replicating formulas. Either a row, a column, or
referring relatively to two rows above. both can be set to be relative or absolute referencing.
A B C D
1 Start distance 38029 38098 39273 KEY WORDS
2 End distance 38087 39137 39410
absolute cell reference: a cell reference that
3 Distance travelled =B2-B1 =C2-C1 =D2-D1
does not change when it is copied into other
cells, usually by placing a $ sign before the
Figure 8.29: Replication across. cell reference

Formulas can be used to retrieve a value from another To stop a row from being changed, a $ symbol must be
worksheet. To do this you should include the name of put before the row number. So C5 would become C$5.
the worksheet before the cell reference. This makes the row an absolute reference but leaves the
column as a relative reference.

WORKED EXAMPLE 8.19


PRACTICAL ACTIVITY 8.09
To use the value in cell B4 in a worksheet called ‘Data
source’, use the following formula: Continuing with 8.12 Absolute References.xls
and the worksheet Absolute 1:
=‘Data source’!B4
The inverted commas are only required if the name of 4 Change the formula in C4 to be =B$1*B4.
the worksheet includes a space, but the exclamation 5 Replicate (copy) the formula from C4 to
mark must always be used. C5 and C6.
The following formula will multiply the value in B4
6 Examine the formulas in C5 and C6.
on the ‘Data source’ worksheet by C15 on the current
worksheet: 7 Which cell references have changed and
=‘Data source’!B4 * C15 which have not?

132

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

To stop a column from being changed, a $ symbol must


WORKED EXAMPLE 8.20
be put before the column letter. So C5 would become
$C5. This makes the column an absolute reference but 8.13 Tax Rate.xls contains a named cell of ‘TaxRate’
leaves the row as a relative reference. which is cell B1. The formula in C4 is =B4*TaxRate
To stop both the row and column from being changed, a
$ symbol must be put before both the column letter and A B C
row number. So C5 would become $C$5. This makes the 1 Tax rate 0.15
whole cell reference an absolute reference.
2
3 Product Cost Tax
PRACTICAL ACTIVITY 8.10
4 6 × 4 frame 12 =B4*TaxRate
Continuing with 8.12 Absolute References.xls,
5 5 × 7 frame 15 =B5*TaxRate
open worksheet Absolute 2. This worksheet is
used to calculate the wage bill each month. 6 10 × 8 frame 18 =B6*TaxRate
8 Look at the formula in C4 which calculates 7 12 × 8 frame 21 =B7*TaxRate
the cost of workers in week 1 month 1.
Figure 8.30: Tax rate named cell.
9 Make any changes necessary to the formula
in C4 before replicating it for months 2 to 4. When this formula is replicated down column C, the
10 Try copying the formula from C4 to E4 for reference to TaxRate remains the same because it is an
week 2 workers. absolute reference.

11 What has gone wrong?


Named ranges can also be used within formulas. It is
12 Why has it gone wrong?
easier to understand formulas with named cells and
13 Change the formula in C4 so that when ranges than to understand formulas with cell references.
replicated both across and down it will
still work.
WORKED EXAMPLE 8.21
14 Now replicate the formula down column C
In 8.13 Tax Rate.xls, cells C4:C7 have been named
and across to columns E, G and I.
as ‘TaxCharged’. Instead of using a function of
15 Complete the spreadsheet with formulas =SUM(C4:C8) for the total tax charged, the named
in column J. range can be used instead.

A B C D
Named cells and ranges 1 Tax rate 15%
2
Ranges were introduced earlier in this chapter. A named
cell is when a name is used instead of the cell reference 3 Product Cost Tax Cost inc tax
and a named range is when a name is used instead of 4 6 × 4 frame $12.00 $ 1.80
cell references. 5 5 × 7 frame $15.00 $ 2.25
6 10 × 8 frame $18.00 $ 2.70
Named cells can be used as absolute cell references.
When referring to a named cell, whenever it is replicated 7 12 × 8 frame $21.00 $ 3.15
it will still point to the same named cell. 8 Total tax charged: =SUM(Tax Charged)

Figure 8.31: Total tax charged name range.

133

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

When a range of vertical cells has been named, it is


possible to make reference to any individual cell in that PRACTICAL ACTIVITY 8.12
range by using the name of the range, as long as the Open 8.14 Times Table.xls which will be used to
reference is being made in the same row. show the times table.
1 Create a formula in B2 that will calculate the
WORKED EXAMPLE 8.22 value in B1 multiplied by the value in A2. Do
not use numbers, only use cell references.
2 Change the formula so that it has absolute
references where needed so that you can
replicate the formula across and down. You
should only need one formula.

Figure 8.32: Referencing a named column. Named ranges can be used across multiple worksheets
within the same spreadsheet. When referencing a
named range in a different worksheet it is not necessary
In 8.13 Tax Rate.xls, cells C4 to C7 have been named to reference the name of the worksheet. Examples
‘TaxCharged’ and cells B4 to B7 have been named of this being used can be found in the Lookup
‘Cost’. The formula in D4 calculates the cost including functions section.
tax by adding the Cost to the Tax. To do this, it makes
reference to the whole named range for Cost and the
whole named range for TaxRate. The spreadsheet
software can see that the range is in the same row so
Functions
it uses the values in the same row from the Cost and A function is a ready-made formula representing a
TaxRate ranges. This can be replicated down and the complex calculation, for example =SUM(A5:B10)
reference is relative rather than absolute because it is or =AVERAGE(cost). It is a reserved word within
relative to the same row. the spreadsheet software that processes a series of
predefined formulas.

PRACTICAL ACTIVITY 8.11 KEY WORD

Open 8.13 Tax Rate.xls. function: a ready-made formula representing a


complex calculation
1 Change the formula in C4 so that it uses a
named range for the cost.
2 Replicate this formula to C5:C7.
3 Use a named range to calculate the total
cost in B8.
4 Name the range for cost including tax.
5 Use a named range to calculate the total
cost including tax in D8.

134

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Summary functions
Table 8.2 shows some of the summary functions.

Function Purpose Example

SUM Calculates the total of values within a range. =SUM(B3:E3)

AVERAGE Calculates the average of values within a range. =AVERAGE(B3:E3)

MINIMUM Calculates the smallest value within a range. =MIN(B3:E3)

MAXIMUM Calculates the largest value within a range. =MAX(B3:E3)

Table 8.2: Summary functions.

WORKED EXAMPLE 8.23

8.15 Student Marks.xls calculates the total, average, minimum and maximum mark that each student scores in a
set of four tests. In row 2, the total has been calculated by adding up each cell individually using a formula. In row 3,
this has been done using a function that requires much less effort. In row 2, the average has been calculated using a
formula, but it is necessary to know how many marks there are to complete this calculation. In row 3, this has been
done using a function which does not require knowledge of the number of values to be averaged and will allow extra
values to be added in the future by inserting columns.

Figure 8.33: Summary functions.

PRACTICAL ACTIVITY 8.13

Open 8.15 Student Marks.xls. Use functions to


calculate the average, minimum and maximum
mark for each of the four tests.

135

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Rounding functions
Numbers can be rounded to whole numbers or decimal places. Table 8.3 shows the functions that can be used.

Function Purpose Example


INT Returns the whole number value of a decimal number (the value =INT(A2)
before the decimal point). The INT function effectively rounds the
number down to the nearest whole number.
ROUND Rounds a number to the nearest decimal place specified. This =ROUND(A2,3)
example rounds the value in A2 to three decimal places.
ROUNDUP Rounds a number up to the nearest decimal place specified. This =ROUNDUP(A2,2)
example rounds up the value in A2 to two decimal places.
ROUNDDOWN Rounds a number down to the nearest decimal place specified. =ROUNDDOWN(A2,4)
This example rounds down the value in A2 to four decimal places.

Table 8.3: Rounding functions.

WORKED EXAMPLE 8.24 REFLECTION


In 8.16 Rounding.xls you can see how the functions What happens if you change the number of
in table 8.3 have been used: decimal places to a negative number? How does
this relate to rounding to significant figures?
Notice how –1 rounds to tens, –2 rounds to
hundreds and –3 rounds to thousands. The
minus number relates to rounding to the power
of 10 rather than rounding to a set number of
significant figures.
Figure 8.34: Rounding functions.

You can also see the results of the calculations made Indices
by the functions:
If you need to calculate indices (powers), then the
POWER function can be used. It uses the syntax
=POWER(number,power). For example, =POWER(6,3)
would raise 6 to the power of 3. It is also possible to
use the ^ symbol and so =6^3 would also raise 6 to the
power of 3.

Figure 8.35: Rounding values.


WORKED EXAMPLE 8.25

8.17 Powers.xls raises the numbers in column A to


the power given in row 1.
PRACTICAL ACTIVITY 8.14

Create a new spreadsheet and experiment with


the four rounding functions using different values
for decimal places.

Figure 8.36: Powers.

136

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.15

Open 8.17 Powers.xls, which contains random values for the number to be raised and random values for
the power.
1 Create a function in B8 that raises the value in A4 to the power given in B7. Do not use any numbers,
only use cell references.
2 Using absolute cell referencing where needed, copy the function from B8 across the row and
down the column. You should not need to change any cell references if you have used absolute
references properly.

Date and time functions


Calculations can be performed on dates and times.

Function Purpose Example


DAY Calculates the day part of a date. =DAY(B1)

MONTH Calculates the month part of a date. =MONTH(B1)

YEAR Calculates the year part of a date. =YEAR(B1)

DATE Calculates the date from a given year, month and day. =DATE(B4,B3,B2)

HOUR Calculates the hours part of a time. =HOUR(B8)

MINUTE Calculates the minutes part of a time. =MINUTE(B8)

SECOND Calculates the seconds part of a time. =SECOND(B8)

TIME Calculates the time from given hours, minutes and seconds. =TIME(B9,B10,B11)
Gives the current date and time (can be formatted for just date or just
NOW =NOW()
time).
WEEKDAY Gives the number of the day in the week. =WEEKDAY(B1,2)

Table 8.4: Date and time functions.

PRACTICAL ACTIVITY 8.16 Text functions


Calculations can be performed on text to extract parts
Explore 8.18 Date and Time.xls. of text, join text together, calculate the length of text or
change the case of text.

137

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Function Purpose Example WORKED EXAMPLE 8.26


CONCATENATE Joins =CONCATENATE
In 8.19 Text functions.xlsx, text functions have
together (A1,B1,C1)
been used to extract data. Before looking in detail
text values. =A1&B1&C1 at how each function works, can you predict which
=A1 & ’.‘ & B1 & function has been used in each of the cells D1, D2,
’@’ & C1 & ’.it. A5, B5, C5, D5, row 7 and row 8?
com’
LEFT Extracts the =LEFT(A1,4)
furthest left
characters.
RIGHT Extracts =RIGHT(A1,2)
the furthest
right
characters.
MID Extracts =MID(A2,4,6)
characters
from a Figure 8.37: Extracted data.
starting
point. We can now look at each of the functions that have
been used. Experiment by changing values and
LEN Calculates =LEN(A1)
looking at what difference it makes.
the length
of a string.
UPPER Converts =UPPER(A1)
text into
upper case.
LOWER Converts =LOWER(A1)
text into
lower case. Figure 8.38: Extracted data functions.
FIND Searches for =FIND(‘@’, A2)
a substring
Notice how D1 and D2 return the same values.
within a
These are two different methods of concatenating
string and
data.
returns its
position. For apples, the first three characters from the left are
extracted which are ‘App’. For bananas, the last two
Table 8.5: Text functions. characters from the right are extracted which are
‘as’. For strawberries, the three characters starting at
character 4 (‘a’) are extracted which are ‘awb’.
For pears, the length is shown which is the number
of characters in ‘Pears’ which is ‘5’.
Row 7 converts the data from row 4 into upper
case and row 8 converts the data from row 4 into
lower case.

138

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.17 CONTINUED

Look at the spreadsheet in Figure 8.39 and In this example, the FIND function was being used
the function used to calculate the username of to find the value ‘n’. As ‘n’ does not exist in ‘Lorry’, it
students in a school. returned an error. Later in this chapter you will find
out how to manage errors in spreadsheets.
A B C D
1 Forename Surname Year Username
2 Harjinder Singh 2013 =UPPER(RIGHT(C2,2)&LEFT(A2,3)&LEFT(B2,3))
3 Abigail Drew 2009 =UPPER(RIGHT(C3,2)&LEFT(A3,3)&LEFT(B3,3))
4 Poonam Patel 2011 =UPPER(RIGHT(C4,2)&LEFT(A4,3)&LEFT(B4,3))

Figure 8.39: Text functions.

1 Describe what the function does and how Figure 8.41: Finding a character function.
the username is formed.
2 Calculate the usernames for each of the The next part of the spreadsheet uses the FIND
three students. function to find the @ symbol in an email address
and then returns the characters after the @ symbol.
3 Write a function that will work out their These characters form the domain name of the email
email addresses. Their email addresses are address.
surname.i.yy@ textfunctionschool.edu where
surname is their surname, i is the first initial
of their forename and yy is the last two digits
of the year they joined the school. The email
address should be in lower case.
4 Write a function to calculate the length of
the email address.

Figure 8.42: Extracting a domain name.


The FIND function can be used to find the position of
a substring within a string. For example, FIND(‘@’, In cell B6, the RIGHT function is used to extract
[email protected]’) will return the number 9 data from the right-hand side of the email address.
because the @ symbol is in position 9. However, to do this the number of characters to
extract needs to be calculated. This can be done by
subtracting the position of the @ symbol from the
WORKED EXAMPLE 8.27
length of the email address.
In 8.20 Find.xlsx, the FIND function has been used
to calculate the position of a specific character in
A1, A2 and A3. Can you predict which character the
FIND function is looking for?

Figure 8.43: Extracting a domain name functions.

Notice how cell B7 uses the MID function instead of


RIGHT to return the same result. Can you explain
how this function is working?

Figure 8.40: Finding a character.

139

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 8.18 CONTINUED

1 Create a function to find the position of the These are the functions that were used in the example
phonetic sound ‘igh’ in a word. above:

2 Create a function to extract the part of a


word that comes before the phonetic sound
‘igh’. For example, for ‘bright’, the function
should extract ‘bri’.

Data type functions


Questions can be asked about data to determine if it is
of a particular type or even if a cell contains an error. Figure 8.45: Data type functions.

Function Purpose Example The file 8.22 Using data type functions.xlsx
ISTEXT Returns TRUE =ISTEXT(A1) contains some examples of using some of these
if a value is functions in practice. Earlier in this chapter, you saw
text. how using the find function to search for a value
would return an error if the value is not found:
ISNUMBER Returns TRUE =ISNUMBER(A1)
if a value is a
number.
ISNONTEXT Returns TRUE =ISNONTEXT(A1)
if a value is not
text.
ISERROR Returns =ISERROR(A1)
TRUE if a cell Figure 8.46: Find function causing error.
contains an
error.
We can fix this by using the iserror function to check
Table 8.6: Data type functions. if an error has been found. If an error is found, then
the value 0 could be returned, or something else like
‘Not found’:
WORKED EXAMPLE 8.28
The file 8.21 Data type functions.xlsx uses
the ISTEXT, ISNUMBER, ISNONTEXT and
ISERROR functions:

Figure 8.47: Removing an error.

Figure 8.44: Data type results.

140

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED WORKED EXAMPLE 8.29

The ISNUMBER function could be used to check 8.23 Months.xls contains a table in the worksheet
a value is a number before performing a calculation Months that lists the numbers that represent months,
on it. This could avoid errors. In the example below, the three-letter shortened version of each month’s
ISNUMBER is used to check a value is a number name, the full name of each month and the French
before trying to divide it by two: name of each month.
A B C D
1 Number 3 Letter Month Francais
2 1 Jan January Janvier
3 2 Feb Febuary Février
4 3 Mar March Mars
5 4 Apr April Avril
6 5 May May Mai
7 6 Jun June Juin
Figure 8.48: Avoiding errors. 7 Jul
8 July Julliet
9 8 Aug August Août
10 9 Sep September Septembre
If the value in column A is a number, then it is divided
11 10 Oct October Octobre
by 2, otherwise a blank value is displayed. 12 11 Nov November Novembre
13 12 Dec December Décembre

Figure 8.49: Lookup table.


PRACTICAL ACTIVITY 8.19

1 Modify the function below from the file 8.20 The worksheet Number asks the user to enter a
Find.xlsx so that it returns the value ‘Invalid number that represents a month and it will then look
email address’ if the @ symbol is not found: up that number in the table and return the three-letter
code, full month name and French month name.

A B
Enter the number
2 Test the function works by inputting an 1 of the month:
invalid email address without the @ symbol.
2 2
3
4 3 Letter code: Feb
Lookup functions
5 Month: Febuary
Lookup functions will look up a value in a table and
6 Francais: Février
return another value in the same row or column.
VLOOKUP is used to look for a value in a column and
return a value from the same row. HLOOKUP is used Figure 8.50: Number worksheet.
to look for a value in a row and return a value from the
same column. These are the VLOOKUP functions that were used:

The VLOOKUP function uses the syntax: A B


Enter the number
=VLOOKUP(Search Value, Lookup Table, 1 of the month:
Column, Match) 2 2
Search Value is the value being looked up in the table. 3
Lookup Table is the range of cells that define the location 4 3 Letter code: =VLOOKUP(A2, Months!A2:D13,2,FALSE)
of the table. Column is the number of the column that 5 Month: =VLOOKUP(A2, Months!A2:D13,3,FALSE)
should be returned as the result in the matching row of 6 Francais: =VLOOKUP(A2, Months!A2:D13,4,FALSE)

the value that was found. Match defines whether an exact


match should be found – TRUE for approximate match Figure 8.51: Lookup functions.
or FALSE for exact match.

141

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

VLOOKUP functions can also be replicated in the same


WORKED EXAMPLE 8.30
way as any other function. The main problem with
this though is that the lookup table cell references will 8.25 Exam Results.xls includes a lookup table of the
change as they are copied down the rows. minimum mark required to achieve each grade. This
table has been called ‘GradeBoundaries’ as the named
PRACTICAL ACTIVITY 8.20 range.

Open 8.24 VLookup Price Categories.xls


which calculates the prices of tickets purchased
for a show.
1 Look at the lookup table on the Ticket
Categories worksheet. It shows the prices
for each category.
2 Look at the function in C2 on the Ticket
Sales worksheet. Describe what this
function is doing.
3 Replicate the function from C2 down
the column.
4 What has gone wrong?
Figure 8.52: Non-matching VLOOKUP table.
5 Why has it gone wrong?
Each student’s marks are entered in cells B2 to B10
One way of overcoming this is to change all the cell which has been named ‘Mark’. The VLOOKUP
references in the lookup table (but not the lookup function is then used to look up the Mark in the
value) to be absolute cell references. An easier way GradeBoundaries table and return the second column,
of overcoming this is to name the lookup table as a which is the grade. Not many of the marks are an
named range. exact match and so the TRUE element at the end
of the function means that the closest mark below
or equal to the student’s mark will be found and the
PRACTICAL ACTIVITY 8.21 grade returned as the answer.
Continue using 8.24 VLookup Price Categories.xls.
6 Name the range containing the lookup table
on the Ticket Categories worksheet (do not
include the titles in the range).
7 Change the VLOOKUP function in C2 to
include the named range instead of the
range ‘Ticket Categories’!A1:B5
8 Replicate the function from C2 down the
column and it should find the correct prices Figure 8.53: Non-matching VLOOKUP function.
for each category of ticket.
It is essential that the lookup table’s first column is in
order from lowest to highest for this to work.
So far you have seen VLOOKUP functions that find
an exact match within a table. However, there are
occasions when an exact match is not required, but
the closest value below or equal to the search value
should be found.

142

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

The HLOOKUP function works in a very similar way


WORKED EXAMPLE 8.32
to the VLOOKUP function, but instead of searching
for values down the table, it searches for values across 8.27 Months index.xls includes a table of months in
the table. short form, full word and the French translation. The
The HLOOKUP function uses the syntax: table has been called ‘Months’ as the named range.
=HLOOKUP(Search Value, Lookup Table,
Row, Match)
Search Value, Lookup Table and Match are the same as
in the VLOOKUP function. Row is the number of the
row that should be returned as the result in the matching
column of the value that was found.

WORKED EXAMPLE 8.31

8.26 HLookup.xls lists products and their prices and


the discounts that are currently being applied to each
of those products. The function used in D2 for the
Discount Rate is: Figure 8.55: Table of months.
=HLOOKUP(C2,DiscountRates,2,FALSE)
To find the French word for July, this INDEX
The discount rate code (C2) is looked up in the function would be used:
named range DiscountRates (B13:F14) and the
corresponding rate in the second row of the table is =INDEX(Months,7,3)
returned as the discount rate. Months is the name of the table used to lookup the
value. The number 7 is the row where the month of
July is to be found. The number 3 is the column where
the French translations are to be found.

PRACTICAL ACTIVITY 8.22

Open 8.28 Days index.xls


1 Create an INDEX function in C10 to find the
full name of the 5th day of the week.
2 Create an INDEX function in C12 to find the
Figure 8.54: Hlookup.
3 letter version of the 2nd day of the week.
3 Create INDEX functions in B16, B17 and B18
to find the 3 letter version, full name and
The INDEX function will find a value based on its
German names for the day number input
position within a table. The INDEX function uses
by the user in cell F14. The INDEX function
the syntax:
should work for any value between 1 and 7
=INDEX(Lookup Table, Row, Column) that is input in F14.
Lookup Table is the table where the value will be found.
Row is the number of the row to use within the table The MATCH function will find the position of a value
(different to the worksheet row number) and column is in a list. Its MATCH function uses the syntax:
the number of the column to use within the table.
=MATCH(Search Value, Lookup Table, Type)

143

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Search Value is the value to be found in the list. Lookup Table is the table to find the value. Lookup Table must be a
one-dimensional list (e.g. values in one row or one column only). Type is a type of search which can be one of 3 values:

Type Description
0 Finds the position of the value that is EQUAL to the Search Value. The Lookup Table can be in any order.
1 Finds the position of the largest value that is less than or equal to the Search Value. The Lookup Table
must be in ascending order.
–1 Finds the position of the smallest value that is greater than or equal to the Search Value. The Lookup
Table must be in descending order.

Table 8.7: Type values.

WORKED EXAMPLE 8.33

8.29 Match.xls includes a list of products and their Now a MATCH function can be used:
prices in Turkish Lira. Figure 8.56 shows the list of
=MATCH(10,E2:E7,1)
products and their prices.
The number 1 indicates that the largest value that is
less than or equal to the search value should be found.
This will return the value 2 which is the position of the
largest value that is less than or equal to 10 (6.50).
To find the cheapest product that Amir could not afford,
the list needs to be sorted into descending order.

Figure 8.56: List of products and prices.

To find the position of Crisps in the list of products,


the following function can be used:
=MATCH(‘Crisps’, A2:A7,0)
This will search for Crisps in the Lookup table A2:A7
and find the position for an exact match.
Amir has 10 available to spend. To find the most Figure 8.58: Product list in descending order of price.
expensive product that he can buy with his 10 he
needs to find the position of the largest value that is The MATCH function can then be used to find the
less than or equal to 10. First, the table needs to be position of the smallest value that is greater than or
sorted into ascending order of price: equal to 10:
=MATCH(10,H2:H7,–1)
The number –1 indicates that the smallest value that
is greater than or equal to the search value should be
found. This will return the value 4 which is the position
of the smallest value that is greater than or equal to 10
(6.50).

Figure 8.57: Product list in ascending price order.

144

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.23

Open 8.30 Match marks.xls


1 Create a MATCH function in E11 to find the position of Balraj in the list of names.
2 Create a MATCH function in E12 to find the position of the highest mark that is below 90. (Remember
to sort the list)
3 Create a MATCH function in E13 to find the position of the lowest mark that is above 50. (Remember to
sort the list)
4 Use an INDEX function and the result in E13 to find the value of the lowest mark that is above 50.

Nested formulas and functions


A nested formula or function is one which can include more than one function or formula. Each nested formula or
function is surrounded by brackets and will be calculated before the formula or function surrounding it is completed.

WORKED EXAMPLE 8.34

8.31 Nested Formula.xls calculates the average mark using separate total and average functions in columns F
and G.

Figure 8.59: Nested IF.

In column H, a nested formula has been used to calculate whether each student is above or below the average mark.
It examines the average mark for the student in column G, then divides the total of all the average marks by the
number of average marks to see if column G is higher. If column G is higher then ‘Above’ is displayed otherwise
‘Below’ is displayed.

PRACTICAL ACTIVITY 8.24

Open 8.32 Profit calculator.xls.


1 Create a single nested formula for E2 that will calculate the total profit made for product 1.
2 Replicate this formula for products 2 and 3.
3 Without using the AVERAGE function, create a nested formula to calculate the average total
profit in E5.

145

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Conditional functions CONTINUED


The functions you have seen so far will always perform
their calculation. However, a conditional function will This is quite a slow way of creating a quiz. Try this
only perform the calculation if certain criteria are met. more efficient method:
1 Put the answers to each question in column
WORKED EXAMPLE 8.35 C next to where the user will put their
answer in column B.
8.33 IF functions.xls contains a simple quiz that asks 2 Change the IF function in B2 to be
users what the capital city of a country is. If the user =IF(B1=C1,’Well done’,’Oops’)
gives the correct answer then they are told ‘Well done’
otherwise they are told ‘Oops’. 3 Now replicate this to the other two
questions and write another two so you have
five in total.
Notice how much quicker it is now to add the
new questions because you don’t have to keep
Figure 8.60: Capital quiz. editing the IF function. However, the user can
see the answers. Use security measures such as
hiding columns and worksheet protection to hide
the answers from the user.
An IF function has three elements as shown in Table 8.8.
Open the worksheet Mark Book.
Element Purpose Example
1 Students need to get 75 marks or more
Condition Specifies the rules to be B1 = to pass maths, otherwise they fail. Write a
checked. ‘Beijing’ function in D4 to display Pass or Fail.
True Value Specifies what to ‘Well Done’
2 Replicate this function for the other
display if the condition
maths results.
is met.
False Specifies what to ‘Oops’ 3 Students need to get 60 marks or more to
Value display if the condition pass English, otherwise they fail. Write a
is not met. function in D12 to display Pass or Fail.
4 Replicate this function for the other
Table 8.8: IF function elements.
English results.

PRACTICAL ACTIVITY 8.25 If needed, more than one criterion can be used by
using AND or OR within the condition element of the
Open 8.33 IF functions.xls and use the Capitals
IF function.
Quiz worksheet.
1 Why does the spreadsheet say ‘Oops’
Nested IF
when the answer for the capital of France
is correct? It is possible to have an IF function nested within
another IF function. This can be useful if there are two
2 Fix the IF function for the capital of France or more alternative outputs. Sometimes the same result
so it works properly. can be achieved with a lookup function.
3 Test your function by entering an
incorrect answer.
4 Add another question in row 7 and write an
IF function to give feedback to the user.

146

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

WORKED EXAMPLE 8.36 WORKED EXAMPLE 8.37

8.34 Nested IFs.xls contains a mark book on the Open 8.35 Photo frames.xls, which shows the
Mark Book worksheet. Students who get a mark of charges made for a photo frame with a standard
80 or above get a distinction. Those who get a mark embossing or a gold embossing. The user can select
below 40 get a fail. All other students get awarded a Standard or Gold embossing and the quantity
pass. Notice how a nested IF has been used to show to purchase. The price can be determined by this
the grades. algorithm:

Start

Yes Is embossing No Charge standard


Is quantity
gold? price
<5?

Yes No

Figure 8.61: Nested IF example.


Charge standard No Is quantity Yes
photo price <15?

Charge standard Charge standard


PRACTICAL ACTIVITY 8.26 15+ photos price 5+ photos price

Open 8.34 Nested IFs.xls and use the worksheet Figure 8.62: Flowchart algorithm.
Mark Book.
1 Create a lookup table for the grades. A nested IF function is used to determine the price by
following the same algorithm:
2 Change the nested IF functions to lookup
functions.
Using the same file, switch to the Ticket Sales
worksheet which shows ticket sales for three
different price categories.
1 Change the lookup function for the price to
a nested IF function.
Figure 8.63: Nested IF for unit price.
2 Replicate the function down the column.

Where the option for a lookup function exists, it is better A nested IF can become quite complex and difficult to
to use this than a nested IF, especially if there are lots of follow. To overcome this, IFS can be used instead. This
options to choose from. However, sometimes decisions works by using pairs of conditions and outputs:
are made based on more than one item of data, in which
case a nested IF function is the only possible option. =IFS(condition1, output1, condition2, output2,
condition3, output3 …..)
The only downside of IFS is that it does not have an
ELSE option.

147

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 8.38 WORKED EXAMPLE 8.39

8.36 IFS instead of nested IF.xlsx contains the 8.38 Maths results.xls results shows the marks and
same mark book used in example 8.36 . The nested IF grades awarded to students taking a maths test. In cell
has been replaced with the IFS function. Notice how C3, a COUNTIF function is used to count only those
the condition and output pairs are used and also how students who achieved a Pass.
an extra condition has had to be included for ‘Pass’
because there is no ELSE option.

Figure 8.64: IFS instead of nested IF.

PRACTICAL ACTIVITY 8.27

Open 8.37 Photo Frames.xlsx.


1 Replace the nested IF function in B7 with an
IFS function. Figure 8.65: Maths results COUNTIF.

Conditional statistical functions


You have already been introduced to the SUM function
and the AVERAGE function. Both of these have similar
functions that will only perform that function if a
certain condition is met. There is also a count function
that will only count items that meet certain criteria (see
Table 8.9).

Function Purpose Example


COUNTA Counts all values in a range. =COUNTA(H3:H200)
COUNTIF Counts all values that meet a criterion =COUNTIF(H3:H200,’Yes’) Only counts cells that
within a range. contain ‘Yes’.
SUMIF Adds up all values that meet a =SUMIF(J3:J200,’<0’) Only adds up negative numbers.
criterion within a range.
AVERAGEIF Calculates the average of all values =AVERAGEIF(J3:J200,’>0’) Only finds the average of
that meet a criterion within a range. positive numbers.
MAXIFS Calculates the largest numeric value =MAXIFS(value_range, range1, criteria1, range2,
that meets one or more criteria in a criteria2, …)
range of values.

Table 8.9: Conditional statistical functions.

148

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.28 CONTINUED

Open 8.38 Maths results.xls used in


worked example 8.39.
1 Use a function to count all the students
in cell C12.
2 Use a function to count all the students who
failed the test in C14.
3 Use a function to count all the students who
achieved a distinction in cell C15.
4 Use functions to calculate the average
distinction mark, pass mark and fail mark in
cells C17 to C19.
Open 8.39 Member ratings.xls which shows
how many meetings each member of a club
has attended. Members who have attended
50 meetings or more are awarded ‘Gold Figure 8.66: IFS instead of Nested IF.
member’ status.
To calculate the maximum female mark and maximum
1 Use a function in B13 to calculate how many male mark, only one criterion is needed for each. In
members have Gold member status. cell D11, the range D2:D9 refers to the rang that will
2 Use a function in B14 to calculate the be used to calculate the maximum mark. The range
total number of meetings that have been B2 to B8 is the range that will be used for the criteria
attended by Gold members. which in this case will be that the gender must be
female.
The MAXIFS function works slightly differently to the
other functions above. It can use a single range to check
that a condition is met or it can use multiple ranges to
check if multiple conditions have been met. It will then
calculate the maximum value within a different range
that relates to the ranges used for conditions.

WORKED EXAMPLE 8.40

8.40 Maxifs.xlsx contains a set of class marks,


together with the names, gender and class of each
student who achieved those marks. It also calculates Figure 8.67: IFS functions instead of Nested IF.
the maximum female mark, maximum male mark and
can also use two conditions to calculate the maximum To calculate the maximum male mark in class A,
female mark from class A and the maximum male two criteria are needed. This is where MAXIFS
mark from class A. enables more criteria to be used. In cell D14, the same
range of D2:D9 is used to find the maximum mark.
Similarly, the same range of B2:B9 is used to check
that the value is ‘M’ for male. However, another range
and criterion pair has been added which is that within
C2:C9, the class must be ‘A’.

149

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 8.29 CONTINUED

Open 8.40 Maxifs.xlsx which you saw in worked


example 8.40.
1 Create two new functions to calculate the
maximum female mark for class B and the
maximum male mark for class B.
Open 8.38 Maths results.xls which you saw in
worked example 8.39.
2 Create a new function to calculate the
highest distinction mark achieved, highest
Figure 8.68: Male/female validation fail.
pass mark achieved and highest fail mark
achieved by students in this class.
This is the rule that had been set up:

Questions
1 Describe the purpose of a named range of cells.
2 Describe the difference between a formula and
a function.
3 Compare absolute cell referencing with relative cell
referencing.
4 Using an example, describe how absolute cell
referencing could be used in a spreadsheet.

8.4 Validation rules


The principle of validation was introduced in Chapter 1.
Spreadsheet software can apply validation rules to data Figure 8.69: Male/female validation setup.
that is input. If data passes the validation rule, then it
will be accepted. If data fails the validation rule, then it The rule ensures that the only data that can be
will be rejected and an error message may be shown. entered must exist in the list that contains ‘Male’ and
‘Female’. It is a lookup in list method of validation.
WORKED EXAMPLE 8.41
In this spreadsheet, the user is asked to enter a person’s
gender. They have two valid options – ‘Male’ or PRACTICAL ACTIVITY 8.30
‘Female’. The user has accidentally entered ‘Mal’ which
is not a valid option. An error message has appeared Create a new spreadsheet.
telling the user what to do to fix the problem. 1 Create a validation rule that will only
allow the entry of ‘Junior’, ‘Intermediate’
or ‘Senior’.
2 Set up an appropriate error message.

150

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Error messages must clearly tell the user what they have
done wrong and what they should do to put it right. An PRACTICAL ACTIVITY 8.31
error message that simply says ‘Error’ or ‘Invalid Data’ Open 8.41 Physics results.xls which is ready
is not helpful to the user. for students’ marks to be entered for tests
The validation rules that can be used in spreadsheet 1, 2 and 3.
software include lookup in list, range, type (integer and
1 Create validation rules that only allow the
real) and length. A range check can be set up with the
entry of marks up to and including the
following properties:
maximum marks for each test.
• between two values
2 The validation rule should also ensure that
• equal to a value negative numbers cannot be entered.
• not equal to a value
• greater than a value
• greater than or equal to a value Question
• less than a value 5 The data below is an extract from a spreadsheet.
• less than or equal to a value.
Customer Product Price Quantity
Code
WORKED EXAMPLE 8.42 K&N QRV58N $28.50 2
This validation rule is a range check that checks input Motors
data is a whole number between 1 and 99. Cosmic PWC48H $19.23 1
Flavours
Boldmere GEV28X $218.29 1
Carpets

a Using the example shown, describe three types


of validation rule that could be applied to the
Product Code.
b Using the example shown, describe two
different types of validation rule that could be
applied to the Quantity.

8.5 Test a spreadsheet


Figure 8.70: Range validation.
structure
Test validation
When testing validation rules work, it is important
to enter four different types of test data as part of a
test plan.

151

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Type of test data Purpose Test formulas and functions


Normal (valid / Data that should pass the Testing of validation rules is just one aspect of testing.
acceptable data) validation rule. All formulas and functions also need testing. To test
Abnormal (erroneous / Data that should generate a formula or function, you need to identify input data
invalid data) an error message. that will be used for the calculation and the expected
Extreme Data that will only just output data (result of calculation). The expected output
pass the validation rule data should be calculated using traditional methods and
because it is on the then compared with the result from the spreadsheet. It
boundary of acceptable is also essential to identify which worksheet the input
data. data and output data are on as they may be on different
worksheets and the tester will need to find the data.
Table 8.10: Types of test data.
Other aspects such as cell and worksheet protection
and conditional formatting can also be tested. It is not
possible to test every possible input value, but a good
range should be used, especially extreme values which
WORKED EXAMPLE 8.43 are small and large. Abnormal input values should only
Here is some test data that could be used to test the be used if validation rules have been set up.
validation rule whole number BETWEEN 5 and 20:
WORKED EXAMPLE 8.44
Test data input Type of test Expected
value data result This test plan tests the formula in C6 of = A6 + B6
10 Normal Accepted Test data input Type of Expected
5 Extreme Accepted value test data result
20 Extreme Accepted A6 = 5, B6 = 8 on Normal C6 = 13 on
3 Abnormal Error message Addition worksheet Addition
worksheet
–10 Abnormal Error message
A6 = 30 000 000, Extreme C6 = 110
abc Abnormal Error message
B6 = 80 000 000 on 000 000 on
10.5 Abnormal Error message Addition worksheet Addition
worksheet and
is fully visible
A6 = 0, B6 = 0 on Extreme C6 = 0 on
PRACTICAL ACTIVITY 8.32 Addition worksheet Addition
Generate test data that will test the following worksheet
rules. You should use a table with three columns:
test data value, type of test data and expected
result. Ensure you cover all four types of When a tester runs a test plan, there will be an
test data. additional column called ‘Actual result’ where the results
of the test will be entered.
• input value is a whole number <1000
• input value is a decimal >25 PRACTICAL ACTIVITY 8.33
• input value is between 100 and 200 Open 8.42 Testing task.xls and run the tests
from Worked Example 8.44.
• input value = PASS or FAIL (there are no
extreme tests for this) 1 Record the results in 8.43 Test results.doc.
2 If a test fails, record what happened.
• input value exists in list Junior, Intermediate,
Senior (there are no extreme tests for this)

152

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

PRACTICAL ACTIVITY 8.34

Open 8.44 Invoices.xls and 8.45 Test plan.doc and complete the test plan with at least six other tests.
Calculate the expected result using traditional methods and then enter the input data and compare with the
actual result.

Test data input value Type of Expected result Actual result


test data
Quantity for Product 3 on Invoice Normal VAT for Product 3 on
worksheet = 36 Cost for Product 3 on Invoice worksheet =
Invoice worksheet = $1,345.00
$9,684.00
VAT rate on Data worksheet = 20%

Test plans are often written during the design stage of a system life cycle. At this point, cell references are unlikely to
be known. Therefore, cell references can be replaced with a description of the input. It must be clear to the tester where
to input the test data.

Question
6 The data below is an extract from a spreadsheet.

Customer Product Code Price Quantity


K&N Motors QRV58N $28.50 2
Cosmic Flavours PWC48H $19.23 1
Boldmere Carpets GEV28X $218.29 1

A customer name should always be present, a product code should be exactly 6 characters long and the quantity
must be an integer above zero.
Using the example shown, complete the test table below.

Test data input value Type of Expected result Reason for choosing data
test data
Customer = Null
Customer = ________________ Normal
Product Code = XYZ12AB
Product Code = ______________ Error: ‘You must input a product
code with 6 characters’.
Quantity = ‘a’
Quantity = _____________ Extreme Value accepted It’s the smallest allowable
quantity.
Quantity = ___________ Value accepted

153

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

coffee is filtered, the granules are left in the filter while


8.6 Use a spreadsheet the flavoured drink flows through the filter.

Extract data using filters WORKED EXAMPLE 8.45


In this example, people with a title of ‘Dr’ have been
filtered.

Figure 8.72: Dr filter.

PRACTICAL ACTIVITY 8.35

Open 8.11 Member List.xls and apply the


following filters:
1 People with a membership status of Full.
2 People who do not want to be emailed.
3 People who have been a member
for one year.
4 People who are either Full or
Patron members.
Figure 8.71: Coffee filter paper in use.
In practical activity 8.35, the last filter that you applied
When there is a lot of data listed in a spreadsheet, users was to find members who were either Full or Patron
may want to view just some of that data. This can be members. This uses a Boolean operator known as OR.
achieved by filtering the data that is required. The term It means that either condition can be true. Other
filter is used to relate to the user’s mental model. When Boolean operators include AND and NOT.

WORKED EXAMPLE 8.46


This filter shows members who have NOT lapsed their This filter will show members who have five or more
membership: years of membership AND less than seven years of
membership:

Figure 8.73: NOT.
Figure 8.74: AND.

154

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED
This is the result of the filter:

Figure 8.75: AND result.

Special text filters can be applied as shown in Table 8.11.

Filter Purpose Example

Contains Selects data in a Contains ‘CH’ will select all data in a column where CH exists anywhere
column that includes within each data item.
the text specified.
Chicken, Reach, Church and Ache would all be included, but not Card.
Starts Selects data in a Starts with ‘CH’ will select all data in a column where the data starts
with column that starts with with CH.
the text specified.
Chicken and Church would all be included, but not Reach, Ache or Card.
Ends with Selects data in a Ends with ‘CH’ will select all data in a column where the data ends
column that ends with with CH.
the text specified.
Church and Reach would be included but not Chicken, Ache or Card.

Table 8.11: Text filters.

155

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Filters that find a range of data can be used with


numbers, dates and times as shown in Table 8.12.
Sort data
It is possible to sort data into ascending or descending
Filter Purpose Example order. If only a selection of columns are sorted, then
only the data within those columns will be sorted. To
Greater than Selects data in >10 Lists 11 keep all data in each row together, do not highlight the
a column that is but not 9 or data. To sort on more than one column, it is necessary
greater than the 10. to specify the sort order for each column and which
value specified. column should be sorted first. If you wanted to sort
by surname and then sort any matching surnames by
Less than Selects data in <10 Lists 9, forename, then you would sort by surname first.
a column that is but not 10
less than the value or 11.
specified. PRACTICAL ACTIVITY 8.37
Greater than Selects data in a >=10 Open 8.46 USA addresses.xls and sort data into
or equal to column that is greater the following order:
than or equal to the
• Position from 1 to 500.
value specified.
• Position from 500 to 1.
Less than or Selects data in a <=10
equal to column that is less • State in alphabetical order from A to Z.
than or equal to the • City in reverse alphabetical order.
value specified.
• Surname in alphabetical order from A to Z
Table 8.12: Filtering for a range. with Forename as the secondary sort.

It’s not just text and numbers that can be sorted into
PRACTICAL ACTIVITY 8.36 order. Dates and times can also be sorted.
Open 8.46 USA addresses.xls and apply the
following filters:
Summarise and display data
1 State is Arizona ‘Az’ OR California ‘CA’.
Pivot tables
2 City starts with ‘San’.
A pivot table will provide summary data such as totals
3 Company ends with ‘Inc’. and averages for a data set. It’s a very powerful feature
because it replaces the need for several functions.
4 Company includes ‘&’. Summary data can also be grouped by chosen items.
5 Position is <=10.
6 Position is >10 AND <=50.
7 State is NOT = ‘FL’ AND NOT = ‘OH’.

156

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

WORKED EXAMPLE 8.47


The file 8.11 Member list.xls contains a list of members of a club including their membership status, gender,
whether they want to be contacted by email and how many years they have been a member. There are 148 members
in total. Figure 8.76 shows an extract of the data.

Figure 8.76: Extract of members list.

The Pivot Tables worksheet of the file includes some more pivot tables. One of the pivot tables shows the average
number of years of membership for each type of member and gender of member. This can be seen in Figure 8.77

Figure 8.77: Pivot table.

157

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

Figure 8.78 shows how the membership status has been selected as the row, the gender as the column, and the
average number of years as the value to display.

Figure 8.78: Pivot table configuration.

A pivot table can sumarise data based on any row or column in the data source. Summary data can include the sum,
count, average, maximum, minimum and standard deviation. The data can also be shown as a percentage of the total
set of values.

158

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

WORKED EXAMPLE 8.48


Figure 8.79 shows the number of years for each type of member grouped by gender as a percentage of the total
number of years of membership. For example, 4.3% of all members are junior male members.

Figure 8.79: Pivot table showing percentage of total.

Pivot charts
A pivot chart works in a similar way to a pivot table but shows the data graphically. It takes just a few seconds to set
up a pivot chart showing summary data.

WORKED EXAMPLE 8.49


This pivot chart shows the number of members in each membership category and how many are male and female.

Figure 8.80: Pivot chart.

159

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
To set up this pivot chart, the membership status was selected for the axis, the gender for the series and the number
of first names for the values.

Figure 8.81: Pivot chart configuration.

PRACTICAL ACTIVITY 8.38

Open 8.47 IQ.xls which shows the IQ of 500 people. Create pivot tables to show:
1 The number of people in each state.
2 The number of people in each age group in each state.
3 The number of people in each county of the state of Arizona (AZ). [Hint: use a filter for the state.]
4 The average IQ for each state.
5 The average IQ for each age group in each state.
6 The number of people and the average IQ for each age group in each state.
7 Create pivot charts to show the data in tasks 1, 3, 4 and 5.
8 Create a pivot chart to show the number of people in each age group in the state of New York (NY).

160

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

Import and export data KEY WORDS


Data can be imported from other formats such as a import: to bring in data from another application
comma separated values (CSV) file, text (TXT) file or
from a database. When importing, you should already export: to prepare data for use in another
have the spreadsheet software open and open the file to application
be imported from within the spreadsheet software. You
will often have to ensure that when opening you have
selected the option to show all files.
PRACTICAL ACTIVITY 8.40
PRACTICAL ACTIVITY 8.39 Open 8.46 USA addresses.xls and export it to
the following formats:
Within your spreadsheet software, open 8.48
Instructor.txt and select options which will cover • CSV
the following:
• TXT
1 This is a delimited file that is separated • PDF
by commas.
• Open Document Spreadsheet (ODS) – works
2 The file has data headers in the first row. with Open Office
3 The Date of Birth should be in date format • Web page (HTML).
with no time.
View the files that you have exported the data to
4 The charge should be in currency. and note how the data has been stored.
5 Use the find and replace option in the
Weekends column only to replace 1 with
‘Yes’ and 0 with ‘No’.
Within your spreadsheet software, open 8.7 Automate operations
8.49 Driving school.accdb and import the
Learner table. within a spreadsheet
Try to open 8.50 Lessons.doc from your
spreadsheet software. It is unlikely that your
Create macros
spreadsheet software will recognise how to Macros are a set of instructions that run all at once.
import this data. It is essential to ensure that the They are usually created by recording a set of actions.
data being imported is structured in a way in This is done by defining a starting point (e.g. clicking
which the spreadsheet software can understand on a record button), then performing the actions, and
it by using rows of data and separating columns then defining a stopping point (e.g. clicking on a stop
with a special symbol such as a comma. button). The actions that have been recorded can then
be repeated at any time by running the macro. A macro
is usually run by clicking on a button, selecting a menu
Data can also be exported so that it can be used in option or by using a shortcut key combination. Once a
other software. If it is exported in a common format macro has been recorded, it can also be edited to make
such as CSV or TXT, then other software will be able fine adjustments to it.
to recognise the rows and columns. Formats such
as portable document format (PDF) will enable the
data to be viewed by a wide variety of users but not KEY WORD
manipulated, so PDF is good for showing output data.
macro: a set of instructions that can be
completed all at once

161

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Examples of macros could include:


• moving to a different worksheet • finding specific items of data
• changing the style of a cell • resetting input cells so they are blank.
• sorting data into a set order

WORKED EXAMPLE 8.50


8.51 Macro Cuboid.xlsm calculates the volume of The following steps were taken to record the macro:
a cuboid. Dimensions can be input in the yellow cells
• The Start Recording option was chosen
and the volume is shown in the blue cell.
• Macro was given a name ‘ClearInputs’
• Cells B3:B5 were selected
• The delete key was pressed
• Cell B3 was selected
• The Stop Recording option was chosen.
Each time the macro is run, the length, width and height
inputs are cleared:

Figure 8.82: Cuboid calculation.

A macro has been recorded to clear the contents of


the input values for length, width and height.

Figure 8.84: After macro has been run.

When recording a macro, the spreadsheet software will


usually generate some code for the macro which will allow
the developer to fine tune how the macro works.

Figure 8.83: Recording the macro.

162

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

WORKED EXAMPLE 8.51 Customise the user interface


The code generated for the macro that was recorded Macros can be run from a menu but this can often
to clear the cuboid input values is: require quite a few actions. For example, in Microsoft
Excel this would require the following actions:
• Click on Developer ribbon
• Click on Macros button
• Select the macro to run
Figure 8.85: Code for macro. • Click on Run.
Instead, a button can be added to the spreadsheet screen
that will run the macro with a single click.

PRACTICAL ACTIVITY 8.41


WORKED EXAMPLE 8.52
Open 8.52 Macros.xlsm
8.51 Macro Cuboid.xlsm includes a button that runs
1 Click on the buttons on the Macros the macro to clear the input values.
Examples worksheet and see what the
macros do.
2 Create the macros suggested in
the workbook.

Table 8.13 shows advantages and disadvantages


of macros.

Advantages of macros Disadvantages of


macros
Repetitive tasks can be The macros need to be
performed quickly rather created before they can
than having to perform be used.
them manually over and
over again. Figure 8.86: Button to run macro.
Complex tasks can be Macros can easily go
completed quickly by wrong and perform
simply clicking a button the wrong actions if Other form controls include those shown in Table 2.5 in
or a shortcut key. they have not been Chapter 2.
created properly or are
not started from the
intended starting point.
Enables software to be If only shortcut keys
tailored to meet the are used then it can
needs of users. be difficult for users to
remember the shortcuts.

Table 8.13: Advantages and disadvantages of macros.

163

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 8.53


8.53 Form Controls.xlsx has a data entry screen Below the End Year is a scroll bar, sometimes called
for applying for a lease for a holiday home using a a spinner, which changes the value of the contents
spreadsheet. of cell B4. Although it looks like the scroll bar is in
B5, it is actually an object that is ‘floating’ above the
spreadsheet.
Next to Annual Discount is a tick box, often called a
check box, which changes the value of cell C7. If it is
ticked, C7 will be TRUE but if it is not ticked then C7
will be FALSE. Similarly, the tick box next to First Year
Discount is linked to cell C9.
The drop down box, often called a combo box, can
have three values of Platinum, Gold or Silver. When a
value is selected, the value in C11 changes to match the
position in the list of the value in the drop down box.
For example, Silver is the 3rd item in the list, so the
value of C11 is 3.
The option buttons for Yes or No are linked to cell C13.
If Yes is selected then the value of C13 will be 1 and if
Figure 8.87: Form controls. No is selected then the value of C13 will be 2.

PRACTICAL ACTIVITY 8.42

You are going to create a worksheet that will be used


as an input form for data relating to feed in tariffs
for renewable energy. Feed in tariffs are payments
made to a customer for supplying electricity back
to the national grid. You do not need to create any
calculations. Figure 8.88 shows an example of what
the input form might look like.

Figure 8.88: Feed in tariff input form.

164

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED

1 Create a drop-down box (combo box) for the Energy Performance Certificate (CPC) which can be A, B,
C, D, E, F or G.
2 Create a scroll bar or slider or spinner to change the size of the system. The size of the system can
range from 0.01 kWh to 9.99 kWh. Hint: use values 1 to 999 and divide the result by 100.
3 Create a grouped set of option buttons for the renewable type which can either be ‘Solar PV’ or ‘Wind’.
4 Create a grouped set of options for the house type which can either be ‘New build’ or ‘Retrofit’.
5 Create a tick box for the micro renewable certification.

8.8 Graphs and charts


Analyse and select a chart
Graphs or charts are used to show information in a way that makes it easy to compare values. This could be as simple
as showing the monthly sales in a column or bar chart or it could be more complex and show how hospital waiting
times vary during a month compared with their targets. Charts that show more than one set of data are known as
comparative charts because data for one set can be compared against data for another set.

WORKED EXAMPLE 8.54


8.54 Graphs and Charts.xls includes some examples The comparative bar chart on the worksheet Worldwide
of graphs and charts. The worksheet Monthly Sales Sales compares the sales of different continents for each
contains a bar chart showing the Monthly sales over of the months in 2015. Notice how a legend is used to
a period of 12 months. Notice how a chart title and show which continent is represented by which colour:
x-axis title have been included:

Figure 8.89: Monthly sales bar chart. Figure 8.90: Worldwide sales comparative bar chart.

165

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

The chart currently shows sales for Australia, Asia The chart is also only showing the sales values at
and Europe but it may be that only the sales for intervals of 200,000. This can be changed to a different
Europe and Australia need to be shown. Australia data interval by setting the major units. In the example
and Europe are in non-contiguous (non-adjacent) below, the data interval (major units) have been set to
columns. One way of creating the graph would be to 100,000 and to enable more space on the graph, the
select only the columns that are required. Depending display units have been set to Thousands:
on the software being used, this can often be achieved
using the Ctrl key to highlight non-contiguous
columns:

Figure 8.93: Changing data interval.

The graph now looks like this:

Figure 8.91: Selecting non-contiguous columns.

Note that this method can be used to select any


specified range of data. Another way to achieve this
would be to remove the Asia data series from the
chart:

Figure 8.94: Monthly worldwide sales bar chart.


Figure 8.92: Removing Asia data series.

166

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED

If we wanted to add the Asia series of data back again, then we could add a new series and specify the range of data
to use (C2:C13) and the name of the series (C1 = ‘Asia’):

Figure 8.95: Adding Asia data series.

Line graphs are similar to bar charts in that they show the size of data, but they are mainly used to show how data
changes over a period of time.

WORKED EXAMPLE 8.55


The first line graph on the worksheet Waiting List in The comparative line graph on the worksheet Waiting
8.54 Graphs and charts.xls shows how waiting times List compares the waiting times of three hospitals over
at the Kerslake Hospital have fallen over a four-year a four-year period with the target waiting time of 2.5
period. Notice how the minimum value on the y-axis hours. Notice how the y-axis scale has intervals of 0.5
scale is 2.0 hours and the maximum value is 3.6 hours. hours, the maximum value for the y-axis scale is 5.0 and
The y-axis scale has intervals of 0.2 hours. Both y and the minimum value for the y-axis scale is 1.5.
x-axes have been given axis titles.

Figure 8.97: Hospital waiting times comparative


Figure 8.96: Kerslake Hospital line graph. line graph.

167

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

While pie charts can also sometimes be used to show actual values, they are usually used to show proportional data.
Pie charts showing proportional data show the proportion or percentage of each data item.

WORKED EXAMPLE 8.56

The worksheet Head Boy in 8.54 Graphs and charts. Finally, look at the Financial Performance tab on the
xls contains a pie chart showing the proportion of worksheet. It contains a combination chart. Think
votes received for each student standing in an election about what information is being conveyed here.
for head boy of a school. Notice how a legend is not
necessary because each segment has been labelled with
the name of the data item. Each segment has also been
labelled with the percentage of the total vote that each
data item represents, and the sector for the boy with the
most votes has been extracted (exploded).

Figure 8.98: Head Boy pie chart. Figure 8.99: Combination chart.

Sometimes, two different data series relating to different data sets need to be plotted on the same chart but they have a
different set of values. In this case, a combination (combo) chart can be used which would include a column chart for
one set of data and a line graph for the other set of data.

WORKED EXAMPLE 8.57


In this example, the contiguous (adjacent) columns for
Year, Revenue and Profit Margin have been selected to
create a column chart. However, the Year has not been
automatically selected as the value for the x-axis.
The horizontal axis labels are currently shown as:

Figure 8.100: Column chart. Figure 8.101: Horizontal axis labels.

168

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED

This can be changed by editing the horizontal axis labels A secondary axis is required for the profit margin data
to use the specified range A2:A6 where the years are series. The chart type can be changed to a combination
found in the table: (combo) chart with the Profit Margin as a Line Chart
and having its own secondary axis:

Figure 8.102: Editing horizontal axis labels.

The Year can also be removed from the legend and series
data:

Figure 8.105: Combination chart.

Finally, the chart title, axis labels and units can be added:

Figure 8.103: Removing the Year.

The graph now includes the revenue and profit margin


but the profit margin is so small compared with the
revenue that it can’t be seen:

Figure 8.104: Chart with revenue and profit margin. Figure 8.106: Final chart.

169

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

When selecting which type of graph or chart to Label Purpose


produce, you should consider the general rules shown in
Table 8.14. Secondary A second axis used to show data for
axis a different set of values to the primary
axis but using the same direction of
Type of graph / Purpose
axis.
chart
Bar / column Used to show a single series of Percentages When using a pie chart, the
chart data in columns or rows. percentages may need to be
displayed for each segment.
Comparative bar Used to compare more than one
Segment Instead of a legend, each segment in
/ column chart series of data in columns or rows.
label a pie chart could be labelled with its
Line graph Used to show how a single series description.
of data changes over a period of
Segment As well as, or instead of the
time.
value percentage, each segment in a
Comparative Used to compare how more than pie chart could be labelled with its
line graph one series of data changes over quantity.
a period of time. Extract / Extract one sector of a pie chart from
explode pie the rest of the pie chart by moving its
Pie chart Used to show the proportion that
chart sector position.
is used by each item of data.
Scale The scale of the y-axis can be set to a
Combination Used to show more than one
normal or logarithmic scale.
(combo) chart series of data using a combination
of a column and line chart where Data interval The interval between values on an
there is a secondary axis. / major units axis.

Axis scale The maximum value to be used on an


Table 8.14: Rules for selecting type of graph or chart.
maximum axis.

Axis scale The minimum value to be used on an


Formatting a graph or chart minimum axis.
When creating a graph or chart, you should ensure that
it is formatted appropriately. Table 8.15: Labelling graphs and charts.

Label Purpose
PRACTICAL ACTIVITY 8.43
Title A brief overview of what the graph or
chart is showing. Open 8.38 Maths results.xls.

Legend A key to show what the colours used 1 Create a bar chart to show the marks for
represent. each student.
2 Include a title and axis titles.
Series label The name given to a series which can
be used on a legend. Open 8.41 Physics results.xls.

Value axis Each of the axes (usually x and y) 1 Enter some marks for each student for
label should include the values including each test.
any units. 2 Create a comparative bar chart to show the
marks for each student in each of the tests
Category Each of the axes should include a title 1, 2 and 3.
axis label to state what the data represents.

170

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

it into the other software, such as word processing for a


CONTINUED report, or presentation software for a presentation. It is
3 Include a title and axis titles. also possible to link the exported chart to the original
spreadsheet data so that if the data changes within the
4 Include a legend for the tests. spreadsheet then the chart will update in the software to
5 Change the y-axis maximum scale which it has been exported.
value to be 50.
6 Change the y-axis scale to have PRACTICAL ACTIVITY 8.44
intervals of 5.
Open 8.54 Graphs and charts.xls.
Open 8.55 School attendance.xls.
1 Copy the graph Monthly sales 2015.
1 Create a comparative line graph to show
the attendance of each of year 1 and year 2 2 Open a word processor or
over the period of the year compared with presentation software.
the target. 3 Select the option to paste as a link (you may
2 Label the chart appropriately. find this under paste special).
3 Adjust the y-axis scale and maximum scale 4 Ensure that the link option is selected and
values appropriately. the object type (graph) is identified.
4 Include a legend. 5 Save this new document and close it.
5 Change the line type of the target series to 6 Change some of the data in the Monthly
be dashed. sales worksheet.
Open 8.11 Member List.xls. 7 Save the spreadsheet.
1 Open the worksheet Pie Chart. Change 8 Reopen the new document you created and
‘Count of Membership Status’ to ‘Count of check that the graph has changed to reflect
membership status’, ‘Membership Status’ the updated data in the spreadsheet.
to ‘Membership status’ and ‘Grand Total’ to
‘Grand total’.
2 Create a pie chart to show the proportion of
members for each status.
Questions
3 Give the chart a sensible title. 7 Identify and give reasons for the most appropriate
type of chart or graph to show the number of
4 Add the percentages and membership missed refuse collections shown in Table 8.16.
statuses to the pie chart segments.
Open 8.26 HLookup.xls. Year Vesey New Hall Trinity
1 Create an appropriate chart to show the 2010 2502 4571 3271
products, original price and discounted price. 2011 2786 5728 3102
2 Label the chart appropriately. 2012 1987 5645 2905
2013 2057 4972 2647
A chart can be created in a spreadsheet and then used
Table 8.16: Missed refuse collections.
within other software by copying the graph and pasting

171

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

8 Identify and give reasons for the most appropriate


REFLECTION
type of chart or graph to show the data shown in
Table 8.17. How would you have drawn a graph or chart
without being able to use a spreadsheet? What
Student Mark Mark Mark Mark Average would happen to that graph or chart if the
1 2 3 4 original data changed?
Name 1 98 40 36 84 65
Discuss situations where data could be valid but
Name 2 31 67 61 77 59 incorrect.
Name 3 62 58 29 38 47
Think about projects you have completed
Name 4 64 83 85 27 65 at school where you could have used a
Name 5 87 45 64 42 60 spreadsheet. What features of a spreadsheet
would have been useful for this project and how
Name 6 93 58 43 73 67
would you have used them?
Name 7 99 29 55 92 69
Name 8 57 58 44 93 63
Name 9 45 43 98 55 60

Table 8.17: Student marks.

REVIEW PRACTICAL ACTIVITY

Open 8.56 Review Task.xlsx and look at the VehicleRates worksheet.


A vehicle hire company rents out vehicles to customers. The types of vehicle available are shown in A4:A11
which has a named range of ‘VehicleTypes’.
The table in columns A to F shows the types of vehicles available, the minimum age of drivers for each
vehicle, and the charge rates for each vehicle.
The table of points in cells G7:G9 refers to a set of ranges for the number of penalty points a driver may
have on their driving licence. Cells G6:G9 have been named Points.
Cell B13 refers to the number of drivers that will be hiring a vehicle.
1 Merge cells C2:F2, give the merged cell a yellow shading and align the text centrally in the cell.
2 Resize columns A to F so that all the data is visible.
3 Name the range A4:E12 as VehicleRates.
4 Insert a new row between rows 5 and 6 for an ‘Estate’ vehicle which has a minimum age of 21 and
charging rates of £34, £38 and £42.
The charge rate is determined by the number of driving conviction points that a driver has had in the
last 5 years.
• 0 conviction points = Rate 1
• 1–3 conviction points = Rate 2
• 4–6 conviction points = Rate 3

172

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

CONTINUED

If there are any additional drivers, then whoever has the highest number of conviction points is used
to determine the charge rate. The driver in the example above has 3 penalty points and so would be
charged rate 2.

Switch to the Quote worksheet.


The Quote worksheet is an input form used to calculate the cost of hiring a vehicle.
5 Create a validation rule in C16 that will only accept vehicles that exist in the named range VehicleRates.
Use an appropriate error message if invalid data is input.
6 Create a drop-down box for the number of Conviction Points. The input range of the drop-down
box should only contain the values from the named range Points and must be a form control, not a
validation rule. The charge rate should be stored in F12.
7 Create option buttons for the number of additional drivers which can be 0, 1 or 2. The option buttons
should be linked to cell B2 on the VehicleRates worksheet.
The quote reference is calculated by taking the initials of the driver and adding the year of the current date,
followed by a hyphen, followed by the month of the current date, followed by another hyphen, followed
by the day of the current date. For example, the reference for Caleb Andrews on 20th May 2019 would be
CA2019-5-20.
8 Create a formula in F6 to calculate the quote reference.
The expiry date is calculated as 7 days after the date of the quote. Assume the date of the quote is the
current date.
9 Create a formula in F8 that calculates the expiry date of the quote.
The minimum driver age is calculated by looking up the type of vehicle in the VehicleRates table.
10 Create a function in F10 to find the minimum driver age.
11 Create a validation rule in C18 for the youngest driver age to be at least 16. Use an appropriate error
message if invalid data is input.
12 The hire rate per day is calculated by looking up the type of vehicle in the VehicleRates table and
finding the correct column for the charge rate. Create a function in F14 to find the hire rate per day.
13 The number of days is calculated to be inclusive of both the date of hire and the date of return. Create
a formula in F16 to show the number of days the vehicle will be hired for.
14 The hire rate is calculated by multiplying the number of days by the hire rate per day. Create a formula
in F18 to calculate the hire rate. You should only use named cells within your formula.
If there is one additional driver, then there is a 15% additional cost. If there are two additional drivers then
there is a 22% additional cost.
15 Create a function in F20 to calculate the additional percentage based on the number of additional
drivers selected. Format the cell to display this value as a percentage.
16 Create a formula in F22 to calculate the additional charge for additional drivers.
17 Create a formula in F24 to calculate the total cost of the quote including additional drivers.
18 Format any cells that contain currency to include a currency symbol and 2 decimal places.

173

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

19 Test your spreadsheet works using the following test plan:

Test data input value Type of Expected result


test data
Firstname: Merrick Normal Quote reference: MWyyyy-mm-dd (where yyyy is current
Surname: Woodward year, mm is current month and dd is current year)
Date of Hire: 21/12/2020 Expiry date: (one week after current date)
Date of Return: 28/12/2020 Minimum driver age: 18
Vehicle: Hatchback Charge Rate: 3
Youngest driver age: 23 Hire rate per day: £38.00
Conviction Points: 5 Number of days: 8
Additional drivers: 1 Hire rate: £304.00
Additional drivers %: 15%
Additional drivers amount: £45.60
Total quote: £349.60

20 Print a copy of the Quote worksheet in both normal view and showing formulas ensuring that no
formulas or functions are truncated.
21 Protect the worksheet so that only input cells can be edited with all other cells being read-only.
22 Create a macro that will clear any input data. The macro must not clear any formulas or functions.
23 Complete the test plan below for the input of Vehicle.

Test Description Type of Test Input Data Expected Output Value(s)


Number Value(s)
1 Vehicle validation Transit
2 Vehicle Sedan ‘You must select a vehicle
from the list’

24 Complete the test plan below for the input of Youngest driver age when booking a 9-seater vehicle.

Test Description Type of Test Input Data Expected Output Value(s)


Number Value(s)
3 Youngest driver age validation Normal
4 Youngest driver age validation Extreme
5 Youngest driver age validation Abnormal

174

Copyright Material - Review Only - Not for Redistribution


8 Spreadsheets

EXAM-STYLE QUESTIONS
Figure 8.107 shows cars that are owned by a driving school. It calculates the fuel type of each car, the cost per litre
of each fuel type and the cost per gallon.

A B C D E F
1 Registration Make Model Fuel type Cost per litre Cost per gallon
2 BX56JWL Ford Mondeo Diesel $ 1.25 $ 5.69
3 BX56JWM Saab Saab 9-3 Petrol $ 1.17 $ 5.32
4 BX56JWN Land Rover Discovery Diesel $ 1.25 $ 5.69
5 BX56JWP Smart Smart Car LPG $ 0.85 $ 3.87
6 BX56JWR Ford Mondeo Petrol $ 1.17 $ 5.32
7 BX56JWS Saab Saab 9-3 Diesel $ 1.25 $ 5.69
8
9 Fuel type Cost per gallon
10 Diesel $ 5.69
11 Petrol $ 5.32
12 LPG $ 3.87

Figure 8.107: Driving school spreadsheet.

Rows and columns are used in the spreadsheet.


1 a Use an example from this spreadsheet to describe a row. [2]
Formulas and functions have been used in the spreadsheet. There are 4.55 litres in a gallon.
b i Using an example, describe a formula. [2]
ii Write the formula used in F2. [1]
iii Describe a function. [2]
iv Identify the type of formula used in E2. [1]
[Total 8]
The driving school would like to see all their petrol cars but not the other cars.
2 a Explain how the driving school could see all their petrol cars but not the other cars without losing
any data. [2]
b Explain how the fuel types could be identified quickly using a different colour for each without
changing them all one by one. [2]
[Total 4]
Absolute and relative cell referencing have been used within the spreadsheet.
3 Using examples, explain how absolute and relative cell referencing have been used. [4]

The spreadsheet model is going to be used to calculate the costs of using each car.
4 a Explain three advantages of using a spreadsheet to model the costs of using each car. [3]
b Explain one disadvantage of using a spreadsheet to model the costs of using each car. [1]
[Total 4]

175

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

SUMMARY CHECKLIST
I can create and edit a spreadsheet structure to meet the requirements of an audience.
I can protect cells and their content.
I can freeze panes and windows.
I can create formulas and use functions within a spreadsheet.
I can use absolute reference, relative reference, named cells and named ranges.
I can know and understand why absolute and relative referencing are used.
I can use validation rules within a spreadsheet.
I can format the content of cells and the emphasis of cells.
I can test a spreadsheet structure including formulas, functions and validation rules.
I can extract data from a spreadsheet using search facilities.
I can sort data in a spreadsheet.
I can summarise and display data using pivot tables and pivot charts.
I can import and export data to and from a spreadsheet.
I can create a graph or chart in a spreadsheet for a specific purpose.
I can apply formatting to a graph or chart.

176

Copyright Material - Review Only - Not for Redistribution


Chapter 9

Modelling
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• use what-if analysis
• test a spreadsheet model
• describe the characteristics of modelling software
• explain the need for computer models
• evaluate the effectiveness of spreadsheet models
• explain how a model can be used to create and run simulations.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know how to use a spreadsheet?


• Do you understand that spreadsheets can be used for modelling?
• Are you able to test formulas within a spreadsheet?
• Are you able to test validation rules within a spreadsheet?

Computer Aided Design (CAD) enables designers to


Introduction produce a model of a physical object. This could include
a kitchen, a building, a motor vehicle or an aeroplane.
A computer model is a representation of a real-world
CAD software can include features such as viewing
process. A model is created through mathematical
an object in two dimensions (2D) or three dimensions
analysis of the real-world process. A simulation is the
(3D), manipulating objects within the model, adding
use of a computerised model to predict how a real-life
or removing objects, viewing the model from different
system might behave. Details in a computer model can
angles, applying different effects such as colour and
be easily changed to see what effects they would have.
lighting, and focusing on specific features such as the
This is often cheaper and safer than trying out changes
electrical cabling or heating system within a building.
on the real-world process.
Modelling software will include some essential features:
KEY WORDS • the ability to change variables within the software

model: a representation of a process • asking what-if questions to see what the result of
changing variables might be
simulation: using a model to predict real-
• formulas and functions to carry out the
life behaviour
mathematical calculations that form the basis
of the model
• automatic recalculation of formulas and functions

9.1 Characteristics of • rules that define how the model behaves


• layers of abstraction so that different parts of the
modelling software model can be viewed and analysed separately.

Modelling software is used to create a model. An example of the use of modelling is to create a model
Spreadsheets can be used to create computerised of a roller coaster. Variables can include the height of
models, but there are also custom-written solutions that each drop, the radius of loops, the starting speed of the
are used to model specific processes. carriage, length of each section and the weight of each
carriage. Calculations will be used to define rules such as
For example, a network simulator such as Cloonix can the amount of friction and how that will slow carriages
be used to model a computer network. The software down, the effect of gravity on carriages as they move up
produces a diagrammatic view of the devices connected and down and the g-force that will be experienced by
to the computer network. It will be possible to identify passengers. What-if questions could be asked such as
the Internet Protocol (IP) addresses used on the network ‘What would happen if we increased the starting speed
and how they are assigned through a Dynamic Host by 2 km/h?’ or ‘What would happen if we increased
Configuration Protocol (DHCP) server. Wireless the initial drop by 5 m?’ The effect of these changes in
networks can be added and security can be configured variables can then be modelled.
to see what the effects will be. Devices can be connected
to specific switches and the throughput of data traffic
can be analysed.

178

Copyright Material - Review Only - Not for Redistribution


9 Modelling

Constructing buildings, kitchens, gardens, motor


PRACTICAL ACTIVITY 9.01 vehicles and other objects can be a very costly process. It
Experiment with a digital single-lens reflex is important to get it right first time as any adjustments
(DSLR) camera simulator by changing the that have to be made in the real world will incur
variables and seeing how this affects the end financial costs. Models help to experiment with different
results. You can find an example simulator on the designs to see which look is most aesthetically pleasing
Cameraism website. and which ones react best to environmental conditions.
When designing a kitchen using modelling software,
variables such as lighting, worktops, cupboard doors,
position of units, flooring and tiling can be changed

9.2 The need for to see which configuration looks the best. Cupboards,
drawers, dishwashers and cookers can be opened to see
if they use the space efficiently. The angle of view can
computer models be changed in a 3D environment to see what the kitchen
There are a variety of reasons why models might be might look like from a variety of angles.
used, including training, forecasting and construction. Models can be used to predict population growth.
Whatever the reason, a model must be able to answer It’s important for governments to know what future
what-if questions. populations will be so they can plan for housing,
Models can be used for the purpose of training people transport infrastructure and public services. Scientists
to use equipment. This could range from learning to model population growth within natural habitats. They
drive a forklift truck to flying an aeroplane or operating can identify the existing population and reproduction
a nuclear power plant. Models are used for training rates and predict what future populations will be. There
because there is less risk of injury to the trainees and will come a point when the population will outgrow
instructors than learning in a real environment. When its carrying capacity (number of inhabitants that can
learning to drive a forklift truck, the trainee may make survive on limited resources) and the growth rate will
a mistake by lifting a load too high and toppling the adjust. This is known as density-dependent growth. If
truck. In real life this could cause serious injury as well there are no limiting resources, then the growth rate
as costing money in terms of repairs, but using a model would be expected to increase exponentially. This is
removes both of these risks. Costs are saved because known as density-independent growth.
real equipment does not suffer wear and tear, fuel is not
required to operate machinery and instructors do not PRACTICAL ACTIVITY 9.02
need to be present all of the time. It is also possible to test
the trainee in unpredictable situations such as turbulence Experiment with the Wolfram population growth
for an aeroplane or driving a heavy goods vehicle on ice. model, which you can find on the Wolfram
Unpredictable situations that would happen in real life Demonstrations Project website, by changing
can also be removed for trainees when they first start the initial population, growth rate and carrying
learning so they can focus on basic controls. capacity variables.

Models can also be used for forecasting. One of the most


common models for this purpose is weather forecasting. Climate change models consider the interactions
Patterns that have happened in the past can be analysed between the atmosphere, oceans, land, ice and the sun
along with current data to predict what the weather might to estimate climate trends. Climate change models are
be in the future. Businesses and governments use financial used for long-term predictions and it can be decades
modelling to predict what might happen to profits or the before it will be known if the model is accurate. Models
economy. It is too risky for a business to make sudden will include several scientific rules such as the first law
changes in the marketplace without testing them out of thermodynamics, the Stefan-Boltzmann Law, the
with a model first. A variety of what-if questions can be Clausius-Clapeyron equation and the Navier-Stokes
asked using a model to determine how to make the most equations, but they include so many uncertainties
profit. Variables that could be changed include selling and are so complex that there is no known exact
prices, adjusting the quantity of products to supply at any solution. These complex models require the use of
given time, times of year to sell products and the effect of supercomputers. Climate change models differ to
weather on seasonal sales. weather forecasting in that they predict average weather

179

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

conditions over a long period of time rather than


specific weather conditions on a given day. Models from PRACTICAL ACTIVITY 9.04
the past can be tested against what really happened to Go to the Onramp traffic simulation website and
see if the model was accurate, enabling the models to be try out their model of road traffic flow.
improved for the future.
Identify the variables that can be changed and
what the effects are of changing these.
PRACTICAL ACTIVITY 9.03
What questions could you ask of the model?
Search on Youtube for the video of the
installation of the final phase of the Met Office
Supercomputer to see the scale of just one of
The Met Office Hadley Centre’s three Cray SC40
supercomputers which are capable of 14,000
9.3 What-if analysis
trillion calculations a second. What-if analysis is the process of asking the question
‘what would happen if … ?’.

Models can be used to help with queue management.


This can include queues at a supermarket, telephone KEY WORD
helpline queues and amusement parks. Being able to what-if-analysis: experimenting with changing
predict the number of customers and having rules variables to see what would happen to the
that define how long it takes to serve each customer output if those variables changed
can help to determine how many staff are needed to
serve the customers. Queues can be quite simple as in
a supermarket or they can be complex where different Some examples of what-if questions in a financial
customers are given different priorities. These rules such spreadsheet model might include:
as ‘first in first out’ or ‘shortest job first’ will form part • What happens to the total income for the month if
of the model. The behaviour of customers can also form we increase the selling price by 20%?
part of a model, including balking (deciding not to join
a queue if it is too long), jockeying (switching between • What happens to our costs if we use a different
queues) and reneging (leaving a queue). Variables will supplier for one of our parts?
include number of customers, number of servers, time to
• What happens to our total expenditure for the next
serve a customer and expected number of customers at
five years if we move to new premises?
different times of the day.
Part of what-if analysis includes the use of goal seek.
Models can also be used for traffic flow. This can
It is possible to set a goal and find out what needs to be
help with planning new roads, improving existing
done to achieve that goal. Some examples of goal-seek
roads or building new shopping centres or residential
questions might include:
areas. Models will take into account existing traffic
movement and projected changes in the number of • What price do we need to sell at in order to sell
vehicles expected along a route. The model can be used 5000 items per month?
to experiment with different traffic control measures • How many items do we need to sell to break even
such as traffic lights, traffic islands or traffic calming (zero profit and zero loss)?
measures. Transport planners can then see what effect
making changes to the roads would have without
committing to projects that might not be suitable. KEY WORDS
Variables within the model can include length of
vehicles, vehicle speed, average acceleration of vehicles goal seek: seeing what a variable needs to
and congestion. Different modelling techniques are change to for a goal in terms of output to
used, such as microscopic models that model the be achieved
behaviour of single vehicles, and macroscopic models
that model the behaviour of a stream of vehicles.

180

Copyright Material - Review Only - Not for Redistribution


9 Modelling

PRACTICAL ACTIVITY 9.05

Open 9.01 bike hire.xlsx which is a model to calculate the profit that would be made for different numbers
of bikes being hired.
1 a What would happen to the profit if the number of short male mountain bikes booked was
changed to 70?
b What if there were no short male mountain bikes booked? Did any other data change when you
changed the quantity booked?
2 What would happen to the profit if the junior hourly rate was increased to £12.50?
3 Experiment with changing other variables within the spreadsheet model and watch what happens to
the outputs.

WORKED EXAMPLE 9.01


9.01 bike hire.xlsx calculates the profits for a bike hire company. In this example, the company wants to see how
many bikes of a particular type they need to hire out to increase their profit to £2500:

Figure 9.1: Goal seek configuration.

Figure 9.2 shows the result of the goal seek being 65.63333 bikes, which would of course need to be rounded up to
70 bikes:

Figure 9.2: Goal seek result.

181

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 9.06

Open 9.02 student marks.xlsx which shows exam and coursework marks for students in a class.
Use goal seek to answer these questions.
1 What coursework mark would John need to increase his total mark to 390?
2 John resits exam 3. What mark does he need to increase his total to 425?
3 Sameena resits her coursework. What mark does she need to get a total of 380?
4 Fathima hasn’t taken exam 3 yet. What mark does she need to get a total of 250?
5 Experiment with setting your own goals.

9.4 Test a spreadsheet model


In Chapter 8 you learned how to choose test data and to test formulas, functions and validation rules within a
spreadsheet. When testing a spreadsheet model, it is important to test all aspects of the model. This could include:
• formulas and functions • graphs and charts
• validation rules • cell and worksheet protection
• conditional formatting • macros.
• form controls
A test plan needs to be created to test all these aspects of the spreadsheet model. It needs to include clearly identified
input values and the expected output values.

WORKED EXAMPLE 9.02

9.03 Block Paving.xlsm produces a quote for block paving a driveway. Here is an extract of a test plan for the model:

Number Description Type Input Value Expected Result


1 Area calculation Valid Input Screen: Area on Invoice = 84
Length = 12, Width = 7
2 Customer Name Valid Input Screen: Invoice customer name = ‘Mr. Marzi’
on Invoice Customer Name = ‘Mr. Marzi’
3 Length Invalid Input Screen: Error Message = ‘Only use real
validation Length = ‘twelve’ numbers (e.g. 12.3)’

4 View Invoice Button Input Screen: Invoice displays in print preview


Button Click on ‘View Invoice Button’ mode with same data from input
screen

182

Copyright Material - Review Only - Not for Redistribution


9 Modelling

• goal-seek to find out what variables need to be


PRACTICAL ACTIVITY 9.07
changed to achieve a given outcome.
Open 9.03 Block Paving.xlsm Other advantages of spreadsheet models include the
1 Follow the test plan in Worked Example ability to share the spreadsheet with colleagues easily
9.02 and see if the actual results match the so that many people can experiment with the model,
expected results. and the fact that most organisations already own
spreadsheet software which reduces the need for training
2 Create another four entries for the test plan and purchase costs.
in Worked Example 9.02
Spreadsheets do have their limitations though. They are
3 Ask somebody else to follow your test plan only as accurate as the formulas and functions that are
entries exactly as they are written and see the rules that represent the real world. Unless extremely
if there is anything you could have put complex rules are used, then a spreadsheet model will
more clearly. never be an accurate representation. These complex
rules require mathematical and computer expertise in
Extension 1: add cell protection, additional order to set them up and it can take a very long time
form controls and conditional formatting to the to create models that are truly representative of the
spreadsheet. Extend your test plan to cover real world. Spreadsheets can only be used to simulate
these new features of the model. numbers, but cannot simulate the effect on objects.
Extension 2: open 9.04 Theme Park Queue
Model.xlsm and create a test plan to test the Questions
theme park queue model. You will need to spend
a bit of time understanding how the model works 1 Identify three characteristics of modelling software.
and how the graph and conditional formatting 2 Describe, using examples, how a spreadsheet
respond to input values. could be used to model the costs or savings to an
organisation of moving premises.

9.5 Evaluating the 9.6 Simulations


effectiveness of Advantages and disadvantages
spreadsheet models of using a model to create and
There is a variety of tools within a spreadsheet that can
be used to help with modelling:
run simulations
A simulation is the use of a computerised model
• variables that can be changed to ask what- to predict how a real-life system might behave. As
if questions with modelling, simulations can be used for training,
• formulas and functions which define the rules forecasting and construction.
of the model Advantages include:
• graphs and charts which can show a graphical • expensive prototypes or the real thing do not need
representation of the forecast to be created in order to experiment with different
• instant, automatic recalculation of formulas, variations and answer what-if questions
functions and graphs/charts to answer what-if • changes to the model can be made very quickly and
questions immediately the effect can be seen just as quickly
• conditional formatting to highlight the effects • alternative models and designs can be used to see
how they react differently

183

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• unusual events (for example, earthquakes) can be wind direction or wind speed and emotional reactions
tested without the need to wait for them to happen to being evacuated. However, planners can experiment
in real life with lots of what-if questions in order to plan for a
large variety of circumstances, which means that when
• equipment does not suffer from wear and tear or
a natural disaster does occur people can be better
damage when being tested or experimented with
equipped to deal with it.
• dangerous situations such as aeroplane equipment
failure can be simulated without putting Pilot training
people in danger
When it comes to large aircraft, it can cost thousands
• simulations can be ‘sped up’ so that effects can be of pounds just to take off, fly and land. This cannot be
analysed over a long period of time without having repeated too often as it will become too costly to train
to wait for that period of time to elapse. pilots. Flight simulators can help by removing the fuel
Disadvantages include: costs associated with flying. They can also remove the
danger that a trainee pilot might pose if they make a
• the way a simulation reacts is only as good as the mistake while in the air.
model it is based upon
Flight simulators not only include software, but very
• simulation software and equipment can be very specialised equipment which can cost hundreds of
expensive to purchase thousands of pounds. The equipment will be designed
• people need to be trained to use simulation to react in a similar way to a real aircraft, so that the
equipment and software pilot can feel the physical effects of any movements
that they make (including take off, landing, turbulence
• complex models take many years to develop, or even a crash landing) in a way that is as close to real
especially if they are designed to react like the life as possible. The software will include the rules of
real process the model that define how the aircraft should react in a
• it is impossible for a simulation to be a perfect variety of circumstances.
representation of the real-world process. Pilots can also practise landing and taking off at
airports they have not visited before, including some
of the most dangerous airports in the world such as
The use of simulation Toncontin Airport in Honduras. Simulations give pilots
the opportunity to respond to malfunctions such as an
Natural disaster planning engine failure, cabin pressure failure or landing gear
When planning for natural disasters, people need to failure. These would be far too dangerous to attempt in
know what the effects of a natural disaster might be. real life.
It is impossible to do this in real life without the actual
disaster happening and, as they are natural disasters, it
is impossible to force them to happen. If the planners
wait for the natural disaster to happen, then it is too
late to plan.
Simulations based on models of natural disasters such
as earthquakes, volcanic eruptions, hurricanes, bush fires
and tsunamis can be used to see what the effects might
be. Planners can experiment with different variables such
as wind speed and direction to see how quickly a fire
might spread, which will help them to plan evacuations
and firefighting.
As with all simulations, these rely upon the accuracy
of the model. There will be many things that the model
can’t predict completely, such as sudden changes in Figure 9.3: Toncontin Airport.

184

Copyright Material - Review Only - Not for Redistribution


9 Modelling

Car driving ‘What happens if I increase the temperature?’ and the


outcomes can be seen. It’s also possible to speed up the
Simulators can be used to help to learn to drive a car. In
simulation so that rather than waiting hours, days or
most countries, learner drivers start immediately on the
even years to see what the effects might be, results can be
road having never used any of a car’s controls before.
seen much more quickly.
They immediately have to deal with hazards such as
other cars, pedestrians, cyclists, potholes and dangerous Nuclear science requires a lot of computing power
junctions. In addition to this, other drivers on the road in order to simulate nuclear reactions. For example,
are held up because of the learner driver being slow reactors convert uranium and plutonium through
and hesitant. nuclear fission which involves millions of collisions
every microsecond. Even with supercomputers, nuclear
Simulations can enable a learner driver to become
scientists cannot represent all of these collisions in a
familiar with the controls of a car and dealing with
simulation.
hazards before taking a car onto the road for the first
time. A simulator is a safe environment and could
reduce insurance premiums for driving instructors. The PRACTICAL ACTIVITY 9.08
simulator could also be used when the learner driver
Look online for a nuclear power plant simulator.
needs to attempt manoeuvres such as turning in the road
An example can be found on the Dalton
or reversing around a corner for the first time, rather
Nuclear website.
than having to do this straight away on a real road. Even
after a learner driver has passed their test, they could
use simulators to learn how to drive on a motorway,
drive in icy conditions and how to handle a car if it gets Questions
out of control, such as in a skid.
3 Describe two advantages of using a simulator for
Simulations can also be used for racing drivers to pilot training.
experiment with different car setups to find the optimum
4 Describe one disadvantage of using a simulator for
configuration for a racing circuit, rather than risking
learning to drive.
crashing. Racing drivers would be able to take the car to
the limit knowing that the virtual crash will not result
in an injury. However, a simulation will never behave REFLECTION
exactly the same as the real car as the rules of the model
will never be perfect. Therefore it is still necessary to 1 Consider the implications of not being able
practise using a real racing car. to model the effectiveness of changing the
timing of traffic lights, but instead having to
try it out over a period of time.
Nuclear science research
Nuclear science is very dangerous. Even a small 2 Think about situations that would be too
accident could expose a person to radiation that could dangerous for a pilot to learn how to react to
cause serious disfigurement or death. It is therefore in a real aircraft but would be better suited
not possible to experiment with nuclear reactions to a flight simulator.
in the real world in the hope that something might 3 Discuss what other models and simulations
work. Simulations can be used to try out different are used in real life.
nuclear reactions by adjusting the coolant temperature,
changing the way the control rods are used and the rate
of reaction. What-if questions can be asked such as

185

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
The spreadsheet shows cars that are owned by a driving school. It calculates the fuel type of each car, the cost per
litre of each fuel type and the cost per gallon.

A B C D E F
1 Registration Make Model Fuel type Cost per litre Cost per gallon
2 BX56JWL Ford Mondeo Diesel $ 1.25 $ 5.69
3 BX56JWM Saab Saab 9-3 Petrol $ 1.17 $ 5.32
4 BX56JWN Land Rover Discovery Diesel $ 1.25 $ 5.69
5 BX56JWP Smart Smart Car LPG $ 0.85 $ 3.87
6 BX56JWR Ford Mondeo Petrol $ 1.17 $ 5.32
7 BX56JWS Saab Saab 9-3 Diesel $ 1.25 $ 5.69
8
9 Fuel type Cost per gallon
10 Diesel $ 5.69
11 Petrol $ 5.32
12 LPG $ 3.87

Figure 9.4: Driving school spreadsheet.

1 The spreadsheet model is going to be used to calculate the costs of using each car.
a Explain three advantages of using a spreadsheet to model the costs of using each car. [3]
b Explain one disadvantage of using a spreadsheet to model the costs of using each car. [1]
[Total 4]
The driving school is considering purchasing a simulator to help students to learn to drive.
2 a Explain why a simulator would be used for this purpose. [4]
b Explain the disadvantages of using a simulator for this purpose. [4]
[Total 8]
3 Evaluate the use of simulators for nuclear science research. [8]

SUMMARY CHECKLIST
I can use what-if analysis.
I can test a spreadsheet model.
I can describe the characteristics of modelling software.
I can explain the need for computer models.
I can evaluate the effectiveness of spreadsheet models.
I can explain how a model can be used to create and run simulations.

186

Copyright Material - Review Only - Not for Redistribution


Chapter 10

Database and
file concepts
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• assign a data type and an appropriate field size to a field
• understand the three relationships: one-to-one, one-to-many and many-to-many
• create and use relationships
• create and interpret an entity relationship diagram
• understand the difference between a flat file and a relational database and when one might be preferred
in certain situations
• create a relational database
• understand the function of key fields
• set primary, compound and foreign keys
• understand referential integrity and its importance
• use referential integrity

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
• validate and verify data entry
• perform searches
• use arithmetic operations and logical functions to perform calculations within a database
• sort data
• design and create an appropriate data entry form
• design and create a switchboard menu within a database
• import and export data
• understand the characteristics of data in unnormalised form, first, second and third normal forms
• understand the advantages and disadvantages of normalisation
• normalise a database to first, second and third normal form
• understand the components of a data dictionary
• create a data dictionary and select appropriate data types for a given set of data and a given situation
• identify different data types
• use static and dynamic parameters in a query and understand their use
• understand when static and dynamic parameters should be used in queries
• understand when simple, complex and nested queries should be used
• understand when summary queries, including cross-tab queries, should be used
• understand different file types and their uses
• understand what is meant by proprietary and open-source file formats and why open-source file
formats are needed
• understand why generic file formats are needed
• understand the use of indexed sequential access
• understand the use of direct file access
• understand the use of a hierarchical database management system
• understand the features of a management information system (MIS)
• understand how a MIS can be used by organisations.

188

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

BEFORE YOU START

• Do you understand the difference between data and information?


• Do you know what a database table is?
• Are you able to create a single database table with records and fields?

Each entity has categories of information. These


Introduction categories are known as attributes or fields. In Worked
Example 10.01, Customer ID, Contact Forename,
A database is a structured method for storing data in
Contact Surname and Street Address are all field/
sets of tables. Each table contains similar data about
attribute names.
people, places, objects or events. Data can be sorted
and filtered to respond to queries. Databases are One of the fields will be known as the primary key. The
used in applications such as inventory tracking and primary key contains a unique value for each record.
payroll management and can be used as source files for This means that each value can only exist once in that
mail merge. table so it is possible to uniquely identify each record
using the primary key. In Worked Example 10.01,
Customer ID is the primary key.
KEY WORDS
The software that is used to manage the database
database: a structured method of storing data is called a database management system (DBMS).
Sometimes, this is referred to as a relational database
table: a collection of related data, organised in management system (RDBMS) as it is managing a
rows and columns (for example, about people, database that includes relationships.
places, objects or events)

KEY WORDS
flat file: a database stored in a single table
10.1 Create a database record: a common word for entity

WORKED EXAMPLE 10.01 entity: a set of data about one thing (person,
place, object or event) or a table within a
Figure 10.1, from 10.01 Sales processing.mdb, database
contains data about customers (people):
attribute: a category of information
within an entity
field: a common word for attribute
primary key: a field that contains the unique
identifier for a record
Figure 10.1: Customer table. database management system: software used
to manage a database
relationship: the way in which two entities in two
Data that is stored in a single table is called a flat file. different tables are connected
Within a table are rows known as records. Each record
is an entity which is a set of data about one single thing
(person, place, object or event). An entity can also refer
to a table within a database. In Worked Example 10.01,
the data about Marc Wenger is a single record/entity.

189

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 10.01 CONTINUED


Open 10.01 Sales processing.mdb and then • Product Name and Quantity Per Unit are
open the table Product. alphanumeric (Short Text is the term used by
Microsoft Access) which means they can include
1 Identify four field names in the letters, numbers and symbols.
Product table.
• Units in Stock is a Number (numeric) which has
2 Identify the primary key in the Product table. been set as an integer because it only contains
whole numbers.
3 How many records are in the Product table?
• Unit Price is Currency (numeric) which has been
4 Identify two other tables within set as a decimal (real) because it can contain
the database. decimal values.
• Discontinued is Yes/No (Boolean) because it can
only contain Yes or No values.
Data types and field sizes The Order table has the following data types:
Each field in a table will have a data type assigned to it.
Data types include:
• text
• alphanumeric
• numeric (integer/decimal) Figure 10.3: Order data types.
• date/time
• Order Number is numeric but it is also set as an
• Boolean.
AutoNumber which means a numeric value will be
automatically assigned to it.
WORKED EXAMPLE 10.02 • Customer ID is numeric which has been set as
an integer. It also matches the data type of the
The Product table in 10.02 Sales processing 2.mdb
Customer ID in the Customer table which you can
has the following data types:
find within the database.
• Order Date is Date/Time and has been set as a date.
• Notes is alphanumeric but has been further defined
as Long Text which means that any amount of text
can be assigned to it.

Different database management systems use different


names for data types. If you are using Microsoft Access,
you will notice that text is used for alphanumeric data
and number is used for numeric data. Sometimes the
software will also use formatted data as a data type,
Figure 10.2: Product data types. such as currency. Currency is numeric (usually decimal)
and is just formatted by displaying a currency symbol
with the number.
Fields within a table will have field sizes applied to them.
This is because most fields are a fixed length. This means
that only a specified amount of data can be stored in
each field.

190

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Text and alphanumeric fields will have a length to


WORKED EXAMPLE 10.03
specify the maximum number of characters that can be
stored. For example, the Product Name in the Product a
table is limited to 40 characters. This avoids having lots
of wasted storage space where field space is not used if
the length is too long.
Numbers can also have a field size. This could be defined
as the number of digits or it could be defined as the
maximum numeric value.
Dates will always be the same field size as they will
always store the date is the same way, but they can be
b
formatted to be displayed differently.
Some text fields can be formatted to be a variable length
which means they can store as little or as much data as
possible. These are sometimes referred to as memo or
long text data types. These are useful for fields that will
contain notes or comments.
It is important to ensure that the field length is not too
long because this will waste storage space, but it is also Figure 10.4: Foreign key. a Order table; b Customer
important to ensure that the field length is long enough table.
to store the longest required data item.
In the Order table, the foreign key is Customer ID
which connects to the primary key Customer ID
PRACTICAL ACTIVITY 10.02
in the customer table. For Order Number 4, the
Open 10.01 Sales processing.mdb and explore Customer ID 3 is looked up in the Customer table to
the data types and field sizes used within find Damion Matkin.
the tables.

One-to-one
The three relationships A one-to-one relationship is when each record in one
Relationships within a database can be used to connect table only connects to one record in another table. Each
entities together. A foreign key is an attribute (field) in foreign key value will link to one primary key value and
one entity that connects to a primary key in another each primary key value will only be linked to by one
entity. This allows related data to be looked up foreign key value. The foreign key can exist on either
and found. side of the relationship.

KEY WORD
foreign key: a field in a table that refers to the
primary key in another table

191

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.04


a b

Figure 10.5: One-to-one relationship. a Sales Rep table; b Employee table.

The Sales Rep table stores details of the sales representatives within a business. This only contains basic
information about their name but their full employee details are stored in a separate table called Employee. Each
sales representative only has one employee record and each employee record can only refer to one sales rep record.

One-to-many
A one-to-many relationship is when each record in one a primary key in the one side of the relationship. This is
table can connect to many (zero or more) records in the most common type of relationship within relational
another table. A foreign key will exist within the table databases.
on the many side of the relationship and will connect to

WORKED EXAMPLE 10.05


The Category table stores data about the different categories of products being sold. Its primary key is Category ID.
The Product table stores data about the products. The Product table has a foreign key of Category ID. Each product
can only have one category. Each category can have many products. There is one Category to many Products.
a b

Figure 10.6: One-to-many. a Product table; b Category table.

Many-to-many
Many-to-many relationships are only conceptual. They table can connect to many records in another table but
are not used in relational databases because they are each record in the other table can also connect to many
converted into two sets of one-to-many relationships. records in the original table.
In a many-to-many relationship, each record in one

192

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

WORKED EXAMPLE 10.06


The Order table stores data about the orders that are placed including which products are being sold. It has a field
called Product IDs which lists the products being sold on each order. Each order can have many products. Each
product can exist on many orders. There are many Orders to many Products.

a b
Order Number Customer ID Order Date Product IDs Product ID Product Name Category ID
+ 1 2 28/05/2015 1, 8, 4, 3 + 1 Chai 1
+ 2 1 22/05/2015 1, 7 + 2 Chang 1
+ 3 5 06/05/2015 2, 5, 6 + 3 Aniseed Syrup 2
+ 4 3 05/04/2015 4 + 4 Chef Anton’s Cajun Seasoning 2
+ 5 7 06/05/2015 3, 8 + 5 Chef Anton’s Gumbo Mix 2
+ 6 Grandma’s Boysenberry Spread 2
+ 7 Uncle Bob’s Organic Dried Pears 7
+ 8 Northwoods Cranberry sauce 2
+ 9 Mishi Kobe Niku 6
+ 10 Ikura 8
+ 11 Queso Cabrales 4
+ 12 Queso Manchego La Pastora 4

Figure 10.7: Many-to-many. a Order table; b Product table.

The problem with the many-to-many relationship is • the table on the many side will have a foreign key
that it is not possible to store single data items within
• the data type and field size of the foreign key must
the foreign key. In the Order and Product example, the
match the primary key on the one side
Product ID field contains more than one Product ID per
Order and this causes a problem of non-atomic data, • only data items that exist in the primary key on the
breaking the rules of first normal form which you will one side can be used in the foreign key.
learn about later in this chapter.
PRACTICAL ACTIVITY 10.04
KEY WORDS Open 10.01 Sales processing.mdb and open
normal form: the extent to which a database has the relationships.
been normalised 1 Create a one-to-many relationship between
Supplier and Product.
2 Create a one-to-many relationship between
PRACTICAL ACTIVITY 10.03 Order and the Sales Rep that dealt with the
order. You will need a new foreign key in the
Open 10.01 Sales processing.mdb and examine
Order table.
the relationships. Identify the relationships that
currently exist. For example, the relationship
between Sales Rep and Employee is One Sales
Rep to One Employee. One-to-one
When creating a one-to-one relationship, there are also
some rules to follow:

Create and use relationships • at least one of the tables (table A) must have a
primary key
One-to-many • the other table (table B) must either have a primary
When creating a one-to-many relationship, there are key that is also a foreign key and will link to the
some rules to follow: primary key in table A or a foreign key field with
a unique index that will link to the primary key
• the table on the one side must have a primary key
in table A

193

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• the data type and field size of the foreign key in Type of Purpose
table B and primary key in table A must match ERD
• only data items that exist in the primary key in table Conceptual Used during the analysis stage of
A can be used in the foreign key in table B. the system lifecycle, a conceptual
ERD shows the relationship between
existing entities within a business and
KEY WORD
the attributes for each entity.
index: a list of keys or keywords which identify Logical This is an extension of the conceptual
a unique record and can be used to search and ERD that includes data types. These
sort records more quickly are for analysis purposes only and the
data types used in the physical ERD
may be different.

PRACTICAL ACTIVITY 10.05 Table 10.1: Types of entity relationship diagram.


Open 10.01 Sales processing.mdb and open
the relationships. In an ERD, each entity is represented by a rectangle.
Each relationship is represented by a line.
Create a one-to-one relationship between Sales
Rep and Employee. Employee ID should be used
as the foreign key in the Sales Rep table and it WORKED EXAMPLE 10.07
will need a unique index.
Sales Rep Employee
If you don’t have a unique index or a primary key as
the foreign key, then the database software is likely to Figure 10.8: One-to-one relationship.
assume you want to create a one-to-many relationship
instead of a one-to-one relationship. Figure 10.8 shows a one-to-one relationship between
a Sales Rep and an Employee. Each sales rep is related
to one employee and each employee can only be one
Create and interpret an entity sales rep.

relationship diagram Category Product


An entity relationship diagram (ERD) shows the
relationships (connections) between each entity. Figure 10.9: One-to-many relationship.

KEY WORDS Figure 10.9 shows a one-to-many relationship between


Category and Product. Each category can have many
entity relationship diagram: a diagram that products, but each product has only one category.
represents the relationships between entities
Order Product
There are three types of entity relationship diagram:
Figure 10.10: Many-to-many relationship.
Type of Purpose
ERD Figure 10.10 shows a many-to-many relationship
between Order and Product. Each order can be for
Physical The structure of data that is or will be
many products and each product can exist on many
used within a relational database that
orders. This is used in a conceptual or logical ERD
meets both business and data needs.
only and should not be used for a physical ERD.

194

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.06


One One
(Optional) (Compulsory)
Describe each of the relationships in Figure 10.11.

VEHICLE TAX DISC

One Many
(Optional) (Compulsory)
HUSBAND WIFE

BOOKING HOTEL ROOM Many One


(Optional) (Compulsory)

CAR SERVICE Figure 10.13: Alternative symbols.

0:M or 0< can be used to depict between zero and many


BOOK AUTHOR related records and 1:M or |<can be used to depict that
at least one record must be used on the many side of the
relationship.
Figure 10.11: Relationships.
An ERD will usually have more than just two tables.
The ERD in Figure 10.14 shows the relationships that
exist within a bank.
Different RDBMSs and analysts use different symbols.
For example, Microsoft Access uses the infinity symbol Branches
for the many side of a relationship. Branch_ID
Address_ID
Bank_ID
Branch_Type_code
Branch_Details

Customers
Customer_ID
Address_ID
Branch_ID
Personal_Details
Contact_Details

Ref_Account_Types Accounts Transactions


Account_Type_Code Account_Number Transaction_ID
Account_Type_Description Account_Status_Code Account_Number
e.g. Checking, Savings etc.
Figure 10.12: Infinity symbol. Account_Type_Code Merchant_ID
Customer_ID Transaction_Type_Code
Current_Balance Transaction_Date_Time
Other_Details Transaction_Amount
Other RDBMSs may use two symbols at each end of Other_Details

the relationship. For example, 0:1 or 0| could be used to


depict that there can be between zero and one related Figure 10.14: Bank relationships.
record on that side of the relationship, whereas 1:1 or ||
could be used to depict that there must be exactly one Each branch of the bank can have many customers.
related record on that side of the relationship. Each customer can have many accounts. Each account
can have many transactions taking place. Each account
can be of only one type but each type of account can
exist as many accounts.

195

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.08


The Product table in 10.02 Sales processing 2.mdb has the following relationships that have been implemented:

Figure 10.15: ERD Implemented.

PRACTICAL ACTIVITY 10.07 When a many-to-many relationship exists, it is necessary


to break it down into two one-to-many relationships.
1 Draw ERDs to represent the following The general rule for this is to put a LINK table between
relationships: the two entities as shown in Figure 10.16.

a One Airline Seat to one Customer.


ENTITY A ENTITY B
Primary Key A Primary Key B
b One House to many Occupants. Attribute A1
Attribute A2
Attribute B1
Attribute B2

c Many Coaches to many Drivers.


ENTITY A LINK-A-B ENTITY B
2 Draw an ERD to represent a library model. Primary Key A
Attribute A1
Primary Key A-B
Foreign Key A
Primary Key B
Attribute B1
Within the library, there are several books. Attribute A2 Foreign Key B Attribute B2

There may be many copies of the same book


which are known as book copies. Customers Figure 10.16: Many-to-many.
can loan a book copy. A customer can have
many loans but a loan will be for just one A new primary key (Primary Key A-B) is created in the
customer. Each loan will be for one book LINK table. The primary keys for each of the original
copy but over a period of time each book entities are then used as foreign keys in the LINK table.
copy can be loaned out many times.

196

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

WORKED EXAMPLE 10.09


KITCHEN UNIT
KITCHEN PART KITCHEN UNIT
Part ID Unit ID
Description Description Unit ID Description Height
Cost Height
DR3-700 3 drawer unit 700
BU-700 Base unit 700
Figure 10.17: Kitchen.
LR-2000 Larder unit 2000
In this example, each kitchen unit can include many KITCHEN PART
kitchen parts. As each kitchen part can be used for
many kitchen units, a LINK table is required. Part ID Description Cost
HNG Hinge 0.30
KITCHEN KITCHEN KITCHEN HND Handle 1.45
PART ASSEMBLY UNIT
Part ID Assembly ID Unit ID SHL Shelf 4.50
Description Part ID Description
Cost Unit ID Height
Quantity KITCHEN ASSEMBLY

Assembly Unit ID Part ID Quantity


Figure 10.18: Kitchen resolved.
ID
1 DR3-700 HND 3
The LINK table kitchen assembly is for each
combination of unit and part. It has its own primary 2 BU-700 HND 1
key, but the primary keys from kitchen unit and 2 BU-700 HNG 2
kitchen part are also used as foreign keys. The quantity 2 BU-700 SHL 2
of each part needed for each unit is also stored. This
is what some of the data might look like: 3 LR-2000 HND 1
3 LR-2000 HNG 4

PRACTICAL ACTIVITY 10.08 The difference between a flat


Resolve the following many-to-many file and a relational database
relationships and suggest attribute names for all
A flat file is a database that consists of a single table
three tables:
with no relationships. It is like looking at all the data
• many Orders to many Products in a single worksheet in a spreadsheet. It is called ‘flat’
because it only has two dimensions – fields and records.
• many Hire Cars to many Drivers
• many Authors to many Books
• many Students to many Classes
• many Employees to many Skills
• many Doctors to many Patients.

197

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.10


This is an example of a simple flat file to store data about cars:

ID Registration Reg Year Transmission


1 BX03HMW 2013 M
2 BR54URS 2011 M
3 BA55WEP 2012 M
4 BC53PRS 2013 M
5 BD05ABC 2012 A
6 BE04RTJ 2011 M

WORKED EXAMPLE 10.11


The flat file below stores data about driving lessons, the cars used and the learners taking the lessons.
LESSON

Lesson Lesson Date Time Slot Registration Reg Transmission Forename Surname Telephone
ID Start Year
1 27/08/2013 08:00 BR54URS 2011 M Nadia Afzal 0555 555 556
2 28/08/2013 08:00 BD05ABC 2012 A Roger Drake 0555 555 557
3 31/08/2013 11:00 BD05ABC 2012 A Roger Drake 0555 555 557
4 31/05/2014 16:00 BC53PRS 2013 M Nadia Afzal 0555 555 556
5 01/06/2014 16:00 BR54URS 2011 M Nadia Afzal 0555 555 556
6 29/08/2013 19:00 BC53PRS 2013 M Sally Mastock 0555 555 555

The data about the car is repeated and the data about the learner driver taking lessons is also repeated. This example
only contains a small amount of redundant data, but imagine if data about the distance each car had travelled, or
the full address of the learner and their date of birth was stored.

In the flat file example about driving lessons, the data lesson is entered, all the details of the car and the learner
about cars was very similar to a table you would find have to be entered rather than just their primary keys.
in a relational database. However, with larger flat files This can lead to further inconsistent data and errors.
there is a problem when all the data is in one table,
Flat files do have their uses though. They are often
because there will be redundant data (that is, data that is
simple to set up as sometimes data can be entered into
unnecessarily repeated).
the file without needing to set up data types, field sizes
Redundant data uses up additional memory. It can also or relationships. They can be shared easily through
cause problems with inconsistency and maintaining email and across the internet because the data is not
the flat file. If, for example, Aimee Fenson changes her dependent upon specific file types or software. It is also
telephone number, then it will need to be changed for easy to add additional information to a flat file because
every lesson that Aimee has taken. If some are missed, it’s a simple case of adding new columns. As all the
then there will be inconsistent data, meaning that a data is in one single table, it is also very quick for the
search will not produce accurate results because Aimee computer to process the data.
has more than one phone number listed. When a new

198

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Relational databases are more useful when data needs Links are created between the tables which means data
to be managed properly. They resolve the problems of can be looked up from one table to another. This takes
inaccurate data, inconsistencies and redundant data by time and expertise to plan in order to ensure that it is
using related tables. all set up correctly. It also means that processing time
can be a bit slower, especially when there are large
Relational databases are used to reduce redundancy.
data sets. It is possible to share a relational database
Where data is likely to be repeated if stored in a single
across a network or even the internet and apply security
flat file then it is preferable to store this data in a set
permissions to each table so that different types of users
of related tables. For example, a relational database
can access different tables. This is not possible with a flat
about a library would include separate tables for books,
file as it is all in one table. Queries can be created that
borrowers and loans. Flat files are used when processing
enable data to be searched and sorted efficiently using a
speed is essential. Data is likely to have been stored in a
relational database and they can also join data together
relational database originally but exported to a flat file
from related tables. It’s also possible to produce detailed
for processing. Flat files would be used in transactional
and customised reports of the data stored within a
processing systems such as when processing monthly
relational database. Relational databases are also flexible
salary payments by updating the master payment file
because additional fields and tables can be added
from employee transactions such as hours worked and
without disturbing the rest of the data.
expenses claimed.

WORKED EXAMPLE 10.12


The flat file in Worked Example 10.11 could be stored in a relational database as a set of three tables:
LESSON
Lesson ID Lesson Date Time Slot Start Registration Learner ID
1 27/08/2013 08:00 BR54URS 10
2 28/08/2013 08:00 BD05ABC 11
3 31/08/2013 11:00 BD05ABC 11

CAR
ID Registration Make Model Reg Year Transmission
2 BR54URS Vauxhall Astra 2011 M
4 BC53PRS Mini Cooper 2013 M
5 BD05ABC Nissan Almera 2012 A

LEARNER
Learner Forename Surname Address 1 Address 2 Post Gender Telephone Mobile Licence Number
ID Code
9 Sally Mastock 15 Cloud Kingston- KI8 6GU F 0555 555 555 0777 777 MAST9999999SA9XX
Road Upon-Hull 777
10 Aimee Fenson 23 Yandle Shrewsbury KN3 7YY F 0555 555 556 0777 777 FENS9999999AI9XX
Lane 778
11 Roger Drake 19 Spion Liverpool L15 9PL M 0555 555 557 0777 777 DRAK9999999RA9XX
Kop 779

Table 10.2 further examines the types of searches and queries that can be applied to flat files and those that can be
applied to relational databases.

199

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

Flat file database Relational database


A search or query has to load the entire database in order A search or query only has to load the tables required. For
to find the data needed. For example, to find information example to find the same information, only the CAR table
about the car with registration BC53PRS, the database would need to be loaded.
would need to search for every occurrence in the whole
LESSON flat file.
A search or query will find all the data required in one file. A search or query would have to assimilate data from
For example, to find all lessons taken by Aimee Fenson, more than one table. For example, to find all the lessons
a filter could be applied to the Forename and Surname taken by Aimee Fenson, her Learner ID would need to be
columns. looked up in the LEARNER table and then the Learner ID
would need to be found in the LESSON table.
Running a query to find the number of vehicles with manual To run the same query would simply require filtering the
transmission would mean searching the whole file and CAR table to show only manual transmission and then a
then identifying unique occurrences of each car and then summary count of the number of records.
counting only those that are manual transmission.

Table 10.2: Types of searches and queries that can be applied to flat file databases and relational databases.

CSV is only one common format. Text files (TXT)


Import data can also be used. Text files can be formatted in exactly
Data can be imported from text files so that data that the same way as a CSV file or they can use different
has been created in another system or for another characters to separate fields. They can also be structured
purpose can be used within the database. The text to have fixed length fields, which means spaces are used
files must be structured in such a way that fields can to fill the gaps.
be recognised and records can be separated. Comma
separated values (CSV) is a common format used for WORKED EXAMPLE 10.14
this purpose. Fields are separated by commas, records
are separated by line breaks and speech marks are used This is a fixed length field text file for students.
to identify text. The use of a separation character means
that the field lengths are delimited, which means each 1 Smith Larry 9F
field can be any length. 2 Nyakatawa Paul 9B
3 Kalsi Waheed 10R
WORKED EXAMPLE 10.13 4 Woolfenden Howard 11M
5 Patel Poonam 9N
This is a CSV file for books. The first row contains the
field names.
“ID”,”Book title”,”Genre”,”Reading
age”,”ISBN”,”Author”
1,”A Soldier’s Tale”,”Thriller”,12,”0-321-93561-1”,”B
Rushmore”
2,”Hidden Gold”,”Mystery”,10,”0-342-92763-X”,”J
T King”
3,”Fearless”,”Action”,14,”0-250-34751-9”,”K
Lawrence”

200

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Examples of primary keys could include:


PRACTICAL ACTIVITY 10.09
• registration plate for a car
Create a new database and import the • student number for a student
following files: • product code for a product.
• 10.03 Book.xlsx (file includes row headings)
It is important that data within primary keys never
• 10.04 Student.xlsx. changes as it can be used within a relationship.
Therefore, some fields that may appear on the surface
to be suitable as a primary key may not be suitable in
Create a relational database the long run. For example, a registration plate for a car
can be changed in some countries. For this reason, it is
The first step in creating a database is to create the file always best to use separate ID fields as primary keys.
that will be used. Other steps can then include creating:
• tables • forms
WORKED EXAMPLE 10.15
• relationships • reports.
Table name Primary key
PRACTICAL ACTIVITY 10.10 Car CarID
Create a new database called 10.15 My library Student StudentID
that will be used to store information about Product ProductID
books in a school library.
1 Create a new database file. These ID fields should be used purely for the structure
2 Import the files: of the database. It is still possible to set another field
to be unique, but the primary key should be used for
a 10.03 Book.xlsx relationships. If possible, the primary key should be
b 10.05 Student.txt set to increment automatically (e.g. AutoNumber).
c 10.06 Copy.xlsx
d 10.07 Loan.xlsx.
3 Check the data types for each field in each Compound key
table and change if necessary.
Sometimes, none of the fields have a unique identifier.
4 Check the field lengths for each field in each
In this case a compound key is used. A compound
table and change if necessary (do not leave
key is two or more fields combined to form a unique
them as 256 characters in length).
identity. These can be complex to use, especially within
Save this file for use later in this chapter. relationships. Examples of the concept of compound
keys are shown in this section.

10.2 Keys KEY WORD


compound key: two or more fields that form
Primary key the primary key. Each field that comprises
A primary key is a unique identifier for each record in a the compound key are themselves keys from
table. Therefore, the field used for the primary key must another table.
contain unique values and not have any repeating values.

201

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.16 PRACTICAL ACTIVITY 10.11


Table 10.3 shows the products and quantities ordered 1 Create a table of appointments as shown in
for each order. If each order only includes each Table 10.4.
Product on one Order Line, then the combination of
Order Number and Product ID is unique. 2 Try to set the compound key to be a
combination of Doctor ID and Patient ID.
Order Number Product ID Quantity What went wrong and why did it happen?
1 1 1 3 a Set the compound key to be a combination
1 2 2 of Doctor ID, Patient ID and Date.
2 3 1 b Create a new appointment for Doctor ID
2 3 1 1 with Patient ID 2 on 12/2/20 at 14:00.
Was the new appointment accepted?
3 4 1
c Create a new appointment for Doctor ID 1
4 5 1
with Patient ID 2 on 2/9/20 at 14:00. What
4 6 1 went wrong and why did it happen?
5 5 1
5 6 2
Foreign key
Table 10.3: Order Line.
A foreign key is a field in a table that refers to the
primary key in another table. It is used to create the
relationship between the two tables. The foreign key
must always have the same data type and field size as
WORKED EXAMPLE 10.17 the primary key to which it is linking. The foreign key
must always be on the many side of the relationship. The
Table 10.4 shows appointments for a doctor. If Doctor foreign key will always link to a single primary key field.
ID and Patient ID were selected as the compound
key, then this would mean each patient could only see
each doctor once and so this combination would not WORKED EXAMPLE 10.18
be suitable. If Doctor ID, Patient ID and Date were
selected as the compound key then this would mean Customer ID in the Order table is a foreign key which
each patient could only see each doctor once each links to the Customer ID in the Customer table.
day. It may be acceptable to the doctor to see a patient Order
only once per day, but if the doctor needs to see the Order Number Customer ID Order Date
same patient more than once on the same day, then a 1 2 28/05/2015
2 1 22/05/2015
combination of all four fields including Time would be
3 5 06/05/2015
needed as the compound key. 4 3 05/04/2015
5 7 06/05/2015
Doctor ID Patient ID Date Time
Customer
1 1 5/11/20 12:00 Customer ID Contact Contact Surname
Forename
1 2 2/9/20 13:00 1 Reina Wolchesky
2 3 18/9/20 13:00 2 Marc Wanger
3 Damion Matkin
1 1 12/11/20 12:00 4 Lucius Winchester
5 Petra Mcnichol
2 3 18/9/20 17:30 6 Katina Ramano
7 Leslie Cackowski
Table 10.4: Appointments for a doctor. 8 Cristopher Wiget

Figure 10.19: Foreign key.

202

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.12 WORKED EXAMPLE 10.19

Open 10.15 My library.mdb that you In Figure 10.20, Customer ID 5 does not exist in the
created earlier. Customer table. This means that the Order table does
not contain referential integrity because the related
1 Assign primary keys to existing fields in customer does not exist.
each table.
Order
Each book has several copies. Each copy of
Order Number Customer ID Order Date
the book can be loaned out several times.
Each loan is for only one student and only 1 2 28/05/2015
one copy of a book. Each student can take 2 1 22/05/2015
out several loans. 3 5 06/05/2015

2 Create relationships between the tables. Customer


Customer ID Contact Contact Surname
Open 10.08 Driving school.mdb. Forename
1 Set the primary key for the Instructor table. 1 Reina Wolchesky
2 Marc Wanger
2 Create a new primary key for the Car table
(do not use Registration). Figure 10.20: No referential integrity.

3 Create a new primary key for the


Learner table.
Without referential integrity a relationship cannot be
4 Create a compound primary key for the properly set within a database. It is a type of lookup
Lesson table. You will need at least three validation where the database will check to see if the
fields for this. related record exists before allowing it to be entered. If
Each car can be used in several lessons. Each the related record does not exist, then the database will
student can have several lessons. Each instructor prevent the foreign key data from being entered.
can give several lessons. Each lesson will be for This is important for maintaining the accuracy of the
one student with one instructor in one car. data within the database. If details of which classes you
attend were entered into a database, but those classes
5 Create relationships between the tables.
did not exist, then the database would not be able to give
you any information about the classes.

Referential integrity
Referential integrity exists when data in the foreign key PRACTICAL ACTIVITY 10.13
of the table on the many side of a relationship exists Open 10.09 Sales processing 3.mdb
in the primary key of the table on the one side of a
relationship. 1 Open the order table and add Sales Rep IDs
4, 5, 8, 11 and 15 to the records.
a Which ones worked?
KEY WORDS
b Which ones did not work?
referential integrity: data in the foreign key of
the table on the many side of a relationship must c Why didn’t they work?
exist in the primary key of the table on the one
side of a relationship

203

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED PRACTICAL ACTIVITY 10.14

2 Try to create a relationship between Product Open 10.10 Sales processing validation.mdb
and Category and enforce referential integrity. and open the table Employee.
a What happens? 1 Create a validation rule that will only allow
b Why has this happened? the entry of “UK” or “USA” for the Country.

c Correct any data that is causing 2 Create an appropriate error message.


this problem and try to create the
relationship again.
There are a variety of validation rules that can be used
within a database including:
• lookup in list (by looking up in a list entered
Validate and verify data within the rule)
Validation rules • lookup in list (by using referential integrity)
The principle of validation was introduced in Chapter • lookup in list (by using a lookup table)
1. Database management systems can apply validation
rules to data that is input. If data passes the validation • range
rules, then they will be accepted. If data fail the • data type
validation rules, then they will be rejected and an error
message may be shown. • format
• length
WORKED EXAMPLE 10.20 • presence.

In this database, the user is attempting to enter the Table 10.5 gives some examples of validation rules.
title that a Sales Rep will be addressed by. They have
four valid options – “Mr”, “Mrs”, “Miss” or “Dr”. Type Field Rule
The user has accidentally entered “Msr” which is not Lookup Gender ”M” or “F”
a valid option. An error message has appeared telling in list
the user what to do to fix the problem. Lookup Title IN (“Mr”, “Mrs”,
in list “Miss”, “Dr”)
Range Date of Birth >DATE() (must be after
today’s date)
Range Date Joined > 28/02/1995
Range Reorder Between 1 and 2000
Figure 10.21: Error message. Amount

This is the rule that had been set up: Range Reorder Level >0
Data State Like “[A-Z][A-Z]” (must
Validation rule In('Mr', 'Mrs', 'Miss', 'Dr') Type be two text characters)
Validation text Title must be Mr, Mrs, Miss or Dr
Format Email Address Like “*@*.*” (* means
any character)
Figure 10.22: Validation rule.
Length Colour Like “??” (must be two
The rule ensures that the only data that can be entered characters)
must exist in the list that contains “Mr”, “Mrs”, Presence Forename IS NOT NULL
“Miss” and “Dr”. It is a lookup in list method of
validation. Table 10.5: Examples of validation rules.

204

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.15

Open 10.10 Sales processing validation.mdb and open the table Customer.
1 Create a validation rule to ensure the surname is present.
2 Create a validation rule to ensure that an email address includes the @ symbol and a full stop.
3 Create a validation rule to ensure the telephone number is 12 characters long.
Open the table Product.
4 Create a validation rule to ensure the Units in Stock is a positive number.
5 Create a validation rule to ensure the Reorder Amount is less than 1000.
6 Create a validation rule to ensure the Reorder Level is at least 0 and no more than 100.
Open the table Employee.
7 Create a validation rule to ensure the Hire Date is at least today.
8 Create a validation rule to ensure the region is two characters long and only contains letters.
9 Create a validation rule to ensure the extension is either three or four characters long and only
contains numbers.
10 Create a validation rule to ensure the Hire Date is after the Birth Date.

Validation applied to a database


You should follow the same process that you learned in Chapter 8 by using valid, invalid and extreme.

PRACTICAL ACTIVITY 10.16

Open 10.10 Sales processing validation.mdb and open the table Customer.
1 The State field has a validation rule applied to it.
a Try changing the state for Reina Wolchesky to NN. What happens? Why does this happen?
b Try changing the state for Reina Wolchesky to NM instead of MN. Why was this error allowed
to happen?
c Identify five items of test data that could be used to test this validation rule.
2 The ZIP Code field has validation applied to it.
a Try different combinations of data to see if you can work out what the validation rule is.
b Identify eight items of test data that could be used to test this validation rule. You should use valid,
invalid and extreme.

205

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Verify data entry


In Chapter 1 you learned that data that has been validated is not necessarily correct. It is therefore necessary to
verify data. When inputting data into a database, you should verify that the data input has been entered correctly by
comparing what has been entered with the original source.

PRACTICAL ACTIVITY 10.17

Open 10.10 Sales processing validation.mdb and open the table Customer.
1 Visually check that the data for Damion Matkin matches the original data below:

Contact Forename Contact Surname Street Address City County State


Damion Matkin 5830 Downing St Denver Denver CO

ZIP Code Telephone Email Marketing Notes


80216 303-295-4797 damion@matkin. com Yes

2 Add the following data to the customer table and then visually check the data matches the source:

Contact Forename Contact Surname Street Address City County State


Joel Nardo 5150 Town Cir Boca Raton Palm Beach FL

ZIP Code Telephone Email Marketing Notes


33486 561-395-2277 [email protected] Yes

Searches Simple queries


A simple query has only one criterion (singular for criteria).
So far you have looked at whole tables. It is also possible
A criterion is the rule that will be applied to the data.
to view only records which meet certain conditions
known as criteria. This can be achieved by creating a Table 10.6 shows examples of when you would use a
query which asks questions about the data in order to simple query for a particular outcome.
retrieve the required records.
When creating a simple query, it is also possible to
specify which fields will be listed.
KEY WORD
query: a question used to retrieve data from
a database

206

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Field Criterion Outcome


State =”CA” Lists all customers who live in CA (California)
Marketing True Lists all customers who have agreed to receive marketing
Mark 100 Lists all students who achieved 100 marks
Mark <50 Lists all students who achieved less than 50 marks
Price >3.99 Lists all products with a price more than 3.99 (i.e. 4.00 or above)
Distance covered >=50000 Lists all cars with a distance travelled of at least 50 000 kilometres
by car
Width <=50 Lists all products with a width up to and including 50 mm
Date of Joining < 01/01/2010 Lists all employees who joined the company before 1 January 2010
Appointment Time >= 12:00pm Lists all appointments in the afternoon
Surname Like “A*” Lists all customers with a surname starting with A
Product Code Like “??B??” Lists all product codes where the third character is B
Allergy NOT “Nut” Lists all students who do not have a nut allergy

Table 10.6: Query criterion and outcomes.

Wildcards can be used to replace one or more characters replaces one single character. For example, Like "?'*"
in a search to mean any value. Table 10.6 shows two would find anybody with an apostrophe as the second
examples of how wildcards can be used. The * symbol letter of their surname or Like "*-*" would find
replaces any number of characters. The ? symbol anybody who has a hyphen in their surname.

WORKED EXAMPLE 10.21


In 10.02 Sales processing 2.mdb a simple query has The criterion of Job Title = “Sales Representative”
been created to show all Sales Reps who have a Job Title means that only sales reps with that job title will be
of Sales Representative: listed. The only fields that will be listed are Last Name
and First Name. Job Title will not be listed because the
option to show it has been deselected. This is what the
result of the simple query looks like:

Figure 10.23: Sales Rep query. Figure 10.24: Sales Rep query result.

207

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

It is also possible to include data from a related table.


PRACTICAL ACTIVITY 10.18

Open 10.02 Sales processing 2.mdb, identify


WORKED EXAMPLE 10.22
which query is most suitable and then create
In 10.02 Sales processing 2.mdb a query has been queries for the following:
created to show all Products over $75 including their
categories: 1 All UK employees.
2 All employees from Seattle.
3 All employees who were born on or
after 1/1/1960.
4 All products that include the word “bottles”
in the quantity per unit.
5 All products with no units in stock.
6 The product name and supplier company
name of all products that have been
discontinued.
7 The names and categories of all products
with at least 100 units in stock.
8 The names and price of products that are in
the category “Condiments”.
9 A list of all orders that were not placed
on 6/5/15.
Figure 10.25: Product Category.
10 A list of all Sales Reps who do not have a job
The CategoryName has been included from the title of “Sales Representative”.
Category Table which is related to the Product Table
11 A list of all products where the Units in Stock
through the Category ID.
is less than or equal to the Reorder Level.

Complex queries
Complex queries are queries that have more than one
criterion. They use either the AND or OR Boolean
operators. If all specified criteria need to be satisfied,
then the AND operator is used. If any one of the
specified criteria needs to be satisfied, then the OR
operator is used.
Complex queries are not restricted to just two criteria.
They can have as many criteria as necessary for
the query.

208

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

WORKED EXAMPLE 10.23


The table below lists characteristics about some people.

Surname Forename Height Shoe Size Eyes Nationality Occupation Sex


Greer Wendy 1.85 7 Blue British Firefighter F
Percy Hugo 1.75 8 Blue French Welder M
Pearce Madison 1.85 8 Blue American Musician F
Gardiner Felicia 1.85 9 Blue South African Waitress F
Ivanova Sofia 1.65 8 Brown Russian Road sweeper F
Joo Haeun 1.35 9 Brown South Korean Firefighter F
Goswami Lamar 1.75 9 Brown Indian Shop Assistant M
Kaya Yusuf 1.95 10 Blue Turkish Teacher M
Danshov Aleksander 1.8 6 Hazel Russian Politician M
Mallapati Smriti 1.6 11 Hazel Indian Singer F
Martinez Maria 1.85 5 Green Argentinian Bus Driver F

The complex query Eyes = Blue AND Shoe Size = 8 would return the following:

Surname Forename Height Shoe Size Eyes Nationality Occupation Sex


Percy Hugo 1.75 8 Blue French Welder M
Pearce Madison 1.85 8 Blue American Musician F

As both parts of the query have to be satisfied, only people with both blue eyes and a shoe size of 8 will be listed.
The complex query Eyes = Hazel OR Eyes = Green would return the following:

Surname Forename Height Shoe Size Eyes Nationality Occupation Sex


Danshov Aleksander 1.8 6 Hazel Russian Politician M
Mallapati Smriti 1.6 11 Hazel Indian Singer F
Martinez Maria 1.85 5 Green Argentinian Bus Driver F

As any one part of the query can be satisfied, all people with either hazel or green eyes are listed.
The complex query Eyes = Brown OR Nationality = Russia would return the following:

Surname Forename Height Shoe Size Eyes Nationality Occupation Sex


Ivanova Sofia 1.65 8 Brown Russian Road sweeper F
Joo Haeun 1.35 9 Brown South Korean Firefighter F
Goswami Lamar 1.75 9 Brown Indian Shop Assistant M
Danshov Aleksander 1.8 6 Hazel Russian Politician M

Aleksander Danshov does not have brown eyes, but he is Russian and so is included in the list. Similarly, Haeun Joo
and Lamar Goswami are not Russian but because they have brown eyes they are included in the list.

209

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.24


The following nested query uses a combination of AND and OR and includes more than two criteria:
Sex = F AND (Eyes = Blue OR Eyes = Brown) AND Height > 1.5
These are the results of the nested query:

Surname Forename Height Shoe Size Eyes Nationality Occupation Sex


Greer Wendy 1.85 7 Blue British Firefighter F
Pearce Madison 1.85 8 Blue American Musician F
Gardiner Felicia 1.85 9 Blue South African Waitress F
Ivanova Sofia 1.65 8 Brown Russian Road sweeper F

PRACTICAL ACTIVITY 10.19

Open 10.02 Sales processing 2.mdb, identify which query is most suitable and then create queries for the
following:
1 All customers from Texas (TX) or Illinois (IL).
2 All customers who would like to receive marketing and live in Ohio (OH).
3 All products priced at least $50 with no units in stock, showing the Product Name and Supplier’s
Company Name.
4 All products over $30 supplied by companies in Germany.
5 All products under $30 supplied by companies in Denmark or Sweden.
6 A list of all products where the Units in Stock is less than or equal to the Reorder Level and the Units on
Order is zero.

Nested queries
So far, each query that you have seen has been based upon existing tables within a database. It is also possible to create
a query on an existing query. This means that the results of the original query will be narrowed down further by the
new query. This is called a nested query.

210

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

WORKED EXAMPLE 10.25


In 10.02 Sales processing 2.mdb a query has been created to show all customers who live in California (CA). A
nested query is then created on top of the California Query to find customers in the California Query who placed an
order on 6/5/15:

Figure 10.26: Nested query.

The new query is based upon the California query and the Order table.

A nested query is effectively a query that has multiple


criteria and is equivalent to using AND. However, they
Queries to find duplicate
can be used to make very complex queries easier to
follow and set up by breaking down the individual steps
records
required to create the query. There are also occasions There may be occasions when duplicate records are
when a nested query is necessary to achieve the desired accidentally created within a table. It is possible to run a
results, such as creating a cross-tab query based on two query to find those duplicate records. One method is to
or more tables. use Structured Query Language (SQL) or some software
packages include a wizard to create a query to find the
duplicate records.
PRACTICAL ACTIVITY 10.20

Open 10.02 Sales processing 2.mdb, identify


which query is most suitable and then create a
query based on the existing query “Qry Products
over $75” that will show those products in the
Meat/Poultry category.

211

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.26 Summary queries


A cross-tab query is a type of summary query used to
Open 10.11 Duplicate Records.mdb and open the summarise data. It can be used to show the total number
table called People. of records, the sum of values within a field, averages or
This table contains duplicate entries for Marlene other statistical data.
Atack and Wendy Greer:
WORKED EXAMPLE 10.27

10.12 People.mdb contains a cross-tab query that


shows the total number of people of each nationality.
It also breaks this down into how many males and
females there are in each nationality.

Figure 10.27: Duplicate records.

A find duplicate queries wizard can be used to create a


query to find the duplicate records:

Figure 10.29: Cross-tab query.


Figure 10.28: Finding duplicate records.
In order to set this up, it is necessary to identify which
The query above has been called “Find duplicates for fields will be used as row headings, which fields will be
People”. used as column headings and which field the summary
of data will be used:

Once the duplicate records are known, they can be Nationality Sex1 Sex2 Sex3
found in the original table and deleted. It is also possible Nationality 1 Count (Surname)
to use Structured Query Language (SQL) to create a Nationality 2
query to find and remove duplicates automatically.
Nationality 3
Nationality 4

Figure 10.30: Cross-tab wizard.

212

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

CONTINUED PRACTICAL ACTIVITY 10.21


This can also be seen in the configuration settings Open 10.12 People.mdb and create cross-tab
where the data is grouped by nationality and sex as queries to show:
row and column headings and the surname is counted:
1 The number of people of each gender with
eyes of each colour.
2 The number of people of each occupation
(no need to have a column grouping).
3 The number of people of each gender with
each shoe size.
Open 10.02 Sales processing 2.mdb and create
cross-tab queries to show:
1 The number of suppliers in each country.
2 The number of customers in each state.
3 The number of products in each category
(the category names must be showing
so you will need to join the Product and
Category tables first).

Figure 10.31: Cross-tab configuration. 4 The total price of each product in


each category.
You will notice that a new calculated field of “Total
of Surname” has been added that counts the total
number of people. This is not essential unless the Using simple, complex, nested and
overall totals are required. summary queries
Simple queries should be used when only one criterion is
required, such as Gender = Male.
To create a cross-tab query based on data from more
than one table, you should use a nested query by first Complex queries should be used when more than one
creating a query that joins the tables together and then criteria are required, such as Gender = Male AND Country
creating the cross-tab query based on the original query. = Israel, or Gender = Male OR Country = Israel.
A nested query can be used in the following situations:
• When an OR needs to be combined with an AND
as this will avoid the problem of having to repeat
the AND part of the query for each OR. It will also
avoid the problem of not getting the criteria in the
correct order.
• When there are lots of criteria and nesting the
queries will make the criteria easier to understand.
• When a query can be reused and so creating a
nested query saves the developer having to recreate
some of the criteria.

213

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

A summary query can be used in the following


WORKED EXAMPLE 10.29
situations:
• when multiple tables are required within a In 10.02 Sales processing 2.mdb, a query has been
cross-tab query created to show all customers in the state that will be
chosen by the user:
• when a cross-tab query is summarising data from
another cross-tab query.

Static parameters
So far all the queries you have used include static
parameters. The parameters are the values used within
the criteria. Each time the query is run, the values of the
parameters will not change.

KEY WORD
parameter: data used within the criteria
for a query
Figure 10.32: Dynamic query.

The criterion of [Please enter state] will be a prompt to


WORKED EXAMPLE 10.28 the user to enter the state. This is what the prompt looks
like when the query is run:
The query for all customers from Texas (TX) or
Illinois (IL) had static parameters of TX and IL.
These values do not change.

Dynamic parameters
Dynamic parameters allow the values within the criteria
to be chosen at the time of running the query. This
can be useful when the user needs to decide what those
parameters might be. Figure 10.33: Parameter.

If the user enters AZ then all the customers in Arizona


will be listed:

Figure 10.34: Arizona.

Dynamic parameters can be used with ranges (<, >,


<=, >=) and Boolean operators (NOT, AND, OR).
They can also be used alongside static parameters within
a complex query.

214

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.22 WORKED EXAMPLE 10.30

Open 10.02 Sales processing 2.mdb and create In the Order Form from 10.02 Sales processing
queries for the following (identifying whether to 2.mdb, the Total Price for each order line has been
use static or dynamic parameters): calculated by multiplying the Quantity by the Unit
Price. The Order Total has been calculated by adding
1 All sales reps with a Title of the up all the Quantities multiplied by their corresponding
user’s choosing. Unit Prices.
2 All products with a price below the The calculation for Total Price is
user’s choosing. = [Quantity] * [Unit Price]
3 All products with a reorder amount above The calculation for Order Total is
the user’s choosing. = SUM ([Quantity] * [Unit Price])

4 All products with more than 100 units in


stock that have a unit price below the
user’s choosing.
5 All products with a category of the user’s
choosing that are also above a price of the
user’s choosing.

Analysing and evaluating when static


and dynamic parameters should be used
in queries
Static parameter values should be used when those
parameter values will not change, no matter how many
times the query is used. For example, if you wanted to
search a table on a regular basis for all customers based
in China, then you would use a static parameter query
with the criterion of Country = “China”. Dynamic
parameters should be used when the user is likely to
want to change the value each time the query is run. For
example, if you wanted a query that would enable you
to search for a specific product code, but that product
code could be different each time, then you would use Figure 10.35: Order Form.
a dynamic query with the criterion of Product Code =
[Please enter product code].
In some database management systems, such as
Perform calculations within Microsoft Access, calculated fields such as Total Price
cannot be used in a SUM function. Therefore, the
a database SUM has to use the full calculation rather than simply
referring to =SUM([Total Price]).
Within a database, calculations can be performed
on fields. This can be done within forms, reports
and queries. Within a form, a text box can be added
to the form which includes the calculation. As with
spreadsheets, the calculation must start with the
equals (=) sign.

215

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Calculations within reports are carried out in the same way as within forms. Within a query, the calculation needs to
be defined by giving it a name and then identifying what the calculation will be.

WORKED EXAMPLE 10.31

In 10.02 Sales processing 2.mdb, a query has been created to calculate how many products are left to sell before
more need to be reordered:

Figure 10.36: Query calculation.

The calculation subtracts the Units in Stock from the Reorder Level. In order to remove any products that are
already below their Reorder Level, a criterion has been added that the total must be greater than zero. Here is an
extract of the result of the query:

Product Name Units In Stock Reorder Level Sell before Reorder


Chang 17 25 8
Aniseed Syrup 13 25 12
Queso Cabrales 22 30 8
Sir Rodney’s Scones 3 5 2

PRACTICAL ACTIVITY 10.23

Open 10.02 Sales processing 2.mdb and create a query to calculate the new Units In Stock when the Units
On Order are added to the current Units In Stock.

216

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Sort data Data entry forms


Ascending/descending As its name suggests, a data entry form is used for the
entry of data. It can also be used to view existing data.
Data can be sorted in ascending or descending order.
This can be done within a table, within a query or When designing a data entry form, you should consider
within a report. The order can be based on numbers, who will be using it and how to make the form effective
alphabetical characters, dates or times. and user friendly by using some of the following
techniques.
Grouped
More than one field can be used to create the sort. This Appropriate font styles and sizes
is commonly used when sorting names into order. The Fonts should be plain and easy to read. A consistent
surname would be set as the first sort order and then font style should be used throughout so the user does
if there are any people with the same surname, the not have to adjust to viewing different font styles.
forename would be set as the second sort order. The colour of fonts should either be dark on a light
background or light on a dark background so that
the user can read the fonts clearly. The size should be
WORKED EXAMPLE 10.32 big enough for the user to read but not so big that all
the data does not fit on the screen. Titles and subtitles
The data below is sorted in order of colour of eyes and
should be in larger fonts.
then within each colour, it is sorted by height:

Surname Forename Eyes Height Spacing between fields


Percy Hugo Blue 1.75 There should be enough space for the user to be able to
Hughes Carl Blue 1.8 distinguish between the data within each field. If you
look at Figure 10.37, you will see that the fields on the
Gardiner Felicia Blue 1.85 left are separated by providing space between them and
Greer Wendy Blue 1.85 each field has a box around it to separate it from other
Young Rose Blue 1.9 fields. On the right you will see that there is sufficient
horizontal space between each field to know which field
Cox Arnold Blue 1.9 belongs to which title.
Inan Menekse Blue 1.9
Hansen Mathias Blue 1.95
Xu Huan Brown 1.35
Li Fen Brown 1.64
Petrova Alisa Brown 1.7
Truong Dinh Brown 1.85
Saltings Damien Brown 1.85
Fontana Giuseppe Brown 1.95
Himura Yuki Green 1.75
Martinez Maria Green 1.85
Brown Joseph Green 1.9
Danshov Aleksander Hazel 1.8
Banton Cedric Hazel 1.85
Hammer Daniel Hazel 1.9

217

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.33


The form from 10.13 Outlet monitoring.mdb is used for monitoring inspections carried out at retail outlets
within a shopping centre.

Figure 10.37: Good data entry form.

Figure 10.38 shows an example of a badly designed input form with poor data flows.

Figure 10.38: A badly designed input.

Character spacing of individual fields Use of white space


There should be enough space between each character White space can be used to separate data and also
within the data for each field to enable the data to be to make sure a screen does not look too cluttered. In
viewed. If there is too much spacing then the user will Figure 10.38, you will see that there is white space used
struggle to read the data because it is spread out too between the left and right hand sides, between field
much. If there is too little spacing then characters will names and the data and between buttons. Having white
overlap. If single words have been used for field names space between controls such as buttons means that the
(e.g. Outlet Code), then when using field names on the user is less likely to select the wrong button by having
form, the labels for the fields should include appropriate the pointer slightly in the wrong position.
spacing (e.g. Outlet Code).

218

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Navigation buttons Drop-down menus


Navigation buttons allow the user to browse through Drop-down menus allow the user to select from a set of
records by choosing the next record, previous record, options. They are used instead of radio buttons when
first record in a file or last record in a file. space is limited. In Figure 10.37 you can see that each
inspection can be selected from a drop-down menu.
Radio buttons This means that the user is only able to select from
the list so will not make any spelling mistakes or enter
Radio (option) buttons allow a user to select one an inspection that does not exist. This also helps to
mutually exclusive option. maintain referential integrity.

Check boxes Highlighting key fields


Check (tick) boxes can be used to select an item. It can If the key field is useful to the user, then it may be
be true (ticked) or false (not ticked). Check boxes are appropriate to highlight it. Figure 10.37 shows the
used for Boolean data types. In Figure 10.37, a tick box Outlet Code in bold. However, if the key field is only
has been used for whether or not a renewal was sent used for the database structure, then it may not even
to the outlet and tick boxes have been used to identify be displayed. In Figure 10.37, there are no key fields
whether each inspection was passed or not. displayed for the inspections or agencies.

WORKED EXAMPLE 10.34 Subforms


When printing a document, print options may be A subform shows data from related tables. The main
available regarding how much of the document to data entry form will include data from the one side of a
print, such as all of the document, a range of pages or relationship and the subform can include data from the
selected records (or pages). many side of a relationship.

Print Range
All WORKED EXAMPLE 10.35
Pages From: To:
The file 10.13 Outlet monitoring.mdb includes
Selected Record(s) a form called “OutletInspectionDataEntryScreen”,
shown in Figure 10.38. This form includes a subform
Figure 10.39: Radio buttons. showing the inspections that have taken place at each
outlet. There are many inspections to one outlet.
Only one of the radio (option) buttons can be chosen
at a time.

219

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 10.24

1 a Evaluate the data entry form from 10.14 Library.mdb.

Figure 10.40: Bad data entry form.

b Using the same database, create a data entry form for students.
c Using the same database, create a data entry form for books without the sub-form.
2 Using 10.13 Outlet monitoring.mdb, recreate the data entry form named
“OutletInspectionDataEntryScreen”. You will need to use data from all three tables.
3 a Using 10.08 Driving School.mdb, create a data entry form for lessons which shows all the details of
each lesson. You should:
• use an appropriate title
• group information appropriately
• use drop down menus to select the instructor, learner and car
• create navigation buttons.
b Create a data entry form for learners which includes a subform showing the date and time of any
lessons they have. You should:
• use an appropriate title
• create navigation buttons
• use radio buttons to select a learner’s gender.
c Extend the subform to show the name of the instructor and the make and model of the vehicle that
will be used for each lesson.
4 Using 10.14 Library.mdb, create a data entry form for students that includes a subform to show which
books they have on loan. Your subform will need to include the tables Loan, Copy and Book. The Copy
table shows each copy of each book as there are multiple copies of some of the books. You should:
• use an appropriate title for the form and subtitle for the subform
• use a drop-down menu to select the copy of the book that is on loan
• create navigation buttons on the main form
• ensure all the necessary data on the subform is showing and any unnecessary data is deleted.

220

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Reports number of records, an average value and a total value.


Unlike a query, a report can be grouped to show records
Reports show data from a table or query in a structured in groups, such as grouping books by their genre.
format. Reports should always include a title and the Summary data can be shown for each group as well as
data for each field will be displayed in columns. for the report as a whole.
Like a query, a report can be sorted into any order. A
report can also include summary data, such as the total

WORKED EXAMPLE 10.36

10.08 Driving School.mdb includes a report showing all the instructors for a driving school.

Figure 10.41: Report showing instructors at a driving school.

It has been grouped by Job Title so the Instructors are shown first followed by the Senior Instructors. It has also
been filtered to only show instructors who are willing to work weekends. Within each group, the data is sorted by
surname and the total number of instructors in each group are shown along with the average charge for the group.
The total number of instructors willing to work weekends is also shown together with their average charge.

221

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

Figure 10.42: Report design.

Figure 10.42 shows how the report has been set up. The report header is the heading that appears at the top of
the report. Page headers and footers can appear at the bottom of multi-page reports. The detail shows the data
that will be listed. The Job Title header is the heading used for each group in this report. Data in the Job Title
Footer appears at the bottom of each group in this report and shows the summary data. The report footer includes
summary data for the whole report.

Reports are used to show the output of data either on screen or in a printed format. Therefore, they do not include
form controls, such as drop-down menus, navigation buttons, radio buttons or check boxes.

PRACTICAL ACTIVITY 10.25

1 a Using 10.12 People.mdb, create a report to show all people in alphabetical order of surname.
b Create a query that shows all people from Italy. Create a report based on this query.
c Create a report to show all the people grouped by their nationality. For each group, show the
average height.
2 a Using 10.14 Library.mdb, create a report to show all of the books grouped by Genre.
b Create a report to show all the books that have been loaned grouped by each student. You will
need to include the following fields from multiple tables:
• Student.Surname • Loan.Return date
• Student.Forename • Copy.Copy
• Student.Class • Book.Booktitle
• Loan.Loan date

222

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Switchboards/menus
A menu can be used to help users navigate between to create the menu with links to forms, reports, macros
elements of a database including forms, reports and exiting the application. It creates a form which
and action queries. A menu should include a title, acts as the switchboard and a table which contains the
clear instructions and buttons for each element. A switchboard data such as actions to take and objects to
switchboard is a Microsoft Access term used for creating open. It is possible to have multiple switchboards so a
a menu automatically. A switchboard manager is used menu could have sub-menus.

WORKED EXAMPLE 10.37


10.02 Sales Processing 2.mdb includes a switchboard.
The switchboard manager was used to add items to the menu. This example shows the “Open Order Form” button
being added to the switchboard:

Figure 10.43: Switchboard Manager.

223

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
The switchboard items were automatically stored in a table:

Figure 10.44: Switchboard Table.

The form was created automatically:

Figure 10.45: Switchboard Form.

Export data Query


In the same way that data can be imported from common Data from queries can be exported in the same way as
formats, it can also be exported to common formats. This tables, but only the data that meets the criteria of the
allows data to be used by other users who either do not query will be exported.
have DBMS software or do not know how to use it. It can
also be used to transfer data to other systems. Report
Reports include formatting, so the best method of
Table export is to a RTF file which will include all the original
Data in tables can be exported as a delimited file in CSV formatting. Data that is exported from a report to a text
format, as fixed length fields in text format or as a table file will lose its formatting.
within a RTF file. It is sensible to save the field names
when saving to CSV or text files.

224

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Attribute 1
PRACTICAL ACTIVITY 10.26
Attribute 2
Open 10.01 Sales processing.mdb and export
the following: TABLENAME (Primary Key, Attribute 1, Attribute 2)
1 The Customer table in CSV format. Table names will be in capitals, primary keys will be
2 The UK Sales Reps query in fixed length underlined and all attributes will be listed below the
fields text format. table name or within brackets.
3 The Categories of Products report in
RTF format.
Normal forms
Unnormalised form
Questions Data in unnormalised form (UNF) is a flat file. It will
contain non-atomic data, repeating groups of data and
1 Define the term primary key. possibly redundant data. Non-atomic data is where a
2 Describe the difference between a simple query and field contains more than one item of data.
a complex query.
Repeating groups of data is when fields are repeated for
3 Give an example of when a dynamic parameter each record or a record appears to have more than one
query might be used. set of data for a group of fields.
4 Identify the decisions involved in exporting data
from a table. Redundant data exists when data is repeated
unnecessarily. This can be spotted when data can be
5 Explain the importance of referential integrity. identified by knowing it is dependent upon another field.

WORKED EXAMPLE 10.38


10.3 Normalisation to This table contains non-atomic data:
third normal form Product ID Description Price
327BLF Brown, Leather, Female
Introduction to normalisation 3510
327BPM Brown, Plastic, Male
Normalisation is the process of structuring data within a 2540
database. The process starts with a flat file and finishes with 327CLF Cream, Leather, Female
a set of related tables. It is a formal method of ensuring 3510
that each table is structured correctly and does not contain
The colour, material and gender are three separate items
redundant data. There are stages throughout the process
of data within the description. This causes a problem
known as normal forms. Each normal form measures the
when trying to sort data by a specific characteristic,
extent to which the data has been normalised.
such as colour, or when trying to search by a specific
characteristic. (Note: is the symbol for rupees.)
KEY WORD
normalisation: process of structuring data in First normal form
a database
Data in first normal form (1NF) must satisfy the
following criteria:
When describing tables, the following conventions • all fields must contain atomic data
will be used:
• there must be no repeating groups of data
TABLENAME
• there must be a unique key.
Primary Key

225

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 10.39


This table contains fields that are repeated for each record:

Surname Forename Subject 1 Subject 2 Subject 3 Subject 4


Jones Ifor Welsh English History
Rushton Ken Politics Literature Philosophy Physics
Smallwood Steven Maths Physics German

The Subject field has been repeated. This can be a problem when trying to search for all students studying the same
subject or when a student only studies one subject (leaving several blank) or when a student needs to study a fifth subject.
This table contains more than one set of data for a group of fields:

Surname Forename Book Date Out Date Due


Jones Ifor Everything in Colour 12/5/19 12/6/19
Guardian 12/5/19 12/6/19
Rushton Ken Saving Grace 14/5/19 14/6/19
Smallwood Steven Delirious 26/11/19 3/1/20
Stretch Out 5/1/20 5/2/20
Always Faithful 5/1/20 5/2/20

Some students are borrowing more than one book and so the fields Book, Date Out and Date Due contain more than
one set of data per record. This could also be classed as non-atomic data as there is more than one data item per field.

WORKED EXAMPLE 10.40 PRACTICAL ACTIVITY 10.27

The table below contains redundant data: Describe the characteristics of data in 0NF using
examples from the table of driving lessons:
Order Order Product Quantity Price
ID Date Learner Lesson Instructor Instructor Price
3857 12/9/19 Marzipan 1 $1.50 Date ID
Flour 2 $0.75 Rob 30/5/16 4 Marcus $35
Brown
2320 15/10/19 Marzipan 3 $1.50
Pocock 6/6/16 4 Marcus $35
Sugar 1 $0.83 Brown
Eggs 6 $0.15 Graham 31/5/16 3 Mike Joyce $30
The price is dependent upon the product and therefore Alkins 1/6/16 4 Marcus $35
it is being repeated unnecessarily. If we know the Brown
product, we know the price.

226

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

WORKED EXAMPLE 10.41


The ORDER table below contains details of products The ORDER table becomes:
ordered by customers:
ORDER (Order Number, Order Date, Customer ID,
ORDER Customer Forename, Customer Surname, Customer
Order Date Address 1, Customer Address 2, Customer Address 3,
Customer ZIP Code)
Customer ID
Customer Name A new table for the order of products needs to be added,
but it needs to retain information about which order
Customer Address
each order of products belongs to:
Product Code
ORDERLINE (Order Number, Product Code,
Description
Description, Quantity, Price)
Quantity
Order Number is retained in the ORDERLINE table as
Price
a foreign key. However, it is not unique and so cannot
Indented fields are a repeating group for each order. be used as the primary key. However, a combination of
To be in 1NF, this table needs: Order Number and Product Code are unique and so
• a unique key (Order Number) these become a compound key.
• atomic data (Customer Name and Customer
Address need breaking down)
• no repeating groups of data (products being ordered).

PRACTICAL ACTIVITY 10.28 WORKED EXAMPLE 10.42

Normalise the table of driving lessons below to The orders database from the previous example now
1NF: LESSON (Learner, Lesson Date, Instructor contains two tables:
ID, Instructor, Price) ORDER (Order Number, Order Date, Customer ID,
Customer Forename, Customer Surname, Customer
Learner Lesson Instructor Instructor Price
Address 1, Customer Address 2, Customer Address 3,
Date ID
Customer ZIP Code)
Rob 30/5/16 4 Marcus Brown $35
Pocock 6/6/16 4 Marcus Brown $35
ORDERLINE (Order Number, Product Code,
Description, Quantity, Price)
Graham 31/5/16 3 Mike Joyce $30
Alkins 1/6/16 4 Marcus Brown $35 Only the ORDERLINE table contains partial keys.
Description and Price are dependent on Product Code
which is part of the compound primary key. Therefore,
a new table needs to be created for products:
Second normal form
Data in second normal form (2NF) must have no partial PRODUCT (Product Code, Description, Price)
key dependencies. This means that no non-key fields can The information stored in the ORDERLINE table
be dependent upon part of a primary key. This therefore that is not part of the PRODUCT table needs to be
only applies to tables with compound keys because retained:
they are the only tables that can have partial keys.
ORDERLINE (Order Number, Product Code,
Dependencies exist when the data is known because of
Quantity)
its direct relationship to another field.
The Product Code field is retained in the
When identifying partial key dependencies, there
ORDERLINE table as a foreign key because it is still
will be fields that are dependent on just one part of
necessary to know which products were ordered.
the compound key. These fields and that part of the
compound key will form a new table.

227

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 10.29

Normalise the table of ingredients below to 2NF: RECIPE-INGREDIENT (Recipe ID, Ingredient ID, Ingredient
Name, Measure, Quantity)

Recipe ID Ingredient ID Ingredient Name Measure Quantity


1 B Flour Grams 200
1 D Eggs Eggs 2
1 K Water Table-spoons 2
2 C Milk Millilitres 250
2 B Flour Grams 100

Third normal form


Data in third normal form 3NF must have no non- primary keys can be ignored. All other fields should
key dependencies. This means that there should be no be examined to see if they are dependent on any other
fields that are dependent upon another field that is not non-key field.
a primary key. Therefore primary keys and compound

WORKED EXAMPLE 10.43


The orders database from the previous example now contains three tables:
ORDER (Order Number, Order Date, Customer ID, Customer Forename, Customer Surname, Customer Address
1, Customer Address 2, Customer Address 3, Customer ZIP Code)
PRODUCT (Product Code, Description, Price)
ORDERLINE (Order Number, Product Code, Quantity)
In the ORDER table, all the customer data is dependent on the Customer ID which is a non-key field. A new table
needs to be created called CUSTOMER:
CUSTOMER (Customer ID, Forename, Surname, Address 1, Address 2, Address 3, ZIP Code)
The ORDER table now becomes:
ORDER (Order Number, Order Date, Customer ID)
Customer ID is retained in the ORDER table as a foreign key so it is still known which customer placed the order.

PRACTICAL ACTIVITY 10.30

Normalise the table of students below to 3NF: STUDENT (Student ID, Forename, Surname, Class, Teacher
Title, Teacher Surname)

Student ID Forename Surname Class Teacher Title Teacher Surname


1 Hayley Barrow 3 Mrs Stokes
2 Harriet Chew 1 Miss Spicer
3 Jessica Lang 3 Mrs Stokes

228

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.31

This PROJECT table contains details of the employees working on projects for clients. It is currently in 0NF.
Normalise the data to 3NF.
PROJECT Company
Description Contact Name
Start Date Employee ID
End Date Employee Name
Client ID Employee Hours
Here is an example of the data:

Description Start End Date Client Company Contact Employee Employee Employee
Date ID Name ID Name Hours
Barton 28/2/15 31/12/16 512 Barton Jerry PK32 Fred Havers 1052
Towers Estates Dean JH45 Janice Spring 575
Haywoo 31/3/15 15/6/15 987 Haywood Peter JH45 Janice Spring 153
Manor Estates Gates YR27 Mike Rawson 372

and it is easy to add new tables without affecting existing


Advantages and disadvantages tables. Having smaller tables also means that data can
fit onto one screen or one page more easily because
of normalisation there are fewer fields and security permissions can be
Normalisation removes duplicate data from a database. applied to individual tables. However, it is also necessary
Not only does this reduce the size of the database, it to design the database properly and to understand the
also removes the potential for errors and inconsistencies. process of normalisation. This is a high-level skill that
Data that is duplicated may be edited for one record but requires a database designer to understand the real
not another, meaning that it becomes inconsistent. This world data structures and represent them in a relational
causes problems when searching for matching data. database. An average user would not be able to do this.

The database will perform better if it is normalised


because searches can be carried out on indexed fields
and data can be looked up from related tables. However,
Questions
each lookup does take time to perform and will use up 6 Identify two characteristics of data in 1NF.
processor time, which means that some queries that 7 Describe one characteristic of data in 3NF.
require access to more than one table may be slow. 8 Explain two advantages of normalisation.
As tables no longer contain redundant data,
maintenance tasks such as rebuilding indexes can be
completed more quickly. However, it can be difficult to
understand the data stored in each table because foreign
10.4 Data dictionary
keys consisting of numbers or codes are used and they
mean very little to the user. This means that the user Metadata
will need to build queries to look up data from related A data dictionary is a document or file that describes
tables. These queries can be quite complex and require the structure of the data held within the database. It
expertise from the user. is known as metadata which means ‘data about data’.
The database becomes more flexible in that it is easy to It is a tool that is used by database developers and
add new fields to tables without affecting other columns administrators. It will include the following items:

229

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• indexed fields which improve search times


KEY WORDS
• validation rules that restrict data entry for
data dictionary: metadata (information) about that field
the database • data about tables:
• the primary key of the table
• data about fields:
• what sort order to use when displaying data
• field names to identify each field
• relationships to other tables
• data types, such as text, integer, date/time
• total number of records
• field size, such as the length of a text field or
the maximum value of a numeric field • validation rules that apply based on multiple
• format of fields fields within the table
• default values which are values a field is set to • permissions and security as to which users can
be initially when a new record is created access the table.
• primary keys, compound keys and foreign keys

WORKED EXAMPLE 10.44


This is part of a data dictionary for fields in a product table:

Attribute Data Type Field Size Format


Product Code Alphanumeric 6 XX99XX
Description Alphanumeric 20
Category Code Integer 4 9999
Price Decimal 3.2 $999.99

Attribute Validation Type Rule Error Message


Product Code Format Must be in the format of two Please enter a code that is two
letters, two numbers, two letters letters, two numbers, two letters
Description Presence Must be present Please enter a description
Category Code Look up in List Must exist in Category Code in Please enter a category code that
Category table exists in the category list
Price Range Between 0.01 and 999.99 Please enter a price between
0.01 and 999.99

230

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

PRACTICAL ACTIVITY 10.32

Complete this data dictionary for employees:

Attribute Data Type Field Size Format


Employee ID
Surname
Forename
Date of Birth
Telephone
Email
Year Joined Company
Pension Scheme?

Numeric
Data types Numbers can be stored in two main formats which are
It is necessary to know the type of data in order to store integer and real.
it correctly and process it efficiently.
Integers are whole numbers. These can be negative or
positive but must not contain decimals.
Real numbers can contain decimals. They can be
positive or negative.
Numbers can also be formatted as percentages or as
currency. Currency values are presented with a currency
symbol. The currency symbol isn’t actually stored with
the data, but is presented when the data is displayed.
Figure 10.46: Product data types.
Percentage values are stored slightly differently to other
number values. The number that is displayed is stored
Text as a one hundredth (1/100) of the value. When using
Text data types come in different formats. They can also 25%, for example, the computer would store it as 0.25
sometimes be known as string or alphanumeric. A text (25/100). However, it would display 25%. So when the
data type can contain any letter, number or symbol. computer displays a percentage data type, it multiplies
what is stored (e.g. 0.63) by 100 and adds the percentage
symbol (e.g. 63%).
WORKED EXAMPLE 10.45
The table 10.7 shows examples of the different
Jane Atkins number format.
M
Female W6749PR
O’Connor
[email protected]
00 44 208 555 5555

231

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Integer Real Currency Percentage


9 9.05 $9.05 0.09 (9%)
–6 –6.2 –$6.20 –0.06 (6%)
232 382 109 232 383 109.00 $232 383 109.00 2 323 821
–238 –238.00 –$238 2.38 (238%)

Table 10.7: Examples of number formats.

PRACTICAL ACTIVITY 10.33 WORKED EXAMPLE 10.46


Use a spreadsheet to enter the Dates can be formatted in a variety of ways such as:
following numbers:
18/7/1965
5 0.32 18-07-65
60 0.2
18th July 1965
Now format the cells as percentages. What has
July 18, 1965
happened to the data and why?

Some people get confused with telephone numbers However, they are always stored in the same way: day
because the word ‘number’ is used. However, a telephone 18, month 7, year 1965. The symbols (such as th, / and -)
number is actually a set of digits. The number data types are not stored. They are just displayed.
cannot include the spaces or hyphens or brackets which
are often used within telephone numbers. The number
WORKED EXAMPLE 10.47
data types also cannot start with a zero because numbers
cannot start with a zero. Arithmetic calculations can be Times can also be formatted in a variety of ways:
performed on numbers but not on telephone numbers.
12:55 p.m.
Therefore telephone numbers are stored as text.
14:02.45 (hours, minutes, seconds)
Try typing this telephone number into a spreadsheet
(without using spaces) and see what happens: 0305 hrs (five past three in the morning)
00442085555555
If this was a number it would actually be
442 085 555 555 which is 442 billion, 85 million, Dates and times can also be combined to give a specific
555 thousand, 5 hundred and fifty-five. time on a specific date, for example:
12:55 18-07-65
Date/time Internationally, days, months and years can be stored
This data type is used to store dates and times. The in a different order. It is important to specify this order
number data type cannot be used because it works in when setting up a data type. For example, in America,
10s, 100s, 1000s, but a date/time data type will be able they use month, day, year (e.g. 7/18/1965), whereas in
to work with days, months, years, hours, minutes and the UK they use day, month, year (e.g. 18/7/1965). This
seconds. It will also enable dates and times to be sorted can become a problem when the day part is 12 or less.
into a logical order. What date is 5/10/2019? Is it 5 October or 10 May?

Boolean/logical
Boolean or logical data types can have only one of two
values. These two values are TRUE and FALSE, but
are sometimes represented as YES and NO. If you use

232

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Microsoft Access you will notice that this data type is


referred to as the Yes/No data type.
Questions
9 Identify and describe three components of a data
Data is only a Boolean data type if the two possible
dictionary.
answers are TRUE/FALSE or YES/NO. Boolean/
logical data types do not include data like ‘M’ or ‘F’ for 10 Select the most appropriate data type for the
Male or Female. These are actually text data types. Just following information stored about flights:
because there are two possible answers for the data does Flight number (e.g. BA372)
not mean that it is a Boolean.
Departure date
Departure time
Select appropriate data types Airport code (e.g. ACF)
You will need to know how to choose an appropriate Max number of passengers
data type for a given situation. You will also need to Type (e.g. scheduled or charter)
be able to select appropriate data types when creating
spreadsheets and databases. The following guidelines Arrived?
should help you: 11 Give reasons for the use of the text data type for
storing a mobile phone number.
Rule Data type
The data contains whole Integer
numbers only 10.5 File and data
The data contains a decimal Real
number management
The data starts with a zero (e.g. Text
telephone number) File types
The data includes letters, Text When data is saved it is stored in a file. Different
symbols or spaces software applications use data in different ways and so
The data is a date, a time or Date/Time the way the data is stored differs between application
both types. For example, a database stores data in tables,
The only values for the data are Boolean/Logical whereas graphics software stores data about pixels.
TRUE/FALSE or YES/NO Each file will typically include a header, which will be
metadata (data about the file), then the main content
Table 10.8: Data type rules. will be stored followed by an end-of-file marker.
To a user, file types are usually identified by their
extension. For example, Students.txt has an extension of
PRACTICAL ACTIVITY 10.34 txt which identifies it as a text file.
Data is to be stored in a database about party
bookings. Select the most appropriate data type
for each of the following fields:
• Date of Party
• Time of Party
• Room being Booked
• Number of Guests
• Deposit
• Price Charged
• Paid?

233

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Examples of file types include:

Extension File type Purpose


.txt Text Stores plain text without any formatting. It is useful for transferring data
between applications, but any formatting is lost.
.csv Comma separated Stores structured data as plain text in rows with each column separated
values by commas. It is useful for transferring data between databases and
spreadsheets or other applications which require data in a structured format.
.rtf Rich text format Stores text-based documents and includes the formatting (rich text). It is
used to transfer data between different word processing or other text-based
applications.
.docx Microsoft Word document Stores Microsoft’s word processing documents in open XML
XML format by saving all objects separately within a compressed file.
.pdf Portable Used to share read-only documents in a common format that can be
Document Format accessed by any PDF reader software. It is commonly used for storing
documents on the web as its contents can be indexed by search engines.
.odt OpenDocument An open-source file type for word processor documents that is used by open-
Text source word processors and is not tied to one manufacturer.
.ods OpenDocument An open-source file type for spreadsheets that is used by open-source
Spreadsheet spreadsheet software and is not tied to one manufacturer.
.odp OpenDocument An open-source file type for presentations that is used by open-source
Presentation presentation software and is not tied to one manufacturer.
.html Hypertext Markup Stores web pages that can be opened by any web browser.
Language
.xml Extensible Markup A data file that uses markup language to define objects and their attributes.
Language They are used to transfer data between applications and can be read by a
simple text editor.
.avi Audio Video Microsoft’s method of storing video files with very little compression. File
Interleave (video sizes are very big but no data is lost.
file)
.mp4 Moving Pictures Audio and video are compressed and videos can be shared across the
Experts Group internet.
(MPEG) Layer-4
(video file)
.wav Waveform Audio Stores audio files as waveform data and enables different sampling rates
File Format and bit rates. This is the standard format for audio CDs but does not include
compression so files are large.
.mp3 MPEG Layer-3 Stores audio files in a compressed format approximately 10% the size of.wav
audio compression files. Enables audio files to be shared across the internet.
.bmp Bitmap image Stores images as uncompressed raster images, storing each pixel individually.
They are large files but can be accessed by any software.
.jpg Joint Photographic Stores images as compressed raster images. It is used by most digital
Experts Group cameras and is a common format for web graphics but its use of lossy
(compressed compression can mean some quality is lost.
image)

234

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

Extension File type Purpose


.png Portable Network Stores images as compressed raster images and can include background
Graphic transparency making it useful when images are required on different colour
backgrounds.
.svg Scalable Vector Stores images as two-dimensional (2D) vector graphics. It is a standard
Graphics format for using vector graphics on the web.
.exe Executable Stores program object code which enables the program to be executed by
program file the computer.

Table 10.9: Examples of file types.

free from copyright, patents and trademarks, and their


File formats structure is known publicly. They are usually maintained
by an international standards organisation or a public
Proprietary file formats interest group. Their main advantage is that the files can
Proprietary file formats are file types that have been be shared between users of different software. However,
developed by software manufacturers solely for use they can hold back development of open-source
within their software. Using their own formats means software because new features will require the file format
that software manufacturers are free to develop software standard to be updated.
features that will store data in a way that is most suitable
Some examples of open-source file formats include:
for the software and without waiting for a standard
format to adapt to the software’s needs. This enables File Type of data Standards organisation
software to improve and provide new features that type
otherwise would not be available.
JPG Compressed Developed by the
Some examples of proprietary file formats include: raster graphics Joint Photographic
Experts Group (JPEG)
Extension Software / Manufacturer and standardised
file type by the International
.docx Word processor Microsoft Word Organization for
Standardization (ISO)
.wpd Word processor Corel Word Perfect
PNG Compressed ISO
.msg Email message Microsoft Outlook raster
.ra Audio / video Real Networks graphics with
streaming transparency
support
.MOV Movie Apple
ePub E-book International Digital
.psd Graphics Adobe Photoshop Publishing Forum
.ai Graphics Adobe Illustrator XML Extensible World Wide Web
Markup Consortium (W3C)
.accdb Database Microsoft Access
Language
Table 10.10: Examples of proprietary file formats. MPEG Compressed Developed by the
video Moving Picture Experts
Group (MPEG) and
Open-source file formats standardised by the ISO
Open-source file formats are file types that have
been developed for the purpose of being used by any Table 10.11: Examples of open source formats.
proprietary software or open-source software. They are

235

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Generic file formats the tape. This was known as storing the data serially. To
access the data, all the records would need to be read
Generic file formats enable data to be transferred
from the first onwards until the required record was
between software. Data can be exported from software
found or until the end of the file was reached. It could
to a generic file format and generic file formats can be
take a very long time to read through a whole table of
imported into software. They store the essential data but
data and so indexed sequential files were developed.
will not include any formatting.
Indexed sequential files still store records one after each
The two main file formats used within databases are CSV
other but they are sorted into an order based upon a
and TXT. These were described earlier in this chapter in
field. For example, data about customers might be sorted
the section about importing data.
into surname order or customer ID order. Sequential files
are particularly useful when data is being batch processed
such as when gas bills are being generated and the master
Types of file access customer file will be processed in order of customer ID
Indexed sequential access and any transaction files will also be processed in order
of customer ID.
Many years ago, data was often stored on tape, which
required records to be written one after another onto

WORKED EXAMPLE 10.48


Here is an example of part of a master customer file showing the customers, the date the current meter reading was
taken, the previous meter reading (amount of gas used) and the current meter reading:

Customer ID Surname Date of reading Previous reading Current reading


10 Black 12/1/20 32721 34872
11 Brown 15/12/19 02717 03281
12 White 8/1/20 47270 48572
13 Green 8/1/20 21827 23593

Here is an example of part of a transaction file that will be processed to update the master customer file with new
gas meter readings:

Customer ID Date of reading Meter reading


11 12/3/20 03692
13 12/3/20 23997

This is what the master customer file will look like once the transaction file has been processed:

Customer ID Surname Date of reading Previous reading Current reading


10 Black 12/1/20 32721 34872
11 Brown 12/3/20 03281 03692
12 White 8/1/20 47270 48572
13 Green 12/3/20 23593 23997

236

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

When reading the data in sequential files, it was


necessary to read the whole file serially from the
Hierarchical database
beginning because there was no way of knowing where
each record was stored. Indexed sequential files are
management systems
stored in exactly the same way as sequential files but The hierarchical database model was created in the
the file also has an index based on the field used to sort 1960s and is not commonly used today. The model relies
the file. A field with an index is known as a secondary upon a tree structure where each parent branch is the
key. The index file stores each secondary key value and one side of a relationship and each child branch is the
the address in storage (e.g. tape or disk) where the first many side of a relationship. The tree structure can only
record containing that value is stored. deal with one-to-many relationships and can only work
in one direction. Hierarchical databases are only suitable
The index is small enough to store in main memory and for models which have a strict hierarchy.
so all that needs to be done to find a record is to search
the index, find the location in storage and then read the One such hierarchy is the file system used within
records from that point until the record is found. computer systems. The file system may look something
like this:
Computer
WORKED EXAMPLE 10.49
system
If Employee ID is the secondary key, then an index
will exist with Employee ID as one column and the HDD SSD
storage address as the other column. Rather than
storing every single Employee ID, the index may store
every tenth Employee ID for example. Paul's Sarah's Program
Windows
documents documents files

Employee ID Storage address


Text book Text book Microsoft System
0001 A8FB2DC3

0011 9AEB08E3 Church Work Adobe Resources

0021 8C4DDDF5
Community Personal Logs

Family
Direct file access
The use of indexed sequential file access still requires Figure 10.47: Folder structure.
some serial access of data and there are problems with
trying to maintain a file in a sequential order as new Each disk contains folders and there may be further
records are added and old records deleted. subfolders within each folder. Each subfolder has only
With direct file access, records are stored in a random one folder at the level above it. To find the data, the user
order. There is no sequence. When storing a file, a browses through the system, selects the disk the data is
hashing algorithm (calculation) is performed on the key stored on, then selects the folder, then selects the next
field to determine the storage address where the record subfolder until eventually the file is found.
should be stored. Then, when the record is searched for, This same process is used when searching for data
the same hashing algorithm will be performed on the within a hierarchical database. This means that data at
key field to determine where the record can be found. the top of the tree is very quick to access.
The computer system can then directly access that
record without having to read through other records.

237

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• data is analysed to provide the data that is required


WORKED EXAMPLE 10.50
by management
A bank could store data about customers and the • summary reports and charts are produced for
accounts they hold: managers that will help with decision making.
The reports and charts are created by people, but once
Customer
they are created they can be reused as the data changes
within the data sources. It’s important that the reports
and charts provide information that managers need.
Current Savings
Loan
account account
Using MISs
Information from a MIS is used by managers to
Debit Debit Debit
transactions transactions transactions
make decisions. Managers can examine the summary
information and then decide upon actions to take.
Reports are provided at regular times and it’s also
Credit Credit Credit possible for managers to request ad hoc reports if they
transactions transactions transactions need additional information.

Figure 10.48: Hierarchical bank.


WORKED EXAMPLE 10.51

Managers within a large second-hand car dealership


need to be able to monitor sales. They need to be able
to identify trends in sales for different makes and
Management information models of cars at different times of the year. This will
enable them to identify which cars are selling the most
systems and which are making the most profit. They can then
decide which second-hand cars they want to acquire
Introduction to management to sell.
information systems Marketing managers can analyse how effective a
A management information system (MIS) provides marketing campaign was by comparing sales figures
summary information to managers to enable them during an advertising campaign with sales figures
to make decisions. The MIS will collate data from a outside the advertising campaign. This will help
database and present it in the form of reports and them to decide whether to run similar campaigns
charts. These reports and charts can be produced in the future.
within the database system itself or they may be part
of an additional piece of software that is used to
analyse the data.
The additional software is likely to collate data from Questions
more than one database and interconnect the data 12 Explain why generic file types are needed.
from those databases to produce reports that analyse 13 Describe the steps involved to find a file using
all the data together. When additional software is used indexed sequential access.
to collate data from more than one database, it is often
referred to as an executive information system (EIS). 14 Explain why direct access is used for databases in
preference to indexed sequential access.
A MIS has the following essential features: 15 Describe two features of management information
• data is collated from databases and other sources systems (MISs).
• data is interconnected from different sources

238

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

REFLECTION

Consider how long it would take to find a single record of data from 10,000 records on paper rather than
using a database.
Discuss the problems that would occur with written data rather than a database if changes needed to be
made to the data, if the data needed to be sorted, if queries needed to be performed on the data or if
calculations needed to be performed on the data.
Discuss what problems might be experienced if a relational database didn’t use referential integrity.
Consider times when you have used data in generic file formats, proprietary file formats and open source
file formats. What was the purpose of using these formats and how did it help you complete a task?

REVIEW PRACTICAL ACTIVITY

A shopping centre would like to monitor the inspections that are carried out at their food outlets. These
inspections include Health & Safety, Food Hygiene, VAT and Franchise Quality Control, amongst others. Figure
10.49 is an example of an Outlet Inspection Card that the organisation currently uses in a paper based format:

Figure 10.49: Outlet inspection card.

1 Create a database that can be used by the shopping centre to monitor these inspections. Import the
three files 10.16 outlet.txt, 10.17 inspectionvisits.txt and 10.18 inspectiontypes.txt. Normalise the
data to third normal form by removing redundant data and replacing it with appropriate foreign keys
and adding any primary keys that might be needed.
2 Create relationships and enforce referential integrity for the database.
3 Penalty points are only applied if the inspection is failed. Using a query, create a calculated field that
will show the ‘Penalty Incurred’ only if an inspection is failed.
4 a Create a data entry screen that will look similar to Figure 10.49 and will allow the entry of data
about outlets and their inspections. It should include a subform and only show the penalty if one
was incurred.
b Create a drop down menu that can be used to select the inspection type on the subform.

239

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

c Add a calculation to the form to calculate the total penalty due. The penalty is calculated as £100
multiplied by the total penalty points.
d Create a button that will print the Inspection Data Entry Screen for a single outlet.
5 Create validation rules that will prevent invalid data being entered for the following scenarios:
a There are 4 floors in the Sheep Square Shopping Centre from 0 (ground) to 4
b Inspection dates must always be after the opening date of an outlet
6 a Produce a query to show the number of inspections passed between 1/2/2011 and 30/6/2011 for
each type of inspection.
b Produce a query showing a list of the outlet codes for any outlets that have failed at least 2
inspections.
7 Create a graph that will show the Inspection Names on the x-axis and the Number of Passes on the
y-axis using an appropriate title and clearly labelled axes.
8 Create a report which shows all failed inspections grouped by the type of inspection. The report should
include the name of each outlet, the agency used for the inspection and the inspection date.
9 Create a menu that will open the following items and include an option to exit the application:
• Outlet Data Entry Screen
• Inspection Passes Graph
• Inspection Failure Report.

EXAM-STYLE QUESTIONS
1 A website accepts donations for charities. Each donor may make several donations to one or
more charities. This information is stored in a relational database.
a Identify three tables that should be used within the database. [3]
b Describe two relationships that would be used within the database. [2]
c Explain how referential integrity is important to this database. [2]
[Total 7]
2 An apartment complex stores data about its customers, their bookings and the rooms they are
staying in. The entity relationship diagram (ERD) is shown in Figure 10.50:

Apartment Booking

Customer

Figure 10.50: Entity relationship diagram.

240

Copyright Material - Review Only - Not for Redistribution


10 Database and file concepts

CONTINUED
a Identify two foreign key fields that should be used within the database. [2]
b Select the most appropriate data type for each of the fields below in the apartment table: [3]
i Telephone Number
ii Swimming Pool
iii Bedrooms
c Describe how a dynamic parameter query could be used to produce a list of customers that have
stayed in an apartment during a specified time period. [4]
d Explain why this query would be a complex query. [2]
e Identify and describe three items of a data dictionary that could be used in this database. [6]
[Total 17]
3 Students in a college belong to tutor groups. Each tutor group has one tutor. The students
are able to borrow books from the college library.
Normalise the unnormalised data below to 3NF. Show each table, its attributes and its primary keys. [4]
STUDENT
Name
Address
Telephone
Tutor Group
Tutor Name
Book ID
Title
Due Date
4 Describe the difference between proprietary and open-source file formats. [2]

SUMMARY CHECKLIST
I can assign a data type and an appropriate field size to a field.
I can understand the three relationships: one-to-one, one-to-many and many-to-many.
I can create and use relationships.
I can create and interpret an entity relationship diagram.
I can understand the difference between a flat file and a relational database and when one might be
preferred in certain situations.
I can create a relational database.
I can understand the function of key fields.
I can set primary, compound and foreign keys.
I can understand referential integrity and its importance.
I can use referential integrity.

241

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
I can validate and verify data entry.
I can perform searches.
I can use arithmetic operations and logical functions to perform calculations within a database.
I can sort data.
I can design and create an appropriate data entry form.
I can design and create a switchboard menu within a database.
I can import and export data.
I can understand the characteristics of data in unnormalised form, first, second and third normal forms.
I can understand the advantages and disadvantages of normalisation.
I can normalise a database to first, second and third normal form.
I can understand the components of a data dictionary.
I can create a data dictionary.
I can select appropriate data types for a given set of data and a given situation.
I can identify different data types.
I can use static and dynamic parameters in a query and understand their use.
I can understand when static and dynamic parameters should be used in queries.
I can understand when simple, complex and nested queries should be used.
I can understand when summary queries, including cross-tab queries should be used.
I can understand different file types and their uses.
I can understand what is meant by proprietary and open-source file formats.
I can understand why open-source file formats are needed.
I can understand why generic file formats are needed.
I can understand the use of indexed sequential access.
I can understand the use of direct file access.
I can understand the use of a hierarchical database management system.
I can understand the features of a management information system (MIS).
I can understand how a MIS can be used by organisations.

242

Copyright Material - Review Only - Not for Redistribution


11
Chapter 2

Sound
Two lineand
video editing
heading
LEARNING INTENTIONS
In this
By the chapter
end of this
youchapter,
will learnyou
howwillto:be able to:
• Cillaut
edit a video
laccatiis
clipaut
to ea
meet
consequi
the requirements
aut ut optatius
of itsconsequiae
intended application
nati quis entioria
and audience
qui volore etur?
• know
Si dolupic
and understand
iasimolut apiduciani
how and aliquas
why typical
is ut features
autemodisfound
et ped
in video
ullori editing
con et ad
software
mil eosam
are used
asini corerch
ictur?
• know and understand the effects of different methods of compression on video
• Exped etur, il moluptae exceat.
• edit a sound clip to meet the requirements of its intended application and audience
• Eveleceatus volutas pelenducia con pro consenimpos aliqui ommossimod exerchiliquo cuptaernamet
• know and understand how and why typical features found in sound editing software are used
optatur?
•• know
El andfuga.
et am understand why file erum
Ignam ipsumet size depends
sam deraon sampling rate
porepudam conand
etursampling resolution
rerchil loriatur abo. Itatur? Em rem
• vidis aborrum
know doleseqthe
and understand uodigendae
effects of etur aute methods
different vellupta est, ute nonsectius
of compression on evellup
sound. idestis inciet percimetur
simustia audis aut idest, omni quid eati soluptatque rendistio optat intiorem eium ium, nulparu

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you understand how to navigate software using drop-down menus and different selection panels?

Introduction
Sound and video editing skills are increasingly desirable
for the individual and businesses.
Some people find that they can make money to
supplement their income by creating high-quality videos
about anything from video games to makeup tutorials.
There are also internet stars who build a whole business
around their video channels and rely on their video
editing skills. There are also people who do the same
using podcasts and rely on their sound editing skills.
Many businesses also use the media of video and
sound to market their product or service. They hire Figure 11.1: Cutting and sticking film.
whole teams of people to use their video and sound
editing skills to ensure they produce high quality
There are a wealth of skills that you can learn to edit
marketing media.
videos. This chapter will cover many of them. You will
The ability to create high-quality videos and sound files read about the skill, why it is used and how to use it,
is much dependent on creativity and accuracy. Creativity then you will complete practical activities to practise
allows you to produce unique media that is attractive to using the skill.
the intended audience. Accuracy ensures that the media
You may be using different video editing software
meets any given brief for the media, and that a refined
to that used in this chapter. However, you will find
product is produced.
that most video editing software has similar features
Editing video and sound files can be a lot of fun. You that can be used in similar ways. This may mean you
will find that out as you progress through this chapter. need to search the menus of your software to find an
You will begin by editing video clips to create a video, equivalent feature.
you will then edit sound clips to create a soundtrack that
you will add to your video.
Setting the aspect ratio and
resolution
11.1 Video editing The aspect ratio of a video refers to the size proportions
Video editing is the manipulation and organisation of of a video. It is the ratio of the width of an image in
video clips. Video editing software is used to do this. comparison to the height. Choosing the right aspect
Before the development of video editing software, the ratio for your video is important. Deciding which is the
only way to edit videos was to physically cut and stick right aspect ratio will depend on the platform on which
the analogue tape that the video had been recorded on. the video will be played. The two most common aspect
ratios are 4:3 and 16:9.
KEY WORD The aspect ratio 4:3 is an older, traditional ratio
for videos. It comes from the shape of a frame on a
clip: a short piece of a video or audio file traditional film strip.

244

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

A resolution can also be set for a video. The resolution


KEY WORDS is the number of pixels in width compared to the
aspect ratio: the proportion of a screen or video number of pixels in height. A resolution of 1920 × 1080
width to its height would mean that each frame of the video has 2 073 600
pixels. Different platforms require different resolutions,
frame: a single image in a video file depending how large the image will be when displayed
and the quality required. 1920 × 1080 is the industry
standard for high definition. The resolution for standard
definition is 640 × 360.

KEY WORD
resolution: the number of pixels per
‘measurement’ an image or a single frame in a
video contains (for example, dots per inch)

Questions
1 Find out what the resolution is for 4K.
2 Find out why black bars are sometimes added to
Figure 11.2: Film strip frame. the top or sides of a video.
Setting the aspect ratio and resolution of a video can be
It is the ratio used for most old film and television done when setting up the video for editing. It can also
programmes. For many years, people were happy be set or changed when rendering a video file when the
viewing videos in this ratio, until the development of editing process is completed.
wide screen. When videos using the 4:3 ratio were played
on widescreen televisions, the image became distorted The software this chapter uses for video editing is
because the picture was stretched to fit the screen. This Davinci Resolve. This is a powerful video editing
led to the creation of the 16:9 ratio. software that has a wealth of different features that you
will learn to use.
The aspect ratio 16:9 is used for almost every digital
media today. Film, television and online video platforms The aspect ratio and resolution settings are combined in
mostly use this ratio, so it is often the most suitable ratio this software. You can select a pre-set aspect ratio, where
to set when creating a video. Video developers in the you can then change the resolution is required.
1980’s decided that this would be the industry standard. To open the menu for aspect ratio you need to click the
Here is a comparison of the different ratios: small settings icon (cog) in the bottom right corner.
You can select one of the settings from the drop-down
menu at the top. This will also provide a resolution for
the video in the boxes below. You can manually change
the resolution in these boxes, if required.

4:3 16:9

Figure 11.3: Comparison of aspect ratios.

245

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 11.01 PRACTICAL ACTIVITY 11.02

Open your video editing software. Save the Add a title slide to your video. Edit the
file for the video that you will create with the text to read:
filename BeeProject.
Did you know that bees are very important to
Locate the aspect ratio and resolution settings. our world?
View the settings available in the timeline
resolution drop-down menu. Edit the slide by:

For the activities in this book, you can leave the • splitting the text across two lines
setting at 1920 × 1080. • changing the font style to Courier
• changing the font size to 80

Adding a title slide • changing the alignment to centre

Title slides are a text-based slide that are used in videos. • changing the timing for the slide to three
Text based slides can be used at various points in a video seconds.
to provide written information for the viewer. This text- Keep the background colour as black and keep
based information can be used for various reasons: the text white.
• to introduce the viewer to the video
• to clarify what the viewer will see, or has just seen,
in a video
Importing a video
• to provide relevant facts and figures
To insert a video clip into your video, you will need to
• to provide information such as company import the file into the software. To import a video file,
contact details. select the ‘File’ option from the menu bar across the
To create a title slide you need to click the ‘Effects top of the screen. This will open a menu. Select ‘Import
Library’ icon in the top left corner. This will open menus File’ from the menu and this will open a sub-menu.
in the bottom left corner. Select the ‘Toolbox’ option, Select ‘Import Media’ from the sub-menu and this will
then from this menu select the ‘Titles’ option. Locate the open up your files. Locate and select your video file and
‘Text’ option in the panel to the right. Click and hold click ‘Open’.
this option and drag it right to the timeline. The video will appear in the file panel in the top left
You can then double click the title slide in the timeline corner. To insert the clip into the video, click and drag
to edit it. This will open an editing panel for the slide at the video clip to the timeline. You can then move the
the right of the screen. Within this panel you can scroll video to where it is required by clicking and dragging it
down and there are options to change the font style, size, up or down the timeline.
colour and alignment.
To change the timing for the title slide, right click on the PRACTICAL ACTIVITY 11.03
title slide in the timeline and a menu will appear. Select
Import the video file 11.01 BeeFly.mov into the
‘Change Clip Duration’ from the menu and a window
software. Insert the video into the timeline, next
will open that you can enter the duration you require for
to the title slide.
the title slide.

246

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

Trimming a video clip Captions and subtitles are created by adding a text layer
over the video. To add text to a video clip you need to use
Trimming a video clip is an essential skill. Most video the same option that you used to add a title slide. This time,
clips are not likely to contain exactly what you require. you need to drag the ‘Text’ option to be placed above the
The clip may have unnecessary content at the start or video clip that you want the text to appear on. This will
finish, and this means that it will need to be trimmed to create a second track in your video. You can then edit the
remove this content. text in the same way that you did for the title slide.
To trim a video clip, select the clip in the timeline and You can place the text in the exact place that you want
select the ‘Trim’ option in the menu bar at the top of it on the video clip. To do this, forward the video to
the screen. Select the option ‘Trim Mode’ and this will the clip with the text, so that you can see it in the video
enable you to trim the video clip. You can also select preview pane. A quick way to do this is to use the small,
trim mode by clicking the second icon in the tool bar red arrow that appears at the top of the timeline. If you
directly above the timeline. drag this left or right, it will allow you to move forward
or backward through the video. To move the text, click
Move the cursor to the start or end of the video clip and
on the text and a white box will appear around it. Click
it will change to become square brackets. Click and drag
and hold in the centre of the box and you can drag the
the video clip left or right to trim the content that you
text to the place that you want it to appear.
do not require in the video clip.
You can also add subtitles with a separate subtitle
You may need to play the clip first to note the timings
option. You will find this in the effects library under the
for the content that you want to trim out of the video.
titles section, right at the bottom. This will add a new
If you want to trim content off the end of the clip, you track to your video that will display subtitles as text at
can also right click on the clip and use the ‘Change Clip the bottom of your video.
Duration option’ from earlier. This will trim the content
off the end of the clip to the timing that you enter.
The software will remain in trim mode until you change
the mode again. If you want to revert to normal mode,
select the option ‘Normal Edit Mode’ from the ‘Trim’
menu, or click the first icon in the tool bar above
the timeline.

PRACTICAL ACTIVITY 11.04

Trim the end of the BeeFly video clip to make it


five seconds long.
Figure 11.4: Adding a caption.

Adding captions and subtitles PRACTICAL ACTIVITY 11.05


Captions and subtitles are text-based content that appear Add a caption to the BeeFly video that
over the top of the video content. Captions can be used displays the text:
to provide further information about what is being shown
in the video clip. Subtitles can be used to provide a text- Bees are very important pollinators for fruits and
based version of any dialogue that is being spoken in the vegetables. They help them grow!
video. This is useful for any viewers who may be deaf,
allowing them to read any speech that occurs in the video. Edit the text so that is appears on three lines,
Subtitles can also be used to display the spoken content with a font style courier, font size 60 and the
in a different language, allowing viewers of different colour is black.
languages to understand the speech in the video. Subtitles Move the caption so that it appears in the top
usually appear at the bottom of the video. left corner of the video.

247

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Adding animations You can add different animations between videos


using the effects library. Select the ‘Effects Library’
Animations can be used to create an attractive transition and select the option for ‘Video Transitions’. Several
from one video clip to the next. This can help keep the different transitions will appear in the panel. To add an
attention of your audience and raise the quality of your animation, click the animation and drag it to the video
video. However, used incorrectly, animations can be clip that you want to apply it to.
very distracting. Imagine watching a video and there is a
long animation from one clip into the next, or different PRACTICAL ACTIVITY 11.06
effects and animations have been added to so many
different parts, they stop you being able to watch some Import the video clip BeeFlower 11.02
of the content. Would that make you feel frustrated? BeeFlower.mov and insert it into your timeline,
after the BeeFly video clip.
KEY WORD Fade out the BeeFly video clip for one second.
transition: the method with which one video Fade in the BeeFlower video clip for one second.
clip merges into a second clip
Add the animation ‘Additive Dissolve’ to the
beginning of the BeeFly video clip.
The simplest animation that can be added between video Add text to the BeeFlower video that displays:
clips is a fading effect. This is where the first clip will
fade out at the end and the next clip will fade in at the Honey bees must gather nectar from
beginning. This can help create a higher quality video as approximately 4 million flowers
it looks more attractive than one video clip stopping and
Format the text to match the BeeFly video clip.
the next abruptly starting. It helps blend the video clips
together for a smoother viewing experience. Display the text for three seconds.
It is simple to add a fade effect between videos. If you Add a second text box to the BeeFlower video
hover over the top corner of a video clip, with your that displays:
cursor, you will see a small white box appear. If you
click on this white box you can drag it left or right, into just to make one kilogram of honey.
the video clip. You will see a timing box appear and the
corner of the video will become shaded. The timing box Format the text to match the previous text, but
shows how long the fade will be and the shaded area with a size of 80.
shows when the fade will start and finish in the video. Place this text in the centre of the video clip.
If you apply this to the top right corner of the video
clip, this will create a fade in effect. If you apply it to the Display the text for three seconds.
top left corner of the video clip, this will create a fade
Create a 0.2 second fade out of the first text and
out effect.
a 0.2 second fade in of the second text
Trim the video clip to be six seconds.

Zooming and panning


Zooming and panning are used often in video editing.
Zooming is moving the camera closer to or further away
from the whole or part of a video clip. You can zoom in
or out of a video clip to highlight a certain part of it.
Panning a video clip is when the camera moves across
Figure 11.5: Adding a fade effect. the video clip from one side to the other, or sometimes
top to bottom, or vice-versa.

248

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

To zoom a video clip, you can use the zoom settings in


the panel to the right side of the video viewing panel. PRACTICAL ACTIVITY 11.07
Scroll this panel and you will find the zoom settings in Import the video clip 11.03 BeeHoneycomb.mov
the ‘Transform’ section. If you want to zoom in or out and insert it into your timeline, after the
on the whole of a video clip, you can just increase or BeeFlower video clip.
decrease the zoom values. The simplest way to do this, is
to click and hold in the ‘x’ value box, drag your mouse Trim the clip to eight seconds.
right to zoom in and left to zoom out. Create a zoom in effect on the honeycomb in the
If you want to create a zoom on part of a video clip, you video, starting five seconds into the video clip
will need to use the key frame feature. You will need to and finishing at the end of the clip.
set a key frame at the point you want the zoom to start, Add text to the clip to display:
and at the point you want it to stop.
Honey bees live in hives
• To create a key frame, you will need to use the small
diamond box to the right of the zoom values. Format the text to match the previous text.

• Move the red arrow above the timeline, to the point Place it in the top right corner of the video clip.
in the video that you want the zoom to begin and Display the text for three seconds.
click the small diamond. It will turn red.
Add further text to the clip to display:
• Move the red arrow to the point that to want the
zoom to stop and click the small diamond to make They create honeycomb by making wax, to store
it red again. This will add two key frames to the their honey
video clip. Format the text to match the previous text.
• At the second key frame, zoom the video clip in or Place it in the bottom right corner of the
out to the point required. video clip.
If you play the video, you will see that the zoom will Display the text for five seconds.
begin at the first key frame and end with the required
zoom amount at the second key frame. Create a 0.2 second fade out and fade in
between the two text elements.

Altering speed
When creating a video, you may find that you want to
alter the speed of a video clip. You may have a video
clip that you want to slow down. This could be because
you want to make it clearer and easier to see what is
happening in the video clip. It may also be because
creating a slow-motion effect in a video can often make
it more entertaining. You may find that you want to
speed up a video clip. This could be because you have
Figure 11.6: Zooming and panning.
quite a long clip, that you do not want to trim, as all of
the content is important, but you just want to speed it
To pan a video clip, you follow very similar instructions up so that it can be all shown in a quicker time. It may
to zooming. Instead of using the zooming values, you also be that creating a sped up effect in a video can also
use the position values. You also need to change the make it more entertaining.
position values if you want to change the position at
which the zoom in placed. To alter the speed of a video clip, right click on the video
clip in the timeline and select the option ‘Change Clip
Speed’ from the menu. This opens a window that allows you
to alter the speed of the clip. The clip is set at 100% speed.
Increasing this percentage will speed up the clip, decreasing

249

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

this percentage will slow down the clip. You will notice that
the ‘Frames per Second’ setting will automatically change PRACTICAL ACTIVITY 11.09
when you alter the percentage. It is the number of frames Insert another copy of the BeeFlySlow clip into
per second that are used that sets the speed of the clip. your timeline, after the previous copy.
The more frames per second there are, the faster the clip
will play. You can also change this value, rather than the Trim the clip so that it is also five seconds long.
percentage, to speed up or slow down the clip. Join the first and second BeeFlySlow video
clips together.
Add the video transition ‘Smooth Cut’ to the
beginning of the second BeeFlySlow video clip.
Add a one second fade out and fade in effect
between the BeeHoneycomb and BeeFlySlow
video clips.

If you play the video now, you will see that a smooth
transition is created between the two BeeFlySlow
clips, the first playing at double speed, then smoothly
Figure 11.7: Changing clip speed. transitioning into the normal speed.

PRACTICAL ACTIVITY 11.10


PRACTICAL ACTIVITY 11.08
Add text to the BeeFlySlow video clip to display:
Import the video clip 11.04 BeeFlySlow.mov We need to take care of our bees.
and insert it into your timeline after the
BeeHoneycomb video clip. Set a suitable format for the text.
Trim the clip so that it is five seconds long. Set the timing for three seconds.
Alter the speed of the clip to 200%. Add further text to the BeeFlySlow video clip
to display:
Without them we’ll lose products such as honey,
coffee and many fruits and vegetables.
Joining video clips
Set a suitable format for the text.
When you are editing video clips, you may want to join
them together. This is useful as it means that if you Set the timing for seven seconds.
apply any kind of effect or animation, it will be applied Create a smooth transition effect between the
to the whole clip. If two clips are joined together, they two text elements.
will be treated as a whole clip. It also means that you can
create a smooth transition between the clips to make it Add a text-based slide to the end of the video
look like they appear as one. to display:
To join two video clips together you need to select both of To find out more about bees visit the website
the clips. Select the first clip and press and hold shift, then [Insert a suitable website here]
select the next clip. This will allow you to select both clips. Find a suitable website about the importance of
When you have both clips selected, select the ‘Timeline’ bees to use in your video.
option from the menu bar at the top of the screen. From
the timeline menu, select the option ‘Join Clips’. This will Format the text to be yellow this time.
join the clips together. If you try and move the clips now Set the timing for five seconds.
you will see that they both move together.

250

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

Extracting a still image PRACTICAL ACTIVITY 11.11


A video may have a certain small part of it that you Extract a still image from the BeeFlySlow video.
think would be a really good still image to have. A still Make sure that no text is showing on the image
image is just like a normal image. It is extracting one when you extract it.
frame from the video that is a single image.
Export the image as a TIFF file.
You may want to use this image in the video to highlight
this particular part and allow it to be displayed on Import the image and add it to the end of
screen for a few seconds. You may want to use the image your video.
as a background for certain text in your video.
To extract a still image from a video, you will need to
Once you have inserted the image still into your video,
use a different section in the software, the ‘Colour’
you can crop it in the same way that you crop a video clip,
section. At the bottom of the screen you will see various
by adjusting the cropping values in the window on the
sections of the software. You have been working in the
right of the screen.
‘Edit’ section. You need to click on the ‘Colour’ section,
this will open a new panel, where you will see the video You can also resize the image if required. To resize the
clips that you have used. image, click the settings cog in the bottom right corner
of the screen. This will open the window that you used
Click the video that you want to extract the still from.
initially to set the resolution of the video. Click the option
Wind the video to the place that you want to extract
in the window labelled ‘Image scaling’. This will show some
the still image, using the scroll bar at the bottom of the
options for changing the size of the image. The image size
preview pane. Right click on the video in the preview
will be automatically set to match the timeline settings. You
pane and select the option ‘Grab Still’. This will extract
can see this box ticked in the bottom half of the window.
a still image of the video at this point. You will see this
If you untick this box, you can use the boxes below this to
image appear in the panel on the left. Right click the
type in the size that you want the image to be changed to.
still image and export it. You can choose various file
options to export the file. You can return to the ‘Edit’
section of the software and import the still image to use
in your video.
Using filters
Filters can be used on both videos and images to change
the look and feel of them. They may be used to correct
the colour of an image or to change the feel and look of
a video or an image.
To add a filter, locate the filters section. This can be
found in the effects library under the option ‘Open FX’
and ‘Filters’. Select the filter and drag it to the video or
image on the timeline that you want to filter.

PRACTICAL ACTIVITY 11.12

Add the ‘Box Blur’ filter to the still image that


Figure 11.8: Extracting a still image. you added to the end of your video.

Removing sound
You may have sound on a video clip that you do not
want. This may be because you intend to put a different
sound file with that video clip, or just that you don’t
want any sound on that part of the video.

251

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To remove sound from a video you need to first unlink


the soundtrack from the video track. To unlink the PRACTICAL ACTIVITY 11.14
soundtrack, click the video clip and you will see a red box Add suitable credits to your video that will be
appear around both the video clip and the soundtrack. displayed over the still image that you inserted at
The soundtrack appears underneath the video clip. Right the end of your video.
click on the video clip and select the option ‘Link Clips’.
This will untick this option and unlink the soundtrack
from the video clip. Click off the video clip and then click You are starting to have the makings of an excellent
just the soundtrack. Make sure the red highlight box is video editing project!
only around the sound track this time. Right click on the
soundtrack and select the option ‘Delete Selected’. This
will remove the soundtrack from the video clip.
Exporting a video clip
You need to export your video clip to a suitable file
format for the platform on which it will mostly be
played. Most people will choose a universal file format
to allow the video to be played on many devices, using
different software. At present, the only people that
would be able to play your video file is those that have
the software used to create it. This is because it is saved
in a particular file format for that software.
When you export a video, it combines all the elements
in the video together and changes them into the format
that you have selected.
Figure 11.9: Deleting a sound track. You will need to select different formats depending on
whether the video will be used on platforms such as
websites, or a large screen television. Except for a RAW
PRACTICAL ACTIVITY 11.13 file format, that will save the ‘raw’ data in the file, each
file format will compress the file using either a lossy or
Remove any sound from the video clips in
lossless compression method.
your video.

KEY WORD
Adding credits compression: reducing the size of a file, for
Credits normally appear at the end of a video and are example, an image
used to display information about the creation of the
video. They are used to show information such as who
created the video, who produced it, who directed, who Lossy compression will remove unnecessary data from the
wrote the script, and they are also used to give credit video file to make the file size smaller. Lossy will slightly
to authors of any material that may have been used in affect the quality of the video file, but most of this will go
the video, for copyright reasons. The text for credits is unseen or unheard by the average human eyes and ears.
normally set to scroll up the screen from bottom to top. Lossless compression will not remove any data in the
The option to add credits to a video is in the effects compression process and will allow the original data file
library, under the option ‘Titles’. Before, you have to be reinstated. This means the original quality of the
selected the ‘Text’ option in this section, but to create video will be retained. Lossless compression can work
credits, you need to select the ‘Scroll’ option. Drag the in various ways. One method is for the compression
‘Scroll’ option to the timeline to the place that you want software to identify repeating patterns in the file and
to add the credits. This will create a text box, as before, group them, often using an index.
and you can edit the text in the same way. The type of file format you choose for a video file will
depend on how important the quality of the video is,

252

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

how big the file size can realistically be for the platform
and the type of platform it will be played on. PRACTICAL ACTIVITY 11.15

If you wanted to export the video in a lossless format, as Export your video in a file format that is lossless.
you want to play it on a larger screen at full quality, you
Export your video in a file format that is suitable
may choose a file format such as MOV or AVI. If you
for the web.
want to export the file in a lossy format as the quality of
it isn’t essential, but you need the file size to be smaller,
you may choose a file format such as MP4.
TIP
If you wanted your video to be displayed on a website,
you need to choose a file format that is suitable You should practice always saving a copy of
for the web. the file in a generic file format as well as in the
proprietary software format.
Questions
3 Find out which video file formats are suitable

4
for the web.
Find out whether the file formats for the web use
11.2 Sound editing
lossy or lossless compression. Sound editing is the manipulation and organisation of
sound clips. Sound editing software is used to do this.
To export your video, you will first need to render it. Before the development of sound editing software, the only
Rendering a video is where your computer processes way to edit sound was also to physically cut and stick
all the data that you have included in your video and the analogue tape that the sound had been recorded on.
changes it to the format you require, to create your
video file. Rendering a video can be one of the most
demanding jobs for a computer and often takes a lot of
processing power.
To render your video, you need to use a different section
of the software again, the ‘Deliver’ section. Click the
‘Deliver’ section at the bottom of the screen and a new
panel will open.
You will see a panel at the top left of the screen that
you will use to select the options for rendering. Make
sure that the ‘Custom’ option and ‘Video’ section are
selected. You need to enter a suitable file name and
choose a suitable location to save the file.
You will need to scroll down to find the ‘Format’ drop Figure 11.10: Analogue audio tape.
down box. Click this drop down and you will see several
different formats that you can select for your video. There are a wealth of skills that you can learn to edit
Once you have selected a suitable file format, click ‘Add sound files. This chapter will cover many of them. You
to Render Queue’. This adds the file to your render will read about the skill, why it is used, how to use it,
queue which appears at the right side of the screen. then you will complete practical activities to practise
When you are ready to render your video, you need to using the skill.
click ‘Start Render’. You will see the software start to
work through the video and render it. You may find that you are using different sound editing
software to that used in this chapter. However, you
You can now go to the location that you chose to render will find that most sound editing software has similar
your video and play the video file. features that can be used in similar ways. This may mean
you need to search the menus of your software to find
an equivalent feature.

253

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The software this chapter uses for sound editing is


Audacity. This is a widely used sound editing software that
Trimming a sound clip
has a wealth of different features that you will learn to use. Trimming a sound clip is an essential skill. Most sound
clips are not likely to contain exactly what you require.
The clip may have unnecessary content at the start or
Importing a sound file finish, and this means it will need to be trimmed to
remove this content. You may also need to trim a sound
To have sound to edit, you need to import a sound file. clip to make it match the timing of a video that you
You will probably need to import multiple sound files intend to add the sound to.
into the software throughout a sound editing project.
Each time you import a sound file it will be imported in To trim a sound clip, you need to select the part of
a new track. A track in the software is a layer of sound. the clip that you want to remove. To begin to select
When multiple tracks are layered together this means the sound clip you will need to make sure that you
that different sound files can be played at the same time. have the selection tool selected. This is the tool that is
automatically selected when you open the software, but
to make sure it is the tool that you have selected, you can
KEY WORD find it on the tool bar located at the top of the screen
in the centre. The selection tool looks like an uppercase
track: a specific recording, for example, of
I. Once the selection tool is selected, move your cursor
one instrument or voice – the tracks can then
to the point in the sound clip that you want to remove.
be edited separately and combined to play
Click and hold the left mouse bottom and drag the
concurrently
cursor along the sound clip to highlight the part of the
clip that you want to remove. You will see that it has
been highlighted in a blue-grey colour. Click the cut tool,
To import a sound file, select the ‘File’ option in the
that looks like a pair of scissors in the tool bar, and the
menu bar at the top of the screen. It is the first option in
highlighted section of the sound clip will be removed.
the top left corner. This will open another menu, select
‘Import’ and ‘Audio’. Find the audio file that you want
to import and select ‘Open’. You will now see the sound
file imported into a track in the software.

Figure 11.12: Selecting part of a track.

Figure 11.11: Imported sound tracks. PRACTICAL ACTIVITY 11.17

Check the timing of your BeeProject video.


You should find that it is approximately 41
PRACTICAL ACTIVITY 11.16 seconds long.
Import the sound file 11.05 Piano_track.mp3. Trim the sound clip to match the length of
your video.

254

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

Splicing and joining sound CONTINUED

clips
Splicing a sound clip is cutting it up into different parts
so that you can use what you require of the different
parts. You can then join the parts that you require, to
edit the sound clip that you are working on. This helps
cut out parts of the clip in the middle that you may
not want, and to join the parts that you do want. You
may find that you like the start of the sound clip and a
certain part in the middle. You can use editing tools to
help you first select the middle section you require and
copy that, trim the clip to the part that you liked at the
start, then paste the middle section into the track that Figure 11.13: Piano_Track at approximately
was copied, to join the parts of the clip you require. 39 seconds.
To splice a clip, highlight the part of the clip that you
require and select the copy tool from the toolbar. This Highlight this section of the clip and copy it.
looks like two pieces of paper layered. You can also use Paste this section of the clip into your first
the keyboard shortcut, Ctrl + C. soundtrack at the 16 second point.
Delete the second soundtrack that you imported.
KEY WORD You no longer need it.

splice: join together two or more sound or You should now have a sound clip that is
video clips approximately 50 seconds long. Trim the
end of the clip again to the correct length for
your video.
To paste the copy that you have made of the clip, move
the cursor to the place in the track that you want to add
the copied clip and click the paste tool in the tool bar.
This looks like a clipboard. The copied clip section will Fading in and fading out a
then be pasted.
sound clip
If a sound clip suddenly starts or suddenly stops, it can
PRACTICAL ACTIVITY 11.18
seem quite a harsh entrance or exit for the sound. This
Import a copy of 11.5 Piano_Track.mp3. You will may be the effect that you require if you are trying to
see this has imported as a second track under make a loud and exciting impact for your sound file.
the one you already have. At approximately 39 However, you may want to create a softer, more gentle
seconds into the sound clip, you should see the entrance and exit for your sound file, this can be done by
sound wave section that looks like this: fading in and fading out the sound clip.
To add a fade effect to the sound clip, highlight the part
of the clip that you want to fade in or out. Select the
‘Effect’ option in the tool bar at the top of the screen.
This will open a large menu. To fade the sound in, select
the ‘Fade In’ option, or to fade the sound out, select the
‘Fade Out’ option.

255

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

You may find that a certain sound or sound clip is too


high or too low. You can change the pitch of a sound
clip to make it the pitch that you require.
To change the pitch of a sound clip, select the ‘Effects’
option in the menu bar at the top of the screen. Select
the option ‘Change Pitch’ from the menu. You can
change the pitch in two ways, by changing the key of
the sound clip, or changing the frequency of the sound.
You can use the key if you know that the music is played
in a certain key and you need it in a different key. For
example, the music is recorded in the key of A Major,
but you want to change it to the key of C Major. If
Figure 11.14: Fade out effect. you are not a musical person, the key of music may
not be familiar to you, therefore, a better option to
use is changing the frequency values. The simplest way
PRACTICAL ACTIVITY 11.19 to do this is to use the blue arrow on the sliding bar
underneath the frequency values. You can slide this right
Add a fade out effect to the last five seconds of or left to make the pitch higher or lower, respectively.
your sound clip.
PRACTICAL ACTIVITY 11.20

Import the sound clip 11.06 Bee_Voiceover.mp3


Changing the pitch of a and move it to be played at the end, so that it
sound clip finishes at the same time as the piano music.

All sound is made by vibrations of particles. The faster [Hint: You can use the ‘Time Shift Tool’ in the tool
they vibrate, the higher the pitch of the sound. The pitch bar to move a section of sound.]
of a sound is a measure of the sound frequency. The Lower the pitch of the voiceover by 5%.
higher the frequency, the higher the pitch of the sound.

Adding or adjusting
reverberation
Reverberation is a very old and traditional effect that
is used with sound. It is an effect on the sound that is
used to make it sound like it is being played in a larger
room. If you play sound in a larger room, the acoustics
Figure 11.15: Example of high pitch sound wave. of the room often change the sound, creating a slight
echo effect. It can be used to create a fuller and softer
feel to sound.

KEY WORD
reverberation: the number of echoes of
the sound and the way that they decay –
reverberation can be natural (caused by
the room in which the sound is played) or
Figure 11.16: Example of low pitch sound wave. introduced by editing software

256

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

To add reverberation to a sound clip, highlight the at the top of the screen. Select the option ‘Echo’. There
sound clip and select the ‘Effects’ option from the menu are two values that you need to consider for your echo.
bar at the top of the screen. Select the option ‘Reverb’. The first is the delay value and the second is the decay
There are several values that can be used to change the value. The delay represents how long it will take to echo
reverberation, but the simplest value to change is the the sound and the decay value represents how much the
‘Reverberance’ value. Increase it to add reverberance echo will fade.
and decrease it to remove reverberance.
An echo effect can also be created using a different
option in the ‘Effects’ menu. This is the ‘Delay’ option.
PRACTICAL ACTIVITY 11.21 This option can be used to create multiple echoes of the
sound and change how the sound is echoed. There are
Increase the reverberance by 10% for the three types of delay options you can choose. These are:
Bee_Voiceover. regular, bouncing ball and reverse bouncing ball. These
three options can be found in the drop down menu at
the top of the window that opens when you select the
‘Delay’ option from the ‘Effects’ menu.
Overdubbing a sound clip
A regular delay will set a fixed time between each delay,
Overdubbing is when sound is layered so that each layer
a bouncing ball delay will make the echoes increasingly
can be individually edited. When songs are recorded by
closer together and the reverse bouncing ball will make
professional music artists, overdubbing is used. Each
the echoes increasingly further apart. You can also set
musical instrument will be recorded on its own, so that
the number of times that you want the sound to echo.
it can be imported into its own track. The vocals will
also be recorded on their own and imported into their
own track. All the tracks are then layered to create
the song. The benefit is that each layer can be edited
independently of each other, to get the exact sound
required for the song.
The addition of the Bee_Voiceover clip to your
sound file in the previous activities is an example of
overdubbing.

PRACTICAL ACTIVITY 11.22

Write a five second intro to your bee video. Figure 11.17: Adding a delay.
Record your intro and import it into the software,
overdubbing the piano music at the start.
PRACTICAL ACTIVITY 11.23

Add an echo to your voiceover intro. Set the


Adding echo and delay to a delay to 0.5 seconds and the decay to 0.5.

sound clip
An echo is a reflection of the original sound, with Applying noise reduction to a
a slight delay. This can often result in the original
sound heard, then the echo heard slightly afterwards. sound clip
It is caused by sound waves being reflected back off
Sometimes when audio is recorded there can be
obstructions, such as walls. Adding an echo to sound
unwanted background noise that gets recorded too.
can make it sound more distinctive. This is useful if you
want a particular sound to be heard. This could simply be a low hum of any other equipment
being used, or a soft hissing noise that can sometimes
To add an echo to your sound clip, highlight the sound occur on recordings. It is possible to remove this kind of
clip and select the ‘Effects’ option from the menu bar background noise using a setting called noise reduction.

257

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To apply noise reduction, select a part of the track


that contains just the background noise only that you
want to reduce. This will allow the software to gain an
understanding of what you want to reduce. Select the
‘Effects’ option from the menu bar at the top of the screen.
Select the option ‘Noise reduction’. Click the option to
‘Get noise profile’. This will allow the software to analyse
the noise in that part of the track. You can then select the
whole track and use the Noise reduction setting again, but
this time by clicking’ OK’ rather than ‘Get noise profile’.
This will apply the profile created of the background noise
to the whole track and reduce it throughout.
Figure 11.18: Applying a pre-set effect.
If you have any unwanted background noise in your
recording of your intro for the video, you could try and
These options are pre-set options, but you can manually
remove it with noise reduction.
adjust the frequencies yourself to alter the sound. Click
the radio button next to ‘EQ Type’ to select the option
‘Graphic’. This will change the window to include a
Applying Equalisation range of sliders that can be used to alter the different
Equalisation is the boosting or reducing of different frequencies. Remember, if you alter the lower frequencies,
frequencies in sound. The most common application of this will alter the lower more bass tones in the sound,
equalisation in everyday sound equipment is the ability If you alter the higher frequencies, this will alter the
to control the level of bass or treble on a sound system. high, more treble tones in the sound. The frequency
on the graph is measured in Hertz (Hz) and it starts at
When used in sound editing, equalisation can also
approximately 20Hz at the lower frequencies and goes up
be used for this purpose and it can also be used to
to approximately 20000 Hz at the higher frequencies.
make certain sounds less prominent or eliminate
unwanted sounds.
To apply equalisation to your soundtrack, select the
section of sound that you want to alter. Then click the
‘Effect’ option on the top tool bar and select the option
‘Equalization’. You will see a window open that looks
like a graph.
Select the drop-down menu labelled ‘Select Curve’.
In this drop-down menu, you will see several different
options. Each of these options will change the curve
on the graph, altering the frequency of the sound,
by adding or removing certain aspects to or from it.
For example, the bass boost option will add more Figure 11.19: Manually adjusting the sound.
bass to the sound by increasing the lower frequencies.
Another example is the treble cut. Treble refers to the If you want to hear what the sound is like when you
higher frequencies in the sound, so this will cut all the have moved some of these sliders, you can click the
higher frequencies out of the sound. Other options ‘Preview’ button in the bottom left corner of the window
such as Telephone and Walkie-Talkie will change the to hear the changes. One of the most useful applications
frequencies of the sound to make it sound like it is being of equalisation is to the sound of a voice. You can use it
played through that equipment. to make the voice sound clearer and of the tone that you
want for your spoken aspects.
There are two other types of equalisation that you can
apply, these are called high pass and low pass filters.
A High-Pass filter is a type of equalisation effect that
allows higher frequencies through, whilst cutting out

258

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

lower frequencies. The cut-off for lower frequencies can allow them to get used to playing the song at a slower
be set and applied to any sound selected for the filter. A speed, before speeding up to play it at the correct speed.
Low-Pass filter works in a similar way, except it cuts the
To change the speed of your sound clip, highlight the
higher frequencies rather that the lower ones. The High-
sound clip and select the ‘Effects’ option from the menu
Pass filter and Low-Pass filter options can also be found bar at the top of the screen. Select the option ‘Change
in the ‘Effects’ menu. Once you have selected either Speed’. The simplest way to change the speed is to use
the High-Pass or Low-Pass filter, you can type in the the blue arrow on the sliding bar underneath the speed
frequency value that you want to be the cut-off value. values. You can slide this right or left to make the speed
faster or slower, respectively.

PRACTICAL ACTIVITY 11.25

This is just a fun activity and not an effect that


you are going to keep in your final sound file.
Speed up your voiceover intro and listen to the
effect it has on your voice.
Remove this effect to return your intro to
normal speed.

Figure 11.20: High-pass filter.

Normalising a sound clip


PRACTICAL ACTIVITY 11.24
Sometimes when you take an audio recording, you play it
Select all or part of your voiceover. Try back and find it is quieter than you had hoped for. There is
experimenting with the different pre-set effects a way to increase the volume of the recording, beyond just
such as Bass boost and Treble cut, and those requiring the listener to turn the volume up. The setting that
such as Telephone and Walkie Talkie too. can be used to increase the volume is called normalisation.

Select all or part of your voiceover and try Normalisation analyses the audio recording. When
adding a low pass filter and a high pass filter. it has finished analysing it, it measures the difference
between the highest peak in the audio and the maximum
Experiment with the different frequency cut-off
decibel limit (often automatically set to 0 decibels). It
values for each and create a sound for your voice
then calculates the difference. So, if the highest peak is
that you are happy with for your voiceover.
–20 decibels, the difference will be 20 decibels. When
the sound file is normalised, all the audio in the file will
be increased by 20 decibels, which will result in it being
Changing the speed of a made louder. One problem to be aware of when using
normalisation is called clipping. This is when sounds get
sound clip so loud that they sound distorted.

It’s possible to slow down or speed up a sound clip and A setting that is often combined with normalisation is
there can be several advantages to this. Speeding up DC offset. When sound is recorded, it is desirable when
a sound clip can often have a very entertaining effect, it is played for it to centre vertically on 0.0. However,
especially if it is done with voices, as it can make them displacement can sometimes occur that can cause the
sound very squeaky. You may also need to speed up a recording to sit above or below 0.0. This too can cause
sound clip to create a different effect with the music, for distortion in the sound. This offset can simply occur when
example, making it seem more upbeat. Slowing down a sound is converted from analogue to digital. Selecting the
sound clip can also affect the feeling the sound creates, setting to remove DC offset will bring the recording back to
it could make it more relaxing. Musicians can often slow vertical 0.0 and limit any distortion of the sound.
down a sound file when using it to practise a song. It can

259

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To normalise a sound clip, select the sound clip and choose To change a sound clip from stereo to mono, highlight
the ‘Effects’ option from the menu bar at the top of the the sound clip and select ‘Tracks’ from the menu bar at
screen. Select the option ‘Normalize ’. This will open a the top of the screen. Select the ‘Mix’ option, then ‘Mix
window that will allow you to set the maximum amplitude Stereo Down to Mono’.
(this shouldn’t be set higher than 0) and choose whether to
remove the DC offset.

PRACTICAL ACTIVITY 11.26

This is just a fun activity and not an effect that


Figure 11.21: Stereo.
you are going to keep in your final sound file.
Try normalising all or part of your sound
clip. Try setting the maximum amplitude to
2 to experiment with what happens to the
sound when you do. Try setting the maximum Figure 11.22: The same sound clip in mono.
amplitude to –1 and see what effect this has
on the sound. Try doing each of those with and
without DC offset. PRACTICAL ACTIVITY 11.27
Remove any normalisation effects that you
Change the piano sound clip from
have added.
stereo to mono.

Change a stereo sound clip to Sampling rate and resolution


a mono sound clip It is important to understand the concept of sample rate
You may notice that the piano sound clip in your sound file and sample resolution when recording sound files. They
has two different tracks. This is because it is stereo. When a both affect the size of the sound file and the quality of
sound file is set to stereo, it has multiple tracks. These two the sound recording.
tracks can be just a duplicate of each other, as they are in
the piano sound clip. They can also have different content.
If they do have different content, the different tracks can KEY WORDS
be set to play through different speakers in a sound system. sample rate: the number of times sound is
This is very useful when trying to create a 3D effect in sampled in a second
films, as different sound effects can be heard from different
speakers, making it seem like the sound is coming from sample resolution: the number of bits that are
different places. A technical term for this type of sound used to represent each sound sample
system is surround sound.
A sound clip can also be mono. This is when it has a When recording sound, samples of the analogue sound
single track, and when played through multiple speakers, are taken at set intervals. This is called sampling. The
they will all play the same track. number of samples taken in a period of time is called
the sample rate. Sample rate is measured in hertz (Hz).
KEY WORDS If one sample is taken per second, this would be a
sample rate of 1 Hz. Most music recordings are taken
stereo: a sound clip that has multiple tracks at a sample rate of 44.1 kHz. This means the sound is
mono: a sound clip that has a single track sampled 44 100 times in a second.
The effect of the sample rate can be seen by looking
at a simple example of a sound wave representing
analogue sound:

260

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

10
PRACTICAL ACTIVITY 11.28

Draw your own sound wave example, like the one


5
given. Record the sample value at each time sample.
Draw the resulting sound wave that is recorded and
compare this to your original sound wave.
0 1 2 3 4 5 6 7 8 9 10

Double the amount of time sample taken of the


Figure 11.23: Analogue sound wave.
same sound wave. Draw the resulting sound wave
that will now be recorded. Is this closer to the
The sample of sound that is recorded at each time original than the first?
interval can be represented in a table:

Sample The sample resolution of a sound file is the number of


6 8.5 2.5 8 3.5 2 4.5 3 8.5 3.5
value bits there are per sample. Sample resolution is important
Time when recording the different volumes of sound. A low
1 2 3 4 5 6 7 8 9 10
sample sample resolution, for example, 4-bits, would limit the
level of volume that could be recorded. A high sample
If these sample values are then plotted on the same resolution, for example, 32-bits, would allow for a
graph, this shows the difference in the initial sound, to very accurate recording, but the size of the file created
the sound sampled. would be very large, so streaming could be affected by
10
buffering, downloading could take a long time and it
may affect your data allowance. The usual sampling
resolution used for music files is 16-bit.
5
The size of a sound file is dependent on the sample rate
and sample resolution. The approximate size of a sound
file can be calculated using:
0 1 2 3 4 5 6 7 8 9 10
Sample rate × sample resolution × length of sound file
Figure 11.24: Analogue sound wave with sampled sound
wave. Question
5 a Calculate the size of a file in megabytes (MB)
You can see that the sound wave differs significantly that is two minutes in length, has a sample rate
in places. This is because a sound sample wasn’t taken of 44.1 kHz and a sample resolution of 16-bit.
at that certain point, so the detail in that part of the
b Compare the file size if the sample resolution
analogue sound is missed.
is increased to 32-bits.
If the sample rate was doubled in the given example, the As size is an important factor when streaming
resulting sound wave after sampling would be a closer or downloading music, sound files are often
representation of the initial analogue sound wave. This compressed.
means that the quality of the recorded sound would be a
truer representation of the analogue sound that is recorded.
It also means that the file would need to store twice as
Exporting a sound clip
many samples, so this will increase the size of the file. You need to export your sound clip to a suitable file
format for the media on which it will be mostly played.
Most people will choose a universal file format to allow
the sound file to be played on many devices, using
different software platforms.
You will need to select different file formats depending
on the type of media used to play the sound file, and
the limitations of the file size required. Each file format

261

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

will compress the file using either a lossy or lossless To export your sound file, select ‘File’ from the menu
compression method. bar at the top of the screen and select the option
‘Export’. You will see several file formats that you can
Lossy compression will remove unnecessary data from
use for your sound file. Select a suitable format and give
the sound file to make the file size smaller, for example,
the sound file a suitable filename and location.
sound that may not be audible by the human ear. Lossy
will slightly affect the quality of the sound file, but most
of this will not be heard by the human ear. PRACTICAL ACTIVITY 11.29
Lossless compression will not remove any data in the Export your sound file in a file format that is lossy.
compression process and will allow the original sound
file to be reinstated. This means the original quality Export your video in a file format that is lossless.
and accuracy of the sound will be retained. Lossless
compression can work in various ways. One method is
for repeated patterns in the sound file to be identified TIP
and grouped together to be stored.
If you wanted to export the sound file in a lossless format, You should practice always saving a copy of
you may choose a file format such as FLAC. Lossless the file in a generic file format as well as in the
compression is often used for recording of live music, proprietary software format.
especially with orchestras. This allows the listener to have
the most accurate experience of the sound created.
The last task left to do is import your sound file into the
If you want to export the file in a lossy format as the video editing software and add it to your video file. Import
accuracy and quality of it isn’t essential, but you need the the file in the same way that you imported the video clips.
file size to be smaller, you may choose a file format such You can simply drag the file from the media section, to the
as MP3. This type of compression is often used when timeline, when imported, to add it to your video.
streaming music, so that less bandwidth is required to
stream the sound file. This makes the ability to stream the
PRACTICAL ACTIVITY 11.30
music accessible to more people, especially those that only
have access to low bandwidth connections. It would also Export your BeeProject video with the sound and
mean that those users streaming via a mobile connection be proud of your sound and video editing skills!
would not use as much of their data allowance.
When compression file formats such as MP4 are used,
the compressed sound and video files are stored in a REFLECTION
structure called a container. All the information needed
for the sound or video is stored within the container. 1 Who do you think the audience is for the
Other file formats that can operate as contains are AVI, video that you have created?
MOV and WAV. The container manages the packing of
2 What do you think the intended purpose is
the compressed files, as well as the transportation and
of the video that you have created?
the presentation of them when the file is opened.

262

Copyright Material - Review Only - Not for Redistribution


11 Sound and video editing

EXAM-STYLE QUESTIONS
1 Define what is meant by the aspect ratio of a video. [1]
2 State why a trimming tool would be used on a video clip. [1]
3 Explain two advantages of using captions on a video clip. [2]
4 Explain two advantages of using a lossy compression method on a video file. [2]
5 Explain one disadvantage of using a lossless compression method on a sound file. [1]
6 Explain what is meant by the sample rate of a sound file and how it affects the file size. [2]

SUMMARY CHECKLIST
I can edit a video clip to meet the requirements of its intended audience and purpose.
I can edit a sound clip to meet the requirements of its intended audience and purpose.
I can know and understand the different compression methods and file formats that can be used for sound
and video.
I can know how to use typical editing features in sound and video editing software and know why
they are used.
I can know how the size of a sound file is affected by the sample rate and sample resolution.

263

Copyright Material - Review Only - Not for Redistribution


Chapter 12

IT in society
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• know and understand what is meant by an electronic currency, including:
• different types
• characteristics
• advantages and disadvantages
• uses
• impact and risks
• know and understand what is meant by data mining, including:
• processes of data mining
• uses
• advantages and disadvantages
• know and understand what is meant by social networking, including:
• types
• uses
• impact
• advantages and disadvantages of different types
• know and understand the impact of IT on a range of areas in society, including monitoring and
surveillance

Copyright Material - Review Only - Not for Redistribution


12 IT in society

CONTINUED
• know and understand technology enhanced learning, including:
• methods of delivery
• impact
• advantages and disadvantages of different methods of delivery.

BEFORE YOU START

• Do you understand what is meant by information technology?


• Do you understand that technology is used extensively in many parts of our society?
• Do you understand that our data is valuable to companies and is used extensively to aid decision making
in companies?
• Do you understand what is meant by social networking?

Introduction
IT has become an integral part of our society and some
would argue that it is very difficult to imagine a society
without it. It affects many aspects of our lives, including
how we spend our money, how our data is stored
and mined, how we communicate and how we learn,
amongst many other aspects.

12.1 Electronic currency Figure 12.1: Electronic payment.


An electronic currency is a payment method that occurs
in digital form. It does not involve the exchange of
physical currency, such as coins and bank notes. There
are several types of electronic currency. These include: Digital currency
digital currency, virtual currency, cryptocurrency, A digital currency is a method of payment that is similar
central bank digital base money and stored value cards. to paying with coins and bank notes. However, rather
These terms can sometimes be used interchangeably, than exchanging physical bank notes and coins to make
but some information, for clarity, is given for each. The the payment, the currency is exchanged digitally using
terms electronic currency and digital currency are often computers. There are several different forms of digital
used interchangeably. currency. The most popular are payments using credit
cards, mobile phones and smart watches. A common
reference for this kind of payment is that it is like having
KEY WORDS an electronic wallet.
electronic currency: a payment method that Credit cards can be used with card payment machines
occurs in a digital form that will either allow the magnetic stripe to be swiped,
the card to be inserted into the machine and the chip
to be read, or touching the card to the computer using
a method called contactless payment. In all cases, data

265

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

that is stored on the card is read by the computer. This their mobile device to the card payment machine and the
data will contain the information required to locate the app will provide the data to access the user’s bank account,
user’s bank account. The business can then request that in a similar way to the credit card method.
the correct sum of money is deducted from the user’s
bank account and sent to the business’s account.
REFLECTION
Another form of digital currency that is similar to a credit
card is a stored value card. This is a type of card that has Imagine a world where physical currency doesn’t
a set amount of currency stored on it, for example, $100. exist, and all payment transactions are digital. In
The card can be used to pay for items and the value stored what way do you think the world would change?
on the card will decrease until it reaches 0. Banks often Do you think it would have a positive or a
provide the cards to people who are not able to have a negative impact? Give a reason for your answer.
credit card due to issues such as credit rating. There are two
kinds of stored value card. The first is the closed-loop card.
This is where a monetary value can only be loaded onto it Virtual currency
once, and it is discarded when all the money is spent. The
Virtual currency is also a type of digital currency.
second is the open-loop card. This is where a monetary
However, unlike the digital currencies discussed,
value can be repeatedly loaded onto the card.
which are centralised systems, virtual currency is a
Mobile phones and smart watches can be used in a similar decentralised system. In simple terms, a centralised
way to the contactless payment that can be made with system is one that has a central body that is managing
credit cards. A user can install an app onto their mobile and regulating the use of the currency. In most cases
device that acts as a digital credit card. Examples of this this is the government and banks. A decentralised
would be Apple Pay and Google Pay®. The user can touch system is therefore one that does not have a central

Advantages Disadvantages
A person doesn’t need to carry physical money around, There is often a monetary limit on contactless
which could be easily lost. payments.
If a card or mobile device is lost, the user can contact their As data is sent electronically, there is always the
bank to stop any monetary transactions from the card or risk that the transactions could be hacked.
device.
All transactions are completed using encrypted methods, so Some people are anxious about the thought of
data is sent securely. contactless payments, believing that they could
walk near a payment machine and money could
be deducted from their account.
The use of contactless payments can speed up payment for Some may think that people can lose track of
products and services. their spending as they are not handing over
physical money for the transaction.
If a user is in a different country, they don’t need to have the If a card or device is lost, it is possible for another
physical currency of that country available in their wallet. person to use it for contactless payments, before
They can use a digital method and the banks involved will the user has chance to cancel it.
electronically change the transaction from one currency to
the other.
The user doesn’t necessarily need to remember their PIN
number each time, if they are using contactless payments
methods.
The use of payment methods, such as stored value cards,
can prevent a person from getting into debt, as they can
only spend the set amount that is stored on the card.

Table 12.1: Advantages and disadvantages of digital currency.

266

Copyright Material - Review Only - Not for Redistribution


12 IT in society

body managing the process. The most common way These cryptocurrencies are also a type of peer-to-peer
to manage transactions with a decentralised system is electronic monetary system. This type of payment
through the use of a ledger, for example, blockchain. system is designed to allow peers to send electronic
payment to each other without the need for it going via
PRACTICAL ACTIVITY 12.01 a central body, such as a financial institution.

Use the internet to research what blockchain The value of a cryptocurrency can often fluctuate a
is and how it is used to monitor payments great deal. In 2011, 1 bitcoin was worth 1 US dollar.
transactions. At the end of 2017, 1 bitcoin was worth close to
20 000 US dollars. In 2018, it fell again and was worth
approximately 6000 US dollars.
Virtual currency also differs from the digital currencies
already discussed, in that it only exists within a PRACTICAL ACTIVITY 12.02
virtual environment, and does not have a physical
representation as bank notes and coins. An example of Use the internet to find out what 1 bitcoin is
a virtual currency would be tokens that can be collected worth today in your country’s currency.
or bought, for example, within a computer game, that
allow players to buy different items within the game,
such as new clothing or armour. The player can buy
a certain number of tokens and use this as virtual
currency in the game. For this reason, a virtual currency
is normally specific to the particular game or application
for which it was created, and cannot normally be traded
anywhere else.

Advantages Disadvantages
It can personalise a Is a decentralised
game or application by system, so has little
making it fun to collect regulation.
and spend the specific
virtual currency.
Normally specific to the Figure 12.2: Bitcoin.
context for which it was
created and cannot be Many people use bitcoin to buy and sell products over
spent elsewhere. the internet. Some support the use of a decentralised
Table 12.2: Advantages and disadvantages of virtual currency, as it allows people, especially businesses, to
currency. make payments that do not involve the usual charges
that are applied by banks in a centralised system.
Others have a more controversial stance on the use of
a decentralised currency, as they believe it can allow a
Cryptocurrency level of anonymity in payments, that means criminal
activity is difficult to trace.
The most well-known examples of cryptocurrencies
are Bitcoin and LiteCoin. Some cryptocurrencies, like
these, are tracked using systems such as blockchain.

267

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages and coins that you can use in payments every day.
Creating digital fiat money in this way would mean that
The usual charges The decentralised banks effectively create a digital currency. Each unit of
that can apply to systems allows a level currency in CBDC will act as an equivalent of a paper
bank transactions of anonymity that some bank note. It will be similar to bank notes, in that it will
are not present for believe encourages have a serial number. There will also be distinguishable
cryptocurrency. criminal activity and characteristics on the unit that will prevent fake units
allows it to go untraced. being created.
People are able to invest There have been a
Banks intend to use it as part of the controlled supply
in bitcoin and possibly number of instances
of currency by the central bank, and it will work
make money if they can where businesses have
alongside existing currency such as physical bank notes
sell it for a higher rate. been hacked and bitcoin
and coins. There are several banks around the world
has been stolen. As the
that are currently looking into the development and use
system is decentralised,
of CBDC. These include The Bank of England, People’s
there is no bank to help
Bank of China and the Bank of Canada.
resolve this kind of theft.
It is very difficult to
Advantages Disadvantages
create counterfeit
currency for a As no physical currency Some people like
cryptocurrency, because will need to be exchanged the privacy of the
of all the security it between banks, the cost anonymity that they
involves. of transactions will be can have with using
reduced. physical currency. If a
Table 12.3: Advantages and disadvantages of person pays with cash,
cryptocurrency. there is no record of
their details attached
The growth of cryptocurrency has proved troubling to to that payment, by
banks around the world. Businesses have begun using the bank.
it more, preferring the free nature of which they can The banks’ ability to
exchange the currency. This is a threat to traditional speed up the exchange
banks offering traditional methods, because they rely on of money will be greatly
the fees generated and the cash input from businesses to improved.
survive. This has led to some banks considering creating Some believe that if
their own cryptocurrency. physical currency became
obsolete, in favour of
CBDC, criminal acts such
REFLECTION as money laundering
What do you think about banks creating their and tax evasion would
own cryptocurrency? What advantages and decrease, as these often
disadvantages to you think this would create? rely on the use of physical
currency.
It costs money to produce
physical currency,
Central bank digital base therefore if it ceased to
exist, then these costs
money would be saved and
could be invested into the
Central bank digital base money (also known as central
security of a CBDC.
bank digital currency (CBDC)) is the digital form of
what is known as fiat money. Fiat money is the currency
Table 12.4: Advantages and disadvantages of CBDC
that is the physical currency used in a country, that is
currency.
issued by governments and banks. It is the bank notes

268

Copyright Material - Review Only - Not for Redistribution


12 IT in society

In order to establish the kind of data that needs to be


12.2 Data mining mined and analysed, the objectives of the business need
to be understood. The business understanding stage is
Data mining is a form of data analysis. It is also a form
where the needs of the business are discovered, and an
of artificial intelligence. The process of data mining
in-depth analysis takes place to ascertain these.
involves searching through and analysing large sets of
data to establish patterns and trends. This information Once the business needs have been established, other
can be used to help identify future trends that could be important factors, such as the resources available, the
very valuable to a company. The large sets of data used constraints on the process and a data mining plan and
are stored in data warehouses. goals must be considered. The data mining plan will
involve developing queries to interrogate the data.

KEY WORDS
Stage 2: Data understanding
data mining: the process of collecting large sets The data understanding stage involves an initial
of data and analysing them to identify patterns collection of data. This is normally collected from
and trends various sources that are available. Once the data is
collected, the integrity, accuracy and the properties of
the data are considered, to make sure that it is viable.
REFLECTION Once the data is established as viable, it can be
interrogated using queries that were developed in
Why could the ability to identify future trends be the business understanding stage. This interrogation
so valuable to a company? will help the business understand whether the
data is complete and will provide them with the
desired outcome.
Computers are used for data mining because of the
sheer volume of data that is searched and analysed.
Stage 3: Data preparation
This is the largest stage in the project and the most time
consuming. During this stage the data is taken through
a whole process of selection, cleansing, construction and
formatting, to make sure that it is in the form required
for the business. This can then allow for patterns and
trends to be established in the data, relating to the
business needs.

Stage 4: Data modelling


During this stage, various test scenarios are generated
to model the data. This will allow the business to
understand whether the models are suitable for the
Figure 12.3: Data mining. business needs, and that the models fall in line with the
business initiatives.

The process of data mining Stage 5: Evaluation


The process of data mining is complex and involves In the evaluation stage, the results generated by the
several different stages. models are evaluated. The outcome of this evaluation
may produce new business needs, depending on
the patterns and trends that have been identified in
Stage 1: Business understanding the process.
There are three main elements to the business
understanding stage: setting the objectives, developing
the project plan and establishing the criteria for success.

269

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Stage 6: Deployment Surveillance data, such as CCTV footage and recorded


telephone calls, are analysed to predict issues such as
The deployment stage normally involves creating a
criminal activity. Some people agree with the use of data
report and other visual material to present the findings
mining in this way because they believe it keeps people
of the data mining process to the stakeholders of a
safer. Others completely disagree with the use of data
business. This information can then be used by the
mining in this way because they believe it is a violation
stakeholders to decide what actions the business will
of privacy.
take next.
If the stakeholders feel the business hasn’t achieved an
informative enough result, they may choose to repeat REFLECTION
the data mining process to further refine the information
How do you feel about the use of data mining in
gathered from the process.
surveillance?

One type of surveillance that data mining is used for is


corporate surveillance. This is when corporations mine
people’s data that can be used for marketing purposes
or sold to other companies. A business can use this
information to tailor their products or advertising to
individuals. This is also known as data profiling.

Figure 12.4: Refining the data mining process.

Use of data mining Figure 12.5: Surveillance.

The use of data mining is increasing. Many different


organisations make use of data mining to aid Business
their planning and the actions they choose to take.
Businesses use data mining for a variety of different
Sometimes, the use of data mining can be critical to
reasons, from predicting customer spending habits,
highly sensitive situations.
predicting product trends and even in hiring staff. Data
mining is valuable to a business because, if they are able
National security and surveillance to predict what products customers will buy, they can
Governments make continued use of data mining to aid beat their competitor to market and gain a competitive
nation security. It is used to analyse intelligence that is advantage. This can ultimately result in increased sales
gathered to highlight the current activity in a country revenue, and possibly profits, for the business.
and predict possible future activity. This can help reduce One business application of data mining is customer
the risk of attack or dangerous activity in the country. relationship management (CRM). The aim of CRM is
The use of data mining in surveillance is an ongoing to improve customer loyalty and to implement business
controversial matter. In surveillance, data mining is used strategies that are customer focussed. In order to build
in a similar way to how it is used in national security. customer loyalty, a business needs to predict the needs
of the customer, this is where data mining can be used.

270

Copyright Material - Review Only - Not for Redistribution


12 IT in society

Question with the stabilisation and growth of the global economic


market. Any data and intelligence that can predict what
1 How do you think a business could make use of might happen in future with the economy can help
data mining when hiring staff ? important institutions, such as governments, to prepare
for any possible crisis that may occur. Companies can
Research also use the ability to predict what may lay ahead with
the economy to make important business decisions, such
Research is a fundamental and imperative part of so
as where they should plan to expand their business.
many areas in society. It helps revolutionise industries
such as medicine, space exploration, engineering and
technology. Data mining is often the underpinning tool Ethical and privacy implications
in research. Research companies can also make use of Individuals and organisations have concerns about
other research company’s data, through the use of data the ethical and privacy implications of data mining.
mining. This can speed up core developments in these This often revolves around the use of data mined
key industries. about individuals that is then used to target them with
products and advertising. There can be certain issues
One research and healthcare application of data
with this. If a person searches for a certain product or
mining is bio-informatics. This is the practice of mining
service, they may be bombarded with similar products
biological data to extract medical patterns and trends.
for a long time afterwards. This might not be too bad if
This can be used in practices such as gene finding and
this was for something they like, but if the search was
disease research and diagnosis.
for a product that can then create upsetting feelings
at a later date, the constant reminder of the targeted
Health care advertising may be harmful. For example, if a person
Data mining is increasingly used to improve health care. searches for their favourite chocolate, but then decides
It can be used to identify success practices in health to start a healthy eating diet, they may keep being
care and to also help reduce costs. It can also be used tempted by targeted adverts about chocolate. Another
to predict the volume of patients that will visit medical example could be a person who searches for symptoms
institutions, so that appropriate levels of staffing can be of a medical ailment that they have. This data is then
put in place. available and mined by lots of companies, and the
individual may never want people to be aware of their
medical issues.
The ethical issues also prompt privacy issues that many
individuals have. Many people feel it is a violation
of their privacy, and also unethical, for companies
who have collected their data to share this with other
companies.

REFLECTION

How would you feel about a company sharing


data they have collected about you with another
company? Do you feel this affects your privacy?
Do you think this is an ethical practice?

Figure 12.6: Data mining for improved health care.


Advantages and disadvantages of
data mining
Predicting social and economic trends You may have realised there can be both advantages
Data mining has a large role in predicting future social and disadvantages of data mining. These may be for the
and economic trends. Many institutions are concerned individual or the organisation:

271

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages Example case study of data mining


A very high-profile case involving data mining was the
Allows organisations to The process of data
Facebook-Cambridge Analytica scandal. The whole
make strategic decisions mining, the software
case involved the way companies collect, use and
that can help maintain tools and the skilled
share people’s data. The case occurred not because
or increase their staff required are all very
the companies involved necessarily broke the law, but
revenue. expensive.
because ethical issues were raised about their activities
in collecting data. This occurred as there were no
Allows organisations Many people see the strict laws in place within the countries concerned
to understand their practice of data mining that necessarily governed this practice. The companies
customers and create as both unethical and an involved were accused though of exploiting loopholes in
the products they need. invasion of their privacy. the law to unethically mine data.
The scandal revealed that Cambridge Analytica, a
political consultancy firm that mined data, had collected
Allows individuals to Storage costs for data the personal data available from millions of people’s
see targeted product are very expensive, Facebook profiles. They did this without the consent of
advertising based therefore this can also the Facebook users. This data was then analysed and
on the things they increase the cost of the used for political advertising purposes. The data was
already like. This means process of data mining. used to influence public opinion.
adverts could be more
meaningful to them. It As a result, on 25th May 2018, a new law was
could also help them implemented to help govern the practice of data mining
see products they would for EU residents. This has meant that any companies
like but do not currently wanting to gather the data of EU citizens must seek
know about. their permission to do so. It details clear guidelines and
definitions about how data can be collected and used.
Allows important The masses of data It also forces companies to consider questions such as
institutions to predict stored prove a great ‘Why am I collecting this data?’, ‘What do I intend to do
future crisis that they security issue, as hackers with this data?’ and ‘Do I have the users consent to use
can then plan strategies will want to gain access this data?’.
and solutions to help to the data because it
handle or avoid them. has a high value.
Allows businesses to The outcomes produced
save costs either by by data mining are only 12.3 Social networking
understanding how to predictions based on It can often seem that the world is obsessed with social
streamline what they patterns and trends in networking, but it has grown to be an inherent part of
already do, or by not past data. They are not many people’s lives. They rely on it for entertainment,
investing in a future an accurate science and communication and often as a source of news. People
product that they can it is very possible for use social networking methods to share information
now be aware may not them to be incorrect. about their daily lives, including how they feel, what
be desired. makes them happy, what irritates them, what they are
eating, where they are on holiday and what their beliefs
Table 12.5: Advantages and disadvantages of data mining. are. The world likes to share!

KEY WORDS
social networking: the use of websites and apps
that allows users to communicate and interact

272

Copyright Material - Review Only - Not for Redistribution


12 IT in society

Chat rooms are mainly used by individuals, but they


could be used by businesses and organisation as a type
of marketing tool. A business who wanted to expand a
current product or service, or launch a new one, could use
it as a method of gaining feedback. A chat room could
be set up to discuss the product and a selection of users
could be sent the log-in details. When the users enter the
chat room, the business could ask questions or make
comments about the product to prompt discussion.

Figure 12.7: Sharing data on social networks. Instant messaging


Instant messaging is one of the earlier forms of social
There are several different types of social networking.
networking. It is designed to allow two users to send
These include chat rooms, instant messaging, forums,
messages to each other in real-time. Although this
email, blogs and microblogs. These are all forms of
often happens between two users, it is possible for
communication technologies that are also known as
more to be included if a group instant message thread
social media. Users normally use these technologies on a
is created. Several social media platforms have an
personal computer or a mobile device and they are often
instant messaging service built into them. These include
accessed using a website or an app.
Facebook, Instagram and Skype. Some other media,
such as online gaming, also have instant messaging
Chat rooms facilities built into them.

A chat room is an online service that allows multiple Many individuals and organisations use instant
users to type messages to each other, allowing them to messaging facilities. Individuals use them to converse
chat. They are meant to be similar to people gathering using text with friends and family. They can also use them
in a room and chatting about what interests them. to contact a business, who have a social media presence,
to ask them a question, or make a complaint. Many
Chat rooms are often created to allow users to discuss instant messaging facilities have a reporting function that
a particular topic or issue. Users are given a username allows a user to see when the other person has read their
and password to enter the chat room. When they log message, and when they are currently replying. A user
in, they can normally see which other users are online can also see when another user is currently online. Instant
and type messages into a text input box. These messages messaging can also be used to send other media, such as
are then displayed as a dialogue onscreen. The process sound files, images, video files and emojis.
is interactive and designed to allow multiple users to
communicate and discuss the chosen topic.

Figure 12.9: Instant messaging.

Businesses and organisations have begun to develop


internal instant messaging facilities. This allows
Figure 12.8: A ‘chat’ room. departments to message other workers in the

273

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

department to ask a quick question or make a quick platform that allows users to post questions or ask for
observation or comment about a current issue or idea. support about their product. A moderator or other can
This facility is also known as a LAN messenger. then reply to users’ requests and provide any support
needed. This type of support facility can be useful to a
PRACTICAL ACTIVITY 12.03 business as a method of customer service.

Use the internet to research more information Forums can also be used to seek advice and support
about how businesses and organisations can use on issues such as health, education and finances. Users
a LAN messenger. may post about a particular health issue, such as their
symptoms, and other users can provide information
about what health issue they think the person has. Users
can also share information about what advice they have
Forums been given regarding a particular health issue, and ask
other users to post whether they have received similar or
Forums are an online place that users can post thoughts,
different advice. A user could also post seeking financial
ideas and questions. Other users can then reply to the
advice about a certain scenario they find themselves in,
post with their thoughts, feedback and answers to any
or for advice about investments, and other users could
questions. Forums are different to chat facilities because
post offering their advice.
they do not have the same level of live interaction. A
user who posts a question on a forum is not likely to Forums sometimes have dedicated professionals that
be needing an immediate reply from other users. They will post experienced advice to the initial user, but there
can post their question, then return to the forum at a can also be posts from other users who may be offering
later time to see what answers and advice other users personal advice, but are not professionals. Therefore,
have given. Other users can also search a forum to see users should always be cautious about any advice given
if someone has already asked for an answer to their by other users as this may not be correct or accurate.
question and they can read the previous responses given
if it has already been asked. PRACTICAL ACTIVITY 12.04
Some forum platforms will have a user who is called a
Think a forum idea that you and a partner could
moderator. The forum will have rules that users must
set up. Make a list of rules for your forum that
abide by to post on the forum. The role of the moderator
you want users to abide by.
is to check the forum on a regular basis to make sure
that users are abiding by the rules. The moderator will
remove any posts and can block any users from posting
if they break the rules. Some forums may be very strict Email
and will only allow posts to be visible on the forum when
they have been approved by the moderator. Most forum An email (short for electronic mail) is a message that can
platforms will require users to register to be able to post be sent by a user to one or more users. Email is similar
or reply to comments. If users do not want to post or to sending an electronic version of a letter. The user
reply to posts, then they can normally read the forum writes the letter then addresses it to send it to another
posts without the need to register. user using their email address. This is an address that
is linked to their email account. A user registers for an
In a forum, posts are structured as threads. A user posts email account with an email provider, and as part of
a question, which starts a thread. Other users post their registration they choose a unique email address.
their reply to the question, which are all added to the They can then give this address to any other user so they
same thread. This allows the original user who posted can be sent emails.
to be able to see all the replies to their post. A forum
will normally have a particular topic as a theme, for It is easy to identify if an address is an email address as
example, technical support, healthcare issues, computer they normally have an ‘@’ symbol within them, and a
games and makeup tips. domain name (for example.com).

Forums are mainly used by individuals, but businesses Businesses and organisations use email extensively.
and organisations do also use them. A business can For many, it is one of their main methods of
use a forum as a support facility. It can have a forum communication. It can be used to easily send
information to everyone within a company. Businesses

274

Copyright Material - Review Only - Not for Redistribution


12 IT in society

can also use email to send information to customers and or national scale. Schools could also use microblogs
potential customers to provide them with information, to provide a stream of information for parents about
such as a recent offer they have or a new product. This is recent updates in the school. Microblogs have become
a more direct method than requiring their customers to a popular source of news for people around the
look at their other social media platforms. world. News platforms will post a headline on their
microblog that can provide a link to a full article for the
Individuals also use email communication to contact
user to view.
family, friends and organisations. Email is used to send
messages to family and friends that the writer may Some individuals make a living as a full-time blogger.
feel is more extensive than what they would put in an They have so many users that read their blog that it
instant message. People can also use email to contact an attracts companies who want to place adverts on their
organisation, for example, to make a complaint. blog. They are paid for the adverts that are displayed on
their blog, which provides them with an income. Video
PRACTICAL ACTIVITY 12.05 has become a very popular media in blogging, and
people who use videos to blog are known as vloggers.
Use the internet to research the first emails that
were sent. Find out who sent them and what they
contained.

Blogs and microblogs


A blog (which is short for weblog) is an online version
of a journal. Blogs are set up by individuals, or groups
of individuals, normally to report on their lives or
a particular topic. Blogs are structured in reverse
chronological order, which means that the most recent
post to the blog will appear first.
Blogs are read by people all over the world. They have
become a very popular way of people finding out about Figure 12.10: Video blogging.
lots of information in which they are interested. The
blogger will usually use some online software to create
their blog. Popular online blogging software includes
WordPress and Squarespace.
Impact of social networking
Social networking has had a huge impact on both
Microblogs are similar to blogs, but posts are created
individuals and businesses.
with a much smaller level of content. A blog may have
posts that are a thousand words or more. However, Some feel that it has had a positive impact on the
a microblog will have posts that are just a couple of lives of individuals. It has allowed us to communicate
sentences or just an image. Popular microblogs include with people on a global scale. This means that family
Twitter and Instagram. and friends that live in different countries can share
more about their lives which can help people feel more
Businessess and organisations can make use of blogs
connected and so happier and less alone. Some also
as a method of providing information, to customers
feel that it has allowed us to connect with strangers
and potential customers about developments within the
and make more friends with people who share similar
company. Education facilities, such as schools, can use
thoughts and beliefs to us. The result of this is that
blogs to allow parents and students to see what has been
people feel happier and more passionate about their
happening in different departments within the school,
thoughts and ideas because they are able to share and
including any recent school events.
develop them with those that think alike.
Organisations such as police and law enforcement
Some feel that social networking has had a negative
can use microblogs to provide regular updates to
impact on the lives of individuals. They believe it
communities about problems and issues on a local
has a detrimental effect on our mental health. Social

275

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

media has created a culture of constant sharing which Social networking has had a positive impact on
has led to constant comparison of our lives to others. organisations because it allows them to distribute
This can result in people feeling very unhappy with important information on a large scale. For example, if
their lives, because they look at how others portray there is a natural disaster within a country, the police
their lives on social media and feel that their own and government can use social networking to distribute
life does not compare. Others also think that social vital information about how people can keep themselves
networking can be used to influence minds, often of safe, or get to safety. They can also use it to give people
the younger generation, to think in certain political or prior warning of an issue, such as an approaching
stereotypical ways. tornado or other bad weather. This can help people
have precious time to prepare safety measures that
Some feel that social networking allows people to hide
could save their lives. One cause for concern about
behind an anonymous online profile, which allows them
organisations using social media is their ability to
to post controversial and often harmful comments that
censor the information that is released. A government
can result in cyberbullying. There have been detrimental
may choose to censor information about a current
results of cyberbullying that have even led to some
issue occurring within the country so that people have
people taking their own life.
a false impression of what is occurring, distorting
One growing concern about the use of social networking their opinion. For example, they could underplay
is that it has created a generation that needs a sense or sensationalise a political protest, influencing the
of immediacy to everything they do. This is creating opinions of others in the country.
cognitive issues that may result in people having
Here is a summary of the advantages and disadvantages
very little concentration to be able to complete daily
of social networking:
tasks because they are taking in a constant stream of
information, without focussing on a one particular task.
Advantages Disadvantages
Allows communication to People can feel
REFLECTION occur on a global scale overwhelmed by all
Some people believe that social networking has between individuals, the information and
improved our ability to communicate, others businesses and communication they
believe it has caused it to deteriorate. What organisations. encounter.
impact do you think social networking has had Allows people to feel Some people can feel
on our ability to communicate? included as they can excluded and feel that
share thoughts and ideas everyone seems to have a
with those who share better life than they do.
Social networking has had a large impact on businesses. similar opinions.
It is used by businesses on a regular basis as an effective Allows organisation to Some organisations could
marketing tool. It can be vital to the success of a distribute important falsely represent certain
business to have an active online social networking information to people situations and influence
presence. Some argue that the impact a business can that could be lifesaving in opinions of people that
have by using social networking is starting to deteriorate. critical situations. are built on censored
Individuals now see so many different online adverts information.
that they are likely to just bypass the advert, meaning Allows some individuals Social networking
it has little effect at all. However, social networking has to make a living writing influencers can
allowed businesses to reach audiences on a global scale an online blog that others sometimes lead people
which can help increase their sales revenue. enjoy reading. to think or do things
that are harmful, such as
over exercise or spend
REFLECTION
too much on expensive
What’s the most effective way that you have seen clothing.
a business use social networking?

276

Copyright Material - Review Only - Not for Redistribution


12 IT in society

Advantages Disadvantages The quality of the resources available through these sites
can often differ greatly. On sites like YouTube there may
Allows people to seek Contributions to be no governing body looking at the level of teaching that
advice or support on platforms, such as forums, is taking place, in the way that there often is with schools.
various issues, including can often be made by This means it may be difficult and time-consuming for a
technical support and people who may not be person to pick through all the tutorials they can find to
healthcare. This can result qualified to give advice get one that is of a high quality. It could also mean that a
in an improved level of or support. This could person could use a tutorial that teaches them incorrectly.
customer service and lead to a person acting
care. on incorrect advice and There are several different types of platform for technology
possibly causing harm. enhanced learning. These include computer-based training,
online tutorials, networked learning, massive open online
Provides a stream of It may be causing courses (MOOC) and video conferencing.
entertainment for people. people’s attention span
to decrease as they no
longer are able to focus
on a single activity for any
Computer-based training
length of time. Businesses and organisations can create extensive
training programs for their staff that can be accessed
Can expose people to News stories can se
using computers. Often just the training resources
news stories that they sensationalised and
created are available and this normally doesn’t involve
otherwise may not be falsely reported.
the presence of a tutor. The resources can be a mixture
aware of.
of text, sound, video and images to present the training
It allows a level of information in the most effective way. Computer-based
anonymity that can training is normally designed to deliver small chunks of
encourage users to training to people, as a step-by step process. It normally
participate in bad allows the user to learn at their own pace.
or sometimes illegal
Many companies develop and make available this kind of
behaviour that they would
training to their staff to allow them to develop their work
not otherwise do, if they
skills. This can mean that the worker can improve their
thought people would
knowledge and skillset to a point that may allow them to
know who they are.
be awarded a pay rise or a promotion. There can be tests
incorporated into the training, that are automatically
Table 12.6: Advantages and disadvantages of social
marked, that can show how much the user has learnt.
networking.

Advantages Disadvantages
Users can learn at Learners may not have
12.4 Technology their own pace. a tutor to answer any
questions that they have.
enhanced learning Different media can
be used to create
Staff may not be motivated
to follow the computer-
Teaching and learning has been improved by technology. an interesting set of based training as they
A large part of technology’s growing influence on resources. aren’t being watched and
society is the introduction of online learning and driven to do so.
online courses.
Staff can improve their
There are many tutorials available on websites such as own skills set and
YouTube, and more educationally oriented sites like knowledge resulting
Lynda.com and edx.org. This means that people can in promotion or
now gain access to teaching, often without a fee, other additional pay.
than the cost of their internet connection. This also
means they can learn at their own pace and in their Table 12.7: Advantages and disadvantages of computer-
own time. based training.

277

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Online tutorials other’s contributions, offering advice about how to


improve their skills and knowledge.
One of the biggest online platforms used for tutorials
The time scales are more limited for networked learning
is YouTube. There is an extensive set of tutorials and a
as the current task will be dependent on everyone
huge variety of different topics, from baking a cake, to
participating in a similar time frame.
fixing a car, to putting on makeup. An online tutorial
is normally delivered using different media and aims
to teach the viewer how to achieve a specific goal or Advantages Disadvantages
outcome. Online tutorials also allow a user to learn at Learners get to work Some learners may find
their own pace and in their own time. They are also with other learners and it difficult to contribute
able to view the tutorial repeatedly until they think build relationships that to the process, as they
they have the understanding that they need for the they could take forward aren’t sure what to give
desired outcome. beyond the course. as feedback.
Learners are exposed to Some learners may
Advantages Disadvantages both the ability to gain be overbearing and
There are online tutorials The quality of online and provide feedback. dominate all the
available on almost tutorials may differ This means that they discussions that take
any skill or issue that greatly, and some may build new skills and place, not allowing
a person may want be poor quality, meaning knowledge and offer enough contribution
information about. it is time consuming to the skills and knowledge to encourage learning
find one that is good. they have to others also. from others. Some tutors
may find these people
Users can learn in their An online tutorial could
difficult to manage.
own time and at their teach a person in an
own pace. incorrect manner. This Learners may be more Learners may be inclined
will depend on the motivated to complete to just provide positive
ability of the person who the tasks as the learning feedback as they do
is acting as the educator. of others is also not feel comfortable
dependent on them. criticising the work of
Different media can
others.
be used to create an
informative tutorial. If some learners do
not complete tasks or
Table 12.8: Advantages and disadvantages of online provide the necessary
tutorials. feedback, this may
limit the learning ability
of other users, as the
timescales for learning
Networked learning are more limited.
Networked learning is a form of online collaborative
learning that helps learners to connect with other Table 12.9: Advantages and disadvantages of networked
learners as well as their tutors. It is designed to help learning.
learners develop relationships with each other as well as
their tutor. This can help the learning process because
there are a number of different people from whom
learners can gain feedback and partake in discussions.
MOOC (Massive Open Online
The aim of networked learning is that learners are Courses)
encouraged to support the learning of other learners.
One of the biggest online learning methods is MOOCs.
The whole process is normally facilitated by a tutor,
These are courses that are not limited in the number
who actively encourages participation from all learners.
of people that can access them and have open access
Learners are often asked to share thoughts, opinions
using the web. MOOCs are free and will be used by
and resources from their work or educational practices.
a large number of learners at any one time. They will
Other learners are then asked to comment on each

278

Copyright Material - Review Only - Not for Redistribution


12 IT in society

often include filmed lectures and other resources, and


have forums that can be used to interact with other
Video conferencing
learners and the educators. MOOCs allow people in Video conferencing is when people communicate using
similar industries to learn more about their industry computers, displaying a video stream, using an internet
from other people within that industry. They allow this connection. The video will often show the user and
to happen at the convenience of the learner. People any other resources that they want to provide. Video
can use MOOCs to develop additional career skills or conferencing software often has a facility that will allow
explore new interests. Progress through courses available a user to share the content on their screen with other
on a MOOC could be assessed using peer review, written users that are part of the conference.
assignments or online tests that are automatically
Teaching and learning can be carried out using video
marked. They may not provide a person with a formal
conferencing. An educator can carry out a lesson that
professional qualification, but they can demonstrate that
allows them to speak to the other learners and also show
a person will expand their own learning, in their own
them any resources that can aid the learning process. This
time, which could be appealing to an employer.
can feel like a more personal learning experience as learners
are able to see and speak to the educator. The quality of the
Advantages Disadvantages lesson will depend on the communication abilities of the
Large selection of Some people may get educator, and could also be dependent on the quality of the
courses available. overwhelmed by the video conferencing software and the internet connection.
number of courses Video conferencing can often require a relatively high
available, and may not broadband speed to be able to deliver smooth viewing
know which one would of the video for the user. Video conferencing can allow
be best to take. learners to ask questions in real-time and clarify any points
of learning that they may be unsure about.
Can provide an There are often large
employee with a numbers of people
competitive advantage on the courses, so the Advantages Disadvantage
as it demonstrates the educators may not have As learners can ask Video conferencing
motivation to learn and a lot of time to dedicate questions in real-time, software can require high
improve in their own to helping each learner. this may improve their broadband speeds that
time. level of learning and may not be available in
They are free of cost. It may be difficult for understanding. some areas.
educators to keep track As learners can see and Only a small number
of the progress of all hear their educator, of learners will be
learners, so they may this may feel like a able to be part of the
not recognise that some more personal learning video-conference, and
are struggling. experience and may this will be limited by
The number of people on Some learners may create an increased level the capabilities of the
a course is often a large struggle with the of motivation for the software and the internet
amount or unlimited, motivation to complete learner as they may find connection. This may
so people do not have the tasks, and may only it more engaging. leave some people
to wait for a place to choose to complete waiting a long time for a
become available. those properly that they place on a course.
know will be assessed. The educator can often
Users can learn at their share what is displayed
own pace in their own on their screen with other
time, often only limited learners, which could be
by the submission useful if a demonstration
deadline for assignments. needs to be given.

Table 12.10: Advantages and disadvantages of MOOC. Table 12.11: Advantages and disadvantages of video-
conferencing.

279

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Technology enhanced learning can vary a lot in terms


of quality, cost and the subjects offered. Whether it is PRACTICAL ACTIVITY 12.06
for self-interest or accreditation, it is often much easier Find out how IT, such as AR and VR, can be used
to learn at your own pace and in your own time. It to improve the performance of sports players
can sometimes be difficult to find the exact course you and teams.
want as there are so many available. Another issue with
online learning is finding effective teachers that are
able to break down problems and help students in the
process. This is partly because of the difficulty in finding IT in manufacturing
someone who is capable, but also it can be because
Manufacturing uses robotics to create assembly lines
of the way in which the customers want to learn. Do
for products such as cars, where heavy elements like
they prefer to be lectured or do they want a small bit
the chassis are moved to an area where humans can
of information and then to be set a task and learn
then fit items to them to build a car. This has meant
as they go?
that humans can be removed from working on the
more dangerous elements of manufacturing. By using
robotics in manufacturing, it is possible to create a more
12.5 The impact of IT consistent and accurate product. This is because the
robot can be programmed to produce a product and will
The use of IT has revolutionised many of our industries do this to the same standard repeatedly. A human may
and areas of society. differ in their standard of production depending on the
mood they are in or how tired they feel that day. Also, if
a manufacturing system is completely robotic, it can run
IT in sport for much longer periods of time and will not require the
In sport, IT has been introduced to aid referees in same level of rest as a human. With the correct level of
making important decisions that could change the maintenance, robotic manufacturing could be set to run
outcomes of a game. In rugby union, the referee for 24 hours a day.
regularly uses IT to see if the ball was put over the goal Some feel that the introduction of robotics into
line for a try to be scored. This was sometimes difficult manufacturing has resulted in a loss of jobs for
to judge without the use of IT, as the referee often had people. This has often created animosity toward
to see around a pile of players trying to aid or stop the the use of robotics in manufacturing, despite their
try occurring. advantages. Also, if a company cannot afford the
IT was used in the women’s football world cup in 2019. robotic equipment, this can sometimes put them at a
Many important decisions, in the process of play, competitive disadvantage against those companies in
were aided by the video assistant referee (VAR). This their industry that can.
meant that goals were allowed or disallowed based on
the ability to re-watch important footage, to allow an
improved refereeing decision to be made. Some people
welcomed the use of VAR in this way, as they believed
that it made the play fairer, allowing correct decisions
to be made in games. Others believed that it stilted play
and made the viewing experience less enjoyable.
IT, such as hawk eye, is used in sports such as tennis, to
allow players to challenge the decisions of the officials
judging the match. Some feel this is a welcome addition
to the game as it can help the decision-making process
become more accurate. Some feel that the system used
is not very accurate and will often provide incorrect
outcomes as a result.
Figure 12.11: IT in manufacturing.

280

Copyright Material - Review Only - Not for Redistribution


12 IT in society

used in the classroom to make lessons more visual and


PRACTICAL ACTIVITY 12.07 appealing. This may enhance the learning process for
Find out how computer aided design (CAD) and students.
3D printing are used in manufacturing. It is also being used to aid learning online with the
practice of technology-based learning that was discussed
previously in the chapter.
IT in medicine
PRACTICAL ACTIVITY 12.08
In medicine, IT has given us the ability to monitor
patients and make sure they are healthy. We’re able to Discuss with your teacher whether your school
measure their heart rate, analyse DNA samples to see if has any plans to introduce any new IT into your
an infection is present, and even use technology to train school in the future. If this isn’t possible, discuss
doctors and nurses in how to perform certain procedures what IT you think would benefit your learning.
through simulations.
IT has enabled many advancements to occur in medicine.
It is now possible to provide people with artificial limbs
that can be controlled through the use of technology. IT in banking and finance
This means that people who previously had debilitating
disabilities can be provided with a new life by using these You have already studied how IT is used in the
artificial limbs. They could be given the ability to walk development and management of a range of electronic
again or regain the use of their arms and hands, allowing currencies. Banks rely heavily on the use of IT to
them to live a fuller life. This type of treatment has been keep very large databases of records about all the
very beneficial to soldiers who have been wounded by transactions that are made on a daily basis. If this had
providing them with the ability to use their wounded to all be recorded on paper, the physical storage space
limbs again, or have them replaced altogether. required in buildings to do this would be immense!

The use of nanotechnology in medicine has provided IT is used to enable people to access physical currency
great advancements, especially in the use of drugs through the use of ATMs. The introduction of IT for
to treat disease. This is when technology is used this purpose meant that people no longer needed to
to manipulate individual atoms and molecules. In queue in the bank to withdraw their money. It also
medicine, it can be used to target the delivery of drugs introduced the ability for people to access their money
in a very precise way. Particles can be engineered to 24 hours a day, and not only when the bank was open.
locate particular cells in the body, for example, cancer Many banks now also provide access to an online bank
cells, and deliver the drug directly to them. This can help account using a mobile app. Customers download the
to reduce any damage or unnecessary treatment being app onto their mobile device, set up access to their
delivered to healthy cells. account by entering their personal details, and use their
The use of IT in medicine is constantly developing login details (or set up new ones) to access their online
because of the vast benefits it can bring. One account using the app.
development in progress is the use of smart devices that Online banking services now allow people to check their
are designed to be implanted into different parts of the bank account quickly using IT. They can carry out most
body, such as the brain or heart. By monitoring the banking services online, such as:
body, these devices can detect health issues, for example,
Parkinson’s disease, a long time before they fully • checking their bank balance
develop. This can enable treatment to start much sooner • viewing bank statements
and this may prove more effective, or avoid the disease
• setting up direct debits
developing altogether.
• applying for loans and overdrafts

IT in education • paying bills

The use of IT in education is a growing trend. • transferring money between accounts.


Technology, such as interactive whiteboards, can be

281

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To be able to use services such as these, people would customer or purchase items as a customer. One of the
previously have needed to go into a bank. Often, they main advantages of this is how quickly the customer
would only have one or two local bank branches, so receives products.
their choice of bank may have been limited if they
Online shopping has become even more popular with
wanted their bank to be close to home. Also, those
the rise of smart devices, because of applications that
people that live in remote locations may have had to
allow you to order anything online by using your
travel a great distance in order to get to a bank. The
phone, regardless of where you are. This is even more
introduction and developments in online banking have
convenient for the customer as they could be out
allowed people to have more choice over which bank to
shopping, not able to find their product in store, but
choose and it saves people a lot of time in using banking
able to order it from the online store straight away from
services.
their phone.
There are many advantages brought about by online
Online shopping can be better for the environment,
banking. These include:
because fewer vehicles may be used as people are not
• Needing to visit a branch less as many services can driving to shops. This will depend on whether the
be used online. amount of people travelling to the shops is reduced
by people shopping online. Some people argue that
• Avoiding queues in bank branches.
the number of vehicles on the road that are delivering
• The ability to use banking services 24 hours a day, the online shopping does not make it much better for
7 days a week. the environment. It is also very difficult for people to
see the quality of products online or check the size
• Using banking services without leaving home.
of them. This can mean that many products end up
• Viewing transactions online without needing to being returned. This may also increase the number of
wait for paper statements to be delivered. vehicles used.
Some banks have chosen to encourage online banking
by offering better deals on interest rates and loans
online. They have done this because online banking News and media
can help cut their costs, from printing statements to the In the social networking section of the chapter, you
number of branches they need to have. studied how it is now being used on a regular basis and
People can access many different financial services how it is a source of news and media for people. This
using IT. People can set up online investment portfolios has allowed people to have quick access to news stories
and use IT to monitor them on a daily basis. They can around the world and has made people more aware of
also use IT to apply for financial services such as loans, world events. The use of IT has also allowed people to
mortgages and insurance. The use of IT can allow them be amateur journalists themselves, by recording events
to compare and contrast the deals on offer by different as they happen and using social media platforms to
finance companies from the comfort of their own home. broadcast this to a wider audience. This has had both a
They can also use aggregate websites that will find all positive and a negative effect. It has allowed people to
the deals available to them on the internet and show see what has happened in certain events, when the media
them which deals would be best for their needs. may have chosen to censor the content of those events.
This gives people a truer impression of what is actually
happening. Others believe that this could also be
E-business harmful and will argue that the media sometimes chose
to censor what happens at events, because they believe it
Business has changed hugely through the introduction could be harmful for people to be fully aware.
of IT. Online business is now commonplace and is often
seen as an easier way of buying goods and services than People are able to use IT to set up news feeds that are
in a physical store. Goods and services are often cheaper able to draw news stories from all different kinds of
online because of cost savings from businesses not media sources. This means that they save time as they do
needing a shop space and from reduced utility bills. not need to go to the site of each individual source and
find the news stories that they want to read. They can
IT has caused the rise of online shopping by providing set their news interests for the feed and then the software
a more convenient platform on which to sell items to a will search for stories that it thinks will interest the user.

282

Copyright Material - Review Only - Not for Redistribution


12 IT in society

Government and politics


The use of IT, especially social media, has become more
prominent in government and politics. Social media is
often used to raise awareness of different political causes
and issues. Many online petitions are set up daily that
try and encourage people to sign for the resolution of
issues that they support. The use of IT in politics in this
way can allow government to see what issues the people
have, and this may help them prioritise what they discuss
in government. It can also help the people have a voice
and force government to discuss issues that they believe
need resolving.
Figure 12.12: The news online.
IT has allowed governments to make services they
provide accessible online. For example, people may be
Family and home able to pay their taxes online, and apply for documents
such as a passport or a driving licence. This can make
The introduction of IT into the home has developed access to these services much more convenient for people
in many ways. People now have devices, for example and could also save costs for government, because they
Amazon’s Alexa and Google’s Home systems, and use need fewer staff available than if people needed to meet
them for many different services in the home. They can face to face for these services.
be used to control many aspects in the home, such as
lighting and heating. A user is even able to use the IT to
control these systems from a remote location. This facility
can help people save money and can also be better for
Monitoring and surveillance
the environment. This is because, rather than having the The use of IT in monitoring and surveillance has
heating on all day, or having it on a timer system to start become very prominent. Many police authorities around
at a certain time, the user can choose to remotely start the world use it to monitor possible criminal activity and
the heating system at a precise time that they are about to to locate criminals when crimes have been committed.
travel back to their home.
One example of its use in this way is to combine facial
These devices can also prove to be a source of recognition software with CCTV footage. Often a
entertainment to families at home. Families can gather criminal will try and flee an area or a country if they
and play lots of games and quizzes using the devices. believe they will be caught. This could involve them
They can also use the device to stream music. This can making a journey using a train or an aeroplane. Train
help families interact and spend quality time together. stations and airports often have a lot of CCTV footage
IT can also be present in many everyday devices in the available. This footage could be scanned using facial
home, such as washing machines and refrigerators. recognition software to see whether the criminal has
IT can be used to provide information to the user, for passed through the train station or the airport. This type
example, how long a washing machine has left to finish of analysis can save a lot of time, as previously, a person
washing clothes. This can allow people to plan their time would need to have watched hours of footage to see if
and know when they will need to remove their washing. they could spot the criminal in the footage. This type
of technology could also be useful in finding a missing
person. The police could analyse the CCTV footage in
certain areas with facial recognition technology to see
if the last known location for the missing person can
be detected.
More people are adding CCTV technology to their
home. Special systems can be set up that will monitor
the area around a house. If any motion is detected in
this area, a user can get an alert to their mobile phone
Figure 12.13: Home IT control devices. and can instantly view footage of their home to see

283

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

what or who has created the motion. Some systems also unpoliced at present. It can take a long time to pass
incorporate a speaker that will then allow the user to laws and regulations to police this type of technology,
speak to whoever is moving outside of their house. This and the development of the technology can often move
may scare off any person who may be planning to burgle quicker that the ability to police it. Some people highly
the house, as they know they have been seen already. disagree with the ability of the average person to record
them walking down the street or past their home, which
People are also starting to use surveillance methods
is what can be done at present with home CCTV systems
in their vehicles. Some drivers are adding dashcams
and dashcams. They believe that this is an invasion of
(dashboard cameras) into their vehicles. These are
their privacy and that there needs to be a greater level of
cameras that will start recording the journey of the
laws and regulation governing there use in this way.
driver when the car is switched on. The intention of
this footage is if another driver crashes into the car, the
driver of the car will have video footage of the accident REFLECTION
for their insurance company. This can help prove that
they are not at fault for an accident (if, of course, it How do you feel about a person’s ability to
isn’t their fault!). This footage has also started to serve record you walking down the street, without your
a secondary purpose for some police authorities. Some knowledge or consent?
police have requested if any drivers have dashcam Do you feel this is an invasion of your privacy?
footage of a certain area at a certain time. They are
hoping to be able to analyse this footage to see if Do you think that the improved level of security
they can get evidence of a crime that may have been that it may create is more important?
committed on the street at that time.
It is argued by some that use of IT in these ways, as
methods of monitoring and surveillance, is relatively

EXAM-STYLE QUESTIONS
1 Explain what is meant by a cryptocurrency. [3]
2 Explain two advantages and two disadvantages of the use of digital currency. [4]
3 Explain the difference between a chat room and a forum. [4]
4 Describe the process of data mining. [8]
5 Explain two ways that data mining can be used. [4]
6 Explain two advantages and one disadvantage of learners using a MOOC to improve their work-based
skill set. [6]
7 Discuss the impact of the central bank moving to a digital based currency only. [6]
8 Discuss the impact of the use of IT in banking and finance. [6]

SUMMARY CHECKLIST
I can recognise a range of different electronic currencies, how they are used and the advantages and
disadvantages of each.
I can describe the processes involved in data mining, how it is used and the advantages and disadvantages.
I can recognise a range of different types of social networking, how they are used and the impact they have.
I can recognise the different methods that can be used to deliver technology enhanced learning, including the
advantages and disadvantages of each method.
I can understand the impact IT has on a range of different areas of society.

284

Copyright Material - Review Only - Not for Redistribution


Chapter 13

New and
emerging
technologies
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• know and understand a range of new and emerging technologies
• know and understand the impact of new and emerging technologies on a range of areas of society.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you understand what is meant by an emerging technology?


• Do you understand that emerging technologies are used in various ways in society?
• Do you understand that emerging technologies can have both a positive and negative impact on society?

Introduction 13.1 Near field


The world of technology is ever evolving. This results
in the development of new and emerging technologies. communication (NFC)
Many of these technologies have a positive impact on NFC is a wireless technology that is similar to
our society. They aid both individuals and organisations, Bluetooth. It is a communication protocol that
medicine and healthcare, scientific research and the enables two devices to connect and share data. Unlike
environment. Bluetooth, which has an average range of 10 m, devices
using NFC must be within 4 cm of each other.
KEY WORDS
KEY WORD
emerging technologies: technologies that are
still in development to allow them to reach their protocol: a set of rules or standards that ensure
full potential data is transferred between devices correctly

An emerging technology may be a new technology, NFC is a technology that is present in most modern
but it may also be an existing technology that is still mobile telephones and smart watches. Users can bring
being developed. An emerging technology is still being their devices close together and use NFC to share data
developed to reach its full potential because this hasn’t securely within seconds, without the need for an internet
yet been realised. connection.
You are going to learn about a range of emerging Some users are apprehensive about NFC. Unlike
technologies and their application. You will develop Bluetooth, it does not require a pairing code or
your understanding of the impact of these technologies password. Therefore, users are worried that someone
through the use of examples. could easily steal the data stored on their device. The
very close proximity required for NFC means that this
would be quite difficult. Many organisations that make
use of NFC plan to add in other security methods to
prevent this issue. As NFC doesn’t require a pairing
code, one advantage is that a connection between two
devices can be established much quicker than with other
wireless technologies.

Advantages Disadvantages
Wireless communication Can be seen as less
so no cabled connection secure as user does not
is required. need to authenticate the
pairing of devices.
Fast method of data Users are concerned that
transfer. the technology could be
Figure 13.1: Emerging technology. used to steal their data.

286

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

Advantages Disadvantages Question


Present in many modern 1 How could NFC be used in a hospital?
mobile devices so
is becoming more
universal. Electronic wallet
Does not require an One of the fastest developing ways of using NFC is the
internet connection. electronic wallet. NFC chips are built into many credit
Does not require a cards. This is the technology that enables individuals
paring code. to make contactless payments. The NFC technology in
mobile phones and smart watches is also beginning to be
Table 13.1: Advantages and disadvantages of NFC. used by companies like Apple, for services such as Apple
Pay. This enables the user to use NFC technology in
their mobile device to make a contactless payment.

REFLECTION

How do you feel about your mobile device and


NFC becoming your electronic wallet in the
future?

PRACTICAL ACTIVITY13.01

Use the internet to research how computer


games, such as Skylanders and Disney Infinity,
make use of NFC technology.

13.2 Ultra-high definition


Figure 13.2: Data sharing with NFC.
television systems
The quality of the image produced by a television
system often depends on the resolution of the screen.
The resolution of a screen is measured in pixels. It refers
Passive NFC chips to the number of pixels wide and the number of pixels
There is a growing use of NFC by organisations to high that a screen can produce.
distribute data. Passive NFC chips can be built into Standard high definition (HD) was once thought to be
information points in buildings and used to provide the highest quality that a picture could be displayed.
visitors with necessary information. Their use in this This has a resolution of 1920 × 1080. However, 4K
way is similar to QR codes, but without the need for and, more recently, 8K screens have been developed and
a QR code reader, and with a more efficient process. produce ultra-high definition (UHD). The resolution of
Instead of having to open a QR reader application and 4K screens is 3840 × 2160. This is double the number of
wait a few seconds for the code to scan, a user with pixels than HD. This allows a sharper, clearer image to
an NFC enabled device can touch their device to the be created as the level of detail that can be replicated is
information point and receive the data almost instantly. greatly increased. 8K is double the resolution again!

287

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages
Quality of the image is The technology required
sharper and clearer. for UHD screens is more
expensive to manufacture.
Can produce a higher It requires a large amount
level of detail in an of data to be transmitted
image. by television broadcasters
to achieve a UHD image.
Can improve the An internet connection of
viewing experience for at least 25mbps is normally
the user. required to stream content
at a UHD level.

Table 13.2: Advantages and disadvantages of UHD.

UHD in surgery
CyberMed NB24k and the Davinci is a medical grade
computer that has a 4K screen. It is a computer that
is used in surgical situations to allow surgeons to view
the surgery in progress. The 4K resolution of the screen
Figure 13.3: An example of the difference in pixels used allows the surgeon to have a higher level of visibility of
between HD and UHD. the surgery. This allows the surgeon to have a greater
level of precision when carrying out tasks such as
The average user will see a difference in an image or surgical incisions.
video produced by a UHD screen, compared to an HD
screen. One way to enhance this difference is by viewing 4K televisions systems are increasingly used this way in
the image up close on each. The grid-like structure of surgery to allow a greater level of precision, and to allow
an image will be more visible up close on an HD screen the possibility for surgery to be carried out remotely,
than a UHD screen, because the pixels are so much using a very high-quality image.
smaller on the UHD screen.
4K television systems are commercially available and are
beginning to become more commonplace in our homes.
8K systems are mostly used on a commercial basis in
applications such as cinema screens. It is possible to
purchase an 8K television for the home, but there are
very few entertainment services that can be used that will
allow this kind of definition to be used. This is because to
broadcast data to fulfil this level of resolution would require
a very high-speed internet connection. Most television
services are still working on managing to broadcast at a
4K resolution. This requires them to develop a method to
broadcast four times as much data than it does for HD, if
the file is considered in its raw form.

Question
2 How could a television broadcaster reduce the Figure 13.4: UHD used for imaging in surgery.
amount of data it needs to transmit, but still
achieve a 4K resolution?

288

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

Question KEY WORD


3 What advantages could there be for using UHD heuristic: the ability to use a value to determine
to allow remote surgeries to take place? What which is the best pathway to select
disadvantages could there be to such surgery?

AI systems are based around the creation of rules. The


UHD in cinemas AI system uses these rules to make decisions based on
Cinema saw the first mainstream Hollywood movie to input. It will then begin to adapt the decisions it makes
be filmed in 8K in 2017, Guardians of the Galaxy Vol. 2. as these rules allow it to learn and make decisions based
Most cinemas were not able to display the film at this on its own learning.
resolution, but cinemas are gradually updating their Knowledge engineering is important to the abilities of
technology to allow future movies to be displayed in 8K. AI. To learn, AI machines need access to a knowledge
The difference in clarity for the 8K resolution is more base and need to be able to establish the relations
likely be seen on large screens. It will create the most between the knowledge available. Machine learning
visually entertaining experience for the viewer and will is also a core part of AI. This allows AI machines to
allow a greater level of immersion. establish patterns in the received input that can inform
its ability to analyse and learn.
The 8K resolution may be the highest resolution that is
seen for a long time for cinema screens. Visual specialists
have advised that it is probably the maximum level of Advantages Disadvantages
pixels that our eyes can take, and anything above it Increased level of Requires a high level of
would go completely unnoticed. precision and accuracy skills to program so can
as will likely have a lower be very expensive to
error rate than a human. create.
Question Can replace the need The storage
4 What impact will UHD have on the technology for humans in tedious, requirements for the
required to create movies, including the computers repetitive or dangerous program and knowledge
often used to edit them? tasks. base can be very
extensive, creating
greater expense.

13.3 Artificial intelligence Machines do not require


rest, so can be used
People have ethical
and moral issues with
Artificial intelligence (AI) is one of the fastest 24/7. computers being used
developing areas of technology. AI is the creation to recreate intelligence.
of computers that are designed to have human-like
capabilities. AI can react to stimuli and make decisions Can make logical They do not consider
much like a human does. On a simple level, it is giving decisions, void of emotion when making
computers the ability to simulate the act of thinking. emotion, so can provide decisions, so this is
AI is capable of actions such as learning, planning, a rational outcome. not considered. This
recognising speech and problem solving. One of the also means they are
earliest pioneers of AI was Alan Turing. During World not fully capable of
War II he cracked the Enigma code, the code generated human emotions such as
from the Enigma machine used by the German army to sympathy and empathy.
communicate, and decrypted German messages about Can analyse large sets As they are
the war strategies. He became intrigued by the possible of data in a much more fundamentally based on
intelligence of machines. This came from the notion of efficient fashion than a rules, this can affect their
providing machines with heuristic knowledge to enable human. ability to be creative.
them to make decisions in a more human-like way.
Table 13.3: Advantages and disadvantages of AI.

289

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

of these organisations to use AI to analyse the extensive


amount of data they collect.
AI is used to identify patterns and trends in the
data that can then be used to form future scientific
discoveries or hypotheses. The learning ability of AI can
also be used to ask the machine itself to provide its own
Figure 13.5: Artificial intelligence. hypothesis that can be considered.
The level of data analysis that can be carried out by AI far
outweighs the capabilities of a human in this application.
REFLECTION
Therefore, this could mean that scientific discoveries can be
How do you feel about the reliance of society on made quicker and with a greater level of accuracy.
the ability of artificial intelligence?
PRACTICAL ACTIVITY 13.02

Use the internet to research neural networks and


Self-driving cars how they are used in data analysis.
Several organisations, for example, Google and Tesla,
are developing self-driving cars. Many people find
driving a car, especially on a long journey, a tedious PRACTICAL ACTIVITY 13.03
task. Therefore, these companies are trying to create a
self-driving car that will remove the need for humans to Discuss with a partner any experience you have
drive. They believe it will greatly increase the quality of had with using speech recognition software.
life for humans, especially those that commute by car on Discuss whether you think that using speech
a regular basis. recognition was beneficial or not. Consider
who could benefit from speech recognition
Some people view the development of self-driving cars
software and why.
as an advantage. It will remove the possibility that
people will drive when tired, and remove the emotional
reactions that drivers can have in certain situations
encountered on the road. Both of these aspects can
often cause accidents. Therefore, if they are removed,
then fewer accidents should occur.
13.4 Augmented reality
Augmented reality (AR) is where technology overlays
Some people view the notion of self-driving cars as a computer-generated images onto a user’s view of
disadvantage. They believe there are several moral and the real world. It creates an interactive experience
ethical aspects that will occur as a result. One aspect is by enhancing the user’s view of the real world with
that the quality of the algorithm that the car is based multimedia elements such as text, sound, animations
upon will be affected by the abilities of the programmers and video.
that created it. The standard of the programmers involved
will differ, therefore the quality of the algorithm as a AR is a relative old technology. It has been in existence
result could affect the AI’s ability to make an effective since the 1960’s, but it is an example of an emerging
decision in critical situations. Another aspect is the technology that is only just starting to realise its
concept of responsibility if two self-driving cars have an potential. The technology commonly makes use of
accident. Who is at fault and should pay for the damage? a digital camera and sensors to read data from the
surrounding environment. It then uses a method of
output to display the augmented reality.
Scientific analysis AR can be created with mobile devices such as
The level of data produced daily in relation to science smart phones. It can also be created with pioneering
is phenomenal! Many scientific research organisations technology such as smart glasses. If you have watched
record terabytes of data each day. This has caused many a science fiction movie, you have probably seen an
example of augmented reality in action, for example, as

290

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

a head up display in an aircraft or a vehicle. This type


of technology is used in the real world, by organisations
Gaming
such as the military, to train professionals such as pilots. One example of AR that continues to develop is its use in
gaming. Pokémon Go, released in 2016, became a global
Advantages Disadvantages sensation in the gaming world. It allowed players to
augment their surround reality to find and collect different
Can make a learning It is based on the Pokémon. A second AR based game, released in 2019,
experience both collection and analysis Wizards Unite, augments the world of Harry Potter onto
entertaining and more of data. This has a player’s surrounding reality, allowing them to immerse
immersive. caused some people themselves in the Harry Potter world. In both cases, players
to be concerned use their mobile device to create the augmented reality.
about the privacy and
security of the data.
Can be used to simulate Some people believe Medicine
and communicate that it can modify a
immediate information, person’s perception of The use of AR in medicine is growing. Technology
creating a better reality and can cause that allows surgeons access to immediate and
experience when used in a blurred distinction vital information whilst performing surgery is in
a learning and training between the two. development. Surgeons can wear technology such
capacity. as smart glasses. This technology would allow them
to request access to any of the patient’s records
Can allow a user to The technology immediately during surgery and they could then see this
simulate everyday required to process data without having to look away from the surgery they
experiences in an efficient the data needed are performing. This could also allow data such as scans
manner. It can allow a for a smooth AR of the patient to be superimposed onto the patient to
shopper to simulate trying experience needs to allow a surgeon to clearly visualise the issue they are
out different clothing and be fairly powerful. This addressing in surgery.
hairstyles, without actually type of technology
changing their clothing or is expensive to
hairstyles. manufacture. PRACTICAL ACTIVITY 13.04
Can be used to allow a
Research which companies are developing smart
user to navigate a new
glasses and what they intend their uses to be.
place, helping them to
easily find the services and
attractions they require.
PRACTICAL ACTIVITY 13.05
Table 13.4: Advantages and disadvantages of AR.
Find out how IKEA are allowing users to make
use of AR.

13.5 Virtual reality


Virtual reality (VR) allows a user to experience a
computer-generated reality that doesn’t immediately
exist in their real-world reality. A computer is used to
generate a 3D space of a digital reality. The user is then
immersed into this computer-generated reality, often
through the use of a headset. The headset will normally
incorporate a visual display and headphones to allow a
Figure 13.6: Augmented reality. fully immersive experience for the user.

291

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Whilst wearing the headset, a user can then walk around


the computer-generated reality and interact with it. The
Scientific research
headset uses two camera feeds, one for the left eye and Scientific organisations are beginning to use VR in their
one for the right, in an attempt to mimic the human field research. In the past, scientists have relied on using 2D
of vision. visualisations of elements, such as atoms and molecules,
to explore their structure and appearance. VR can
VR is becoming a more prominent technology in the
now allow scientists to create a VR representation of
gaming world, with the release of technology, such as
this kind of aspect of our world that they can interact
PlayStation VR, allowing users to enjoy an even greater
with and see an immersive visual representation of
immersive experience.
their research. They could use this kind of technology
to combine molecular structures to see what affect it
Advantages Disadvantages
will have. This may help in the development of new
Can be used to simulate Achieving perfect medicinal drugs to treat new and existing medical
critical situations for calibration between the conditions.
organisations such as cameras and the user
hospitals and the military, can be very difficult. If it
to provide a training tool is not accurate enough, Tourism
to develop the necessary it can cause the user to
skills required for dealing get a feeling of motion Organisations around the world are using VR to allow
with the crisis. sickness. users, particularly those who have disabilities and are
unable to travel, to experience a computer-generated
Can be used to provide The technology reality of tourist attractions. It could allow the users to
a very immersive required to create experience a walk around the ancient ruins of Rome, or
experience into a the VR experience is to admire all the art at the Louvre.
different reality than the often expensive to
immediate real world. manufacture. This type of technology can allow people to experience
This can enhance the many tourist attractions around the world that they
gaming experience. It can would otherwise be unable to experience. This can help
also provide a relaxing or create a better quality of life and can also be used for
calming environment, to educational purposes in a similar way.
help people with stress or
mental health issues.
PRACTICAL ACTIVITY 13.06
Can help build a person’s Some people think that
confidence if they can there is a danger that Discuss with a partner what your perfect VR
replicate a situation that people can be seduced world would look like. Discuss whether you think
allows them to practise by an alternate reality it would help your quality of life if you could
for a certain scenario. and neglect their real immerse yourself in this world on a regular basis.
world reality as a result.

Table 13.5: Advantages and disadvantages of VR.

13.6 Robotics
Robotics involves the study of designing, building and
the application of robots. A robot is any machine that
can perform tasks that would otherwise be performed
by a human. Robots can be programmed to do this
automatically or through the direct instruction of a
human. The word Robot has Slavic origins and comes
from the word robota, which means ‘forced work
or labour’.

Figure 13.7: Virtual reality headset.

292

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

Robots seem like a modern-day technology, but their Advantages Disadvantages


origins are quite old. The automation aspect of robotics
can be traced back to ancient Greece and Rome, where Can help reduce Some humans fear the
there is evidence of automation in toys. This kind of time and costs in use of robots and do not
automation can be seen throughout history. manufacturing as can agree with our current
often complete tasks dependence on them.
quicker and more
KEY WORD consistently than a
human is able to.
automation: the ability to operate automatically
Robotic pets can be
used to increase the
In the 1960’s robots were introduced on a more quality of life for those
industrial scale by General Motors. They introduced who are not able to have
them into their automotive factories and used them to real life pets, due to
move car parts around to make it easier to assemble the issues such as allergies.
cars. They are still used in automotive factories around Robotics pets have
the world today and have become a large part of the also been used to help
process of constructing cars. people with depression.

Robots are normally automated using microprocessors Table 13.6: Advantages and disadvantages of robotics.
and sensors. Sensors sample data from the surrounding
environment and send this to the microprocessor. The
microprocessor analyses the data and sends signals to
instruct the robot on what action to take as a result.
Prosthetic limbs
The use of prosthetic limbs in humans, to replace those
Advantages Disadvantages lost, has been a medical practice for a long time. The
use of prosthetics is now in further development due
Can perform tasks that Can be used to replace to the use of robotics. Robotic prosthesis is a rapidly
might be tedious or humans in certain jobs developing area in medicine. A robotic prosthetic can be
dangerous for a human. and may take much connected to a human mind. This can allow a human
needed jobs from some to train their brain to be able to move the robotics in
humans. the prosthetic, creating a working limb again. This
Do not require a break, Can be paired with advancement in medical technology will vastly improve
so can work 24/7 if artificial intelligence and the quality of life for those who have lost limbs.
necessary. can therefore learn, but
are not capable of an
emotional response.
Can improve a person’s Require a constant
quality of life. supply of power. This
can be expensive
and can have a
lasting impact on the
environment.
Not prone to error like a Designing and building
human can be. robots requires a high
level of skill and high-
quality materials, to
make sure they are
reliable. This can be very
Figure 13.8: Prosthetic limbs.
expensive.

293

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Nano-robots The tool normally works by providing the software with


a document for translation. The software will identify
Nano-robots are robots that have been scaled down to a the text elements in a document and translate them
microscopic size. The ability to do this to robots could prove into the required language. An important point to note
to be extremely useful in medical procedures. It could be about computer-assisted translation is that is a not like
possible to put nano-robots into a human’s blood stream to a human translator. It is a database-driven software that
track down and eliminate certain medical conditions. They matches words to those in its database and is capable
could also be used to perform internal surgery in places that of using the grammatical rules of a language to piece
are normally very challenging to reach for surgeons. together a translation.
Nano-robots could revolutionise cancer treatment, by There are some well known computer-assisted
tracking down and destroying cancer cells in the body. translation tools available, such as Google Translate,
This could save the lives of many people in the future. WordBee and memoQ.

PRACTICAL ACTIVITY 13.07 Advantages Disadvantages


People can get access Some people are
Discuss with a partner about how you feel about
to an instant translation sceptical about
having nano-robots released into your blood
of a document from one the accuracy of
stream. Would you feel this is an invasion of your
language to another. the translation that
body, or would you feel that it is a very beneficial
This can save time and computer-assisted
medical advancement? improve communication. translators are capable
of.
It can help reduce errors Some people find
PRACTICAL ACTIVITY 13.08 that may be present that certain terms in a
in manual translation language are used in a
Use the internet to research how robots are
methods. context, for example,
helping in the fight against environmental issues
slang or colloquial
such as climate change.
language. Translation
tools can often struggle
to interpret these terms
REFLECTION if used within a certain
context.
Some people are concerned that advancements
Translation tools are quite
in robotics will one day cause them to take over
widely available and are
the world. How do you feel about this?
therefore a relatively
inexpensive tool. Some
companies offer them for
free, for example, Google
13.7 Computer-assisted Translate.

translation Table 13.7: Advantages and disadvantages of computer-


assisted translation.
The ability to translate from one language to another
has allowed a greater level of communication in the
world. It is an essential process on a global scale for the
practice of business and politics.
Computer-assisted translation tools have been
developed to help support this essential practice. They
can be used to increase the productivity and accuracy
of human translators, especially when vital information
Figure 13.9: Language translation.
needs to be translated immediately.

294

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

Foreign-language websites Holograms were originally invented in the 1950’s by


a Hungarian born physicist called Dennis Gabor. He
Computer-assisted translation can be very useful when was awarded a Nobel prize in Physics in 1971 for his
accessing websites from around the world. If you want invention and development of the holographic method.
to use a website from a different country, it is likely to
be written in the language of that country. This can Laser Half mirror
mean that you are not able to read the language it is
Mirror
written in. Computer-assisted translation tools can be
used to translate the website content into the language
that you require. This can help improve communication
and make a lot more information accessible to people
Reference beam
around the world. Object beam
Object

PRACTICAL ACTIVITY 13.09

Use the internet to find a website that is written


in a different language to your own. If you do this
using a search engine, such as Google Chrome,
this has a built-in computer-assisted translator.
Ask the translator to translate the website into Mirror
your language. Look at the translation and
consider how accurate it is. Can you see any Hologram
errors that the translator may have produced?
Figure 13.10: Creating a hologram.

Holograms can be a 2D image that appears to look 3D,


Spell checking as it is moved. Holograms can also be an image that is
Another way that computer-assisted translation can actually 3D and free standing. This kind of hologram
be used is as a spell-checker tool. The database stored also uses photographic projection. You may have seen
of all the words for a language can be used to compare this kind of hologram appear in movies such as Star
text that is typed. This will allow the tool to identify Wars and Iron Man.
any words that may be incorrect and offer a corrected
spelling for them.

13.8 Holographic imaging


Holographic imaging is also known as a hologram. A
hologram is a 3D image that is created using laser beams
and mirrors. The laser beam is split up by reflecting it
off mirrors and when they recombine, they create the
holographic image.

KEY WORD
hologram: a 3D image that is created using laser Figure 13.11: Holographic image.
beams and mirrors

295

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages images can be used to see a true 3D visualisation of


what a building will look like when constructed. They
They do not require 3D projected holograms can offer additional benefits over the use of on-screen
special glasses to view require expensive simulated 3D models, which is the older alternative.
the 3D effect. equipment to create. This can help architects of buildings provide further
They are very difficult A lot of data needs to be understanding to construction companies, by allowing
to replicate so can be stored in order to create them to see an actual representation of what the
useful as a security holograms and the cost they intend the building to look like. This means that
measure. of data storage can construction companies do not need to spend as much
often be expensive. time deciphering the plans and ideas of an architect.
If is much easier to see
depth perception on a
3D projected hologram,
than in ordinary 3D
images.

Table 13.8: Advantages and disadvantages of holograms.

Security
Holographic images are used on many items around the
world. They appear on credit cards, currency and other
secure documents such as driving licenses and passports.
They are used as a method of security, to stop fraud, as
they are difficult to replicate.
Holograms add an extra layer of security to sensitive Figure 13.13: Hologram of a building structure.
items and information. This is an important benefit
as these documents can be the target of many
acts of fraud.
PRACTICAL ACTIVITY 13.10

Use the internet to research one other


application of holographic imaging. Create
a short presentation that could be used to
inform the members of your class about how
holographic imaging is used in this application.

REFLECTION

It may become possible to transmit holographic


images into individual homes. This means that
we could actually see a true 3D representation of
the person we are talking to. How do you think
Figure 13.12: Hologram used on currency.
this will affect our communication with each other
and our daily lives?

Architecture
The use of holograms has become more prominent in
architecture and the construction industry. Holographic

296

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

13.9 Holographic data Advantages


Large amounts of data
Disadvantages
It is not compatible with
storage can be stored on a very
small medium.
current methods of data
storage. This would
The use of light to store data is common. Optical data make reading the data
storage uses light to burn data onto a reflective surface, very difficult.
and also uses the reflective properties of light to read It will make the storage The technology required
the data from the reflective surface. The concept of of large amounts of data to use holographic data
optical storage is also the underlying principal behind much more portable. storage is currently very
holographic data storage. complex and expensive.
One possible way of holographic data storage will use a It is capable of storage
laser beam. The laser beam is fired, and it is then split. millions of bits of data at
The splitting process is important, as this is what helps a time, making transfer
create the hologram. The split beams will be bounced rates much faster than
off mirrors and they will both travel to a crystal. When current methods.
the two beams meet again, they will create a hologram
that is stored in the crystal. Table 13.9: Advantages and disadvantages of holographic
data storage.
Detector
Crystal

Shutter
Taking data into space
Holographic data storage could be extremely useful
when transporting large amounts of data, for example,
Mirror
taking data into space. It can be difficult to send large
amounts of data into space to a space station that may
require it. It has to travel a long way and that limits the
amount of data that can sent at any given time.
Gating light
The amount of space available to send items to space in
a rocket is also very limited. Therefore, if holographic
data storage could be used to store data that can be
Beam transported into space, this would enable very large
splitter
Laser amounts of data to be sent with each mission to space.

Archiving data
Figure 13.14: Beam splitter. Large corporations often archive large amounts of data.
This can often be to refer to in future, or sometimes for
A single storage crystal is about the size of a grain of legal reasons. Data storage currently can take up a lot of
sugar. Each storage crystal could be capable of storing space in a storage unit and to buy or rent the building
a single terabyte of data. Imagine how much data could space necessary to hold the large data storage units can
be stored on a single disk as a result! be very expensive.
If the size of the data storage units could be greatly
reduced, through using holographic data storage, this
could potentially save large organisations a lot of
money. The CERN data centre, a large particle physics
laboratory in Switzerland, generates 30 petabytes of
data a year to be archived. They could definitely benefit
from smaller data storage units!

297

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages
The speed at which It has become much
certain objects can easier to build
be created is greatly dangerous and
increased through the counterfeit items, which
use of 3D printing. causes greater security
and fraud issues.
A 3D printer will At present, 3D printers
Figure 13.15: Data storage facility. consistently create the are only capable of
exact same product from creating relatively small
a model. The level of items. Developments are
PRACTICAL ACTIVITY 13.11 consistency would be progressing to increase
much greater than when the size of the objects
Use the internet to research information about created by a human. that a 3D printer is
the longevity of holographic data storage. capable of creating.
Much more flexible 3D printing reduces
when creating complex the number of
models, especially those manufacturing jobs,
13.10 3D printing that have hollow cavities as it is able to replace
within solid parts. the need for humans to
The concept of 3D printing is now a relatively developed
create the products.
technology. It has been in development since the 1980’s.
It is the application of 3D printing that continues to Although the initial 3D printing requires a
develop. There are increasingly more ways that 3D setup costs will be high, relatively high level of
printing is used and many past methods are being the cost of creating power consumption.
revolutionised. each product with a This can be harmful to
3D printer will often the environment as it
be much cheaper increases emissions.
than alternative
manufacturing methods.
At present, ABS filament
is the most common
type of material used in
3D printing. The by-
product of this plastic is
increasingly dumped in
landfill and negatively
affects the environment.

Table 13.10: Advantages and disadvantages of 3D printing.

Figure 13.16: 3D printing.
Bespoke prosthetics
3D printing is a form of additive manufacturing. A 3D The application of 3D printing has revolutionised many
software-based model is created using computer aided areas of the medical industry. It is possible to print
design (CAD) software. The data to create this model is bespoke prosthetics, making limb replacement much
transmitted to a 3D printer. The 3D printer creates the more accessible to many.
physical model by layering very thin materials, such as 3D-like printing is also being used as a method of
plastic, to build the model. bio-printing. This is allowing practices such as tissue

298

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

engineering to be developed. The layer-by-layer method Vision enhancement can also be used to enhance the
used in 3D printing is used in tissue engineering, layering vision of all in situations where visibility is limited, for
biomaterials to create tissue-like structures. This technique example, in the dark. Two types of vision enhancement
can also be used to print organs and artificial blood vessels that can be used for these situations are night vision
that can be used to aid drug and other medical research. and thermal vision. Night vision devices, such as night
This reduces the need to harvest organs for medical vision goggles, operate by collecting all available light,
research. The hope is that these biomedical printing including infrared light and ultra-violet light, and
techniques will lead to the ability to create artificial amplifying it to create a more visible image. Thermal
organs that can be used in humans in the future. This vision devices, such as thermal vision goggles, operate
will replace the need to have long waiting lists for organ by using thermal imaging technology to capture the
transplantations, due to the need for a human donor. infrared light emitted as heat by objects such as humans.

Advantages Disadvantages
Printing in space
It can improve the vision The technology
3D printing has become an increasingly valuable of those with limited or involved is expensive to
practice in space. As storage space in a rocket is limited, poor vision, which can manufacture.
a limited number of items can be taken into space with provide them with a
each visit. If a part breaks on a space station, the crew better quality of life.
may be waiting for a quite a while for the next mission
It can improve the vision The use of night and
to be sent to get a replacement part. It has now become
of those who are colour thermal vision devices is
possible to take a 3D printer into space. This means that
blind, allowing them limited or illegal in some
if any parts break on the space station, it is possible to
to see a greater scope countries.
print a copy and repair the space station much quicker.
of colours, and colour
correct the issue they
REFLECTION may have.
It can help improve
How would you feel about having a 3D printed
visibility in scenarios
artificial organ inserted into your body?
where visibility is limited.

Table 13.11: Advantages and disadvantages of vision


enhancement.
13.11 Vision enhancement
Vision enhancement is a field of technology which can
restore vision, one of our five senses, to those who have
Improving vision
lost it. Vision enhancement is normally provided in People with poor vision can wear a headset that allows
the form of a type of glasses or lenses. These alter the images of a person’s surroundings to be projected inside
stimulus that enters through the eyes and filters it in a the headset in front of their eyes. This allows them
way that can enhance a person’s vision. The glasses or greater awareness and vision of their surroundings,
lenses can be tailored to the person and their current allowing them improved navigation.
level of vision for greatest effectiveness.
The ultimate goal of vision enhancement is to be able to
provide blind people with images of their surroundings Seeing in the dark
so that they can work and enjoy themselves just as Night vision and thermal vision devices are often used
others do. However, this field is not solely focused by military, to allow soldiers to have enhanced visibility
on those who are blind. A recent development in the at night. This can aid strategy necessary in combat,
field has allowed those who are colour-blind to see the making it possible for soldiers to move around or assess
world in the same way that everyone else sees it. This a dangerous situation, at a time when they will be less
means that they are better able to distinguish between visible also.
colours and in some cases see new colours that were
muted before.

299

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages
It allows greater access Users can become
to important statistics obsessed with their
regarding our daily health. health statistics, which
This can improve our ability can lead to damaging
to monitor our health. thoughts.
Users can sync their fitness There can be
devices together and can compatibility issues
encourage each other and between devices, such
set each other challenges, as fitness trackers and
improving people’s mobile phones, that
motivation to exercise. may mean data cannot
be shared between
Figure 13.17: Night vision goggles. them.
It can aid communication The accuracy of some
by allowing a user to health trackers can be
REFLECTION see alerts for any text dubious, as they are
messages or emails that designed to monitor
Do you think it is ethical for people to be able to they have received, on the ‘average’ person
use night vision and thermal vision devices? their wearable device. and not the bespoke
Some can even be used to health of each person.
make telephone calls. This
removes the need for the
13.12 Wearable user to take their mobile
out of the pocket or bag.

computing Some people are


concerned about the
Wearable computing can take many different forms. One security of their data
of the most common items of wearable computing is that is gathered by
a fitness tracker. These are used by many people to see their wearable device.
how many steps they have taken during a day, and often It is also possible for
provide other health information, such as how many companies to use the
calories they have burned. data that is collected
Wearable computing refers to clothing or accessories that for marketing
have some form of computer-based components embedded purposes, which users
into them. This could include glasses, headsets, watches, may not be aware of.
t-shirts and any other item that can be worn. Some of these
Table 13.12: Advantages and disadvantages of wearable
serve a functional purpose that will provide information
computing.
to the user, some are merely to look stylish and fashionable.

Exercise brings rewards


Companies are now providing employees with health
trackers and rewarding them for the amount of exercise
they record. They are provided with points for the steps
that they record each day and these points can be spent
on rewards for the employee. Rewards can often be in
the form of gift vouchers for the employee, or a choice
Figure 13.18: Wearable technology. of products they are able to purchase.

300

Copyright Material - Review Only - Not for Redistribution


13 New and emerging technologies

Monitoring health issues can cause for our environment. The more we use and rely
on technology, then more power consumption we will
Heath trackers can also be used to monitor those with create. This will increase the level of emissions created in
serious health issues. A user could have their heart rate order to continue to power all our technology.
constantly monitored, and if they have a heart issues,
Despite the environmental issues that the power
the device could be set to alert a medical professional
consumption of technology can create, some of
or family member the instant that medical assistance is
these emerging technologies can be used to aid our
required.
environment. AI can be used to monitor current trends
and patterns in our environment, and predict future
PRACTICAL ACTIVITY 13.12 trends. This can help identify information that could be
useful to governments, so they can prepare for natural
Use the internet to research how wearable disasters and adverse weather possibilities. It could also
technologies are being developed to monitor be used by industries, such as farming, so that they can
other health issues, such as diabetes. create the best conditions for their crop growth.
There will always be the added issue of e-waste from
people throwing away technology in favour of new
REFLECTION technology. This discarded technology often ends up
being disposed of in landfill, where harmful metals from
How do you think our world will continue to the technology can leach into the soil and infiltrate water
change through the development of emerging supplies. Governments around the world are trying to
technologies? encourage the recycling of technology to limit the issue
created with this kind of disposal.

13.13 Environmental REFLECTION

What do you think could be done to limit the


issues disposal of old technology into landfill?
Whilst emerging technologies can be used to create many
positive impacts on our lives, there is always the issue they

EXAM-STYLE QUESTIONS
1 Identify one advantage and one disadvantage to the user of wearable technology such as a health tracker. [2]
2 Explain three ways that 3D printing can be used in medical circumstances. [3]
3 Explain two advantages to a surgeon of using ultra-HD technology when performing surgery. [4]
4 Explain two disadvantages that emerging technologies have on the environment. [4]
5 Describe how near field communication (NFC) can be used in electronic payments. [3]
6 Discuss the impact on employees of the use of AI in manufacturing. [8]
7 Evaluate the potential impact on an organisation of using holographic data storage to archive data. [6]

SUMMARY CHECKLIST
I can understand what is meant by an emerging technology.
I can recognise a range of emerging technologies and understand how they are used.
I can understand the impact of a range of emerging technologies and the impact they have on areas of society
such as individuals, organisations, medicine and the environment.

301

Copyright Material - Review Only - Not for Redistribution


Chapter 14

Communications
technology
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• know and understand the different types of network, their characteristics and uses, and their advantages
and disadvantages
• know and understand the role and operation of different components in a network
• know and understand the different types of network server, their role and operations in a network
• know and understand the characteristics, uses and advantages and disadvantages of cloud computing for
a given scenario
• know and understand about data transmission across networks; speed of transmission; bandwidth and bit
rate; and data streaming
• know and understand different methods of routing data over a network, including packet switching, circuit
switching and message switching, and the purpose and use of network addressing systems
• know and understand the definition of a network protocol and the purpose and use of protocols in the
preparation, addressing, sending and receiving of data across a network, including the internet
• know and understand about the management of network traffic; static and dynamic routing; the function
of routing protocols; and the use of layers in protocols

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

CONTINUED
• know and understand about data transmission methods; the properties, features and characteristic of
different transmission methods; typical applications of each transmission method; and the advantage
and disadvantages of each method
• know and understand the methods, uses and operation, and advantages and disadvantages of
different methods of wireless data transmission technology
• know and understand about mobile communication systems, including cellular networks and how
satellite communication systems are used for transferring data
• know and understand a range of network security threats to stored data and files, the impact of
network security threats on individuals and organisations, and a range of prevention methods of
network security issues, including the advantages and disadvantages of each method
• know and understand how threats and risks are identified in disaster recovery management, how to
control threats and about the strategies to minimise risks.

BEFORE YOU START

• Do you have a basic understanding of a LAN, a WAN and a range of network topologies?
• Do you have a basic understanding of a range of network components including hubs, switches, routers
and bridges?
• Do you have a basic understanding of security methods that can be used in a network?

Introduction PRACTICAL ACTIVITY 14.01

Until the 1990’s, most computers found in the home and Use the internet to research information about
even in a workplace were stand-alone computers. This ARPANET, one of the first networks created.
means that they were not connected to other computers.
When computers are connected together, a network
is created. This can be as simple as connecting two
computers together.
14.1 Fundamental
KEY WORD
network models
network: two or more computers or devices There are two fundamental network models that many
connected together so they can communicate networks are built upon. These are the transmission
and share data and resources control protocol/internet protocol (TCP/IP) suite and
the open systems interconnection (OSI) model. Both
outline rules and standards about how communications
The primary reason why we create networks is to share
should take place over a network. Each is split into
data and resources, and to communicate with each
several layers. This is so that each layer can operate
other. There are three fundamental aspects to a network.
independently of another, which allows the functions
These are the network components, the structure of the
that take place at each layer to be easily adapted, if
network and the protocols used. Protocols are vital in
necessary.
the effective transfer of data across a network and there
is a wealth of them that have been created to make sure The OSI model has seven different layers:
this is done efficiently and securely.

303

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Layer Function
Application This is the top layer of the model that directly interacts with data from the user. Software
applications, such as web applications and email clients, rely on the applications layer to
communicate. However, user applications, such as word processing packages, are not included
in this function.
The applications layer is responsible for managing the protocols that allow meaningful data to be
presented to the user. It manages protocols such as hypertext transfer protocol (HTTP) and simple
mail transfer protocol (SMTP) (you will learn about the function of these later in the chapter).
Presentation The primary function of the presentation layer is to prepare data ready for use in the
applications layer. This could involve the translation, encryption and compression of data. It
makes sure that the data is translated into a form that will be understood by the receiving
device. If the devices are communicating over a secure connection, the data will be encrypted.
It will also decrypt any data that is received. It will also compress any data that is required to
increase the speed of transmission.
Session This layer is responsible for opening and closing communication links between devices. The
time that passes between a communication link being opened and closed again is called a
session. This layer makes sure that the session is open for long enough to allow all the data to
be transmitted and then closes it immediately, as soon as transmission is completed.
Transport This layer is responsible for breaking down the data from the session layer into segments.
These segments are then given to the network layer. It is also responsible for reassembling the
segments at the receiving device. This layer is also responsible for flow control (the best speed
for transmission) and error checking. It checks that all the data has been received and will
request a retransmission if it is not complete.
Network The network layer breaks down the segments from the transport layer into smaller units, known
as packets. It is also responsible for reassembling the packets after transmission. This layer is
also responsible for routing, which is the process of finding the best path across the network.
The network layer performs these tasks when data is transmitted from network to network. A
router is one of the key network components in this layer. You will learn more about the role of
a router later in the chapter.
Data link This layer performs a very similar role to the network layer, but rather than transmitting data from
network to network, it is responsible for transmitting data from node to node within a network. It
takes the packets created at the network layer and converts them into frames. A switch is one of
the key components in this layer. You will learn more about a switch later in the chapter.
Physical This layer involves the physical equipment that is used to transmit the data, such as the
cables. In this layer, data is broken down into bits to be transmitted as binary. This layer is also
responsible for reassembling the bits into frames, after transmission.

Table 14.1: Layers in OSI model.

KEY WORDS
packet: a unit of data in data transmission
router: a network component that uses a computer’s IP address to send data packets to a destination
outside the current network
switch: a network component that uses a computer’s MAC address to send data packets to a destination
within a network

304

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

The OSI model is a logical model that can be applied


when creating a network. An alternative setup is the 14.2 Structure of a data
TCP/IP model. In its basic form the TCP/IP model is a
condensed version of the OSI model. It has four layers,
rather than the seven outlined in the OSI model. The
packet
TCP/IP model was developed by the US department of The prime function of a network is to transmit data
defence and is intended to be a more advanced version from one device to another. In order to begin to
of the OSI model. understand how this occurs and how networks are
structured, it is important to understand how the data is
The four layers of the TCP/IP protocol are: packaged to be transmitted across the network.
A data packet is normally the smallest unit of data that
Layer Function is sent across a network and it contains several elements.
Application This layer condenses the role of These elements can depend on the network used to send
layer the application, presentation and the packet. For example, if a packet is sent using the
session layers from the OSI model. It internet, it will contain more elements to allow to it to
uses several protocols to provide a be directed to the right place. All the normal elements
standardised exchange of data. The of a packet of data are the header, the payload and
protocols it uses include HTTP, SMTP, the trailer.
post office protocol (POP) and file
transfer protocol (FTP). You will learn The header could include:
more about the function of these • the IP address of the sender. This is called the
protocols later in the chapter. source IP address.
Transport This layer is comparable to the • the IP address of the receiving device. This is called
layer transport layer in the OSI model. It the destination IP address.
is responsible for maintaining end-
to-end communications between • the sequence number of the packet. This is so the
devices. There are two main receiving device can reorder the packets to obtain
protocols that are used at this level. the original data.
The first is the transmission control • the MAC address of the sender and the receiver.
protocol (TCP) and the second is the If the packet passes through a router, these will be
user datagram protocol (UDP). You removed, as they are no longer necessary, as they
will learn more about the function of are only used by a switch. You will learn the roles
these protocols later in the chapter. of a router and a switch later in the chapter.
Network This layer can also be known as the • any protocols used.
layer internet layer and it is comparable to
the network layer in the OSI model. The payload will include:
It breaks data down into packets and • the actual data from the file that is being
transmits it network to network. There transmitted.
are two main protocols that are used
at the level. The first is the internet
protocol (IP) and the second is the KEY WORDS
internet control message protocol
(ICMP). IP address: (Internet Protocol address): a
unique address given to a device, normally
Link layer This layer can also be known as the
by a router
physical layer and it condenses the
role of the data link layer and physical MAC address: (Media Access Control address):
layer from the OSI model. A protocol a unique address given to a device by the
used at this level is the address manufacturer
resolution protocol (ARP).

Table 14.2: Layers in TCP/IP model.

305

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The trailer could include:


Packet switching
• a flag that tells a device it has reached the end of
In packet switching, the data packets sent across the
the packet. network can take any available path. There is no set
• any error checking methods that are used. pathway and each data packet could be sent along a
different pathway. In the diagram in Figure 14.1, data
The data sent in the header and trailer are all designed packets sent from Computer A and could be sent via
to make sure that payload data arrives at its intended any of the five switch components in the network.
destination without any errors. The packets will be collated and reordered when they
reach Computer B. Packet switching is normally used
when packets are sent across the internet. In this case,

14.3 Transmitting data they will be sent via routers. You will learn later in the
chapter how routers are used in this way.

packets There are two main methods of transmission in packet


switching. These are connection-oriented (also known
The term used for transmitting data packets across as virtual circuit switching) and connectionless (also
a network is switching. There are three main types known as datagram switching). Frame relay and
of switching, circuit switching, packet switching and transmission control protocol (TCP) are two types of
message switching. connection-oriented packet switching. Ethernet, internet
protocol (IP) and user datagram protocol (UDP) are
types of connectionless packet switching. In connection-
Circuit switching oriented packet switching, a session is created before
any data is transferred. This becomes a fixed channel for
In circuit switching, a direct path is created between the the data to travel. In connectionless packet switching,
sending and the receiving device. These are dedicated there does not need to be any prior arrangement set up
pathways to transmit the data packets from one device between devices to transmit the data.
to another across the network. The data is transmitted
each time using this dedicated path. Connection-oriented
Method Function
Frame In frame relay, data is separated into
Switch Switch relay units called frames. Any methods of
error correction that are used are carried
out by the devices at the end points of
transmission, which is one advantage
of frame relay, as it helps speed up
transmission.
Switch
If an error is detected in a frame, that
Computer A Computer B
frame is dropped. The devices at the
endpoints will then detect the dropped
frames and retransmit them. This makes
frame rate most suitable for sending data
Switch Switch
where the error rate is likely to be low.
There are two main methods of
Figure 14.1: Circuit switching. connection in frame relay. The first is
permanent virtual circuits (PVC), which
Whilst data is being transmitted from computer A to are connections intended to exist for
computer B, no other computers in the network can long periods of time, even if data is not
use the same pathway. When the data transmission is currently being exchanged. The second
completed, the path is then released for use by other is switched virtual circuits (SVC), which
data transmission across the network. are temporary connections designed to
exist for a single session.

306

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

Method Function along the same path, and it is like packet switching in
that any path from Computer A to Computer B can be
TCP In this protocol, a connection is created taken. The data packets are sent from Computer A to
and maintained until the application the first switch device. The device holds the data packets
software at each endpoint have finished until all of them have arrived. This switch then sends
exchanging data. the data packets onto the next switch, which holds onto
It determines how the data is broken the data packets until all of them have arrived. The data
down into packets, which it gives to packets are sent from switch to switch in this way, until
and receives from the network layer in they reach Computer B. This is known as the store and
the TCP/IP model. It is responsible for forward method.
providing error free data transmission
and managing the flow of the data. PRACTICAL ACTIVITY 14.02
Table 14.3: Connection-orientated packet switching Draw a diagram to represent the method of
methods. message switching.

Connectionless
Method Function 14.4 Network structures
Ethernet This is a traditional protocol used to There are several different structures that can be used
connected devices, using a wired to create a network. You are going to learn about six
connection, to form a network. It makes different structures.
sure that network devices format and
transmit data in a way that other devices Peer-to-peer
on the network will understand.
A peer-to-peer network is one that contains computers
Most networks that are set up within a known as peers. A peer-to-peer network can be as
home or school are likely to use ethernet. simple as two computers connected in a home. It can
IP This is the protocol that is used when also be as extensive as hundreds of peer computers
data is sent across the internet. It is connected using the internet. The main reason that peer-
the protocol that is responsible for to-peer networks are created is to share data. A peer-
delivering the packets of data to the to-peer network has a decentralised structure, which
receiving device. means that is doesn’t have any central point of control.
Therefore, each peer in the network has the same level
UDP This is an alternative protocol to the TCP.
of responsibility and capability.
There are two main differences between
this protocol and the TCP. The first is
that this protocol sends the data in units KEY WORD
called datagrams. The second difference
is that this protocol does not control the peer: a computer of equal importance in a peer-
flow of data or carry out error checking. to-peer network
For this reason, the exchange of data
using UDP is often faster than using TCP.
Each user in the peer-to-peer structure stores data
Table 14.4: Connectionless packet switching methods. on their computer. They can choose to keep this data
private, which means other peers in the network are not
able to view it. They can also choose to make the data
Message switching public, which means that other peers in the network
are able to view the data too. If a peer computer in the
Message switching is a little like an intermediate method network has a peripheral, such as a printer attached to
between circuit switching and packet switching. It is it, the user can make the printer public so that other
like circuit switching in that all the data packets are sent peer computers can print to it also.

307

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Peer-to-peer networks have evolved into being used as a sharing has proved controversial because of its use in
file sharing system for digital media, such as sound and the piracy of music and movies.
video. Sound and video files are accessed by users using
There are several advantages and disadvantages of a
a dedicated peer-to-peer software. The software links
peer-to-peer network:
people who have the files with people who want the files,
so that the data can be exchanged. This method of file

Advantages Disadvantages
Relatively cheap to setup as no need If a peer computer is being accessed by another peer computer, it can
to buy expensive servers. affect the performance of the computer and cause it to run slower.
Requires little technical knowledge to The data stored on each peer computer is not centrally backed up by
set up. the network. Therefore, if a peer loses the data, it is lost for everyone,
unless they have a copy saved locally on their computer.
Users are able to share data and The public files shared by a peer computer may be disorganised and
resources. difficult to navigate, because there is no central organisation system in
place.
Often has less traffic than the Each user in the network is responsible for the security of their peer
alternative client-server structure. computer. If users are not vigilant, and their computer gets a virus, this
could be passed to other peer computers in the network.
Users have full control over the data
stored on their computer.
If a peer computer fails, this will only
have a minor effect on the rest of the
peers in the network. It will just mean
that any data that the user had made
public will be temporarily unavailable.

Table 14.5: Peer-to-peer network advantages and disadvantages.

PRACTICAL ACTIVITY 14.03 Most client server networks operate using a request-
response method. A typical operation in this method is
Draw a diagram to represent a peer-to-peer a client sends a request to a server to ask the server to
network. The network must contain four perform a task and the server responds by performing
computers and a printer and a scanner. the task.

KEY WORDS
Client-server client: a computer in a network that is not a
A client-server network is one that contains two types central point of control
of computers, a client and a server. The server or servers server: a computer in a network that is a point
in a client-server network are a central point of control of control
and provide a dedicated function for the network. All
other computers in the network are called clients. The
client computers in the network are all connected to the There are several types of server that could be included
server to allow it to perform its dedicated function. in a client-server network that perform a dedicated
function. These include:

308

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

Server type Function


File server Stores and manages data files. This saves the need for extensive storage space on client
computers. They allow a user to use any client computer in the network and still be able
to access their files and also any publicly shared files available. They also allow a central
backup of all data to be made.
Web server Stores, processes and transmits web pages.
Mail server Sends and receives emails. It stores incoming emails for the user that can be downloaded
when requested. It forwards outgoing messages to the correct destination. Most mail
servers have security checking software that will scan emails for issues such as known viruses
and malware. They can also be set to check for inappropriate content and spam.
Application Installs and runs software applications. They provide a platform to run both desktop and
server web applications.
Print server Receives print jobs from client computers and sends them to the correct printer. This allows
many client computers in a network to use the range of printers available. They can be set
to print to a specific printer. They can also be set to find the next available printer, or the
closest printer to the client. If many jobs are sent to the print server at a time, it will queue
the jobs until it can deliver them to a printer.
FTP server Manages the transfer of data that uses the file transfer protocol (FTP). It keeps a log of all
activity involving FTP. Uses a lot in the transfer of files over the internet.
Proxy server Acts as an intermediary between clients and other servers by receiving client requests
and forwarding them on to the relevant server. It provides an added level of security in a
network, protecting clients directly accessing resources on another server. For this reason, it
can also be set to act as a firewall.
Virtual server Shares the hardware of another server. Created using virtualisation software on another server.
Multiple virtual servers could be created on one physical server. A virtual server can be given
the capabilities of any of the above physical servers. Businesses sometimes use third party
virtual servers that will act as a web server, for the business to host its website. This allows the
hosting company the ability to host several businesses websites on the hardware of a single
physical server.

Table 14.6: Server types.

Spreading the functionality of the network across some businesses are planning to have fewer physical
several servers can help a network run more efficiently. servers and to divide them up into enough virtual
However, servers are very expensive computers, because servers for the functionality they require.
of the performance power and sometimes high levels of
There are several advantages and disadvantages of a
storage space they are required to have. For this reason,
client-server network:

309

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantage Disadvantage
Files can all be located in a single place and backed up on Can be very expensive to set up due to the
a regular basis. This means each user does not need to be need to buy expensive equipment, such as
responsible for this. servers.
Security for the network can be controlled from a central point, Expensive to maintain as specialist knowledge
meaning each user does not need to be responsible for this. is required to setup and maintain the servers.
Levels of access can be applied to resources and data on the Failure of a server will mean that functionality
servers, so only those that should have access will do so. This is unavailable for all users. For example, no
is very beneficial when some data and resources have to be user can access their files if a file server fails.
kept confidential.
Updates for any software or network peripherals can be rolled
out from a central location. Therefore, the business is not
reliant on each user installing updates.

Table 14.7: Client-server network advantages and disadvantages.

Servers can be grouped together to provide functionality servers, connected in a small business. Individuals and
that would be beyond a single computer. As a collective, organisations create LAN networks to allow them to
the servers have a huge amount of processing power and efficiently share data and resources, such as peripherals.
require a large amount of power to keep cool, so that
A wide area network (WAN) is a network of computers
they can all run. Servers that are grouped in this way are
and other devices that are connected over a large
called a server farm and they can be used to execute very
geographical area. The largest example of a WAN is the
large tasks, as all servers can be used to execute one or
internet. Businesses and organisations, such as banks
more parts of the task simultaneously. There are often
and the police force, use WAN networks because they
thousands of servers present in a server farm. One of
have multiple branches over a large geographical area
the largest server farms to exist is owned and maintained
that need to be connected to share data and resources.
by Google. It has over 10,000 servers.
A WAN in these examples is normally a LAN network
in each branch location that are all connected to
PRACTICAL ACTIVITY 14.04 create a WAN.
Draw a diagram to represent a client-server
network. The network must contain eight KEY WORDS
computers, two printers, a print server and a
file server. local area network (LAN): a relatively
small network that is located within a single
building or site

LAN and WAN wide area network (WAN): a relatively large


network that is normally two or more LANs that
A local area network (LAN) is a network of computers are linked
and other devices that are connected within a small
geographic area, such as a home, school or small
business. A LAN could be as simple as two computers LAN and WAN networks are set up with a purpose
connected within a home. It could also be as extensive to share data, storage and peripheral devices. There
as one hundred computers, several peripheral devices are several factors that can be considered about their
and other network components, such as switches and structure.

310

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

Factors LAN WAN


Data transfer Capable of higher transfer speeds up to Often restricted to lower transfer speeds,
rate 1Gb per second. normally less than 200Mb.
Data Fewer errors are likely to occur because data Greater chance of errors occurring as data is
transmission is transferred over a shorter distance. transferred over longer distance.
errors
Method of Normally connected using copper wire, fibre Connections could include copper wire, fibre
connection optic cables or radio waves. It could be a optic cables, radio waves, microwaves, public
mixture of all three. telephone systems, leased lines, transmission
towers and satellites.
Security Can normally be kept more secure as a More susceptible to security issues as a larger
smaller number of devices need securing. number of devices need securing. The organisation
Most of the security required is the will normally need to rely on the security measures
responsibility of the network owners. of others for part of the network, so they will not be
able to control security in these areas.
Ownership Most of the network components and devices Elements of the network are often owned by a
are owned by the individual or organisation, so third party, so they have to rely on the control
they can control and maintain them. and maintenance of others.

Table 14.8: LAN and WAN factors.

• If the data is intercepted between the user’s


Virtual private network computer and the VPN server, a hacker would not
Individuals or organisations may want to access know the final destination of the data.
sensitive data from a remote location to where it is • If the data is intercepted between the VPN and the
stored. It is possible that a request to access this data final destination, the hacker would not know who
could be intercepted by a hacker. This security issue can the original sender of the data is.
be overcome by using a virtual private network (VPN). Because the VPN server connects to the rest of the
To us a VPN, a user needs to open their VPN client. internet on your behalf, this adds a level of security and
This is the software that they have used to create the privacy to data that is beneficial to both an individual
VPN. The VPN software will encrypt any data that and an organisation.
the user wants to transmit before it gets sent across the
internet. The data will first be sent to the VPN server. Advantages Disadvantages
From here, it will be sent to its required destination. The
Data is encrypted before In some countries the
data sent is encrypted and the when the data arrives at
it is sent across the use of a VPN is illegal or
the destination, it only shows that it was sent from the
network. controversial, as some
VPN server, and not the details of the original sender.
people can use them
When data is sent without the use of a VPN, it could be to create anonymity in
intercepted by another user and the contents of the packets certain criminal activity.
examined. This would show who sent the data and where it The identity of the The security of the data
is going to. This may mean that a hacker could then use this sender is kept private is reliant upon a third
data to hack the accounts of the user. The security of data from the destination party and their ability to
is increased in several ways by using a VPN: and any hacker who create effective software
• The data is encrypted, so even if it is intercepted, it intercepts a data and maintenance of the
will be meaningless. package. VPN server.

311

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages the fastest and most reliable connections available.


When they are fully established the average
The maintenance of the There is often a cost download speed should be approximately 1 Gbps.
VPN server is not the involved in purchasing They have tested speeds up to 1.5 Gbps at present,
responsibility of the user, a VPN. This could be but could prove to be capable of even faster speeds.
so they do not need to a monthly subscription
think about this. fee. Mobile networks have their advantages and disadvantages:

Table 14.9: VPN advantages and disadvantages. Advantages Disadvantages


Mobile networks have Quality of
enabled users to communicate reception can vary
Mobile network with others and access the and can be poor
A mobile network (also called a cellular network) internet while on the move, towards the edge
is a wireless WAN that uses radio to transmit and often through the use of of a cell, leading
receive communications from portable devices, such as smartphones. to interrupted
smartphones. Mobile networks now cover a considerable or delayed
amount of the inhabited areas of world. transmissions.

Mobile networks are broken down into small areas Breaking the network down The use of
called cells. At the heart of each cell is a radio base into cells allows for lower frequency must
station that transmits and receives messages. The base power radio transmitters to be be carefully
stations connect to public telecommunications services used, bringing energy and cost planned to avoid
allowing access to the internet. savings. interference
between cells.
Cells vary in size:
• picocells cover an area of less than 200 metres There are only so many radio The technology
frequencies that can be used for 5G technology
• microcells cover an area up to 2 kilometres
for mobile communications. is limited at
• macrocells cover larger regions. These frequencies can be split present and it
There have been several generations of mobile networks, among neighbouring cells, and could take a while
each providing faster access speeds and greater reliability: reused in more distant cells, and be costly
• 1G networks – This is the first generation of mobile thereby increasing the number to make the
networks. They use analogue signals. 1G networks of communications that can technology full
are largely limited to voice and text message take place at the same time. useable.
communications. Larger geographical areas can
• 2G networks – This is the second generation of be covered than by using a
mobile networks. They switched from analogue single transmitter. Even high-
to digital transmission, improving signal quality. power transmitters are limited
2G networks were able to connect with each other, in range. By using several low
allowing a phone to use other networks. power transmitters, a wider
• 3G networks – This is the third generation of mobile area can be covered.
networks. 3G networks increased data transmission The use of multiple
speeds up to 2 Mbps, allowing internet access, video transmitters means the network
transmission and online gaming. is more robust. Failure of one
• 4G networks – This is the fourth generation of mobile base station only affects one
networks, and is a relatively recent generation of cell, leaving other areas of the
mobile network technology. In theory, 4G networks network unaffected.
allow data transmission speeds of up to 1 Gbps,
allowing greater use of video streaming facilities. Table 14.10: Mobile networks advantages and
disadvantages.
• 5G networks – This is the fifth and most recent
generation of mobile networks. 5G networks offer

312

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

to create a swarm. Each host will be given pieces of


14.5 Network protocols the file. The BitTorrent protocol allows the user to join
the swarm and download the file from the available
Some of the main network protocols have already been
hosts. The protocol will download the file in pieces,
discussed. However, there are several other protocols
simultaneously, from various hosts in the swarm. The
that you need to understand.
protocol can then rearrange the pieces to create the
These protocols are mainly designed to increase the completed file.
privacy and security of data. They include:
Each piece of the file is protected to stop it being
modified by any users. Each user trying to download the
Protocol Description file is called a peer and each user that is providing an
Tunnelling This is a communications protocol that upload of the file, as part of the swarm, is called a seed.
allows for the secure transmission of
Further network protocols include:
data from one network to another. It
allows private data packets to be sent
across a public network through a Protocol Function
method called encapsulation. This is Internet This is an error reporting protocol
when private data packets are made control that is used to generate error
to look like public data packets, so message messages, to transmit to the
that they can be sent across a public protocol sender, when network problems
network. Tunnelling is an important (ICMP) cause delivery problems with data
protocol used in VPNs. packets.
Secure This is a network protocol that is Address This protocol is responsible for
sockets designed to ensure connections made resolution translation of an IP address into
layer (SSL) between web clients, such as user protocol (ARP) a MAC address for a device. It is
devices, and web/mail servers are necessary for use between the
secure. It uses both public and private network layer and the data link
keys to encrypt data that is transmitted layer of the OSI model.
over the secure connection. It is still Inverse This protocol performs the
used in some applications, but it has address opposite role to the ARP. It
now mostly been replaced by the use resolution translates a MAC address into an
of TLS. protocol IP address.
Transport This is a network protocol that is (InARP)
layer the updated version of SSL. It uses Dynamic host This is a network management
security updated and more secure encryption configuration protocol that is used to assign IP
(TLS) algorithms. protocol addresses to devices on a network.
Internet This is a network protocol that is (DHCP) It manages the assignment of
protocol designed to encrypt and authenticate the addresses so that a network
security data packets that are sent across administrator does not need to
(IPsec) the internet. IPSec is also part of the manually carry out this task.
tunnelling process for a VPN. Hypertext HTTP is the protocol that is used
transfer for transferring the content of web
Table 14.11: Network protocols.
protocols pages across the internet, from a
(HTTP and web server to a browser. HTTPS
Another protocol that is used in the transmission HTTPS) is the secure version of this that
of data over a network is BitTorrent. This is a incorporates the use of the SSL
communications protocol that is often used in peer- protocol.
to-peer file sharing. It allows the transfer of large files
such as videos. It does this through distributing the load File transfer This protocol is responsible for the
of downloading the file across several sources on the protocol (FTP) transfer of files between a client
network. Several sources (known as hosts) are collated and a server in a network.

313

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Protocol Function cards (WNIC). A NIC is an electronic circuit board


that is inserted into a device’s motherboard. More
Simple mail This protocol is used to send modern devices can have the NIC already built into the
transfer email from a computer to a mail motherboard, which removes the need to have a separate
protocol server, and between different mail component. When a manufacturer provides a device with
(SMTP) servers. a network interface card, it also provides the card with
Post office This protocol is used to retrieve a media access control (MAC) address. This address is
protocol (POP) emails from a mail server. When unique to the NIC and is made up of the manufacturer’s
the user checks their mailbox, the ID and the serial number. The MAC address is used to
email is sent from the server to uniquely identify the device when it is connected to a
their device. The protocol then network. A cable, called an ethernet cable, is connected
deletes the email from the server. into a port on the NIC. The cable can then simply be
Internet This protocol is also used to connected to another computer, or to another network
message retrieve email from a mail server. component, such as a router or a switch. This is the basis
access It has one main difference from of creating a simple network of computers. If a WNIC
protocol POP and that is that the email is is used, rather than a wired NIC, there is no requirement
(IMAP) not deleted from the server by for an ethernet cable, as the devices can be connected
the protocol. The only time it is using the wireless capabilities of the cards.
deleted is when the user chooses
to delete it.
KEY WORDS
Telnet This protocol allows a user to
connect remotely to another network interface card: a network component
computer, using the internet. required to attach a computer to a network
Secure shell This protocol provides a secure
(SSH) way to access a computer over
an unsecure network. It does
this using strong authentication
and encryption methods for
communication.

Table 14.12: Network protocols.

14.6 Components in
a network
A network can often include several different
components, that each have a role within the network.
Figure 14.2: Wireless network interface card.

Network interface cards


and wireless network Hubs and switches
interface cards If only a couple of computers are connected in a
network, a simple ethernet connection between the two
The first component a device needs to connect to can be made. If several computers need to be connected,
a network is a network interface card (NIC). These a component needs to be used to connect the devices
can allow a wired connection to a network, but also and manage the traffic. There are two devices that can
exist in wireless form as wireless network interface be used for this purpose. They are a hub and a switch.

314

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

intended destination only. It knows which device to send


KEY WORD the data to because, when the devices are connected
hub: a network component that joins computers to the switch, it creates a MAC address source table.
together and forwards data packets to all When it receives a data packet, it looks which MAC
connected devices address is the intended destination of the packet and
then forwards it to that device. This greatly reduces the
amount of traffic on the network, because data is only
A hub is a component in a network to which each device sent to the destination device, and not to every device it
is connected using a wired connection. If one device is connected to on the network. This also greatly reduces
wants to send data to another device in the network, the possibility of data collisions occurring.
it will go via the hub. The hub receives the data from
the sender and then forwards the data on to every
other device connected to the hub. The other devices
connected to the hub will ignore the data sent to them
if they are not the intended destination. The computer
that is the intended destination will receive the data.
A hub can be described as an active or passive hub.
Figure 14.4: Switch.
A passive hub will just send the data to the other devices
as described. An active hub will amplify and regenerate
the signal used to send the data to make it stronger.
Because the hub forwards the data to all connected Repeaters
devices the process is inefficient. There is lots of
unnecessary traffic present in the network and this can As signals sent by devices travel around a network, they
often cause an issue called data collisions. The data sent can be prone to deterioration. This can often occur
only needs to be received by the intended destination because of interference that can occur in the transmission
device. This inefficiency was recognised and, as a result, media (the cables that are used to transmit data around
another network component was developed, the switch. a network). To try and retain the original quality of
the signal as it travels around a network, a component
called a repeater can be used. A repeater can be used at
various points in a network to boost the signal as it passes
through the repeater. A repeater can be used to boost a
wired signal, or a wireless signal, and they are capable of
retransmitting both analogue and digital signals.

KEY WORD
repeater: a network component that is used to
boost a signal in data transmission

Wireless access points


There may be requirement in a network for devices to
Figure 14.3: Hub. connect to the network using a wireless connection.
The network component required for this is a wireless
A switch is a component in a network that is used in access point (WAP). A WAP allows a wireless device
the same way as a hub, to connect devices together. to connect to a wired network. It receives wireless data
The difference between a hub and a switch is the way signals and then uses the wired network to transmit
it forwards the data received on to its destination. them to their destination, often via a switch. It supports
A switch has the capability to examine each data the connection of multiple wireless devices to the same
packet it receives and forward the data packet onto the WAP, therefore it connects the devices to the network

315

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

by effectively creating a wireless LAN. Although a WAP the packet ‘across the bridge’ to that part of the LAN.
will support the connection of multiple devices, they If the bridge finds that the packet’s destination is within
often have a limit, for example, 15 to 20 devices. For this the same part of the network, for example, within the
reason, larger organisations will have multiple WAPs. same building, it will just ignore the packet and allow it
They will distribute these throughout the building to continue to its destination.
as the signal strength for connection to a WAP also
deteriorates with distance.
KEY WORD

KEY WORDS bridge: a network component that connects


segregated parts of a LAN
wireless access point: a network component
that receives and transmits radio signals to allow
wireless (Wi-Fi) connection to a network
Gateways and routers
Some organisations may find that they have different
branches, sometimes within the same city, for example, a
bank. Each branch will have its own LAN network. The
branches may want to share data about their customers,
so they need to connect their LANs together. They do this
using a component called a gateway. A common gateway
component that is used to connect LANs is called a router.

KEY WORD
gateway: a network component that joins
different LANs together

One of the primary roles of a router is to assign each


device that is connected to it with an IP address. This is
Figure 14.5: Wireless access points. an address that is unique to the device and can be used
to identify its location in the network. There are two
current versions of IP address, IPv4 and IPv6. IPv4 was
Bridges the original version, that is a 32-bit numerical address.
As more devices connected to the internet, we started
Some organisations may have a site for their business to run out of possible combinations for IP addresses,
that has several different buildings. This may mean so IPv6 was developed. IPv6 is a 128-bit address that
that they have a LAN network that is split up and allows for many more possible combinations of IP
segregated between the different buildings. This can address. An IP address can also be static or dynamic.
result in the parts of the LAN being too far apart A static IP address means that the device will always
to operate effectively, the signal can deteriorate too have the same IP address. A dynamic IP address means
much, travelling from one device to another. The parts that the IP address could change for each internet
of the LANs can be connected more effectively using session. Most devices operate with a dynamic IP address
a network component called a bridge. A bridge also setup. A user will normally need to request a static IP
uses MAC addresses to forward data to the correct address from the internet provider if they want one.
destination, like a switch. It works slightly differently
to a switch in one way though. It examines the data
packets it receives, checking them against the MAC PRACTICAL ACTIVITY 14.05
address source table. If it finds that the data packet’s
destination is in another segmented part of the network, See if you can find out the current IP address of
for example, another building on the site, it will forward your computer.

316

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

A router is used to connect LANs and also to connect Advantages Disadvantages


LANs to WANs. A router acts in a similar way to a switch,
but with two main differences. The first is that a switch will Low cost to Has the lowest level of
only forward on data packets to their destination within a manufacture and bandwidth of the three
single network. However, a router is used to forward data purchase. cable types.
packets outside the current LAN to other networks. The Lower error rate The way in which
second is that a switch examines data packets and looks for because the central a coaxial cable is
the MAC address to establish the packet’s destination, but wire is within a faraday insulated can make it
a router looks for the IP address of the destination device shield (a special difficult to install and
and uses this to send it there. Routers use routing tables shield used to block maintain.
to do this, which allow them to establish the most efficient electromagnetic
route the data packet should take to reach its destination. A interference).
routing table is stored on the router and lists all the available
routers to particular network destinations. Routers need Table 14.13: Advantages and disadvantages of coaxial
to use routing protocols to specify how they communicate cable.
with each other. Routing protocols help select the route
that data travels from one device in a network to another.
There are three main types of routing protocol – interior Twisted pair
gateway protocols, exterior gateway protocols and border
gateway protocols. Interior gateway protocols are used to Twisted pair is a type of copper cable that has two
specify how routers communicate with each other within separate insulated wires that are twisted around each
a network, such as a local area network. Exterior gateway other. These cables are then covered by an outer layer
protocols are used to specify how routers communicate that acts like a jacket. Twisted pair cables transmit electric
with each other between different networks. Border gateway current. They are used for telephone communications and
protocols are a specific kind of exterior gateway protocol normally as part of an ethernet network.
that manage the process of exchanging packets of data
across the largest network, the internet.
Many of us have routers in our home that we use to
connect our devices to the internet. The router devices
we have within our home can be quite neat little devices.
They are often a router and a WAP all in one.

14.7 Network Figure 14.6: Twisted pair cables.

connections (physical)
To connect devices together in a network, either some Advantages Disadvantages
kind of wired or wireless connection will be necessary. Crosstalk (a signal Can be susceptible
transmitted from one to electromagnetic
There are three main types of cable that can be used
channel to another) is interference.
to create a wired connection between devices, these are
minimised.
coaxial, twisted pair and fibre optic.
Is the lowest cost Has the shortest
to manufacture and distance that a signal
Coaxial purchase. can be carried before it
Coaxial is a type of copper cable that has a central wire will begin to deteriorate.
surrounded by an insulating layer. Coaxial cables also Has a higher level of
have an outer layer that acts like a jacket. Coaxial cables bandwidth than coaxial.
are used to carry radio frequency signals. They are used
in applications such as TV and Cable TV connections as Table 14.14: Advantages and disadvantages of twisted pair
well as some internet connections. cable.

317

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Fibre optic
Fibre optic is a type of cable that is made up of lots of
very fine threads of glass. These are covered with an
outer layer. The use of fibre optic cables is becoming
more prominent in networks, because they can transmit
data much faster. Fibre optics cables use the properties
of light to transmit data. They are used in modern
internet connections and in high performance networks
where large amounts of data are transmitted.

Advantages Disadvantages
Has the highest level of Has the highest cost
bandwidth available of for manufacture and
the three cables. purchase. Figure 14.7: Wireless communication.
Can carry signals for a Can be difficult to install
much longer distance due to how fragile the
without deterioration. glass tubes can be. Advantages Disadvantages

Table 14.15: Advantages and disadvantages of fibre optic


Several wireless capable The speed at
cable.
devices can connect to a which data can
single router or WAP. be transferred
decreases as more
devices connect to
14.8 Network a wireless network.

connections (wireless) The high level of frequency


used means that large
Less secure than a
wired connection.
There are several types of wireless methods that can be amounts of data can be
used to connect devices in a network. These include Wi- transmitted at a time.
Fi, Bluetooth, infrared, microwaves and radio. More recent Wi-Fi standards Radio signals
are backward compatible with can be subject to
Wi-Fi previous ones. interference.
Has quite a large range of
Wi-Fi uses radio signals and is the most commonly
approximately 100 m.
used wireless communication method. Each device that
wants to make a wireless connection will broadcast It doesn’t require a line of
a radio signal. A router or a WAP will receive these sight, so it can work through
wireless signals and process them. The router or WAP obstacles.
will also broadcast radio signals that will be received and
Table 14.16: Advantages and disadvantages of Wi-Fi.
processed by each device when it is receiving data that
has been transmitted. Wi-Fi currently transmits data at
frequencies of 2.4 GHz and 5 GHz. These frequencies are
much higher than those used by mobile networks. These Bluetooth
are considered high frequencies, which are required to Bluetooth also uses radio signals to create a wireless
send larger amounts of data. The current limit for Wi-Fi connection between two devices. It uses the radio
data transmission is approximately 450 Mbps. frequency 2.45 Ghz. To establish a connection, devices
need to be within 10 m of each other and there is
currently a limit of eight devices that can be connected
at any given time using Bluetooth. The two devices
requesting a wireless connection using Bluetooth must
have matching profiles. For example, if a mobile device

318

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

wants to connect to a headset to allow sound to be


transmitted, they must both have the profile that allows
Infrared
this. This is to stop pointless Bluetooth connections Infrared connections use infrared radiation as their method
being made. For example, connecting a wireless mouse of connection. Two different types of infrared connection
to a digital camera – the mouse cannot be used to can be made. These are line-of-sight mode and scatter
control the camera as it is not designed for this function. mode. In line-of-sight mode, there must be a direct line of
sight between the sending device and the receiving device.
To create a connection, the Bluetooth transmitter is turned
This means that there can be no obstacles in the way. In
on in a device. This device will then begin to transmit
scatter mode, a device broadcasts infrared into a certain
the radio signals. Any device that has a matching profile,
area and any device may receive it directly or through
within range, will pick up the radio signals and will then
reflection of an obstacle. The sending device will need the
identify with the sender as a possible device to connect
ability to produce an infrared signal and the receiving device
to. The required device for connection can then be
needs an infrared sensor to capture the infrared signal.
chosen. The devices will then be paired together. This can
sometimes require entering a pin code for added security. Infrared lasers can also be used to transmit data from
one device to another in a network. The infrared laser
beam needs to have a direct line of sight in order to be
able to connect the devices. Laser data transmission
works in a similar way to fibre optic, in that it uses the
properties of light to transmit the data. Rather than
travelling through physical transmission media, like fibre
optic transmission, laser transmission relies on data
travelling through free space.

Advantages Disadvantages
It is the most secure Cannot be transmitted
form of connection. through obstacles.
Low cost to If it uses line-of-sight
manufacture and mode, there must be
Figure 14.8: Establishing Bluetooth pairing. purchase. a direct line of sight
between the two devices.
It requires a low level It can only be used to
Advantages Disadvantages of power consumption. connect two devices.
It requires a low level of Has a limit of 10 m It doesn’t get any It has a short range with
power consumption. for a connection. interference from radio a limit of approximately
It doesn’t require a line of A limit of eight frequencies. 1 m.
sight, so it can work through devices can be May be subject to
obstacles. connected at a time. interference from bright
sources.
Can be made more secure Has a lower level of
by requiring a pin code for bandwidth available Table 14.18: Advantages and disadvantages of infrared.
connection. than Wi-Fi.
There will be less
interference as other wireless Question
connections transmit on 1 Identify two examples where an infrared wireless
different frequencies. connection could be used.

Table 14.17: Advantages and disadvantages of Bluetooth.

319

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

There can be security issues associated with the use is the measure of the frequencies available on the
of wireless data transmission. This is because wireless channels of communication in the network. Bandwidth
connections do not have the same level of protection is also used to describe the maximum amount of data
as a wired connection. Wired networks are normally that can be transferred across a network within a given
limited to the confines of a building or single site, and time, which is usually one second. Therefore, the more
there are often locks and other security methods in place bandwidth a connection has, the more data it can
to stop an unauthorised person entering that area and transfer at a single time. It is a common misconception
gaining access to that network. that the bandwidth is a measure of the speed of a
network. It is not.
As a result, there are two main protocols that are
designed to improve the level of security of a wireless The bit rate is a similar measure to bandwidth, in that
network. These are wired equivalent privacy (WEP) and it is a measure of how many bits of data are transferred
wi-fi protected access (WPA): in a given period of time. It is different from the
bandwidth in that bandwidth is a term used to describe
Protocol Function the performance ability of a network, whereas bit rate
is used to describe the rate at which a particular file,
WEP This protocol is designed to provide a
for example, a video file, is transferred. The bit rate of
wireless network with a compatible level
a transfer will not exceed the bandwidth, because the
of security to a wired LAN. It does this
bandwidth will be the maximum possible bit rate.
by encrypting data transmissions sent
using a wireless connection.
WPA This is a standard required of devices KEY WORDS
equipped with a wireless internet
bandwidth: the range of frequencies available
connection. It is designed to provide a
for a communication method which determines
more sophisticated encryption method
the transmission rate
than WEP.
bit rate: the rate at which bits can be transferred
Table 14.19: Wireless security protocols.
in data transmission

Microwaves and radio waves An example to demonstrate the two would be that a
network could have a bandwidth of 100 Mbps but
In data transmission, the terms ‘microwaves’ and a video file that is transferred from one computer to
‘radio waves’ are often used interchangeably. This is another over that network may be transferred at a bit
because microwaves and radio waves are both types rate of 75 Mbps.
of electromagnetic radiation that can be used to
transmit data. Microwaves have shorter wavelengths Bandwidth and bit rate are also important when
and are therefore generally used for short-distance streaming audio and video files. There are two different
communications. Radio waves have longer wavelengths types of data streaming – real-time and on-demand
and are therefore generally used for long-distance streaming. In real-time data streaming, the data is
communications. Considering this, the waves used in both streamed as soon as it is recorded by the camera (or any
Wi-Fi and Bluetooth are technically microwaves. However, other recording device that may be used). In on-demand
historically, the term ‘radio waves’ has been applied to the streaming, data is pre-recorded and streamed to the
technology used in wireless data transmission. users device whenever they request the recording. When
a file is streamed, it removes the need to download
and store the whole file before it is viewed or listened
to. Data is streamed as a series of bits to the receiving
14.9 Bandwidth and device. The receiving device will have a temporary
storage area called a buffer. Data will be stored in the
bit rate buffer, as it is downloaded, before it is needed as the
video is viewed, or the song is played. Data is removed
One very important factor that affects the performance from the buffer to be played and simultaneously added
of a network is bandwidth. The bandwidth of a network to be ready to play when required. The bandwidth

320

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

available will limit the quality of the sound or video file There are several advantages and disadvantages of cloud
that can be streamed. If a user has a connection that has computing:
a bandwidth of 2 Mbps, it is highly unlikely they will
be able to stream a 4K movie from an online streaming Advantages Disadvantages
service. The data required to produce each frame in the
Individuals and organisations Individuals and
video would be too much to be transmitted using the
do not need to purchase organisations are
bandwidth available.
additional hardware to store reliant on a third
data and software. party to keep their
Question data secure and they
have little control
2 What do you think would happen if a buffer were over the security
not used when streaming data? measures that are
put in place by the
cloud provider.
14.10 Cloud computing Individuals and organisations
do not need to host their
If the resources
provided by the
Cloud computing is a term that is used to refer to own development platforms cloud provider fail,
services that are hosted using the internet. These services to develop applications for example, a server
could include the storage of data and software, and software. fails, then the data
access to resources such as servers. or software stored
Cloud computing can be divided into three main on that server will
categories, infrastructure as a service (IaaS), platform as become unavailable.
a service (PaaS) and software as a service (SaaS): Organisations do not need Cloud computing
to employ technical staff to resources can
Category Description maintain the hardware used only be accessed
to store data and software using an internet
IaaS In this model of cloud computing
that is provided by the cloud connection, so if an
the host provider hosts some of the
provider. internet connection
network resources that are used by
cannot be found, the
businesses, such as servers. Businesses
resources cannot be
can gain access to these resources
accessed.
using the internet.
Individuals and organisations
PaaS In this model of cloud computing the
do not need to worry
host provider hosts platform resources
about creating a backup of
that can be used to build software
their data, because this is
applications. Users can gain access to
automatically carried out by
these resources using the internet.
the cloud provider.
SaaS In this model of cloud computing
Individuals and organisations
the host provider hosts software
can access their data and
applications and makes them available
software applications from
to users using the internet.
anywhere in the world, as
long as they have an internet
Table 14.20: Cloud computing categories.
connection.
One of the most common uses of cloud computing by the Individuals and organisations
individual is to store data. Many applications now offer the do not need to worry
service of storing data linked to the application, and other about updating software
personal data, on cloud resources. These are normally a applications that are accessed
collection of servers in a remote location. using the cloud, because
this will be carried out by the
cloud provider.

321

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Advantages Disadvantages Satellites are complex machinery. Their main


components are a solar powered battery, a transponder
Organisations can quickly and various antennas.
boost the performance of their
network by employing more Any data that is intended to be sent using satellite
resources from the cloud. If communications will need to be converted to radio
an organisation is expecting waves. The data is transmitted in the form of radio
more data traffic to their waves from a ground station on earth. This process is
server, for example, they are called the uplink. The radio waves travel through the
having a sale of their products, layers of the atmosphere up to the intended satellite.
accessed by their website, they This may be a chosen satellite, or the nearest in orbit to
could increase the capacity of pick up the radio waves. The antennas on the satellite
the web server to allow it to are the component that initially receive the radio waves.
handle the temporary increase The transponder processes the data, which can often
in traffic. They could then involve boosting the signal. The antenna then transmits
reduce it again after the sale, the radio waves back to the destination ground station
to save costs. on earth. This process is called the downlink.

Table 14.21: Advantages and disadvantages of cloud PRACTICAL ACTIVITY 14.07


computing.
Use the internet to research further information
about what a ground station looks like and how
they are used. See if you can find out where
Question there are satellite ground stations in your country.
A company creates websites using style sheets.
3 Describe another scenario that would allow an Satellite
organisation to take advantage of the ability to
scale up resources using cloud computing.

PRACTICAL ACTIVITY 14.06

Use the internet to research a news story


Upload Download
that outlines a security issue caused by cloud
computing.

14.11 Satellite
communication systems Ground
station
Ground
station

Earlier in this chapter you learnt about cellular mobile


Figure 14.9: Uplink and downlink to a satellite.
communication networks. There is another type of
mobile communication system that uses satellites.
Satellites are also used in navigation systems such as
A communications satellite is a machine that has been global positioning systems (GPS). A GPS uses satellites
transported into space and set to orbit the earth. These to work out a user’s current location. One of the most
satellites are used to transmit radio waves from one well-known satellite navigation systems is the Navstar
place on earth to another. The radio waves that are GPS. This system currently has 24 satellites in orbit.
transmitted can carry most things radio waves on earth At any time on earth, a user will usually be in the
are used for, including telephone calls, internet data and line of sight for at least 10 of these satellites, however
television broadcasts.

322

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

only three or four are actually needed to work out a Many devices are equipped with GPS devices, including
user’s location. mobile telephones and cars. As well as giving the user
the ability to find out their location, this technology can
A process called triangulation is used to find the location
also be used by others for surveillance purposes. It is
of a user. The user will be in possession of a device, such
possible to use a GPS to find out where another person
as a mobile telephone, that receives radio signals. Each
is by tracking their device. These devices often keep a
navigation satellite constantly beams radio waves that
log of all GPS activity, so it is possible for a person to
are sent toward earth. A user’s device will receive these
gain access to that log and see exactly where the device
radio waves. A device must pick up radio waves from
(and therefore possibly the user) has been.
at least three satellites and the GPS will then be able to
pinpoint their location.
PRACTICAL ACTIVITY 14.08
KEY WORD Find out how GPS systems are being tested to
create driverless vehicles.
triangulation: the process of pinpointing the
location of a device, using radio signals from
a satellite

14.12 Network security


Data is very precious. Some will argue that it has
become more valuable to companies than resources
such as oil. Unfortunately, for this reason, there are
B people that will create malicious systems that are
designed to either steal data, so that it can be used for
criminal activity, such as identity theft, or to damage
data, and therefore cause damage to a company, often
to their reputation. The use of networks, unfortunately,
A has made accessing data through malicious means a
greater risk.
C
There are various risks that users should be aware of
when using a network. Each of these risks is designed to
damage or steal data.
The first risk is malware. A user will normally
unknowingly download the malware onto their
Transmitter computer. The malware is often disguised in a file
download or a link that the user is enticed into clicking.
Time between satellite and receiver There are several types of malware, these include
viruses, worms, spyware and ransomware. You can read
Receiver more about these in Chapter 5.
Figure 14.10: Triangulation by three GPS satellites. An attack may come from a single third party and
computer, or it could be distributed across many
If the user’s device receives a signal from satellite computers. This type of attack is called a botnet.
A, this means they must be somewhere in the area Any user’s computer could be made part of a botnet,
currently covered by satellite A. If it also receives a often by the user downloading malware. Malware is
signal from satellite B and satellite C, the user must be downloaded onto the computer and will often stay
at the point where the area covered by all three of the dormant until the third party wants to use the computer
satellites meets. in an attack. Each computer that is infected with this
type of malware is called a bot. When the user wants to

323

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

carry out an attack, they ‘wake up’ the malware in the


bots and use them to form a botnet. A botnet can be PRACTICAL ACTIVITY 14.09
used to carry out attacks such as a distributed denial of There are advantages and disadvantages to
service (DDoS) attack. This is when the bots are used physical methods for securing data. Complete
to send a huge number of requests to a web server all the table to outline what some of those
at once, causing the web server to struggle to deal with advantages and disadvantages could be:
all the requests and eventually crash. This will prevent
legitimate users accessing the websites stored on the
web servers. Physical Advantages Disadvantages
method

REFLECTION Barrier

What impact could it have on a business if Lock


people are not able to access their website? requiring a
key or pin
code
Third parties may also want to hack computers to Security
damage or steal data. Hackers will try to gain access to guard
a system, normally by installing what is often known as
a backdoor, in software. This is a mechanism, sometimes CCTV
implemented using malware, or sometimes already
present in a software download (this can be the case if Alarm
the software is not legitimate), that allows a hacker to system
gain unauthorised access to a computer system, through
the backdoor.
Third parties may also want to crack into computers Data can also be protected using software-based methods.
to damage or steal data. Crackers will try a brute
An employee may be required to provide biometric data,
force approach to get into a computer by trying many
such as their fingerprint, iris or facial features, to access
different combinations of a password. They can also
data. A biometric device will scan their biometric data
build software that will carry out this function for
and check to see if it matches data stored in a database.
them. This allows them to gain unauthorised access to a
If it does, the employee will be allowed to gain access.
computer system by using the user’s log-in details.
Biometric devices are useful because biological data is
Individuals and organisations can put a range of unique to the user and very difficult to fake. Biometric
preventative methods in place to help protect their data. devices could also be used to secure individual devices in
The simplest form of protecting data is the use of a similar way. Modern mobile telephones have biometric
physical methods. Organisations can put a barrier to devices installed that require a user to provide, for
entry at the opening of their office or building. They example, their fingerprint, to gain access to the device.
could also put a lock on a door to their office or a The effects of malware can be prevented by using software,
selected area in their office. Other physical methods such as anti-malware, anti-virus and anti-spyware software.
that could be used are CCTV, security guard and alarm This type of software is designed to scan a computer system
systems. CCTV will allow an organisation to see who for malware. If it finds any, it quarantines the malware (put
is trying to gain unauthorised access. Security guards it in a designated safe area) and allows the user to delete it.
can stand guard and only allow authorised users to gain Software of this nature can sometimes monitor the data
access to a place where the data is stored, for example, a that is downloaded in real-time. It can scan each download
server room. Places of this nature could also be secured and, if it finds malware present, it can alert the user before
using an alarm system, this will alert the organisation if the file is downloaded. The quicker this kind of software
unauthorised access is attempted. finds malware, the less damage the malware can carry out.

324

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

A firewall is another method that can be used to prevent


unauthorised access or damage to data. A firewall
The impact of security
can be hardware based or software based. A firewall
examines incoming and outgoing traffic to a computer
threats on individuals and
or a network. The firewall can be set to recognise
malicious traffic by providing it with rules and criteria to
organisations
check the traffic. If traffic is detected that does not meet Individuals and organisations need to carefully consider
the rules or criteria, then it can be rejected. the impact of security threats. There are two main
common reasons why perpetrators carry out security
One way that an organisation can protect data is to only attacks – either to obtain personal data or as an act of
allow access to those that directly need that data. This sabotage or revenge.
is called access rights. The username that an employee
is given in an organisation is often what indicates their Individuals need to be very cautious of any of their
access rights. The permission to access the data that the personal data being accessed and stolen. This could lead
employee requires can be attached to their username, so to criminal acts such as fraud and theft of their identity.
they are not able to see any data that needs to remain Organisations need to be very cautious of any of their
confidential. This can prevent data being damaged. stored data being accessed and stolen. They also need
One final method that an organisation and an individual to be very cautious of their data being manipulated or
can use to protect their data is encryption. Encryption destroyed. Data is a very precious asset to organisations,
will not stop the data from being stolen, but it will as it is used in the day to day functioning of the
mean that if the data is stolen, it will be meaningless organisation. Without it, they are unlikely to be able to
to the third party, unless they are able to get the key to function at all. This could lead to a loss of profits, or if
decrypt it. the data is stolen because the organisation’s security is
breached, this could lead to a negative reputation for the
organisation, which may also lead to a loss of profits.
PRACTICAL ACTIVITY 14.10

There are advantages and disadvantages to


software-based methods for securing data.
Complete the table to outline what some of
14.13 Disaster recovery
those advantages and disadvantages could be:
management
Software- Advantages Disadvantages In an organisation, a disaster is anything that may put
based the operations of the organisation at risk. This could be
method anything from a cyber-attack, power failure or a natural
disaster. Disaster recovery is a planning mechanism that
Biometrics allows an organisation to plan for disaster and put in
place measures that will minimise the risks. To be able
Anti- to plan for protection against a disaster, the possible
malware disaster first needs to be identified.
There are several stages that can be used to identify a
Firewall
risk that could cause a disaster, these include:

Access
rights
Encryption

325

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Stage Description
Risk This is also known as a risk assessment. The organisation will first identify what they think could
analysis be a potential disaster. They will then consider what or who could be harmed as a result. They
will finally think about how this could impact the organisation. Finally, they will develop methods
to control the possibility and impact of the disaster.
All parts of a company will be assessed, including its infrastructure, networks, hardware, software
and people.
The type of things that could cause disaster in an organisation may be a power cut, cyber-attack,
fire, flood, denial of access to data, theft of data, corruption of data and hardware failure.
Perpetrator This process is often carried out as part of the risk analysis. The organisation will identify who
analysis they think could be a perpetrator that could cause a disaster to occur. A perpetrator is someone
who carries out malicious or illegal acts.
Risk testing In this stage of the process an organisation will rehearse the plans and strategies that have been
developed during the risk analysis. This will allow employees in the organisation to understand
exactly what they should do in the event of a disaster. An organisation can monitor what
happens during the testing stage and can amend plans to take improved actions, or to correct
the behaviour of employees, if they are not acting correctly. The type of plans and strategies that
could be tested are:
• restoration of data
• replacement of hardware
• reinstallation of software
• emergency evacuation of offices
• emergency protection methods for data.
Quantifying The process of quantifying a risk involves evaluating the risk and prevention methods for the risk
the risk in terms of cost and time.
There are two key measurements that should be considered, maximum tolerable downtime
(MTD) and recover time objective (RTO).
• MTD is the maximum time that each part of the organisation could tolerate not having
access to the essential parts of a network that they require.
• RTO is the estimated maximum amount of time in which an organisation has in which to
recover its network and resume operations.

Table 14.22: Stages of disaster recover management.

REFLECTION • Power surge protection devices could be used to


stop a surge in power damaging hardware.
What kind of impact could a disaster have on a • A back-up generator could be ready for use if an
company if it isn’t managed effectively? organisation suffers power failure.
• Back-ups of data could be stored in fire and flood
Earlier in the chapter you learned about methods that proof cases so that data is not lost in a fire or flood.
can be used to protect data and a network against a Back-ups could also be stored off site.
cyber-attack. An organisation will also need methods in
place to prevent against other disasters that could occur:

326

Copyright Material - Review Only - Not for Redistribution


14 Communications technology

• Policies and procedures should be developed for All of these areas will be planned and assessed in
staff to follow to prevent disaster such as fire and a disaster recovery plan, which will consider how
damage to equipment. these will be carried out and what timescales should
be expected
• Cloud computing could be used as a back-up for
data and possible hardware resources.
PRACTICAL ACTIVITY 14.11
In the event of a disaster occurring, data and resources
will need to be restored. This can often mean the: Use the internet to research more specific
• the restoration of data from back-ups information about what an organisation could
include in a disaster recovery plan, for example,
• the re-installation of software taking a detailed itinerary of equipment.
• replacement or repair of hardware.

EXAM-STYLE QUESTIONS
1 Explain the function of the presentation layer in the OSI model. [2]
2 Explain the function of the network layer in the TCP/IP model. [2]
3 William wants to create a network in his home that will connect three computers, a printer, a mobile
tablet device and a mobile telephone. He wants to minimise the costs in setting up his network.
a Identify the network structure that would be suitable for William to use. Justify your choice. [1]
b Identify the components William will need to build the network and describe the role of each. [4]
c William wants to use the network to stream videos and music. Explain the importance of
bandwidth and bit rate for this purpose. [2]
[Total 7]
4 Identify two protocols that are used in the transmission of emails. Describe the role of each
protocol in the process. [4]
5 Describe how the sound required to make a telephone call is sent from one mobile device to
another, using a mobile network. [4]
6 Emily stores data about her customers on a server in a server room in her office building. Emily
wants to keep the data more secure, so she installs a biometric device required to gain access to
the server room. She also installs a firewall.
a Explain one advantage and one disadvantage of using a biometric device to secure access to
the server room. [2]
b Describe how the firewall will help keep the data safe. [4]
[Total 6]
7 Discuss the impact of implementing a disaster recovery plan for an organisation. [6]

327

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

SUMMARY CHECKLIST
I can understand models that form the basis of a network, including the OSI model and the TCP/IP model.
I can describe the structure of a data packet.
I can describe a range of ways that data is transmitted, including circuit switching, packet switching and
message switching.
I can understand a range of network structures, including peer-to-peer, client-server, LAN, WAN, VPN,
mobile and satellite.
I can understand the role of a large range of network protocols and the responsibilities they have in the
transmission of data.
I can understand the role of a range of network components, including NIC/WNIC, hub, switch, repeater,
WAP, bridge, router, cables and wireless technologies.
I can understand the importance of bandwidth and bit rate when transmitting data.
I can understand what is meant by cloud computing.
I can understand the risks that could cause harm to a network and data and a range of methods that can be
used to help prevent them.
I can understand the process of disaster recovery management.

328

Copyright Material - Review Only - Not for Redistribution


Chapter 15

Project
management
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• describe the stages of a project
• describe the use of project management software for supporting projects
• discuss the strengths and weaknesses of project management software for supporting projects
• use and describe tools and techniques for project management.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Are you able to decompose a problem into smaller problems?

are identified and decisions are made about whether or


Introduction not it is appropriate to undertake a project by conducting
a feasibility study. The feasibility study will determine
Project management is about applying a process to
whether the project is of benefit to an organisation
enable the completion of a project on time and within
based on resources, time and finance. Requirements
budget. It can be broken down into initiation, planning,
for the project will be identified so that all stakeholders
execution and monitoring, and close stages. Project
are aware of the expectations of the project. Objectives
management software can be used to assist a project
of the project, its scope, risks, approximate budget and
team throughout a project and tools such as Gantt
approximate timescales will be defined and agreed with
charts, PERT and CPM can be used to aid project
all stakeholders. An estimate of the resources that will be
planning. Failure to complete projects on time, and
required will be made and a high-level schedule created
within budget, can be embarrassing for organisations
which identifies proposed dates for completion of aspects
who have made promises on delivery and frustrating for
of the project. A project brief or Project Initiation
the end user.
Document (PID) or initial statement of work (SoW) will
be created. At the end of the project initiation stage, a
phase review will be carried out to check that all aspects
15.1 The stages of the of initiation have been completed and that all stakeholders
understand and agree the project brief.
project life cycle
Every project needs to be managed properly in order KEY WORD
to ensure deadlines are met, resources are available and initiation: start of a project
everybody knows what they are doing.

KEY WORD
Project planning
resources: people, equipment, facilities or
funding required to complete a project There is a common phrase, ‘failing to prepare is preparing
to fail’. This is true in all parts of life, but particularly
with project planning. It is essential that the project
is planned well so that all stakeholders know their
Monitoring responsibilities during all stages. A comprehensive budget
Initiation Planning and Closing will be formulated along with details of timescales for
controlling
the progress of the project. Milestones will be set. These
milestones show by which time certain aspects of the
project must be complete. Tasks that have to be completed
between each milestone will be identified and prioritised.
Executing
A Gantt chart will be produced to show which tasks need
to be completed and in which order. Resources, including
Figure 15.1: Project stages. personnel, will be allocated to tasks in a coordinated
manner so that they are available at the right times. A very
important part of planning is to ensure that appropriate
amounts of time are allocated to each task and resource so
Project initiation that tasks can be completed on time, resources (especially
personnel) are not over used and that personnel have work
During the conception and initiation stage, the initial ideas
to do rather than not being used.
for a project are identified and goals set. Key stakeholders

330

Copyright Material - Review Only - Not for Redistribution


15 Project management

its original objectives. There should be regular project


KEY WORDS review meetings where key stakeholders can discuss the
Gantt chart: a chart used for planning a project progress of the project. At times, the project plan will
need to be adjusted, so there is regular iteration between
the execution, monitoring and control, and planning
At the end of the project planning phase, a phase review phases as shown in Figure 15.1.
will be carried out to check that the plan is achievable
and that it meets the objectives of the project.
Project close
When the project is ready to complete, a handover will
Project execution take place from the project team to the client. Contracts
Once all plans are in place and the start date arrives, will be terminated, which means some people may
the project can commence. It is critical that the plan is need to be deployed elsewhere or may need to look
followed so that resources are used at the appropriate for alternative employment. Resources that have been
times. Any delays to a task can have a knock-on effect to assigned to the project will be released. A review of the
successor tasks. The project manager will be expected to project will take place between the client and the project
communicate roles and responsibilities to team members management team, where requirements will be evaluated
and set interim targets for each member to achieve and successes will be celebrated. The client will be
within the timescales of the overall plan. expected to sign off the project as completed, so that it
is clear there is no further work to carry out and closure
At the end of the project execution phase, an execution will have been achieved.
phase review will take place to learn lessons from what
went wrong and to note examples of good practice. The
review will cover questions such as: WORKED EXAMPLE 15.01
• Was the project schedule maintained? Before writing a textbook, authors are given a project
brief that outlines the scope of what they are required
• Was the project within budget?
to write about, the types of pedagogical items to
• Were all resources available when required? include, the timescales for the delivery of manuscripts
• Has the project met the original requirements? and payment information. This is all part of planning.
Prior to this, a publisher will have decided that they
want to publish that particular textbook, and may
KEY WORD seek approval from an exam board, which makes the
execution: the development stage of a project publisher and the exam board the key stakeholders
in this case. During planning, the publisher will have
identified a project manager, an editor, a reviewer and
authors, all of whom are required resources.
Project monitoring and control The execution stage includes the authors writing
chapters for the textbook. This is monitored
Throughout the execution of the project, the project
and controlled by the editor who stays in regular
manager must monitor the progress and control what is
communication with the authors to check on their
happening. The project manager will be responsible for
progress and to collect completed chapters. If
ensuring tasks are completed on time and rescheduling
timescales slip, then the project plan is revised as other
any tasks if there are delays. The project manager will
execution stages such as reviewing, typesetting and
need to monitor the performance of team members
proofreading are all dependent upon the manuscript
to ensure they are carrying out their agreed roles
being delivered.
effectively. The project manager will need to monitor
expenditure and compare it against the budget to The project comes to a close when the textbook is ready
ensure that overspends don’t occur and keep a close to be sent to the printers, once the authors, the publisher
eye on the scope of the project to make sure it doesn’t and exam board have approved the final proof.
extend beyond its agreed boundaries. Objectives will be
regularly reviewed to ensure that the project is meeting

331

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Question be completed, together with calendars for each team


member that is responsible for those tasks.
1 Explain why it is necessary to iterate between the
planning, execution, and monitoring and control
stages of project management. Allocation of resources
Resources can be equipment, property or people that are
required to complete a task. These resources will need
15.2 Project to be defined within the project management software
and their availability can be identified so the project
management software manager knows when they can be used. Costs can be
assigned to any resource, so the project manager can see
how their use will affect the budget. Resources can then
Planning be assigned to tasks and a number of hours or days be
Most of the planning involved using project assigned to the use of that resource. The software will
management software is concerned with scheduling help the project manager to avoid resource conflicts and
tasks and allocating resources to those tasks. However, also identify clearly situations where team members
key milestones can be identified in advance. These are could experience overload. This is when a team member
when crucial points in the project should be reached, has too many tasks to complete during a period of time.
so tasks should be scheduled to meet these milestones.
Documents that are likely to be required can be Costings
allocated to milestones, such as success criteria and
specifications. Templates can be used for setting up an All resources will have costs allocated to them, so the
initial project plan. These templates can be provided by project manager will be able to calculate the total cost
the software or they could be templates that are created of each task based on how many hours each resource
based upon an organisation’s previously successful is used for each task. The software can be used to keep
projects. Through the use of project templates, company a record of any expenses incurred by team members
standards can be set up for the way projects should be and account for these in the overall costs. Daily, weekly,
planned, so employees have a common, collaborative monthly or custom analysis of expenditure and its
and recognisable structure. comparison to the budget can be provided. The software
can report on the total costs for each individual resource
or set of resources. The costings information will be able
Scheduling of tasks to be exported to common formats such as spreadsheets
Tasks are jobs that need to be completed as part of for further manipulation and analysis.
the project. Project management software will enable
a project manager to create a Gantt chart to show Communication and
an overview of the tasks that need completing on a
timeline. Tasks will be assigned an estimated number of
collaborative working
hours or days that they will take to complete, together Project management software can offer a large variety
with a deadline for completion. The project manager of communication tools which help team members to
will be able to identify which tasks are dependent upon collaborate throughout the whole project:
other tasks and so cannot start until those other tasks
• Calendars: each team member will have a calendar
have been completed. Tasks can be delegated to other
showing what they are doing at any time. These can
members of the team and put in a priority order to
be synchronised with third-party calendars, such
identify which should be completed first. Team members as Google, iCal or Outlook, so that each member’s
will be able to record how many hours have been spent availability is always up to date. This enables
on each task and identify when the task is complete. meetings to be scheduled with each team member.
Milestones can be identified for crucial points of the Documents can be attached to these meetings so
project and these can be highlighted. A milestone is that they are readily available to each participant.
often a point at which a key part of the project has been
completed or part of the project has been delivered • Instant messaging/video chat/video conferencing:
(known as deliverables). The project manager will be these tools enable team members who are working
able to see an overall calendar of all tasks that need to remotely from each other to communicate

332

Copyright Material - Review Only - Not for Redistribution


15 Project management

in real time so that they can share ideas and Graphs, charts and reports can be used to analyse the
discuss progress. budget, scheduling and task progress. Comparisons can
be made between the plan and what is actually happening
• Shared documents: all documents should be stored
during the execution of the project, and then decisions can
in a central repository so that they are available
be made to make changes if necessary. The software can
to the team members who require access to them.
show how much time was spent on each task compared to
Documents can be assigned to tasks, resources or
how much time was planned for that task, so that lessons
milestones so that they are available at the right time
can be learned for future tasks that are similar in nature.
to the right people. Changes to the documents can
be tracked so that each team member knows what The software will identify a critical path which will show
modifications have been made and which is the all tasks that must complete on time if the project is to
latest version of the document. The software can meet its deadline. This can then be monitored closely
email team members to inform them when changes and delays can be anticipated in advance and resources
to documents have been made or display an alert diverted to critical tasks if necessary. The software will
on their project dashboard, their home page for the show an overview of the availability of resources and the
project management software. This is a much more time allocated to each and their respective costs, so that
controlled manner of dealing with documents than the project manager is able to reallocate them as necessary.
email attachments and mixed revisions.
• Discussions/forums: these can be set up for tasks, KEY WORDS
documents or milestones so that discussions between
team members can be held. This is particularly useful critical path: the tasks which must be completed
when all team members are not available at the same on time for a project to complete on time
time. Team members will be able to see comments
and suggestions that have been made by others
and respond to them. Email notifications of new
contributions to discussions can be sent or alerts can
Weaknesses of project
be displayed on project dashboards. management software
• Progress: the software can inform team members and
The strengths of project management software
the project manager of progress that is being made.
have been detailed within the discussion of features
Team members can update tasks to show how near
above. However, there are also weaknesses of project
to completion they are and this progress can be fed
management software that need to be considered.
into the whole project plan. If changes are made to
Good quality project management software is a large
the project timeline, automated email notifications
financial investment, especially if it needs to be used
can be sent out to all affected team members.
by several users. This initial investment can deter
some organisations from using the software. Project
KEY WORD management software is complex because it covers so
many different aspects of project management. Project
collaborate: work together managers need extensive training to use the software
effectively and team members also need training to use
the components that are relevant to their tasks. The
complexity of the software can also over complicate
Decision making simple projects which could have been managed more
All communications within the project management effectively without the software.
software can be logged and tracked so that if decisions Users can become too reliant on the software to remind
have been made, then it is possible to clearly identify who them that tasks need to be completed. This can result in a
made each decision and for what reasons. If problems task not being done until an alert pops up on someone’s
or issues have been experienced, then these will be screen telling them they’ve missed a deadline. Online
highlighted by the software and decisions can be made as project management software will enable access for many
to what adjustments need to be made, such as changing users which is good for collaboration but it creates a risk
the timeline or allocating additional resources. These that unauthorised users may access sensitive data that
issues can also be monitored to check on progress of the they shouldn’t have access to. It’s therefore important to
resolution. ensure that any access control is set up properly.

333

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Question on time in order for the whole project to complete


on time, and defines the minimum time in which the
2 Explain how project management software can be project can be completed. It is appropriate for projects
used for allocating resources to tasks. where the time needed for each task is known, usually
because they are common recurring tasks, for example
construction tasks.

15.3 Tools and KEY WORD


techniques for project CPM: critical path method, also known as CPA
(critical path analysis)
management tasks predecessor: a task in a project that must be
completed before another task can start
Critical path method (CPM)
The critical path method (CPM), also known as critical
path analysis (CPA), finds a project’s critical path.
The critical path identifies which tasks must complete

WORKED EXAMPLE 15.02


Figure 15.2 shows a network activity diagram for making a cup of tea.

Boil kettle
Fill 180
kettle
15 Pour water Put milk Stir
0 1 4 into cup 5 into cup 6 tea 7

Put tea 2 10 5 10
3
in cup Put sugar Get milk
25 in cup out of fridge
25 10

Figure 15.2: Network activity diagram for making a cup of tea.

The circles represent milestones in the project and are numbered for identification purposes. The tasks are
represented by arrows. The numbers next to each task represent the number of seconds the task will take. For
example, pouring water into the cup will take 10 seconds.
Some tasks can be completed in parallel to other tasks. For example, boiling the kettle can take place at the same
time as putting tea in the cup, putting sugar in the cup and getting milk out of the fridge. Where there are parallel
tasks, the longest timeline forms the critical path. In this case, 180 seconds to boil the kettle is longer than the 60
seconds it takes to do the three parallel tasks.
Sequential tasks cannot be carried out at the same time because they are dependent upon other tasks completing
first. For example, boiling the kettle is dependent upon the kettle being filled with water and so cannot start until the
kettle is filled with water. In this case, the kettle being filled with water is a predecessor to boiling the kettle.
The total length of the critical path is calculated by adding up all the sequential tasks plus the longest of each of the
parallel sets of tasks. In this case that is 15 + 180 + 10 + 5 + 10 = 220 seconds, which is the shortest time it will take
to complete the project. If any of the tasks on the critical path takes longer than planned, then the whole project will
be delayed.

334

Copyright Material - Review Only - Not for Redistribution


15 Project management

Some tasks aren’t critical and have what is known as In the example network activity diagram for making a
float time. The float time is the time an activity can be cup of tea, getting the milk out of the fridge has a float
delayed without affecting the rest of the project. time of 120 seconds because it can be delayed this long
before it would catch up with milestone 4.

PRACTICAL ACTIVITY 15.01

Interpret the network activity diagram in Figure 15.3 for building an extension to a house.

Erect roof Tile roof


4
10 5
Dig for Lay Lay Install
0 1 2 3 5
foundations foundations bricks windows
5 2 20 3
10 First electrics
Plumbing fix 7

2nd fix Paint Plaster


9 8 7 6
electrics walls walls
3 2 4

Figure 15.3: Network activity diagram for building an extension.

1 Identify the longest task.


2 How many milestones are there?
3 Which tasks are dependent upon the bricks being laid?
4 Which tasks can run parallel to installing the windows?
5 How many days is the critical path?
6 Which tasks form the critical path?

To create a network activity diagram you need to know


the following information:
• the list of tasks
• how long each task will take
• which tasks are dependent upon predecessors.
This information can be shown in an activity
dependence table.

335

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 15.03 PRACTICAL ACTIVITY 15.02

Complete a network activity diagram for the


Task Days Dependencies
following scenario:
A 3
B 2 A Task Days Dependencies
C 6 A A 3
D 1 B B 5
E 3 C C 4
F 5 D D 18 A
G 4 E, F E 16 B
H 3 G F 12 C
I 2 G G 7 E, F
J 3 G H 11 D, G
I 2 H
First, add any tasks to the diagram that have no
predecessors.
Network activity diagrams can be extended to include
A the earliest start time (ES) and earliest finish time (EF)
0 1
3 of a task. The ES of the first task is 0 and the EF of the
first task is the length of that task. The ES of all other
Figure 15.4: Network activity diagram part 1. tasks is the latest EF of its predecessors.

Then add on any tasks that are dependent on task A. ES of task = latest EF of predecessors
The EF of any task is calculated as:
2
B EF = ES + length of task
A 2
0 1 The float time can also be added to each task. The float
3 C time is calculated by subtracting the EF of a task from
6
3 the ES of the next task:
Float time = EF of task – ES of next task
Figure 15.5: Network activity diagram part 2.

Continue task by task until there is a completed


diagram.

D H
2 4
B 1 F 3
A 2 5 G I
0 1 5 6 7
3 C 4 2
6 E J
3
3 3

Figure 15.6: Network activity diagram part 3.

336

Copyright Material - Review Only - Not for Redistribution


15 Project management

WORKED EXAMPLE 15.04


Figure 15.3 has been extended to Figure 15.7 below to show the ES in green, the EF in red and float time in blue.

37 37
Erect roof Tile roof
4
27 10 5 42
0 5 5 7 7 27
Dig for Lay Lay Install windows
0 1 2 3 5
foundations foundations bricks 3
5 2 20 42
Float = 12
Plumbing First electrics
10 fix 7
37
49
Paint Plaster
8 7 6
walls walls
55 2 53 53 4 49

Figure 15.7: Extended network activity diagram.

The ES for dig for foundations is day 0 because it is the first task. The EF for dig for foundations is day 5 because
the task will take 5 days. This means that the ES of the next task (lay foundations) is also day 5 because it can only
start when the foundations have been dug.
EF for lay foundations = ES for lay foundations + length of lay foundations
EF for lay foundations = 5 + 2 = 7
When it comes to parallel tasks, the ES of a task is the latest EF of its predecessors. The EF for installing windows is
day 30, but the EF for tiling the roof is day 42. As these are both predecessors for first fix electrics, the ES for first fix
electrics must be day 42.
The ES for first fix electrics is day 42 but the EF for installing the windows is day 30 meaning there are 12 days of
float time.

Note: when working in days, the EF and ES are when a task needs to be completed earlier than planned,
considered to be the beginning of the day. For example, if additional resources can be allocated to that task. This
the EF of task 2 is day 4 then task 2 should be finished by is known as ‘crashing’. Those additional resources could
the beginning of day 4, or the end of day 3. This will then come from tasks with high float times because it’s not
enable task 3 to start at the beginning of day 4. critical that those tasks finish at their planned earliest
finish time. When there aren’t any float tasks available
or the necessary resources can’t be found from float
PRACTICAL ACTIVITY 15.03
tasks, additional resources have to be found which incur
Extend the CPM from Practical Activity 15.02 to additional costs. For example, in Figure 15.7, if the laying
include the ES, EF and float time for each task. of bricks needs to be completed 5 days earlier then there
are no float tasks available from which to use resources.
However, if erecting the roof needed to be completed
Using a network activity diagram can help to allocate earlier than planned, then resources could be used from
the right number of resources to a task. For example, the plumbing task which has a float of 12 days.

337

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Performance evaluation and The estimated time is then calculated as:


4 × most likely time + optimistic time
review technique (PERT) + pessimistic time
estimated time =
PERT is similar to CPM in that it is used to plan, 6
schedule and manage projects and activities are based
on predecessors. It is more suitable for research and Gantt charts
development projects which are non-repetitive because A Gantt chart is used to show the start and finish dates
estimates of time are used rather than definitive times. of each task, the predecessors for each task, the progress
of each task and the current position within the project.
KEY WORD Tasks are listed with their start and finish dates. A bar
represents each task. Each bar can be shaded in to show
PERT: performance evaluation and review technique the percentage of the task that has been completed.
Arrows are used to show which tasks are dependent
upon other tasks. A line or other indicator can be used
Tasks or activities are represented by arrows and to show the current position (time) within the project.
milestones are represented by nodes, usually a circle. It’s also possible to identify the resources required,
PERT and network activity diagrams therefore look usually by listing the person responsible for each task.
very similar.
To create a Gantt chart you need to know the following
The key difference with PERT is that the time for information:
each task is estimated. To estimate the time, the
• the list of tasks
following are used:
• how long each task will take
• most optimistic time
• which tasks are dependent upon predecessors
• most likely time • start date of the first task
• most pessimistic time. • resources that are allocated to each task.
The most optimistic time is based on the assumption that Note that some programs used to create Gantt chart
everything will go right and there will be no problems. (like Gantt Project) only work in days/months, so
The most pessimistic time is based on the assumption that sometimes you might need to adapt this accordingly
anything that can go wrong will go wrong. when the context is minutes/seconds or hours/minutes.

WORKED EXAMPLE 15.05


Figure 15.8 shows a Gantt chart for developing a book.

Figure 15.8: Gantt chart.

On the left-hand side you can see the task list together with beginning dates and times, coordinators and the
duration. The yellow bars represent the time that each task takes. This makes it much easier to see the float time that
is available. Dependencies are shown by the arrows from the end of a predecessor to the start of another task. The
black lines represent how much of each task has currently been completed and the red line represents the current
time. Therefore, assuming that the progress is correct, the project is running slightly behind schedule. The diagonal
lines on the yellow bars represent the critical path.

338

Copyright Material - Review Only - Not for Redistribution


15 Project management

PRACTICAL ACTIVITY 15.04

Interpret the Gantt chart in Figure 15.9 for building a house extension. The Gantt chart is saved as 15.01
House extension.gan and was created using GanttProject, which can be used to open the files.

Figure 15.9: Gantt chart for house extension.

1 Which task has float time?


2 Which tasks are currently in progress (started but not finished)?
3 The plumbing appears to be behind schedule. Will this affect the whole project finish date? Why?
4 Which tasks are the predecessors for plastering the walls?

REFLECTION

Figure 15.10 is the resources chart for the house extension project. Have a look at when each resource will
be being used. What do you notice about the weekends?

Figure 15.10: Resource chart for house extension.

339

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 15.06


Task A starts on 1 January 2020. Then add on any tasks that are dependent on task A, to
start the day after task A finishes.
Task Days Dependencies Resources
A 3 R1 JAN
123456789
B 2 A R1
Task Duration Start End Resources
C 6 A R2
A 3 1-1-20 3-1-20 R1
D 1 B R1 B 2 4-1-20 5-1-20 R1
C 6 4-1-20 9-1-20 R2
E 3 C R2 D 1 R1
E 3 R2
F 5 D R3 F 5 R3
G 4 E, F R3 G 4 R3
H 3 R5
H 3 G R5 I 2 R2
J 3 R6
I 2 G R2
Figure 15.12: Gantt chart part 2.
J 3 G R6

First, create a list of tasks, the duration and the Continue task by task until there is a completed Gantt
resources required and identify the start and finish chart.
dates of the first task.
JAN
JAN 1 20
1234567 Task Duration Start End Resources
Task Duration Start End Resources A 3 1-1-20 3-1-20 R1
B 2 4-1-20 5-1-20 R1
A 3 1-1-20 3-1-20 R1
C 6 4-1-20 9-1-20 R2
B 2 R1
D 1 6-1-20 6-1-20 R1
C 6 R2
E 3 10-1-20 12-1-20 R2
D 1 R1
F 5 7-1-20 11-1-20 R3
E 3 R2
G 4 13-1-20 20-1-20 R3
F 5 R3
H 3 17-1-20 19-1-20 R5
G 4 R3
I 2 17-1-20 18-1-20 R2
H 3 R5
J 3 17-1-20 19-1-20 R6
I 2 R2
J 3 R6
Figure 15.13: Gantt chart part 3.
Figure 15.11: Gantt chart part 1.

340

Copyright Material - Review Only - Not for Redistribution


15 Project management

A team manager would then be responsible for each


PRACTICAL ACTIVITY 15.05 phase, so for example, an assistant project manager
Complete a Gantt chart for the following might be responsible for the testing phase of a software
scenario commencing on 1 April 2020. development project. Each phase would be broken down
further to show the stages involved in each phase.
Task Days Dependencies
Software
A 3 development
B 5
C 4
Analysis Development Implementation Evaluation
D 18 A
E 16 B
Design Testing Documentation
F 12 C
G 7 E, F
H 11 D, G Black box
testing
I 2 H

White box
testing

Work breakdown structure


(WBS) User testing

All of the methods discussed so far have broken the project Figure 15.15: WBS for software development with testing
down into manageable tasks. However, very large projects expanded.
can become quite daunting if looking at hundreds of tasks
all at once. To help manage those tasks, a hierarchical
decomposition of the project can be created as a work
REFLECTION
breakdown structure (WBS). A WBS forms a hierarchical
diagram with tasks allocated to sub-tasks or project phases. Find some recent news stories that report about
In a software development project, the project might be government projects that have not met their
broken down into the phases of a development life cycle deadlines or budgets.
as shown in Figure 15.14.

Software
development

Analysis Development Implementation Evaluation

Design Testing Documentation

Figure 15.14: WBS for software development.

341

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
A landscape gardening company has commissioned a software development company to develop a new piece
of software that can be used by customers to view a model of what their new garden might look like. A project
manager has been appointed to oversee the project.
At the end of the initiation stage of the project, a project brief will be created.
1 a Identify four items that might be included in the project brief. [4]
b Identify three other stages of project management that will be coordinated by the project manager. [3]
[Total 7]
The project will involve a large team.
2 Describe four ways the project management software can help the project team to work collaboratively. [4]
The project manager has the option of using critical path method (CPM) and a Gantt chart for planning
the timescales of the project.
3 a Compare CPA with a Gantt chart. [2]
b Identify two features available in a Gantt chart that are not shown on CPA. [2]
[Total 4]
The project manager has decided that PERT would be more appropriate than CPA for this project.
4 Explain why PERT is more appropriate than CPA for a software development project. [3]
5 Explain how a work breakdown structure (WBS) can help a project team. [3]

SUMMARY CHECKLIST
I can describe the stages of project management including:
project initiation
project planning
project execution and monitoring
project close.
I can describe the use of project management software for supporting projects.
I can discuss the strengths and weaknesses of project management software for supporting projects.
I can use and describe tools and techniques for project management tasks including:
Gantt charts
performance evaluation and review technique (PERT)
critical path method (CPM).

342

Copyright Material - Review Only - Not for Redistribution


Chapter 16

System
life cycle
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• describe the stages in the system life cycle
• describe methods of research for a given situation
• understand the content and purpose of specifications
• construct diagrams to represent system processing and the flow of data through a system
• design data storage, input forms and output reports
• create a test plan and understand its purpose
• select appropriate test data
• describe the differences between alpha and beta testing
• describe the differences between white box and black box testing
• describe different methods of implementing a system
• explain the advantages and disadvantages of each implementation method for a given situation

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
• describe types of documentation and explain why each is needed
• describe the contents of documentation
• explain methods of evaluating a new system
• describe different types of maintenance and explain why each is needed
• explain how each type of maintenance is carried out
• explain different types of prototyping and explain why each is needed
• explain the advantages and disadvantages of each type of prototyping
• describe the stages and processes of different software development methodologies
• explain the advantages and disadvantages of different software development methodologies.

BEFORE YOU START

• Do you understand what a project is? • Do you know what validation means?
• Do you understand the structure of a database? • Are you able to draw a flowchart?

Introduction KEY WORD


A new system following the waterfall method of analysis: finding out how the current system
software development evolves through a system life works and what the requirements of the client are
cycle. Requirements are specified by the client and for the new system
recorded by the analyst. The designer will then follow
a requirements specification in order to produce a
design specification which will show the client what
the new system is likely to look like. When the user is Methods of research
happy with the design specification, the system will
be developed based upon the design specification and A variety of methods can be used to research current
the developed system will then be tested before being systems and the requirements of a new system.
installed for the client. The client will be provided with
user documentation. An evaluation will take place to Questionnaires
review the system life cycle for the project. Any ongoing Questionnaires are used when information is required
maintenance will be carried out by the maintenance from a large number of users when it would be
team. Other methods for software development are impractical to interview them all. A large number
also used including agile and Rapid Application of users also means there is a large sample size for
Development (RAD). the results of the questionnaire to be quantified and
compared. They are not suitable when there are only
a small number of users involved because there is not

16.1 Analysis a large enough sample size to gauge opinion and it


would be quicker to conduct interviews than spend time
Analysis involves finding out how the current system preparing questionnaires. An exception to this would be
works and what the requirements of the client are for if it is impossible to arrange an appointment time with a
the new system. user or users, in which case questionnaires could be used

344

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

as an alternative to interviews. The disadvantage of this so that the responses can be analysed collectively. This
is that it doesn’t allow the analyst the opportunity to ask often means providing multiple choice responses so that
the user to elaborate on answers without contacting the each response can be counted. It’s also important to
user again. ensure that the questionnaire does not take too long for
users to complete as otherwise not many responses may
Questions need to be asked in a way in which the
be returned.
required information can be elicited from users, but also

WORKED EXAMPLE 16.01


During the analysis for a new school reports system, the analyst wants to find out from pupils, teachers and parents
what information should be included on the report. One question that could be asked would be:
Please rate from 1 to 5 the importance of the following information on the school report (1 is not important, 5 is
very important):
• Attendance total half days • Percentage score for each end of year exam
• Attendance percentage • Average score for all exams
• Number of negative behavioural events • Comment from subject teacher
• Number of positive praise events • Targets from subject teacher
• Academic grade for each subject • Comment from house tutor
• Position/rank in class for each subject • Target grade.
This will allow the analyst to consider the importance attributed to each piece of information by the three different
groups of people, which will contribute to deciding what is included on the reports and how prominent a position
each piece of information will take.
An alternative way of asking this question would be:
Please list any information you would like to be included on the school report.
This would make it very difficult to quantify the responses and analyse the findings as each respondent would give
very different answers. By providing the list, the analyst is able to give the respondents a starting point.

A mixture of multiple choice questions, opinion ratings applied to compare the responses of all males who work
and open questions should be used. This will provide part-time compared with males who work full-time.
a balance of quantitative analysis of closed questions
and a qualitative analysis of open questions where users Interviews
are able to suggest alternative ideas to those presented
by the questionnaire. Questions should also be written Interviews involve a direct conversation between the
in a way which does not threaten users and the way analyst and the client. Where there is a single end user or
they currently do their work. Users should be given the small group of end users then interviews are the perfect
opportunity to return their questionnaires anonymously solution, because questions can be asked of the users
because that means more honest answers are likely and a conversation can take place which can expand
to be given. upon answers that are given with follow-up questions
searching for further detail. Even in large organisations,
Questionnaires should ideally be completed online. interviews can still be used with key stakeholders or
This means that the results are immediately stored and representatives of user groups.
readily available for detailed analysis in the form of
graphs and tables. Filters can be applied to the results Questions to be asked during interviews should be
and responses can be compared based on the answers planned and designed to elicit the required information
given to another question. For example, a filter could be from the client. The questions will vary depending on
who is being interviewed. If management are being

345

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

interviewed, then the questions will focus on the and this may cause them some stress, which means they
requirements of the organisation as a whole and the don’t perform as they would do normally. Although this
information that is required for decision making. If end method can take up a lot of time, it is the most insightful
users are being interviewed, then the questions need to method of finding out how an organisation works.
be aimed at finding out what the users need to make
their jobs more efficient. Interviews don’t have to be with Document analysis
individual users. They can take place with groups of users
or focus groups that represent user groups or customers. Existing documents within an organisation can tell an
analyst a lot about the information that is currently
The logistics of each interview also needs to be planned. being used.
It can sometimes be difficult to find a time when both
the analyst and the client are available, especially if
PRACTICAL ACTIVITY 16.01
the client has a busy schedule. Honesty is important
during interviews so that the analyst can get an accurate Examine the receipt in Figure 16.1.
picture of how tasks are completed. This can sometimes
be difficult to achieve because end users may not
want to admit to taking shortcuts in their tasks or not
carrying out tasks to the best of their ability. In these
situations, anonymous questionnaires can get more
honest responses. With interviews, the analyst has to be
involved with every interview and this can result in a lot
of time being used up early in the project.

Observation
Observation involves the analyst watching the processes
that take place within an organisation to find out
how everyday tasks are completed. This can involve
sitting with users to understand the tasks they have
Figure 16.1: Receipt.
to complete, with an opportunity to ask questions
of the users to elicit further information that could
be needed for a requirements specification. This can 1 Identify the output information that is
give a very good understanding of the current input included on the receipt.
data, processing methods and output information. 2 Identify any calculations that are likely to
Other options can include wandering around an office have taken place on the receipt.
throughout the day to see how information is shared
amongst users. 3 Identify which information is likely to be the
same for all receipts and which information is
likely to be different for each receipt.
KEY WORDS
requirements specification: what a user needs a
The analyst will need to see examples of any documents
new system to do
that show output information or give an indication of
what data is being collected for input to a system. The
analyst can sometimes also identify processes that take
One disadvantage of this method is that when users are
place by looking at documents. It’s also possible to
being observed, they may do things differently from normal
estimate the amount of data that is likely to be required
or they may be more efficient and so this does not give the
if the volume of documents is known.
analyst a true picture of what is happening. The analyst
needs to be able to identify how long tasks genuinely take This method is not to be used on its own but must be
and any inefficiencies that could be improved upon. By used in conjunction with other analysis methods, because
observing users directly, the analyst can get first-hand it is difficult to identify the processes just by looking at
experience of the inefficiencies and can plan to overcome documents. Examination of the documents also only
these. Of course, some users may not like being watched shows data that is currently output and doesn’t give the

346

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

analyst an opportunity to find out what additional data • processes that need to take place to convert inputs
an organisation might need or what data the organisation into outputs or to store data
does not need. This information can be found out by • data that need to be stored
following up document analysis with interviews.
• functional requirements such as
performance measures
The content of specifications • deadlines for each milestone within the project.
There are three types of specification used within the life
cycle. These can be summarised as shown in Table 16.1. WORKED EXAMPLE 16.02
Here is an extract from a requirements specification for
Requirements Design System
a new town council website. The extract shows specific
specification specification specification
data that is required on the home page in addition to
Created by the Created by the Created by the that which will have been specified for all pages:
analyst. designer. designer.
• Quick links
Contract Shows what the Identifies the
between system will look software and • Show list of links editable by content manager
developer and like. hardware • Initially to be:
client. needed to run
the system. • How can I get involved? (go to Consultations)
Identifies what Describes how Identifies the • How can I stand for council? (go to Elections
the system the system minimum arrangements)
must do. should work. hardware
• When is the next steering group meeting? (go to
needed to run
Meetings)
the system.
Specifies the • When will I be able to vote for councillors? (go
data structure to Key dates)
to be used. • What powers does the Town Council have?

Table 16.1: The different types of specification. • How do I report a problem? (go to City
Council sub-page)
• When can I vote for councillors? (go to
Requirements specification Elections 2016 arrangements)
A requirements specification is a contract between the
• News list
developer and the client. It will specify exactly what
the client needs the system to do so that the developer • Picture, news title, date (taken from list of
can produce a system that meets the client’s needs. The news)
analyst will usually write the requirements specification
• Button: view all news
in consultation with the client who will approve it.
• To show latest four news articles
A requirements specification should include:
• the purpose of the system • What’s on list

• the main objectives of the system • Picture, event title with hyperlink, date and
time (taken from List of events, Key dates and
• data that must be output from the system (for
Meetings)
example, invoices, sales reports)
• Button: view all events
• data that needs to be input to the system to
generate the outputs, including any screens or data • Button: view all key dates
collection forms
• To show next four events.
• validation and verification that is needed for
input data

347

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

System specification In addition to this, a design specification will include:


A system specification lists all the software and hardware • house style (logos, colours, fonts, styles, sizes)
that is needed for the new system. The software needs
• screen sizes
to be identified first as the hardware will depend upon
what software is needed. Only software that is needed • connectivity diagram to show links between screens
to run the system should be specified. There may be
• purpose of calculations.
different software identified for different types of users
and for servers.
Once the software is known, the minimum hardware Questions
required to run that software can be identified. In 1 Identify five stages in the system life cycle.
addition to this, the analyst needs to consider how 2 Explain why interviews are better than
much storage space is going to be required for the data questionnaires for smaller groups of users.
being used by the system. The analyst will probably
also recommend higher than minimum specifications so 3 State the purpose of the system specification.
that the system functions at a reasonable speed. These
specifications will include the processing power and
the amount of memory required. External hardware
components that are needed should also be specified
16.2 Design
and these should be based upon the requirements During the design stage, the overall structure of the
of the user. system and details of the system components are
designed without being developed. Diagrams can be
Design specification used to describe how a current system works (during
analysis) or they can also be used to demonstrate how a
The design specification is produced by the designer and
new system will work (during design).
is an illustration of how the system will look, what the
data structures will be and how the system will work. It
is intended to give the user an idea of what the system KEY WORD
will look like before it is developed so that the user’s
feedback can be incorporated into the final designs. The design: the stage in the life cycle when the
developer will then follow the designs. design specification is produced

KEY WORDS
system specification: the hardware and software
System processing
needed to run the system Data flow diagram
design specification: illustration of how the A data flow diagram (DFD) shows how data flows
system will look, what the data structures will be throughout a system. It is not about the order of
and how the system will work processes, it is purely about the data flows. The elements
shown in Table 16.2 are used within a DFD.

Later in this chapter you will learn how to design:


KEY WORD
• flowcharts
DFD: data flow diagram which shows how data
• data flow diagrams
moves around a system
• data collection forms
• screen layouts
• validation routines
• data dictionary.

348

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Element Purpose Symbol CONTINUED


Data flow This is the data that
is flowing throughout Guest
the system.

ing
Process This is an action that

Pa
ok
bo

ym
uses or manipulates

ent
ne

Encrypted
key card
data.

Onli
Bill
Data store This is a place where
data is stored. This
could be a hard
disk, cloud storage
or a paper file, for Hotel
booking
example. system
Data This is an external
source or entity where the Figure 16.2: Level 0: DFD.
destination data originates or is
(inputs and destined.
This DFD shows the system as the hotel booking
outputs)
system. It shows the guest as an external entity. It then
Duplication This is where we have shows the four items of data that flow between the
data more than one source guest and the booking system.
source or where data originates
destination. or is destined, to avoid
crossing data flow. To create a level 0 DFD, you should identify the external
entities and the data flows between the external entities
Table 16.2: DFD elements.
and the system. It is important to remember that it is
the data flow that is being represented and not physical
DFDs can exist at many levels. At level 0, or context level, objects. Each data flow will be in one direction only.
the diagram will show the whole system and the data
flows between the whole system and any external entities, DFDs can also be considered to be one of the final
such as customers, suppliers, members, guests, etc. stages of analysis as they can be used to record the
data flows that are currently taking place within an
existing system.
WORKED EXAMPLE 16.03
A hotel accepts online bookings for its hotel rooms. PRACTICAL ACTIVITY 16.02
Guests make a booking online and the booking is
received by the hotel. When the customer arrives, they Create a level 0 DFD for the following scenario:
are given an electronic key which includes encrypted A car hire company accepts bookings of cars
data that will unlock the door and allow purchases at by telephone. A credit card payment for the
the bar. At the end of the stay, the guest is presented deposit is taken from the customer at the time
with a bill which must be paid before leaving. of booking. When the customer arrives to collect
the car, they have to provide details of their
driving licence, which are stored by the car hire
company. The car hire company will provide
the customer with details of the insurance and
breakdown services for the car. The customer
must pay the remainder of the hire cost before
taking the car. The customer will be presented
with an invoice showing the payments made.

349

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The next level is a level 1 DFD. This shows the flow of store to another or between an external entity and a
data within part of a system, or if the system is small data store because a process is required to deal with the
within the whole system. If the DFD is showing just data. Ignore how the data will actually be processed and
part of a system, then other parts of the system are just focus on the data movements.
considered to be external entities. Each flow of data
must be linked to a process, because something has to PRACTICAL ACTIVITY 16.03
happen to the data before it can be stored or passed
onto an external entity. Create a level 1 DFD for the car hire company
introduced in Practical Activity 16.02. Assume the
DFD will be for the whole system.
WORKED EXAMPLE 16.04

Figure 16.3 is a level 1 DFD for the hotel booking


system. Any other aspects of the hotel system are System flowchart
considered to be external entities. A system flowchart shows the flow of data and processes
within a complete system. A system flowchart will show
Guest
how various elements of an information system are
related. System flowcharts were popular in the 1960s
Payment
Encrypted

and 70s when punched card and magnetic tape were


key card

Bill
commonplace, but they are not as commonly used
Hotel booking system
in modern systems analysis techniques. The elements
Online booking
shown in Table 16.3 are used within a flowchart.

Check room Activate Produce Bar


Bar
availability key card expenditure
bill
KEY WORDS
Booking
details

Booking

Room
details

access system flowchart: an overview of how a system


details
Bookings Rooms
works in a diagrammatic format
Accept
payment
Booking
details

Payment details Element Purpose Symbol


Manual Manual input into a
input computer system,
Figure 16.3: Level 1: DFD. for example using
a keyboard.
When the guest sends their online booking, the
room availability is checked and the booking details Arrow Shows the direction
are stored. When the guest arrives, their key card of flow.
is activated by retrieving the room access details.
When the guest is ready to leave, a bill is produced by Process An activity within
retrieving the booking details and any bar expenditure the system.
from the bar system. When payment is made, the
booking details are updated to confirm that payment
has been made.
Document A single printed
document.
To create a level 1 DFD, first identify any external
entities and any other parts of the system that will be
classed as external entities. Identify the data flows to and
from those external entities. Each data flow must have a
process attached to it. A data flow cannot move directly
from one external entity to another or from one data

350

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Element Purpose Symbol CONTINUED


Multi- Multiple printed
Hotel bookings are input manually using a keyboard.
document documents.
While editing the booking, the data that has been
input is displayed on the screen. Data for the guest
who will be staying at the hotel is retrieved from
the guests’ file. When the data has been input, it is
Magnetic Storage on a validated and the user is required to correct any
disk magnetic disk, errors. A process then saves the booking and prints
although in a booking confirmation document which can be
modern systems, sent to the guest. Each morning, guest arrival sheets,
other storage which include information about each guest and the
methods are likely. room they will be staying in, are printed. Also in the
morning, a checkout list is printed which shows which
Magnetic Data stored on a rooms are due to be vacated that morning.
tape magnetic tape.

To create a system flowchart, identify the processes that


take place within the system. Then identify the different
files that will be used. Use arrows to connect process to
Display Output on a visual data files with the arrow pointing towards the data file
display. if data is being stored, or the arrow pointing towards
the process if data is being retrieved. If user input is
required, then add the manual input symbol at the
appropriate place with the arrow pointing towards the
process. Identify any documents that are produced by
Table 16.3: Flow chart elements. the system and link each one with a process with the
arrow pointing from the process to the document.

WORKED EXAMPLE 16.05 PRACTICAL ACTIVITY 16.04


Figure 16.4 is a flowchart for taking a hotel booking Create a system flowchart for the following
online. scenario:
A pizza delivery company accepts orders for
Guests Guest
pizzas by phone. The customer is asked for their
file arrival
sheets
address and the system checks the address is in
the delivery file. The customer is asked for their
Enter hotel Edit the
Booking Print guests order and the telephone operator inputs the
confirmation arrival sheets
booking booking order into the system. The order is added to the
orders file. Payment details are then taken from
Booking
Print
Bookings
the customer which are saved to the payments
checkout list
display file file. A receipt is printed for the customer and an
order sheet is printed for the cooks.
Validate the Correct Save and print
booking data errors the booking

Booking
confirmation

Figure 16.4: Online hotel booking flowchart.

351

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Data storage
Data dictionaries
A data dictionary should be created to describe how data will be stored in tables within a database. The fieldnames
should be identified along with their data type, field size and format. Primary keys and foreign keys be identified,
including the names of tables to which the foreign keys link to. Any input masks, validation rules or default values
should be identified for each field along with an example of what typical data might look like.

WORKED EXAMPLE 16.06


This is an example of a data dictionary for a table about students.

Attribute Data Length Format Validation Rule Default Sample Primary Foreign
type Value Data Key Key
Student ID Integer 6 999999 Autonumber 459283 Yes
Forename Text 20 Xxxxx Required Mao
Surname Text 20 Xxxxx Required Zedong
Other names Text 50 Xxxxx Required Xi
Tutor Group Text 3 99X 12A TUTOR
GROUP –
TgId
Date of Birth Date 8 DD/MM/ <= 10 years 12/04/2007
YYYY before today
Date Joined Date 8 DD/MM/ >= 10 years 01/09/2018
YYYY after date of
birth
Date Left Date 8 DD/MM/ > [Date
YYYY Joined]
Disability Boolean 1 Required False True

PRACTICAL ACTIVITY 16.05

Revise data types, field sizes, primary and foreign keys and validation from chapter 10. Complete the
following data dictionary for a table of vehicles:

Attribute Data Length Format Validation Default Sample Primary Foreign


type Rule Value Data Key Key
Vehicle Registration
Make
Model
Engine size (cc)
Transmission
Number of doors
Imported?

352

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

An entity relationship diagram should be created to job applications or reply slips. It is important to design the
show the relationships between the tables that will be form in such a way that the required data can be collected.
used. Refer to Chapter 10 for detailed information about When designing a data collection form, it is good
entity relationships. practice to follow these principles:
• avoid colour as the document may not be
Files
printed in colour
Any files that will be used to import data should be
• include instructions about how to complete the form
designed, including the intended layout of data. Similarly,
any files generated by the system should be designed, • give clear instructions about where the form should
including the format in which the data will be exported. be returned
The type of files should be specified, for example, whether • identify which questions must be answered and
it is comma separated or tab delimited. The contents of which are optional
each column should be specified including the expected
• provide enough space for each answer
data type, length and format of each column.
• use tick boxes for multiple choice lists
• make it clear how many options are allowed to be
Input forms chosen from a multiple choice list
Data collection forms • ensure all fonts are consistently used
Data collection forms are documents that are used to • avoid cluttering the form with too much
collect data without the use of a computer. These could information or too many questions
include membership application forms, questionnaires,
• ensure the font style and size are legible

Figure 16.5: Example of a data collection form.

353

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• if the respondent needs to complete a scale (e.g. user expects should be used, for example green
1–10), then explain what the scale represents is usually seen as a positive colour and red as a
(e.g. 1 = very dissatisfied, 5 = neither satisfied or negative colour
dissatisfied, 10 = very satisfied). • ensure all fonts are used with consistency
• avoid cluttering the screen with too much
PRACTICAL ACTIVITY 16.06 information, but at the same time try to fit all
Explain how the application form in Figure 16.6 information that needs to be viewed at the same
could be improved. time on a single screen
• ensure the font style and size are legible

Membership Application Form


• if the screen requires user input:
• include instructions about how to
complete the form
Name________
• identify which questions must be answered and
Address________________________________________________________ which are optional
Gender________________________________________________________
• provide enough space for each answer
Age___________________________________________________________

Do you have any disabilities? Y/N


• use tick boxes for multiple choice lists that can
have more than one response
Which of the following types of movie do you watch? Horror Action
Drama Comedy Other • use drop-down boxes (combo boxes) or option
buttons (radio buttons) for multiple choice lists
Figure 16.6: Poorly designed form. that can only have one response.
See C*hapter 2 for detailed information about the types
of form controls that can be used on input forms.
Screen layouts When designing a screen or collection form, it is only
A screen can be used to ask the user for data to be input necessary to indicate where questions and responses will
or to display information to the user or a mixture of go, the types of response options and the styles to use.
both. For example, Figure 16.7 shows information about The layout of any information should also be indicated.
a property that is for sale. It also allows the user to The developer will then follow the design.
change details about the property or add details about a
Arial, bold, 18,
new property. black

Title: Lesson Charge Calculator


* Please select the type of lesson you require:
drop-down box for type
of lesson: Beginner
Test Retake
Disqualified retake
Advanced

* Please select the number of hours you require:


radio buttons
1 Hour
2 Hours
3 Hours

* The total charge for your lesson will be:

$ total charge for lessons in $ dollars

Figure 16.7: Screen example. Main Menu Clear Arial, bold, 20,


black, yellow
Button to Button to background
When designing a screen it is good practice to follow return to clear screen
main menu
these principles:
• use colour sparingly and appropriately; different * Instructions in Arial, 14, black 800 x 600 screen
colours could be used for questions and responses
or for different types of data; colours that the Figure 16.8: Example of a screen design.

354

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Validation routines Input data Validation Validation Error


type rule message
PRACTICAL ACTIVITY 16.07 Application Type Must be The
Revise validation routines from Chapter 1. number a whole application
Complete the following table. number number
must
Validation Description Example contain only
type numbers
Presence Telephone Length Must be Telephone
between number
Range
3 and 15 must be
Type digits between
Length 3 and 15
digits
Format
Product Format XX999XX9 The product
code code must
Validation rules should be used wherever possible be in the
and be appropriate in order to reduce the number of format
possible input errors. They only need to be used for XX999XX9
input data so any calculations or output data do not where X is a
require validating. Drop-down boxes should always be letter from
used instead of lookup validation checks. For example, A to Z and 9
if a category needs to be selected, then a drop-down is a number
box should be used to select that category rather than from 0 to 9
requiring the user to type in the category. Table 16.4: Examples of a design for validation.
When designing a validation rule, identify the input data
that is to be validated, the type of validation rule to be
used, the rule that will be used and the error message
Checking of data collected by forms
that should appear if the data input is invalid. Error In addition to validation rules, any intended methods
messages should be positive and guide the user as to for verifying data input such as visual checking,
what to do to correct the error. double data entry or hash control should be specified.
See Chapter 1 for detailed information about these
Input data Validation Validation Error verification methods.
type rule message
Surname Presence Surname Please enter
must be a surname Output reports
entered The design of output screen layouts follows the same
Date of Range Date of Applicant principal as input forms except that there is no need for
birth birth must must be instructions or input fields.
be at least at least 18
18 years years old Printed copy layouts
earlier
When designing a printed copy layout, as well as
than today
following the same principles for output reports,
consideration needs to be made to the size of paper
that will be used, the size of margins and the intended
audience. Printed copies can often include tabular data.

355

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 16.07


16.3 Development
This example shows a report for listing all the
products available. and testing
The development stage is often referred to as the
Products implementation stage where the design is implemented.
Due to the confusion between implementation
of the design and implementation of the system,
Description Category Supplier 1
development is now a more commonly recognised and
Description Category Supplier 1 understood term.

Description Category Supplier 1

KEY WORD
Description Category Supplier 1

development: the stage in the system life cycle


Page n of nn 2 Total products: ## 3 when the software is produced

Key:
field from the database Test data
field titles (should appear at top of every page)
When a system has been developed, it needs to be tested.
data that should appear at the bottom of the whole report only
In order to test the system, data has to be created that
data labels
will be used for the purpose of testing. This is known
Figure 16.9: Example of report listing for products. as test data. The data used in this phase is a simulation
of ‘live data’. There will need to be enough test data
1 The description, category and supplier generated to ensure that the system is able to cope under
data will be repeated for each record in the the pressures of large amounts of data in everyday
PRODUCTS table. use. There will also need to be specific types of data to
test different scenarios within the software, including
2 n = page number, nn = total number of pages validation rules and queries.
3 ## = total number of products in
PRODUCTS table
KEY WORD
In addition to these points, the size of paper, size
of margins, font styles and sizes, colours and any test data: data that will be used for testing a
gridlines should also be specified. system

When testing the input of data that is to be validated,


PRACTICAL ACTIVITY 16.08
Table 16.5 shows the types of data that should be
Design the layout of a report that will show a list included as test data:
of all the students in your class including their
dates of birth and contact details. Type of test data Description
Valid (also called Data that will be accepted by
normal data) the validation rule.
Questions Invalid (also called Data that will not be accepted
4 Identify the purpose of a data flow diagram (DFD). abnormal or by the validation rule.
5 Identify one rule for data flows within a erroneous data)
level 1 DFD.
6 Describe the difference between a tick box and an
option button.

356

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Type of test data Description WORKED EXAMPLE 16.09


Extreme (also Data that will only be
The following data for records could be used to test
called extreme accepted by the validation
the query for males over the age of 50 (including 50).
data) rule because it is at the limit
of acceptability. Record Gender Age Reason
Table 16.5: Types of test data. number
1 M 65 Both criteria met
2 F 25 Both criteria not met
WORKED EXAMPLE 16.08 3 M 25 Gender part met, age
To test the validation rule that gender must be ‘M’ or part not met
‘F’, the following test data could be used. 4 F 65 Gender part not met,
age part met
Type of test data Data 5 M 50 Age part only just
Valid (normal) M, F met
6 M 49 Age part only just not
Invalid (abnormal or B
met
erroneous)

To test the validation rule that a date must be between


1/1/2017 and 31/12/2017, the following test data could The more criteria that are used and the more
be used. possibilities for extremes, then the more records that will
be required to test the query fully.
Type of test data Test data
Valid (normal) 12/5/2017 PRACTICAL ACTIVITY 16.10

Invalid (abnormal or 15/7/2012, 4/6/2019 Data is stored about cars, including their make,
erroneous) model, registration number, transmission
(automatic or manual), colour, distance travelled
Extreme 1/1/2017, 31/12/2017
and year of registration. Select test data that
could be used to test the query to find all
automatic transmission cars that were registered
before 2016.
PRACTICAL ACTIVITY 16.09

Select test data to test the input of numbers in The system will also be tested to see how it works under
the range 2500 to 5000. normal conditions and so a sample set of `live data’ will
be used to test that the system functions correctly under
normal conditions. ‘Live data’ is the actual data being
Test data is also needed to test queries. Records will used by the system once it has been implemented, and
need to be created where there is data that meets the so a sample of `live data’ enables a simulation of a live
criteria of the query, does not meet the criteria of the system to take place. This type of testing with a sample
query, only just meets the criteria of the query and only of ‘live data’ will be carried out by the end-users in most
just fails to meet the criteria of the query. Where there is circumstances. They will use the data as if they were
more than a single criterion, data should also be selected doing their normal job, simulating different processes
that only meets part of the criteria in case both parts that they would carry out.
have not been set up correctly.

357

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Alpha testing and beta testing White box testing usually takes place with small program
modules and is carried out by the software developers who
Alpha testing is carried out by the developers or a coded the programs. They will do this to ensure that each
specialised team of testers before a system is delivered to module works in the way it was intended, and because
the user. This usually takes place close to the end of the they know the inner workings of the module they can test
development stage when the application is nearly ready pathways that a black box tester would not know about.
for the user. Alpha testing can take a long time because The testing will be focused on whether detailed designs,
each time an error is found, testing has to be repeated such as validation rules, have been developed correctly.
when the error has been corrected and there may be
knock-on effects to other parts of the system. Black box testing usually involves testing the whole
system or user testing. It can be carried out by specialist
Beta testing is used when software is being made available testers or, in the case of user testing, by the intended
to a large number of customers. Beta testers will be users. No knowledge of programming or the way the
real customers who have been selected to test an early system works is required. The testing will be focused on
release of the application. Beta testing only takes place ensuring the requirements specification has been met.
after alpha testing has been completed. Alpha testing
is planned and structured using test data to follow all White box testing needs access to a detailed specification,
pathways through the software but beta testing involves whereas black box testing does not require knowledge
customers using the software in a real world environment of how the system was developed. In black box testing,
using real data. As bugs are found within a beta version, only a limited number of test scenarios are actually
new beta versions will be released for further testing performed due to not knowing how each module works,
before a final version is released for sale. but with white box testing, each module can be tested
in-depth. Black box test plans are difficult to design
because so many different input data options have to
KEY WORDS be considered along with pathways through the system,
alpha testing: initial testing of the software by a whereas with white box testing, test plans can be created
for each calculation, navigation and input separately.
limited group of people
With white box testing, the tester can identify the type
beta testing: a sample of users test a pre-release of test data that will be required, particularly related to
version of the software valid, invalid and extreme test data, but with black box
testing, the tester may not know what the boundary
values are expected to be. Due to needing to understand
the code, skilled testers are required to carry out white
Black box testing and white box testing, whereas black box testing can be carried out
by moderately skilled testers.
box testing
Black box testing involves selecting input data and The importance of testing and
checking that the expected output data matches the
actual output data, with no knowledge or understanding having a test plan
of what happens inside the black box. The black box Testing is necessary because no programmer or developer
could be the whole system or part of a system. White
is perfect and errors are to be expected. These errors need
box testing involves the same process of input and
to be found and rectified. It is important to ensure that
output data but the internal structure and logic of the
the system is error free so that the users can use the system
program are known to the tester.
knowing that it will work reliably and behave as expected.
Although it’s almost impossible to ensure a system is
KEY WORDS completely free of errors, a test plan can help to minimise
black box testing: testing of inputs and the number of errors by ensuring that all pathways
outputs to a system or part of a system with no through a system and types of data have been tested.
consideration for the workings of the system
KEY WORD
white box testing: testing the whole system in
terms of structure and logic covering all paths test plan: a detailed and structured plan of how
through the system testing should be carried out

358

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

WORKED EXAMPLE 16.10


This extract, from a test plan, tests the input of data where the date must be between 1/1/17 and 31/12/17.

Number Description Type of test Input Expected result Pass/Fail


data
1a Test the Valid 12/5/17 Accepted Pass
1b input of join Extreme 1/1/17 Accepted Pass
date.
1c Extreme 31/12/17 Accepted Fail – error message
1d Invalid 15/7/12 Error message: the join Pass
1e Invalid 4/6/19 date must be in 2017. Pass
1f Extreme 31/12/16 Fail – accepted
1g Extreme 1/1/18 Pass

The reason the test for 31/12/17 failed to be accepted may be because <31/12/17 was used in the validation rule
rather than <=31/12/17. Similarly, the reason 31/12/16 failed to generate an error message may be because >=
31/12/16 was used in the validation rule rather than >31/12/16.

A test plan will identify all the tests that are needed
for every input, every button, every link, every report, Test plans
every screen and all other elements of a system. The test A test plan will identify what is being tested, the type
plan will include different types of test data, including of test, the input data that should be used to test it, the
valid, invalid and extreme, so that inputs are tested to expected result of the test and space to record the actual
their limits. Without this planning, important parts of result. Each test will be numbered.
testing would be missed out and errors could be left
undiscovered. The plan will also cover all the user’s
PRACTICAL ACTIVITY 16.11
requirements and ensure that they are tested.
A good test plan will provide a systematic outline of Create a test plan to test the input of data for a
all features and functionality which will be continually character code between the letters D and P.
updated to reflect any new risks as the software is
developed. The test plan will ensure that all aspects
of running a test are considered and prevent aspects As well as inputs, it is important to test that all
being missed out. The test plan is also important so calculations work as expected. Each input for a
that testers know what the testing regime will involve calculation will need to be identified and an expected
and that there is a mechanism for ensuring each test is result determined. Table 16.6 shows an example of how
carried out as planned and signed off. testing of calculations might be planned and executed.

Number Description Type of Input data Expected result Pass/Fail


test
2 Discount formula Calculation Charge per hour = $13 on Test retake = $25 in Pass
works for 2 hours quote worksheet 2 hours column
3 Function for lesson Calculation Lesson type = advanced Total charge = $19 Fail = $1.90
charge
Number of hours = 2 on
quote worksheet

Table 16.6: Examples of test plan for calculations.

359

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Any links or buttons also need testing. Table 16.7 shows


how a navigation button (main menu) and an action
button (clear) would be tested.

Number Description Type of test Input data Expected result Pass/fail


4 Main menu Button Click on main menu The main menu Pass
button button on quote worksheet opens
worksheet
5 Clear button Button Lesson type = advanced, Lesson type = Fail – number of
works number of hours = 2 (blank) Number hours remained
Click on the clear button of hours = as 2
on quote worksheet (blank)
Table 16.7: Example of a test plan for buttons.

Questions Parallel running


7 Describe the purpose of using extreme test data. Parallel running is when a new system and an old system
8 Describe two differences between alpha and are run at the same time. On an agreed date, the new
beta testing. system will become live but the old system will continue
to run. Data will need to be duplicated from the old
9 Explain black box testing.
system to the new system. New data will need to be input
10 Explain the importance of having a test plan. into both systems and output will be produced from
both systems. This will continue until the organisation is
REFLECTION confident that the new system is running satisfactorily.

What would be the implications of rocket launch


system software not being fully tested? Direct changeover
Direct changeover is when a date is chosen for the old
system to stop running and the new system to start
running. The systems do not run at the same time
16.4 Implementation and there is a clear break from the old system to the
This section has the title ‘Implementation’, however, the new system. Data will need to be transferred from the
term ‘installation’ can also be used. Implementation old system to the new system before the new system
can have two meanings within the system life cycle and can be used.
is sometimes understood to be the development stage
where the design is implemented.
Phased implementation
With phased implementation, parts of the new system
KEY WORD
will be introduced one at a time. This often takes place
implementation: the stage in the system life when there is a large system with lots of functionality
cycle when the software is installed for the user that can be easily separated into sections. The old system
will run until a date that has been agreed, at which point
part of the old system will be retired and part of the
There are four different methods of implementing new system will start running. After a while, another
(installing) a new system which can be remembered as part of the old system will be retired and another part
the 4 Ps: of the new system will start running. This will continue
until the complete new system is fully running.
• parallel • phased
• plunge (direct) • pilot.

360

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Pilot implementation • how critical the system is to the running of the


organisation
Pilot implementation takes place when part of an
• cost
organisation starts to use the new system while the rest
of the organisation continues to use the old system. The • number of users in the organisation
new system is effectively being beta tested by the pilot
• the size of the new system.
group who may also be able to deliver training to the
rest of the organisation when the system goes fully live. The advantages and disadvantages of each method is
shown in Table 16.8.

Choosing an implementation
method
The most suitable changeover method will always
be dependent upon the individual circumstances
surrounding a new system. Factors that will need to be
taken into account will include:

Implementation Advantages Disadvantages


method
Parallel Less risky because if the new system Duplication of data input means additional
fails the organisation can continue to run staffing costs.
using the old system.
There may need to be additional hardware
The accuracy of the new system can be installed at the same time as the old hardware
tested against the old system and any is still being used, which will require physical
errors can be fixed. space.
Data may be input differently into the two
systems, meaning that the data is not accurate
in both.
Direct This is cheap to implement because there This is a risky method because any errors
is no duplication of work. could lead to the system failing with no
fallback.
The data being used will be consistent
because it is only being used in one All the training will need to be done in
system at a time. advance of changeover and so if there are a
lot of users this could result in some forgetting
There is no need for the new system to
what they’ve learned by the time they start to
be compatible with the old system.
use the new system.
Phased If there are any errors, they will only affect Delays can occur waiting for each phase to
the part of the system that has changed be running successfully before the next phase
over rather than the whole system. can start.
End users can be trained how to use each Users will be using two different systems and
phase of the new system and spend time they may get confused as to which system
using that phase before being trained in they should be using for which part of their
the next phase. work. This could lead to data being updated
in the wrong system.
Both the old and new system need to be
compatible with each other in order for data
to be used across both systems.

361

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Implementation Advantages Disadvantages


method
Pilot If there are any errors, they will only affect This is a slower method of changeover
the pilot group that are using the system. because the rest of the organisation has
to wait until the pilot has been completed
Any errors found by the pilot group can
satisfactorily.
be fixed before the system is installed for
all users. Users in the pilot group might not be happy
about using the new system while it may still
The pilot group can train other users on
have some errors in it and users not in the
how to use the system because they will
pilot group may be disgruntled that they have
have experienced using it for real.
not been offered the opportunity to try the
new software first.
Both the old and new system need to be
compatible with each other in order for data
to be shared between the pilot group and the
users still using the old system.

Table 16.8: Advantages and disadvantages of implementation methods.

Questions validation rules will be listed with the criteria used


for successful input and the error messages that they
11 Identify four methods of changeover. generate. The purpose of calculations within the system
12 Describe one situation when direct changeover will be identified and an explanation given of how each
would be more appropriate than parallel calculation works. All buttons and links will be listed,
changeover. including where they are located and what their function
is. All files used by the system will be listed and their
13 Describe one situation when pilot changeover would
purpose identified. The technical documentation will
be more appropriate than phased changeover.
also include flowcharts to show how different parts of
the system work and other diagrams that may have
REFLECTION been used during design and development such as entity
relationship diagrams and screen connectivity diagrams.
Find out what happened in 1992 when the
London Ambulance Service Computer Aided
Dispatch system failed. What lessons can be KEY WORDS
learned from this?
technical documentation: an overview of the
structure of the system, how it was put together
and how it works

16.5 Documentation There will be an installation guide for the installation


team and also in case the system has to be installed
Technical documentation again in the future. All the results of testing will be
Technical documentation is an overview of the structure recorded, including any known errors and bugs. Backup
of the system, how it was put together and how it works. routines will be detailed to show where files are stored,
It will include a data dictionary to show how data has how the routines were configured and how to restore
been structured within the system. Any programming from a backup. All security settings will be documented
code or macros will be annotated to explain their to show which groups have access to each part of the
purpose and anything unusual, along with a list of system and the permissions they have been granted. The
variables including their datatypes and purpose. All software and hardware requirements will also be listed.

362

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

User documentation The main part of the user guide will be the instructions
on how to use the system. This should include written
User documentation is a user guide giving instructions instructions together with screenshots of the system
to the user. It can be in electronic or printed format. or photographs of hardware. Arrows can be used to
A printed user guide should have a front cover that point to parts of screenshots or photographs. Bullets or
clearly identifies the name of the system and the whole numbering should be used to break instructions down
guide should have a header or footer with page numbers. into manageable tasks.
A contents page should be included with page numbers
A glossary will show an alphabetical list of any technical
and an electronic version would include hyperlinks to
terms that have been used within the user guide and a
those pages. An introduction to the purpose of the user
definition of each of those terms. There should be a
guide should be included, but it only needs to be a few
troubleshooting section that includes a table of common
sentences. All the software and hardware requirements
problems (for example, error messages) together with a
will be listed within the guide.
description of what might have caused the problem and
possible solutions for overcoming the problem. An index
KEY WORDS will be included at the end of the user guide with page
numbers for each popular term.
user documentation: a user guide giving
instructions to the user on how to use
the software

WORKED EXAMPLE 16.11


This is an example of a troubleshooting guide for a printer.

Problem Cause Solution


Orange light displayed on No paper in feeder tray. Add paper to the feeder tray.
printer.
Red light displayed on Paper is jammed in the Open the paper feeder tray and check there is
printer. printer. no paper stuck there. Open the back door and
check there is no paper stuck there. Open the
toner door, remove the toner and check there
is no paper stuck there. If any paper is found,
gently pull any paper that is stuck.
Error message on computer Printer is turned off. Turn on printer.
says ‘Printer Offline’. Printer is not connected to Ensure the USB cable is connected between
the computer. the computer and the printer.

363

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Below is an example of a troubleshooting guide for an order processing system.

Problem Cause Solution

Microsoft Access On the New order form Enter a smaller quantity.


you have specified a
quantity larger than the
i Not enough items in stock
amount currently in stock.
OK

Figure 16.10: Error message 1.

Microsoft Access On the Order details form Check the invoice has been dispatched. If it
you have ticked the Paid has, then tick the Invoice dispatched box.
i Invoice cannot be paid if not dispatched
box before the Invoice has
OK been dispatched.

Figure 16.11: Error message 2.

what has caused an error to occur and what they need to


PRACTICAL ACTIVITY 16.12 do in order to stop the error from occurring.
Find a user manual for an electronic device or
appliance at home. Identify the different sections
that are used and compare them with those Questions
listed in Worked Example 16.10. 14 Give three sections you would expect to find in user
documentation.
15 Describe the purpose of a glossary in user
Why technical and user documentation.
16 Give a situation when technical documentation
documentation is needed would be needed.
Technical documentation is required so that anybody
carrying out future maintenance on the system will
be able to understand how the system was developed
and how it is configured. It is unlikely that the person
16.6 Evaluation
carrying out future maintenance is part of the original When a system has been developed and installed, the
development team and so will not be familiar with whole process will be evaluated. This is sometimes
the system without the technical documentation. referred to as a review. The evaluation will consider how
Even if it is the same person or team carrying out the the project team and end users worked together so that
maintenance, they will need the documentation to lessons can be learned for future projects.
remember the structure of the system.
User documentation is needed so that the user can KEY WORD
learn how to use the new system or look up how certain
features are supposed to work. The troubleshooting evaluation: a formal review of a project
section will be important for the user to understand

364

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Users will be given questionnaires to find out what


they think of the new system and how they feel it is
Perfective maintenance
improving their workflow (or not). Selected users will The idea of perfective maintenance is to be always
also be given specific tasks to complete that will be looking to improve a system. There may not be anything
observed to see whether the new system is living up to its wrong with the system, but there may be ideas to make
expectations. Some users will also be interviewed about the system perform better or to do additional tasks.
their interaction with the new system. Sometimes improvements might be possible because of
new technology that has become available.
The most important question to be asked will be
whether the system meets the user requirements. Each If a system remains in place for several years without
requirement will be considered in turn to determine if it any improvements, then it may become outdated
has been fulfilled. If it hasn’t been fulfilled, then actions and inefficient compared with other systems that
will be set to rectify the situation in the long run. The are available. Users will also have new ideas and if
efficiency of the new system will also be discussed. Users they are likely to improve efficiency then they should
will have been given an opportunity to feed back on how be embraced.
well the new system is working for them and if there are
For example, an online accounts application sends
any problems. It is expected that the new system will
out automatic reminders to customers when payments
work more efficiently than the old system. However, if
haven’t been made. These reminders are sent to a single
there are problems that need addressing, then actions
customer contact. The system only allows for the
will be taken.
contact details of one person to be stored. Many users
The requirements specification should have specified of the accounts application have requested that the
how easy the new system should be to use. This can be system be adapted to store details of multiple contacts
rather subjective and so it is difficult to measure. Again, for each customer and that contacts who should receive
feedback will have been gained from users as to how invoice payment reminders are identified within the
well they have adapted to the new system and how easy software so that they go to the right person.
or not they find it to use now they are using it regularly.
If there are issues regarding ease of use, then plans can
be made to simplify any processes by adding additional Adaptive maintenance
features to the software if necessary.
Systems need to adapt to changes. There could be
There will also be an opportunity for users to make changes to internal procedures within an organisation
suggestions for future improvements or additions to or changes over which the organisation has no control.
the system. For example, new government legislation could be
introduced to which the system has to adapt. It’s
necessary to adapt to changes so that the system
Question continues to work effectively and doesn’t produce
17 State three elements that might be evaluated after a incorrect outputs. It’s important that the system enables
system has been installed. an organisation to comply with new laws. There is
also a need to adapt to new technology such as a new
operating system, new web browser and new hardware.

16.7 Maintenance For example, the government introduced new


requirements for organisations to provide pensions to
Maintenance takes place after a system has been all employees. The online accounts application needed
delivered to a customer and it is being used. There are to be updated to include a facility for checking that all
four reasons why maintenance might be required, which employee payslips include pension payments unless they
are outlined here. have opted out of the scheme. The accounting software
was supposed to show a paper clip symbol to indicate
that a receipt had been uploaded against a recorded
KEY WORD expenditure. When a web browser was upgraded, this
paper clip stopped being displayed. The software had to
maintenance: changes made to a system after its
be adapted to work with the new web browser.
implementation

365

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Preventative maintenance
Preventative maintenance is required to prevent
Identification
problems arising within a system. This can apply to both and tracing
Analysis Design
hardware and software. Hardware should be regularly
cleaned to stop dust from blocking any fans and regular
scans of storage media should be carried out to ensure
they are working properly. Heat should be monitored
within systems for any abnormalities to prevent Maintenance Maintenance Implementation
hardware failures. Data should be regularly checked for management
activities
consistency and integrity. Performance of the system
should be monitored to ensure that the processor,
memory and storage are all working efficiently. By
carrying out regular preventative maintenance, system
downtime can be avoided. Delivery
Acceptance System
testing testing

Corrective maintenance
When errors or bugs are found within a system they Figure 16.12: Maintenance activities.
need to be corrected. This will be the responsibility
of the original developers, although it may be different Maintenance needs to go through the same stages as
people that carry out the maintenance. These errors software development because the software is being
need to be corrected so that the system can run further developed. Testing is still very important because
efficiently and accurately and produce the results any changes made could affect existing parts of the
required by the organisation. Bugs that cause problems system. The maintenance team can be formed using one
by making a system slow or by crashing a system of three different approaches:
can be very frustrating to users and reduce overall
productivity. • separating development and maintenance: the
maintenance team will be different to the original
For example, a graphics application would intermittently development team.
stop responding for several seconds. This was not
supposed to happen and so corrective maintenance • combined approach: the maintenance team will
was required. include both maintenance specialists and members
of the original development team.

How maintenance is carried out • functional approach: this is similar to the combined
approach, but systems personnel are assigned to
There are many ways in which maintenance to software
functional areas within an organisation where
can be carried out, but one widely used methodology
they are responsible for both development and
similar to the software development life cycle (SDLC)
maintenance within that functional area.
is the maintenance process model. The maintenance
process model includes the following stages: Maintenance starts with the identification and tracing
stage. A modification request (or problem report) will
be generated which could be a request by a user or it
could be as a result of collating error logs from the
system. The modification request must clearly describe
the existing functionality of the system and the desired
functionality of the system. The modification request
will need to be classified as either perfective, adaptive,
preventative or corrective maintenance.
During the analysis stage, a change impact analysis
will take place. An impact analysis involves identifying
all systems and software that will be affected by the

366

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

change, the risks associated with the change, an estimate During system testing, new and modified modules
of the resources that will be required to implement will be tested together as a group. This type of testing
the change and a cost-benefit analysis of the change. is known as integration testing because the testing is
If the impact of the change is considered to be severe designed to expose faults in the interaction between
then an alternative solution may be sought. If the integrated units. Following this, regression testing will
impact is manageable then the required modifications take place. This is effectively re-running the original test
from the modification request will be analysed with the plan for the original software to ensure that the software
customer to form a requirements specification for the continues to perform as expected after the change. It is
modification. called regression testing because if a change causes a
new fault, then that is a regression.
The design stage of the maintenance process model
closely follows the design stage of the SDLC. There Acceptance testing involves the users testing the system
will also be a need to identify any new modules that following the change. Users will be able to confirm
are required, any modules that need to be replaced, whether issues have been addressed by the change or
any modules that need to be modified and any modules if there are any adverse effects on the system following
that need to be scrapped. Test plans will be created in the change. Simple modifications to a system may not
preparation for the testing stage. require this stage.
The implementation stage is very similar to the The delivery stage is similar to the implementation/
development stage of the SDLC but should not be installation stage of the SDLC where the existing
confused with the implementation/installation stage software will be upgraded to include the modification
of the SDLC. Implementation will involve following that has been developed. This will include any
the design to implement the changes to modules. A additional training that is required by users and updates
technique known as software re-engineering will be to the user documentation.
used. Software re-engineering can involve:
Maintenance management is an essential part of
• deciding whether the whole system needs re- maintenance in terms of documenting changes. It
engineering or just part of it involves ensuring that version control is in place and
is fully documented. Version control identifies each
• performing reverse engineering to obtain
update made to the software and will include technical
specifications of the existing software
documentation for that update. Without version
• restructuring the program (if required) control, software revisions become unmanageable and
it is impossible to identify when changes were made
• restructuring the data (if required)
and what impact those changes may have had on the
• forward engineering to get the re-engineered software. This makes finding a bug in the system very
software through software engineering methods. difficult because there is no documentation to show the
Reverse-engineering involves analysing and changes which may have caused that bug.
understanding the existing system to produce a
system specification. This is required when original
specifications are unavailable. The process involves Question
examining the code in depth to generate a design. The 18 Give a situation when corrective maintenance
design is then used to generate a system specification. would be required.
Program restructuring could involve re-writing the
program in a different programming language or REFLECTION
restructuring the way modules are used within a
program. Program restructuring is often required to Discuss the types of software maintenance you
enable obsolete hardware to be decommissioned. have seen take place on mobile phones.
Throughout the implementation stage, modules that are
introduced or modified should be tested, including their
impact on other parts of the system. The impact on the
rest of the system of scrapping any modules should also
be tested.

367

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Each prototype will build upon the previous one and


16.8 Prototyping include more functionality until a final product is built.
At each stage, only clearly understood requirements
A prototype is a ‘mock-up’ of a software solution in
are developed. Each prototype can be functional and if
a primitive form. It is used during the design stage to
required can be used by the client until the next iteration
demonstrate how a system will look and work. It is
of the prototype is ready. This means that the end users
usually focused on the user interface, rather than any
may request enhanced or new features that they discover
data structures. It is used so that the client can get a
they require as the prototypes are being developed,
feel for the new system before it is developed and can
features they wouldn’t have envisaged at the initial
provide feedback that can then be acted upon. The
requirements specification stage.
client is also able to compare the prototype against
the requirements specification. The client also has an
opportunity to explain their requirements more clearly Evolutionary prototyping
having seen the designer’s interpretation. Evolutionary prototyping follows a similar pattern
to incremental prototyping in that it is iterative in
nature. However, unlike incremental prototyping, there
KEY WORD is no requirements specification at the start of the
prototype: a ‘mock-up’ of a software solution in project, but instead there might be a goal or an aim.
a primitive form Both the analyst and developer begin the project by
brainstorming ideas. The developer will start working
on some of the best ideas so far while the analyst will
discuss with the customer what the problem is and what
Types of prototyping is needed to solve the problem.
After a few days, the analyst and developer will compare
Incremental prototyping notes. The developer will demonstrate how they have
This type of prototyping takes an iterative approach implemented ideas and the analyst will talk about what
in that requirements are specified, an initial prototype the customer has said. Following this discussion, the
is developed, the prototype is reviewed and then developer will continue with development focusing on
requirements are clarified and the prototype is improved the needs of the customer that are understood most
based on feedback. clearly, while the analyst will get feedback from the
customer and get more clarification on their needs.
Initial requirements This process will continue as the product evolves from
a goal to a usable piece of software. This evolutionary
approach is often used by start-ups or where new ideas
Initial prototype are being experimented with.

Throwaway/rapid prototyping
Feedback With throwaway prototyping, also known as rapid
prototyping, the prototype will never become part of the
final delivered software, but will be discarded. A loosely
Refine requirements working model is created following a short investigation,
with the aim being to get something tangible to the
client as soon as possible for feedback as to how well the
Refine prototype requirements are being met.

Final product

Figure 16.13: Iterative prototyping.

368

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Initial requirements Advantages Disadvantages


The end users will be When users see the
involved more in the prototype, they can
Rapid prototype process, giving them often get lots of new
more ownership of the ideas about features
solution and providing they would like to be
Client feedback valuable feedback. included, which can lead
to disappointment if
these features can’t be
Specify final requirements
funded. This is known as
‘feature creep’.
If the prototype is When users see what
Figure 16.14: Throwaway prototyping.
evolutionary, then users looks like a working
can get used to using interface with a
This enables the requirements to be fine-tuned early in parts of the system throwaway prototype,
the process, which is more cost-effective than trying to before having to use the they don’t realise how
make changes later when considerable work has been whole system, which will much more effort is
carried out. The main aspect to the prototype will be the reduce the need for bulk required to make it
user interface which the client will be able to test and training. into a working solution
experience. The interface will appear to work by being and may have false
simulated. It’s much cheaper to expectations as to the
make changes earlier in timescale.
the process than after
The advantages and real development has The iterative process of
taken place. feedback can sometimes
disadvantages of prototyping last too long if the user
is regularly wanting
The advantages and disadvantages of prototyping are
changes to be made to
shown in Table 16.9.
the latest prototype.
By listening to feedback The initial costs of
Advantages Disadvantages
from end users, developing a prototype
Problems can be Requirements analysis the developers will are high compared with
identified early during can be rushed, meaning have a much better traditional designs.
the process and that prototypes don’t understanding of what
modifications made reflect much of what the users are expecting
before it becomes very the end users were and so a better
costly to make changes. expecting. quality solution will be
Requirements can be With rapid prototyping, provided.
clarified and refined the prototype can
following feedback on become rushed and, Table 16.9: Advantages and disadvantages of prototyping.
the prototypes. when trying to develop
it into a working system,
it may have significant
design flaws or structural Question
errors that carry through 19 Compare and contrast evolutionary and throw-
to the end solution. away prototyping.

369

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

16.9 Methods of Development methodologies


Waterfall method
software development
Requirements
Types of development
Software development tends to fall into two main
categories which are incremental development and iterative Design
development. Both types of development can be followed
mutually exclusively or in co-existence with each other.
Implementation

KEY WORDS
Verification
incremental development: creating a system or
adding new functionality in small parts
iterative development: creating a system or Maintenance
adding new functionality in a repetitive cycle

Figure 16.15: Waterfall method.


Incremental development is about development in
phases. Part of the software is developed fully, including The waterfall method is an iterative development model.
improvements from feedback, before moving on to the The waterfall method involves gathering all the user
next part of the software. requirements at the beginning of the project. There will
Iterative development is about planned rework be considerable communication with the user at this
throughout a project. It allows for feedback to be given stage in order to elicit the requirements of the potential
by the customer and improvements to be made based on solution. When the requirements are defined, the process
that feedback. It usually involves building a bit of every runs ‘downhill’ like a waterfall.
part of a solution before seeking feedback and then During the design stage, the interface and the structure
revisiting the whole solution to make improvements. of the system will be designed. During implementation,
A typical analogy used to describe incremental and often referred to as development, the system will be
iterative development is that of an artist. A landscape developed, which often involves programming. The
artist following the incremental approach might start purpose of the verification phase is to ensure that the
by painting a picture of a house and perfect that picture project meets the customer’s requirements. The system
before moving on to painting something else. Then will then be used and during its use there may be
the artist may paint a tree and perfect that tree before problems that are discovered that need to be corrected
moving on to the next object. or other changes that need to be made. This is known as
maintenance.
A landscape artist following the iterative approach
would sketch an outline of the whole landscape. The As each stage starts, changes may need to be made to
artist might then start to add background colour to all the previous stage as a result of user feedback or lessons
parts of the landscape. The artist might then start to that have been learned during that stage. This is what
add details to all parts of the landscape. The artist will makes the model iterative.
keep revisiting the picture and changing it until they are The waterfall method relies upon the requirements being
happy with the final picture. clearly defined, which is an unrealistic expectation, so
it is fundamentally flawed. It was originally used in
manufacturing and then adopted into computing, but
with adaptions that included the need to revisit the
requirements.

370

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

The system life cycle discussed in this chapter is based Agile


on the waterfall model and there are many variations in
The agile approach to software development is able to
existence.
respond to a customer’s changing requirements, even
The advantages and disadvantages of the waterfall late in the development life cycle. It is expected that
method are shown in Table 16.10. the customer’s requirements will evolve as the project
develops. The process can cope with change and harness
Advantages Disadvantages that change for the benefit of the customer.
Each stage is completed The customer only sees Following the agile approach, individuals and the
before moving onto the product at the end interaction between people is valued more highly
the next stage making of the project. than design processes and tools. Similarly, it is more
management of the important that working software is developed than
project more structured having comprehensive supporting documentation.
and controllable. Collaboration with the customer is expected to underpin
It’s a simple model to It’s hard to measure the whole project with contract negotiations taking
understand and use progress within each a less important role. While planning is necessary,
because each stage is stage because the flexibility is more important in the agile approach and so
distinctly separate from milestones are just the responding to change is essential. These are summarised
the other stages. beginning and end of in a manifesto for agile software development
each stage. as valuing:

It works well for projects It doesn’t work well for • individuals and interactions over
where the requirements complex projects where processes and tools
are clearly understood the requirements cover • working software over comprehensive
and are unlikely to a large variety of aspects documentation
change. and aren’t clearly
• customer collaboration over contract negotiation
understood by everyone
involved. • responding to change over following a plan.
The process followed Projects can take longer Unlike the waterfall model which has separate phases
and the resulting to deliver than other throughout the system lifecycle, the agile approach uses
software are well methods because of the iterations with each iteration including the planning,
documented, meaning emphasis on planning design, development and testing of part of the software.
new team members can and documentation. At the end of an iteration, a working solution for that
get up to speed very part of the software is ready for demonstration. Several
quickly. iterations are usually required before a product is ready
The client and project Client involvement is to be released or updated.
team work to a set limited to set times As an iteration includes designers, developers and
timescale and a set within the project which testers, they are expected to be located in the same place.
budget which removes can lead to requirements This ensures a collaborative approach to each iteration.
a lot of uncertainty from not being met to the Each team will also include a customer representative,
projects. client’s expectation. sometimes referred to as a product owner, who
The requirements are The model doesn’t represents the client and must be available to developers
clearly set from the accommodate changes throughout an iteration. Working closely together means
beginning of the project to requirements. that feedback is instantaneous and enables a flexible
and are used to measure approach to be taken to the design and development.
the project’s success There will often be a daily ‘scrum’, which is a briefing
when it is completed. session where each team member reports to the others
on their work so far and their plan for their next stage
Table 16.10: Advantages and disadvantages of the of development.
waterfall method.
One technique used in agile software development is
pair programming where two programmers work at the

371

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

same computer with one being the driver who writes the upon in future iterations. It’s important not to get the
code and the other being the observer who reviews each words iteration and iterative confused. Each iteration
line of code. The observer is expected to think about increments the existing functionality and each iteration
potential improvements that could be made and pre- is iterative in nature.
empt potential problems that might take place.
The advantages and disadvantages of agile software
Agile is both iterative and incremental. It’s incremental development are shown in Table 16.11.
because each iteration can be planned to be improved

Advantages Disadvantages
The customer gets to see completed parts of As requirements change, it’s difficult to know how
software quickly which enables them to adapt their much a project is going to cost and how long it will
requirements for other parts of the software. take.
The customer, designers, developers and testers are The project can easily go off track if requirements
constantly interacting with each other which reduces change too much.
delay.
If the business needs aren’t fully known at the start Experienced senior programmers are needed to be
of the project then they can evolve as the project able to make quick decisions during each iteration.
progresses.
There is unlimited access to the customer which There will be minimal documentation produced which
means their needs are more likely to be met. means new team members can take longer to get up
to speed with the project and there can be a large
learning curve when maintaining the software.
There is no complicated bureaucracy that delays Projects may seem to never have an end in sight.
decision making.
The customer doesn’t have a fixed budget or Not having a fixed budget or timescale creates a lot
timescale so customer needs can be met above of uncertainty for the client and is not a popular move
timescales and budgets. with senior members of an organisation.
Parts of the software can be deployed when they are The software, especially the user interface, can
ready so the customer sees the value of that software become disjointed because each iteration is worked
sooner. on separately.
Bugs and problems can be fixed quickly because the
designers, developers and testers for each iteration
are working closely together.

Table 16.11: Advantages and disadvantages of agile software development.

Rapid application development of the system. Less time is spent on planning and design
and more emphasis is put on the development phase.
Rapid application development (RAD) uses prototyping
to develop a system in a very short time frame, usually
less than six months. Instead of following a traditional KEY WORD
requirements gathering approach, requirements are
gathered through focus groups. Users are key players rapid application development (RAD): use of
in the prototyping stage and provide feedback for prototyping to develop a system in a very short
refinements. This type of user involvement is known as time frame
joint application development (JAD) because the user is
jointly involved with the developer in the development

372

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

Strict deadlines are allocated throughout the can be created using drag and drop functionality. This
development of the system to ensure that the product is enables users to be involved in the actual design of the
developed and finished on time by allocating time boxes interface as part of the JAD approach and they can see
to the development of each requirement. This requires the interface taking shape in real time.
understanding from the user that, if requirements are
RAD is based on an incremental model in that each
too complex, then they must be simplified or removed
timebox will deliver specific functionality. However, it’s
from the project. The RAD approach will also try to
not necessary to complete a timebox before moving onto
reuse any modules of software that already exist and are
another one as timeboxes can be developed in parallel.
available, rather than always developing from scratch.
Software application frameworks can be used to develop The advantages and disadvantages of RAD are shown
the solution whereby a complex graphical user interface in Table 16.12.

Advantages Disadvantages
The high level of user involvement means that the end Requirements are not clearly specified from the outset
solution is more likely to be suitable for the end users, and so the final solution may not meet the entire
who will also have ownership of the solution. needs of the organisation.
Users are often not sure of what the requirements Users are required throughout the whole process and
of a system should be from the outset and so they also have their normal day jobs to do. This can
the evolutionary approach of RAD enables the lead to work overload or the need for temporary staff.
requirements to evolve.
As users are involved throughout the whole project, The structure of the system may be compromised,
it is quickly recognised when a requirement is leading to instability, as the focus is on the user
overambitious and therefore the requirement can be interface and getting a system developed rapidly.
simplified or removed at an early stage.
The strict deadlines ensure that the project will be The strict deadlines mean that some parts of the
completed on time and prevents ‘feature creep’. project could be rushed and not completed to a high
enough quality.
Prototyping of the interface with user involvement Existing software modules will not have been
means less time is spent on design and more on designed for the exact requirements of the system
development, leading to a shorter overall project. and so may not provide sufficient functionality.
Software application frameworks mean that a user Software application frameworks don’t produce
interface can be developed quickly and users can particularly efficient code and so the end solution will
even be involved in configuring the layouts of screens not run as quickly as if it had been developed from
and reports. scratch.
Users who are not involved in the JAD approach may
be disappointed that they didn’t have a say in the
process and the system may not meet their specific
needs.

Table 16.12: Advantages and disadvantages of RAD.

REFLECTION
Questions
20 Describe the differences between incremental and Discuss whether there is a perfect methodology
iterative methods of development. that would be right for every project.
21 Describe joint application development.

373

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

EXAM-STYLE QUESTIONS
Thornhill Estates runs several hotels. It would like a new software solution to manage room bookings, dinner
reservations and purchases across all its hotels. It has asked a software developer to produce the software for them.
The software developer will follow the system life cycle.
1 a State one purpose of analysis in the system life cycle. [1]
b Suggest four reasons why questionnaires would be appropriate for researching how bookings are
currently managed at the hotel. [4]
c State three other methods that could be used to research the current booking system. [3]
[Total 8]

The analyst will interview a group of users to create a requirements specification.


2 State the purpose of a requirements specification. [1]

The designer will create a design specification based on the requirements specification.
3 a Identify three factors that should be considered when designing a screen layout. [3]
b Using an example, show how a validation rule could be designed for the hotel booking system. [3]
c Apart from keyboards, mice and monitors, describe three external hardware components that will
be needed by the hotel system. [3]
[Total 9]

An evolutionary prototype approach will be used during the design and development of the software.
4 a Define the term ‘prototype’. [1]
b Justify the manager’s choice of an evolutionary approach. [4]
[Total 5]

Once the system has been developed, it will need to be tested.


5 a Describe two differences between white box and black box testing. [4]
b Explain one reason why beta testing might not be appropriate for the hotel system. [2]
c Explain why invalid test data is used. [2]
[Total 8]

The system will be installed in a pilot approach and user documentation will be provided to the hotel staff.
6 a Justify the choice of the pilot approach of installation for the hotel system. [4]
b Explain why the user documentation should include troubleshooting and glossary sections. [4]
c Suggest four reasons why the hotel system may require maintenance in the future. [4]
[Total 12]

374

Copyright Material - Review Only - Not for Redistribution


16 System life cycle

SUMMARY CHECKLIST
I can describe the stages in the system life cycle.
I can describe methods of research for a given situation.
I can understand the content and purpose of specifications.
I can construct diagrams to represent system processing and the flow of data through a system.
I can design data storage, input forms and output reports.
I can create a test plan and understand its purpose.
I can select appropriate test data.
I can describe the differences between alpha and beta testing.
I can describe the differences between white box and black box testing.
I can describe different methods of implementing a system.
I can explain the advantages and disadvantages of each implementation method for a given situation.
I can describe types of documentation and explain why each is needed.
I can describe the contents of documentation.
I can explain methods of evaluating a new system.
I can describe different types of maintenance and explain why each is needed.
I can explain how each type of maintenance is carried out.
I can explain different types of prototyping and explain why each is needed.
I can explain the advantages and disadvantages of each type of prototyping.
I can describe the stages and processes of different software development methodologies.
I can explain the advantages and disadvantages of different software development methodologies.

375

Copyright Material - Review Only - Not for Redistribution


Chapter 17

Mail merge
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• use, create and edit source data using appropriate software
• create a master document structure
• link a master document to a source file
• specify rules selecting recipients and for managing document content
• set up manual completion, automatic completion and calculated fields
• use manual methods and software tools to ensure error-free accuracy
• perform mail merge.

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

BEFORE YOU START

• Do you know how to create documents using a word processor?


• Do you know how to create data sources using a database or spreadsheet?

Introduction KEY WORDS


A mail merge is the automatic process of merging data, mail merge: the automatic addition of data, such
such as names and addresses, from a source file into a as names and addresses, from a source file into a
master document, such as a letter. You can save time master document, such as a letter
writing the same letter to lots of different people when
source file: the file containing the data that will
their data already exists in a data source.
be merged into the master document
master document: the main document that will
be used for all records

Data source Master document


Name Address City Zip Store Account
Louis xxxxxxxxxxxxx xxxx xxxx xxxx 0156595
Carlos xxxxxxxxxxxxx xxxx xxxx xxxx 0156594
James xxxxxxxxxxxxx xxxx xxxx xxxx 0156593 Auguest 2012

Dear :

We would like to inform you because


your account - xxxxxxxx has qualified
you for a special gift.

Please come in our store in xxxxxxx to


claim your price. Louis thank you for
being a loyal customer.

Sincerly

James Carlos Louis


xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx
August 2005 August 2005 August 2005

Dear James : Dear Carlos : Dear Louis :


We would like to inform you because We would like to inform you because We would like to inform you because
your account - 0156593 has qualified your account - 0156594 has qualified your account - 0156595 has qualified
you for a special gift. you for a special gift. you for a special gift.

Please come in our store in xxxxxx to Please come in our store in xxxxxx to Please come in our store in xxxxxxx to
claim your price. James thank you for claim your price. Carlos thank you for claim your price. Louis thank you for
being a loyal customer. being a loyal customer. being a loyal customer.

Sincerly Sincerly Sincerly

Merged documents

Figure 17.1: Mail merge documents.

377

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

17.1 Mail merge letters PRACTICAL ACTIVITY 17.01

Create a master document that you will use to


Create a master document write to customers of the company IT Distribution
Inc. You should create the letter in a standard
structure letter format, including space for the recipient’s
name and address. Your letter should invite
A master document is the main letter, email, memo, fax
the customer to participate in a survey with the
or other document that you can send to all recipients
opportunity to win one of ten prizes each worth
from the data source.
$250. Tell customers that the survey is available
online and is available for two months from the
WORKED EXAMPLE 17.01 date of the letter.

17.01 Learner letter.docx is a master document.


It is a letter written to learner drivers in a driving
school. The words in italics are the data that needs Create a source file
to be inserted about each learner driver and will be
obtained from the data source. You need to create a source file that contains the
data the computer will include in each mail-merged
document. This source file usually consists of names
and addresses and other information about the people
you are writing to.

WORKED EXAMPLE 17.02


17.02 Driving School.mdb contains a table
called Learner which includes the names, addresses,
telephone numbers and mobile numbers of learner
drivers in a driving school.

Source files can be in a variety of formats including:


• database table
Figure 17.2: Master document.
• database query
Notice how a standard letter includes the letterhead • spreadsheet
of the organisation sending the letter, the date of
the letter and the full name and address of the • word-processed table
recipient of the letter. When you produce a letter on a • variable length text file (for example, comma-
computer, it should always have all the text (except the separated values)
letterhead) aligned to the left.
• fixed length text file
• email contacts.

378

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

PRACTICAL ACTIVITY 17.02 WORKED EXAMPLE 17.03

1 Examine the structure of the following 17.01 Learner letter.docx has been linked to the
data sources and identify which formats Learner table in 17.02 Driving school.mdb.
they are in:
Select Table ?
a 17.03 Student.csv Created Type
Car 8/3/2015 11:41:39 AM 9/13/2013 1:15:38 PM TABLE
b 17.04 Student.rtf Instructor
Learner
8/3/2015 11:42:29 AM
8/18/2015 12:04:35 PM
9/13/2013 12:44:50 PM
9/13/2013 1:29:23 PM
TABLE
TABLE
Lesson 8/3/2015 11:43:55 AM 9/13/2013 1:48:39 PM TABLE
c 17.05 Student.txt
d 17.06 Student.xlsx
OK Cancel

e 17.07 Student.mdb (examine the


student table) Figure 17.3: Database link.
f 17.07 Student.mdb (examine
the query) The records from the data source are identified in the
master document in the recipient list.
2 Create a data source using a table in a word
processor that will include the following
fields (categories of information):
a forename
b surname
c email address.
3 Create three records in the data source.

KEY WORD
field: a category of information from the
data source
Figure 17.4: Recipients.

Link a master document to a


source file PRACTICAL ACTIVITY 17.03

Your master document needs to know the source 1 Open the master document 17.08 New
location of the data. You therefore need to link the class.docx and link it to each of the
master document to the data source. following data sources one at a time. Finish
by linking it to the query from the database.
a 17.03 Student.csv
b 17.04 Student.rtf
c 17.05 Student.txt
d 17.06 Student.xlsx

379

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED PRACTICAL ACTIVITY 17.04

e 17.07 Student.mdb (link to the 1 Use the master document 17.08 New class.
Student table) docx that you linked to the query in the
database 17.07 Student.mdb. Insert merge
f 17.07 Student.mdb (link to the fields for forename, surname and class.
query)
2 Open the letter that you wrote for IT
Open the letter that you wrote for IT Distribution Inc. and linked to 17.09 Sales
Distribution Inc. Use it as a master document processing.mdb. Insert merge fields in the
and link it to the table Customer in 17.09 appropriate places.
Sales processing.mdb.

Perform mail merge using the


Set up fields
master document and data
Having a link from the master document to the source
file only tells the master document which file to use. The sources
master document also needs to know which fields to put Now that you have entered the fields, the mail merge can
into the document and where to place them. be completed. You need to tell the software to carry out
the merge process. It is usually possible to preview the
results of the mail merge prior to printing or creating
WORKED EXAMPLE 17.04
a new document with the merged letters. It is also
17.10 Learner letter with fields.docx includes the possible to merge the letters to an email address for each
merge fields from the Learner table in 17.02 Driving recipient.
school.mdb. The merge fields are highlighted
in yellow and have been inserted in place of the
WORKED EXAMPLE 17.05
placeholder names in Worked Example 17.01.
17.10 Learner letter with fields.docx can be
previewed. The data from the first record of the data
source 17.02 Driving school.mdb is highlighted in
yellow.

Figure 17.5: Merge fields.

When you eventually run the merge, the fields will be


Figure 17.6: Merge preview.
replaced with data from the Learner table.

380

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

PRACTICAL ACTIVITY 17.05

1 Open 17.10 Learner letter with fields.docx and merge to a new document. Notice how all the records
have been included so that there is one letter for every learner.
2 As you have added merge fields, use the master document 17.08 New class.docx to merge to a
new document.
3 Open the letter that you wrote for IT Distribution Inc. Merge the letters to send as emails to the email
address field in the Customer table.

Edit the source data PRACTICAL ACTIVITY 17.06


You can edit the source data by making changes to the
source file. However, if a master document that is linked 1 Open 17.08 New class.docx that you
to the source file is open, then it is possible that the source have already merged with 17.07 Student.
file will be locked and you won’t be able to edit it. You mdb. Edit the data source to change Chloe
must remember to close the master document before Carson’s surname to ‘Carlton’.
making changes to the source file. Any changes made to 2 Open the letter that you wrote for IT
the source file will be visible in the master document. Distribution Inc, and linked to 17.09 Sales
Some word processors allow the source data to be edited processing.mdb. Edit the data source to
directly from within the word processor. change Carmella Wishman’s email address
to ‘[email protected]’.
WORKED EXAMPLE 17.06
17.10 Learner letter with fields.docx has been
used to edit the data source and change Patricia Mail merge labels
Thomas’ surname to Donaldson. You can use mail merge to create labels or similar
documents such as business cards from a data source.
You can set up the document as a table with each cell
representing a label, business card or similar. Each cell
will contain the merge fields from one record from the
data source.

Figure 17.7: Edit source data.

Be careful when you edit the data source because


other users may be using it and so any changes you
make would affect other users.

381

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 17.07


17.11 Instructor Labels.docx has been set up to use You can now add merge fields to the first label.
labels. It is set up to use the labels named L7263 which
defines the measurements of the label.

Figure 17.8: Setting up the labels.


Figure 17.10: Adding merge fields to the labels.

The label layout has been merged with the Instructors


You can update the rest of the labels to include the same
table from 17.02 Driving School.mdb. A table is
merge fields as the first label. A preview of the labels
created for each label and a <<Next Record>> field is
shows the merged content.
added to each of the cells in the table except the first
one. The <<Next Record>> field means that the next
record from the data source will be displayed so that
each cell contains data about a separate record from
the data source.

Figure 17.9: Initial label merge structure. Figure 17.11: Preview of merged labels.

382

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

PRACTICAL ACTIVITY 17.07 WORKED EXAMPLE 17.08

1 Create a new word-processing document 17.12 Learner letter with fill-in prompt.docx asks
and set it up to contain labels. Link the the user to enter the name of the senior instructor
document to the data source 7.07 Student. who will sign the letter.
mdb using the query Qry Student Teacher.
Insert Word Field: Ask ?
2 Using merge fields, create a set of labels that
shows each student’s name, their class and Prompt:
their teacher. Which senior instructor will sign the letter?
3 Create a new word-processing document
that is linked to the Sales Rep table from
17.09 Sales processing.mdb. Use the mail-
merge labels feature to create a business
card for each sales representative. You can
create business cards instead of labels by
selecting a business card page layout from
the label options.

Ask once OK Cancel

17.2 Manipulating mail- Figure 17.12: Fill-in.

merge documents The Fill-In prompt rule can be viewed as a merge field
code.
We would be grateful if you could email us at
Create prompts [email protected] with your email address.
You can use master documents several times and on
many different occasions. There may be some data that Yours sincerely
needs to be included within the master document that
is not part of the data source but will change each time
the mail merge is run. A prompt can be given to the { FILLIN "Which senior instructor will sign the letter?" \o }
user. This is a question that asks them what the data Senior Instructor
should be.
Figure 17.13: Fill-in code.

KEY WORD When you process the mail merge, the user is
prompt: a question asked to the user which prompted for the name of the senior instructor.
requires a response
Microsoft Word ?
Which senior instructor will sign the letter?
Ben Dean

OK Cancel

Figure 17.14: Prompt.

383

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Note that Microsoft Word uses rules to control the way the same for every letter. However, by deselecting ‘Ask once’,
mail merge works. Fill-In is one of these rules. It is most you could have a different response for every recipient.
commonly used to ask for one item of data that will be the

PRACTICAL ACTIVITY 17.08

1 Open the master document 17.08 New class.docx to which you have added merge fields. Add a Fill-In
prompt for the name of the Head of Year.
2 Open the letter that you wrote for IT Distribution Inc. before you completed the mail merge process.
Add a Fill-In prompt for the date when the survey will close.

There are occasions when the same data needs to be Fill-In prompt. The Ask prompt stores the response
included more than once within a document. In these in a bookmark which can be placed in more than one
situations, an Ask prompt can be used instead of a location in a document.

WORKED EXAMPLE 17.09


17.13 Learner letter with ask prompt.docx You now need to reference the bookmark in the document.
prompt asks the user to enter the date by which the You can do this by inserting a reference point.
information should be returned. You will notice that
the difference from the Fill-In prompt is that the Ask
prompt needs a bookmark to be defined. This has
been defined as ‘ActionBy’. You will also notice that
the default text has been completed. This is necessary
in order to be able to reference the bookmark.

Figure 17.17: Reference point.

Here, you can see two reference points highlighted in


Figure 17.15: Ask. yellow that have been inserted.

You can view the Ask prompt rule as a merge field


code, but its location is not important because the
bookmark will be referenced in the required locations.

Yours sincerely

{ FILLIN "Which senior instructor will sign the letter?" \o } Figure 17.18: Reference point text.
Senior Instructor
{ ASK ActionBy "What date should the information be
returned by?" \d "Return Date Here" \0 }

Figure 17.16: Ask code.

384

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

CONTINUED
You can also view these as merge field codes.
Microsoft Word ?
What date should the information be returned by?
20 January 2017

OK Cancel

Figure 17.19: Reference code. Figure 17.20: Prompt.

When you process the mail merge, you are prompted If you look carefully at the field code for the Ask
for the information return date. prompt you will notice that it includes the name of the
bookmark. This can be useful in other ways because you
can reference the data by other rules in the same way
that data in fields can be referenced.

PRACTICAL ACTIVITY 17.09 Automatically select the


Open the master document 17.08 New class.docx. required records
You will already have added merge fields to this.
Instead of a Fill-In prompt, add an Ask prompt Data sources can often have thousands of records. The
for the name of the Head of Year and assign a document that is being produced may not need to be
bookmark. Insert references to the bookmark at merged with every record. It is therefore possible to set
the end of the document where the Head of Year conditions to select which records will be included in the
will sign and a new sentence that will inform the mail merge by using a filter.
parents who the Head of Year will be.
KEY WORD
filter: selecting records from the source file
based on conditions

385

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 17.10 WORKED EXAMPLE 17.11

17.14 Learner letter with filter.docx has filtered 17.15 Learner letter with sort.docx has sorted the
the records so that the letter will only be sent to male records by surname and if any surnames are the same
learners whose records haven’t been updated since then by forename.
1 January 2015.

Figure 17.23: Selecting sort order.


Figure 17.21: Filter.

The recipient list now only includes the filtered


records, so the letter will only be sent to those PRACTICAL ACTIVITY 17.10
recipients.
1 Open the master document 17.08 New
class.docx that you have added merge
fields. Set the filter so that the letter is only
sent to students in class 9F.
2 Change the filter so that the letter is sent to
students in classes 9F or 9B.
3 Change the order of merged letters so they
are sent to students in surname order. If any
students have the same surname, then they
should be sorted by forename.
4 Open the letter that you wrote for IT
Distribution Inc. Set the filter so that the
merged email is only sent to customers who
have agreed to receive marketing and live in
Figure 17.22: Filter records. the state of California (CA).
5 Change the order of the merged email so
they are sorted by postcode or ZIP code.

Sort the merged documents


The data source may not be sorted in the order in which
the user wants to merge the documents. Rules for managing document
content
Data sources are often fixed and cannot be changed.
Therefore, any data manipulation may need to take
place in the merge master document. The IF…THEN...
ELSE rule can be used to insert text conditionally based
on data within the data source.

386

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

The other option you can use is a nested IF...THEN…


WORKED EXAMPLE 17.12 ELSE rule. This involves using another IF...THEN...ELSE
17.16 Learner letter with condition.docx is to rule as the ELSE part of the original IF...THEN...ELSE
have a new sentence that asks users to confirm their rule. You can only manipulate this in field code view.
gender has been stored correctly. You can see here
how the IF statement was set up. TIP
Note that the nested IF...THEN… ELSE rule do
not work in Open/Libre office

WORKED EXAMPLE 17.14

17.18 Learner letter with nested conditions.docx


has used a NESTED IF by entering the IF...THEN...
ELSE rules within the ELSE parts of previous rules.

Figure 17.24: IF…THEN…ELSE.. Our records show that your gender is { IF { MERGEFIELD


Gender } = "M" "Male" }{ IF { MERGEFIELD Gender } = "F"
"Female" }{ IF { MERGEFIELD Gender } = "" "not recorded in
This can be seen in field code view as shown here.
our records – please confirm your gender" }.
Our records show that your gender is { IF { MERGEFIELD
Gender ] = "M" "Male" "Female" }. Figure 17.27: Nested IFs.

Figure 17.25: IF…THEN…ELSE code.


It achieves the same outcome as the previous example,
but is a bit more complex. The speech marks need to
be in exactly the right places, as do the curly brackets.
This will work for situations where there are only two You can use AND or OR operators within the IF...
alternatives. However, when more than two alternatives THEN...ELSE rule. You can also include text from
are required, you will need to use a different method. files as the outcome or pictures as the outcome. You
One option is to use a series of IF...THEN...ELSE rules may want to research how these can be achieved.
to cover each eventuality.

WORKED EXAMPLE 17.13


PRACTICAL ACTIVITY 17.11
Some records may not have the gender recorded. In
this situation, the letter should state ‘your gender is 1 Open the file 17.19 Vehicle Data Sheet.
not recorded in our records – please confirm your docx which has been merged with the Car
gender’. There are now three options: F, M or [blank] in table from 17.02 Driving School.mdb.
17.17 Learner letter with three conditions.docx. 2 Change the field for the Transmission so that
ELSE cannot be used because it would apply the it automatically displays ‘Manual’ instead of
second outcome to both of options two and three. ‘M’ and ‘Automatic’ instead of ‘A’.
Here, three separate IF...THEN...ELSE rules have
been used without defining the ELSE part. 3 Open the letter that you wrote for IT
Distribution Inc. Add a sentence that tells
Our records show that your gender is { IF { MERGEFIELD customers who live in California (CA) that
Gender } = "M" "Male" }{ IF { MERGEFIELD Gender } = "F" they have a special discount. If they live in
"Female" }{ IF { MERGEFIELD Gender } = "" "not recorded in
California then the sentence should read
our records – please confirm your gender" }.
‘As you live in California, you are entitled
Figure 17.26: Separate IFs. to a special 10% discount until the end of
this month.’

387

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Rules for selecting recipients CONTINUED


One method of deciding which records will be included a Add a rule to skip records for customers
from the data source is to use a filter. Another method who have chosen not to receive
you can use is a rule, which is a merge field code that will marketing (this is a Boolean field that
control which records will be omitted. The rule is called can be TRUE or FALSE).
SKIP IF and this will omit the record from the mail
merge if the conditions are met. b Add additional rules to skip records for
customers who are based in New York
(NY), California (CA) or Texas (TX).
WORKED EXAMPLE 17.15
17.20 Learner letter with selection codes.docx
includes a SKIP IF rule that states that if the gender
field is equal to “M” then the record should be
skipped. 17.3 Arithmetic
Insert Word Field: Skip Record If ? operators
Field name:
Gender There are occasions when the merged data needs to have
Comparison: a calculation performed on it. For example, a discount
Equal to might be offered when writing or the tax might need
Compare to:
M
to be calculated on a price. It may not be possible to
perform this calculation within the data source itself
OK Cancel
and so a calculation can be performed on the merge
field. When a calculation is performed, it is known as a
Figure 17.28: Skip If set up. calculated field.

SKIP IF a rule is inserted into the document.


KEY WORD
calculated field: an arithmetic calculation on a
Figure 17.29: Skip If code. field from the data source

The rule should always be inserted at the beginning of the WORKED EXAMPLE 17.16
document. When using Microsoft Word, you will need to
complete the merge to see which records have been skipped The file 17.21 Instructor letter with calculation.
as they will still show when previewing the merge. docx has been merged with the Instructor table from
17.09 Sales processing.mdb.
PRACTICAL ACTIVITY 17.12

1 Open the master document 17.08 New


class.docx.
a Add a rule to skip records for class 9B.
b Add a second rule to also skip records
for class 9F.
2 Open the letter that you wrote for IT
Distribution Inc. and remove any filters that Figure 17.30: Instructor letter.
you have applied.
The formula option has been selected and a formula
added to multiply the charge by 0.2. The number format
has been set to currency with two decimal places.

388

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

CONTINUED CONTINUED
The merge codes can be hidden (ALT+F9) to view the
result of the calculation.

Figure 17.35: Preview of calculation.


Figure 17.31: Setting up a calculated field.

This initially gives an error because ‘charge’ doesn’t


mean anything. PRACTICAL ACTIVITY 17.13

1 Open the file 17.19 Vehicle Data Sheet.docx


which has been merged with the Car table
from 17.02 Driving School.mdb.
2 Add a calculated field that states when the
Figure 17.32: Bookmark error. MOT (vehicle safety test) is due. The MOT
is due three years after the vehicle was
The field codes can be edited using Alt+F9 and the registered.
Charge merge field can be inserted in place of ‘charge’ 3 Open the file 17.21 Instructor letter with
within the calculation. calculation.docx which has been merged
with 17.09 Sales processing.mdb.
4 Add a sentence and a calculated field that
tells the driving instructor their maximum
number of hours available during weekdays
(multiply the Max Hours by five).
5 Challenge: add a sentence and a calculated
field that tells the driving instructor their
maximum number of hours available during
the week. This should include weekends for
those who have opted to work weekends (if
Figure 17.33: Including a merge field in a calculation. Weekends field set to TRUE).

The merge field is now included within the calculation.

Statement of Tax Date and time fields


Your hourly charge is £{ MERGEFIELD Charge } You can include the current date or time in a document.
This doesn’t have to be a merged document but can be
The amount of tax we collect from this is { ={ MERGEFIELD any document. Each time you open the document or
Charge }*0.2 \# "£#,##0.00;(£#,##0.00)" }
the field is refreshed, the current date or time will be
Figure 17.34: Calculated field with merge field. displayed.

389

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 17.17


17.4 Document properties
You can choose a variety of date and time formats. Properties of the document can be included
Ticking the Update automatically option will ensure automatically including:
the date or time is automatically updated.
• filename
• author
• document title
• creation date
• number of pages.

PRACTICAL ACTIVITY 17.15

Open a word-processing file that you have


created and that includes more than one page.
Experiment by adding the document properties
into your document.

Figure 17.36: Inserting a date field.


Embedding data
You can embed data from another document.
Embedding means that the data remains in the original
PRACTICAL ACTIVITY 17.14
source document but can be shown in a word-processed
1 Open the file 17.19 Vehicle Data Sheet. document. Any changes you make to the source
docx which has been merged with the Car document will be automatically updated in the word-
table from 17.02 Driving School.mdb. processed document.

2 Add a sentence that states the date and


time the document was printed, for example KEY WORD
‘This document was printed on <<date>>
at <<time>>’. The date and time should embedding: importing data from a data source
automatically update. so that any changes to the data source are shown
in the new document
3 Open the letter that you wrote for IT
Distribution Inc. Add the current date to the
beginning of the letter so that it updates
automatically. Embedding tables
You can embed data in tabular format within a
document. Any changes you make to the data in the
data source will be updated in the document.

390

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

WORKED EXAMPLE 17.18 WORKED EXAMPLE 17.19


17.22 Attendance Report.docx is a report that has 17.22 Attendance Report.docx is a report that has
been written to summarise the attendance of students been written to summarise the attendance of students
in a school. The attendance data has been embedded in a school. The chart showing attendance data has
from the spreadsheet 17.23 School attendance.xlsx. been embedded from the spreadsheet 17.23 School
attendance.xlsx. Here is the chart.

Figure 17.37: Paste and link.

Any changes you make to the selected data in


17.23 School attendance.xlsx will be updated
automatically in 17.22 Attendance Report.docx
the next time it is opened. Figure 17.39: Embedding a chart from a spreadsheet.

You can also update the data while the main Any changes you make to the chart in 17.23 School
document is open by clicking Update Link. attendance.xlsx will be updated automatically in
17.22 Attendance Report.docx.

PRACTICAL ACTIVITY 17.16

1 Create a new word-processing document.


Write a brief report summarising the results
of the votes for head prefect at your school.
The report should include embedded data
from the table in 17.24 Graphs and charts.
xlsx and an embedded pie chart from the
same data source.
2 Save and close your report.
Figure 17.38: Updating embedded data.
3 Open 17.24 Graphs and charts.xlsx and
change the number of votes for Adrian
Smith from 4 to 40.
4 Save and close the spreadsheet.
Embedding charts
Similarly, you can embed data into a document from 5 Reopen your report and check that the data
a graph or chart. Any changes to the original graph or and chart have updated automatically to
chart will be updated automatically in the document. show 40 votes for Adrian Smith.

391

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• printing a copy of the document to read it instead


17.5 Error-free accuracy of reading it on screen

and proofreading • reading the document out loud so errors that may
not be spotted visually are heard
You should carry out a number of checks before • using a blank piece of paper to cover up the rest
completing a mail merge. of the document so each line can be checked
• Run a spell check and grammar check on the individually
master document. • searching for common errors such as ‘there’ instead
• Visually check for any errors on the of ‘their’.
master document. Even if you run a spell check, it may not spot all the
• Visually check for any errors on the preview or errors. These can include words that sound the same
merged documents. but are spelt differently, for example, stationery and
stationary. The spell check will not be able to identify
• Check that the correct records have been included problems with layout, such as spaces that are missing
in the filter. or have been added by mistake. Errors in names are
Visual checking could include: not spotted by a spell check and field codes will not be
checked by the spell check. A visual check will also be
• reading the document from start to finish to see if required to see if all merge fields have been included.
there are any errors in grammar or spelling

WORKED EXAMPLE 17.20


17.25 Learner letter with errors.docx includes several errors.

Figure 17.40: Errors.

The grammar and spell checks have spotted some errors: ‘a anual’ should be ‘an annual’, ‘wood’ should be ‘would’
and ‘greatful’ should be ‘grateful’.
The errors highlighted in yellow require visual checking as the grammar or spell checks have not identified them:
‘record’ should be ‘records’, ‘you’re’ should be ‘your’ and ‘Deane’ should be ‘Dean’.

392

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

CONTINUED
The errors highlighted in blue also require visual checking but these may not be spotted until data is actually
merged. Here, you can see what the data would look like when merged.

Figure 17.41: Merge errors.

There is no space between the forename and surname and there is an additional space after the mobile number.
The criteria for the filter are that letters should be sent to male learners whose records haven’t been updated since 1
August 2015. This should mean letters going to 11 learners. However, only four letters will be produced.

Gender Telephone Mobile Licence number Date updated


M 0555 555 511 0777 777 720 KRIS9999999PA9XX 5/24/2014
M 0555 555 513 0777 777 718 SARR9999999DA9XX 5/24/2014
M 0555 555 516 0777 777 715 DRAK9999999RA9XX 5/24/2014
M 0555 555 526 0777 777 774 LANT9999999PE9XX 5/6/2014

Figure 17.42: Filter errors.

This has been spotted using a visual check. The error was due to the filter requiring an American layout of date
which should be 8/1/15, rather than 1/8/15 that had been used. When corrected, the 11 learners are included.

Gender Telephone Mobile Licence number Date updated


M 0555 555 557 0777 777 724 HARI9999999RA9XX 6/8/2015
M 0555 555 511 0777 777 720 KRIS9999999PA9XX 5/24/2014
M 0555 555 512 0777 777 719 SMIT9999999SA9XX 6/8/2014
M 0555 555 513 0777 777 718 SARR9999999DA9XX 5/24/2014
M 0555 555 516 0777 777 715 DRAK9999999RA9XX 5/24/2014
M 0555 555 517 0777 777 714 BLAC9999999SA9XX 6/8/2014
M 0555 555 518 0777 777 713 DREW9999999JA9XX 6/8/2014
M 0555 555 519 0777 777 712 BROW9999999DA9XX 6/8/2014
M 0555 555 523 0777 777 777 PETE9999999PA9XX 6/8/2014
M 0555 555 525 0777 777 775 HARR9999999PA9XX 6/8/2014
M 0555 555 526 0777 777 774 LANT9999999PE9XX 5/6/2014

Figure 17.43: Filter correction.

393

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 17.17

1 Open the master document 17.26 New class errors.docx. Check the master document and merged
letters for accuracy. The merged letters should be sent to students in classes 9F or 9B.
2 Change the filter so that the letter is sent to students in classes 9F or 9B.

REFLECTION

1 How long would it take you to write 100 personalised letters to customers without using mail merge?
2 What do you think are the advantages of using mail merge?
3 How could you apply what you have learnt about mail merge to your life? Are there any occasions for
you when mail merge might be useful, for example in your social life?
4 When you created a mail merge document, did you make any errors? If so, what did you do to
correct them?

REVIEW PRACTICAL ACTIVITY

1 Create a new word processing document and link it to the Product table in 17.09 Sales
processing.mdb
2 Create a product information sheet using mail merge fields from the Product table. The product
information sheet should include the Product ID, Product Name, Quantity Per Unit, Unit Price, Units in
Stock, Reorder Amount, Units on Order and Reorder Level.
3 Sort the data so that it will be merged in order of Product Name.
4 The product information sheets should only be printed for stock that has NOT been discontinued.
5 At the top of the product information sheet should be the date the sheet is printed. This should
automatically be the current date.
6 At the bottom of the document should be the name of the person who printed the document. This
should be populated using the word field FILL IN.
7 Use the word field SKIP IF to skip any products that are in Category ID 3.
8 If the Unit Price is above $60 then the phrase ‘HIGH VALUE ITEM’ should be displayed.
9 The Sale Price should be displayed. The Sale Price is 30% on top of the Unit Price.
10 The total value of stock for each product should be displayed.
11 Merge the product information sheets to a new document.

394

Copyright Material - Review Only - Not for Redistribution


17 Mail merge

EXAM-STYLE QUESTIONS
1 Service to You is a company that carries out car servicing at the customer’s home address. They store
details in a database of the services they have carried out and when the next service is due. When a
customer’s car is due a service, Service to You use mail merge to write a letter to the customer to let
them know.
a Describe the term mail merge. [2]
b Describe the steps involved in creating a set of mail merged letters. [6]
[Total 8]
2 Service to You sends out letters once a month.

Explain how Service to You can use mail merge facilities to only send letters to customers whose cars
are due a service in the next month. [4]
3 Amin has used a word processor to send mail merged invitations for his party to his friends. Describe
how he could proofread his invitations. [4]
4 Sharene has written a report to her manager to show the sales figures for members of her team. She
has embedded a graph in her report. Describe the term embedding. [2]

SUMMARY CHECKLIST
I can use, create and edit source data using appropriate software.
I can create a master document structure.
I can link a master document to a source file.
I can specify rules for:
selecting recipients
managing document content.
I can set up fields for:
manual completion
automatic completion.
I can use calculated fields.
I can use manual methods and software tools to ensure error-free accuracy.
I can perform mail merge.

395

Copyright Material - Review Only - Not for Redistribution


Chapter 18

Graphics
creation
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• use common graphic skills
• work with layers
• use transform tools
• use grouping or merging tools
• use alignment and distribution tools
• use layout tools
• use colour picker tools
• use crop tools
• know and understand the properties of different colour systems
• know and understand the need for different image resolutions
• know, understand and select different bitmap and vector file formats
• export an image in different file formats
• change the opacity of all or part of an image.

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

CONTINUED
• use vector images
• create a vector image that meets the requirements of its intended application and audience
• use vector drawing tools
• use selection tools to select parts of a vector image
• use fill tools to colour elements
• use node and path editing
• convert bitmap images into editable vector shapes.
• use bitmap images
• use selection tools to select parts of a bitmap image
• adjust colour levels
• use tools/filters to alter parts of an image
• resize an image/canvas
• know and understand the effects of different methods of compression on images.
• manipulate text
• select font style
• fit text to path or shapes
• set text in a shape
• convert text to curves.

BEFORE YOU START

• Do you know the differences between bitmap and vector images?


• Have you had some experience of creating images and changing images through software such as
Microsoft Paint?

draw the image and fill areas with colour. If you change
Introduction the size of the image, the computer recalculates and
redraws it. This means it does not go blurry (pixelate).
In this chapter you will learn about image editing,
The image itself is not saved. Only instructions on how
including the difference between vector and bitmap
to create the image are saved. For example, coordinates
images. The skills you need will be introduced using the
for a line and a calculation for drawing the line are
photo-editing software Adobe Photoshop.
stored, including the colour, width, and so on.

18.1 Type of images KEY WORD


vector: an image that uses geometric points and
Vector images shapes; calculations are used to draw the image
A vector image is created using shapes and coordinates.
Mathematical formulas and calculations are used to

397

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

KEY WORDS
bitmap: an image made up of small squares,
called pixels; each individual pixel can only be
one colour
pixel: a small square of one colour; these are
combined to create a bitmap image

Figure 18.1: A vector image.

Figure 18.3: A bitmap image.

Figure 18.2: An enlarged vector image.


Figure 18.4: A pixelated bitmap image.

Bitmap images
A bitmap image is made up of small squares called
The use of vector and bitmap
pixels. Each pixel can have one colour. If you change images
the size of the image, the pixels are enlarged or made
smaller. By enlarging the pixels you pixelate an image The most common form of a bitmap image is a
and it goes blurry. photograph. When you take a photo, the camera
records the colours as pixels and the quality of an
image depends on the resolution. Other common

398

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

bitmap images include ones that have been scanned,


or produced using painting software. Resolution is the
number of pixels per measurement, for example dots
per inch (DPI). The larger the DPI, the more pixels and
therefore the more precise your image is.
Different images have different requirements for their
resolution. If an image is going to be small and will
not need enlarging then a smaller resolution will be
acceptable. If you are going to enlarge an image to
allow you to see more detail, then you need to have a
higher resolution otherwise it might pixelate if it is a
bitmap image.
The resolution also impacts the file size of the image –
the higher the resolution, the larger the file size. This is Figure 18.5: A graphics tablet.
important if you have limited storage space, or if you
are uploading images to a website. The larger the file size
is, the longer it will take to download the image. Deciding between vector or
Selecting a resolution depends on both the image
requirements and the file size. For example: A bitmap bitmap graphics
photograph is taken that has a resolution of 1600 × 1200 If you scan a document (for example a photo), then you will
pixels. Each pixel is 2 bytes in size, so the image will take create a bitmap image. As increasing the size of this image
up 3.84 megabytes. may result in pixelation, you must be careful to ensure the
One possible use: the image is going to be modified resolution is high enough. These pictures cannot be created
and then enlarged to print as a posted. This image will as vector images, so if you want to use a photo of you and
need a high resolution because it needs the detail and your friends, it will be a bitmap graphic.
is going to be enlarged. The file size is not necessarily
relevant here.
KEY WORD
A second possible use: the photograph will be uploaded
to a website for other people to view and then purchase. pixilation: when a bitmap image is enlarged, the
The full detail is not necessarily required here, it is pixels are enlarged and become visible causing
more important that users can download it, and to save the image to appear blurry
storage space on the server. Therefore the resolution
could be lowered.
If you are creating a graphic using a computer, then
you can choose between a bitmap and a vector image.
KEY WORDS If you produce a bitmap image, such as a photo, it may
pixelate when enlarged. If you produce a vector graphic,
DPI/dots per inch: the resolution of an image
it will not pixelate but will require a lot of work to look
realistic.
Vector graphics are created using a computer, often with Software exists that can turn bitmaps into vectors,
specialist drawing software, but word processors usually and vectors into bitmaps. For example, if you
provide some vector tools, such as drawing shapes and scan a document, you can vectorise it. Most image
speech bubbles. They could be used, for example, to manipulation software has this option.
create a logo or an animation where characters can be
drawn using a graphics tablet.

399

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 18.01

Open some of the images you have stored on


your computer or on your account. Are they a
bitmap or a vector image? Try enlarging them.
Do they pixelate?

The use and impact of image


editing on society
This section explains some of the tools available to
manipulate images. These tools can be used to edit
images to both improve the image and make the image
look worse. For example, in magazines, photos may be
edited (airbrushed) to make people appear thinner or to
remove blemishes, such as wrinkles and spots.

Figure 18.7: An example of a meme.

These are just two examples of how image manipulation


can be used. Each have their positive and negative
aspects. In the first example in Figure 18.6, the company
using the image may increase sales by showing a perfect
Figure 18.6: An example of airbrushing. model. However, the image is not real and people
may strive to achieve this impossible vision. This can
contribute to mental-health problems. Memes can be
Another way image manipulation software may be
used to draw attention to an advert or create humorous
used is to put people in scenarios (for example memes)
effects, but they can also be used negatively,
that have never actually happened. For example, using
a selection tool to copy a person from one image and to make fun of people and situations and may be used
place them in another. The image of the person can be without the consent of the person in the image.
edited, and the colours manipulated, so they appear to Image editing can be used in politics both to promote a
belong in the new scene. political agenda, for example enhancing images so they look
Vector images can be used on their own or added more favourable, and to put people into situations where
to a bitmap image. For example in the meme shown they have not actually been. Image editing may mean that
in Figure 18.7, vector text has been added to the false versions of real events can be presented in a positive
bitmap photo. way in order to mislead the audience intentionally.
Image editing can also be used in a negative way, to put
opposing party members in unfortunate situations or to
use memes to mock them, which can cause offence and
influence people by creating images that are not real.
As well as being used for political purposes, image
editing can also be used in the entertainment industry.
Image editing is used to create posters, signs, CD and
DVD covers, all of which are enhanced to increase their
attractiveness and appeal. This can increase sales as the
images are attractive, but it does not portray an image of
real life.

400

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Questions
1 Describe bitmap graphics.
2 Describe vector graphics.
3 State two advantages of vector graphics
over bitmaps.
4 Explain the problems associated with image
manipulation on society.

18.2 Common graphic Figure 18.9: New layer symbol.

skills To delete a layer drag the layer, using the left mouse
Layers button, to the bin.

Layers contain parts of an image, or an effect, that can be


built up on top of each other to create the final image. By
using layers, you can move or edit elements of an image
independently without affecting other elements of the
image. Imagine that each layer is an individual piece of
paper and you can move them above and below each other.

KEY WORD
layer: a ‘surface’ onto which an image or object
is placed; each object is placed on a separate
layer and they are stacked on top of each other
Figure 18.10: Bin symbol.
(as though on different pieces of paper)

The layer that is on the top is in front. In this example


On the right-hand side of the screen is the layers menu. the blue ellipse is in front of the rectangle, because the
layer is higher up.

Figure 18.8: Layers menu. Figure 18.11: Ranking of layers.

To create a new layer, click the new layer symbol, then To reverse these, and make the red rectangle come to the
double click the layer name to change it. front, drag it above the circle layer.

401

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Transform tools
Transform tools are used to change the size, rotation,
distortion and skew of an item.
To transform an item, you first need to select its layer
and then the part of the object you want to change. You
can do this using any of the selection tools, for example,
lasso, magic wand, rectangle select tool.

Scale/resize
Scale, or resize, lets you change the size of an object to
make it larger or smaller.
Once you have selected the object, click Edit from the
Figure 18.12: Ranking of layers (reversed). top menu, then Transform and Scale.
The squares will appear on the object and you can drag
To raise a layer, drag it one position up. these to resize the object.
To lower a layer, drag it one position down.
Move
To bring to front, drag the layer to the very top.
This tool lets you move the shape you have selected.
This allows you to order layers. Click the Move tool from the toolbar, then drag the
An alternative way is select the layer, then from the top shape to where you want it.
menus select Layer, then Arrange. In this menu there
are options to bring forward (raise), send backward Flip
(lower), bring to front, and send to back. This lets you create a mirror image of the shape, either
horizontally or vertically.
PRACTICAL ACTIVITY 18.02 From the top menu select Edit, then Transform.
There are two options: Flip Horizontal and Flip
1 Create two layers and draw an image in each
Vertical. Click one of these to flip the object.
layer. Move the layers to change the order.
2 Open a background image, for example, Shear/skew
scenery such as a forest. Add new images Skew allows you to edit the edges of a shape while
such as additional trees, objects such as keeping it in proportion. For example, here the rectangle
buildings and/or people in new layers. has had both of its edges skewed,
Position the layers so that the new objects
are in front of the background.
3 Open 18.01 Background.jpg in your
image manipulation software. You may
need to convert this to a different file type
depending on the software you are using.
Figure 18.13: Skewed rectangle.
Add a new layer to this image and use the
drawing tools to add shapes, lines, and so
on to the image. Use the drawing tools to Skew is in the Edit – Transform menu. Once selected,
draw a new tree or flower or other feature. move the squares on the object to skew the object.
Change the shapes, move them, delete
them; the background layer should not Rotate
change. Add further layers with additional This lets you turn a shape. Click the Edit menu then
shapes or objects. Transform and select Rotate. Put your cursor near the
corner of your object and you can free rotate it.

402

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Grouping or merging To align objects, first select them and then from the top
menu choose Layer, Align and then one of the options.
When creating an image, you may have multiple items
(objects or shapes). These can all be moved individually,
which can cause problems when you need them to KEY WORD
stay together. You can group or merge items, which
align: make objects start at the same position
combines them into one item that can be moved and
resized together.
To group two or more objects, click one object, hold
down shift on the keyboard and select the other object;
they will now become one. To ungroup the objects, click
elsewhere on the screen and they will be separated.
Flatten will combine all of the separate layers in an
image into one layer. To do this, right click one of the
layers and choose Flatten Image.

KEY WORDS
group: join several images together
flatten: merge all layers into one single layer Figure 18.14: Align menu options.

Distribute
PRACTICAL ACTIVITY 18.03 Distribute works on layers. It evenly spaces out the three
(or more) layers selected, based on horizontal or vertical
1 Using the image you manipulated in distances.
Practical Activity 18.02, select all the items
you added in one layer (for example your
drawing of a tree) and group or merge them. KEY WORD
The item should now move as one, rather
distribute: make the space between
than as separate components.
objects the same
2 Rotate one of the items you have added in a
layer in Practical Activity 18.02, for example To use Distribute, highlight at least three layers. Select
a tree. Move it to a new location. the Layer menu, then Distribute and choose which
3 Insert the bench from 18.02 Bench.jpg into edge you want the distribute to use.
the background on 18.01 Background.jpg.
Resize the bench and move it into a
suitable position.

Alignment and distribution


tools
Align
This allows you to make two or more objects start at a
set point, for example at the top, the left, the bottom or
the right.
Figure 18.15: Distribute menu options.

403

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Layout tools Grids


You can put a grid on the background of the image
Rulers to help you align objects by using the lines to position
You can view a ruler on the horizontal and vertical axes them. The grid does not appear on any printout or
of the screen. This lets you see how large an object is exporting of the image, it is purely to help you create
in inches. the image.
To turn rulers on and off select the View menu and then To turn the gridlines on or off, select the View menu,
click Rulers. The tick indicates that rulers are visible. then Show and then Grid.

Figure 18.16: Ruler on/off options.

Figure 18.18: Grid options.


Rulers can be in cm, inches or pixels. To change the
measurement, double click one of the rulers and then
choose the units you want.

Figure 18.17: Ruler measurement unit options. Figure 18.19: Image with grid options.

404

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Guidelines WORKED EXAMPLE 18.02


You can set a line at a specific point, for example at 3.5
inches in. These can then be used to align objects and Set the shapes to snap to meet the gridlines.
make sure you are drawing images of the correct size. First click View and then if Snap is not ticked, click it.
When you want more freedom, click on the Snap
WORKED EXAMPLE 18.01 button again to untick it.
Set a guideline
Create a new vertical guideline.
First click the View menu and then New Guide.
Then select Vertical from the new menu. Enter the
position where you want the guideline to appear, in
this case at 3.5 inches. Then click OK.

Figure 18.20: Vertical guideline option.

Snapping
Snap tries to help you by only allowing you to adjust,
or draw, an object to meet gridlines. If you want more
freedom to edit or draw the objects, you will need to
turn snap off.

Figure 18.21: Snap options.

Crop tools
Cropping lets you select only part of an image to keep
and removes everything else. To do this, select the crop
tool from the menu and then drag the corners of the
image in to show only the area you want to keep.

405

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

In Adobe Photoshop the amount of each colour is


WORKED EXAMPLE 18.03
represented by a two-digit number, from 0 to F. This is
Crop the image so only a square from the centre of called hexadecimal, the higher the number, the more of
the image is produced. that colour is present. The letters are used to represent
two-digit numbers, so A = 10, B = 11, C = 12, D = 13,
First click on the Crop button on the left hand menu. E = 14 F = 15. So to have as much of one colour as you
Adjust the size of the box by clicking on the edges or possibly can have, use FF. To have absolutely none of
corners. the colours, use 00.
Sometimes the numbers are replaced with whole
numbers between 0 and 255. The most of a colour is
255, which is equivalent to FF. None of a colour is 0,
equivalent to 00.
RGB colour codes are RRGGBB, which is the amount
of red, then green, then blue. Look at this colour code:
FF0000. This shows RR = FF (the highest), and no
green or blue. So the colour is red. There are lots of
colour mixers online to try.

KEY WORD
RGB: Red/Green/Blue colour system; all
Figure 18.22: Cropping. colours are a combination of quantities of red,
green and blue
When you have a square in the centre of the screen,
click Enter to complete the crop.
HSL
HSL stands for Hue–Saturation–Lightness.
PRACTICAL ACTIVITY 18.04

Using 18.01 Background.jpg, crop the bottom KEY WORD


layer of soil from the image and the top of HSL: Hue/Saturation/Lightness colour system; all
the sky above the clouds. Make sure you have colours are a combination of the hue saturation
the correct layer selected before you begin, and lightness selected
otherwise you will crop the wrong image.

The Hue represents the base colour (red, yellow, green).


The saturation is the % of that colour being used,
Colour systems (RGB, HSL, with 100% being the highest. Lightness is a % from
white to black.
CMYK, CMS)
For example, this is hue 100, with 50% saturation and
A colour is developed by combining different colours in
50% lightness.
different quantities.

RGB
In school you have probably learnt about the primary
additive colours, Red, Green and Blue. Every colour
can be created from combining these colours in different
quantities.
Figure 18.23: Hue 100, with 50% saturation and 50%
lightness.

406

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Increase the saturation to 100% CMYK


CMYK stands for Cyan–Magenta–Yellow–Black. These
are the colours usually used by printers. Your printer
will probably have a cartridge (or toner) for each of
these four colours. By mixing these four colours you can
create any colour.

Figure 18.24: Hue 100, with 100% saturation and 50%


KEY WORD
lightness.
CMYK: Cyan/Magenta/Yellow/Black colour
Now increase the lightness to 95% (100% would make it system; all colours are a combination of these
white and invisible) four colours

Each colour is given a number as a percentage from 0 to


100, as to how much of the colour is included.

CMS
Figure 18.25: Hue 100, with 100% saturation and 95% This is not a colour itself, but a CMS (Colour Matching
lightness. System). This is a way that a piece of software can select
a colour from an image and reproduce it. For example,
You can represent every colour using different values for if you have an image of a car and you want the shade of
hue, saturation and lightness. red used in the car, you can click the colour and find out
what its RGB/CMYK values are and then use this later.

Questions Adobe Photoshop has the magic wand tool that lets you
click a colour and then use it elsewhere.
5 What do the letters RGB stand for?
6 What colour will FF0000 create? Colour picker tools
7 What colour will 00FF00 create? Colour options appear in a sidebar. Click the small
8 What colour will 0000FF create colour square.
9 What colour will 000000 create?
10 What colour will FFFFFF create?

PRACTICAL ACTIVITY 18.05

Generating colours
Find a colour generator online and try
experimenting with HSL.
Enter some numbers and try and guess what
colour will appear.
Work as a pair and test each other, give your
partner the numbers for a colour and ask them
what colour they think it will produce.

Figure 18.26: Colour options.

407

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

In the new menu you can manually select the colour The image has to be viewed in some way such as on a
based on the RGB and CMYK, and HSB (B for screen, or printed out. However, screens and printers
Brightness instead of Lightness). have their own maximum resolutions so the resulting
resolution is limited by the hardware being used to display
or view it regardless of how much detail is in the image.
To change the resolution in Adobe Photoshop you need
to change the size of the image. Click Image on the top
menu bar and then Image Size.
You can then change the width and height of the image,
and also the resolution. The larger the number, the more
pixels there are per inch.

Figure 18.27: Colour options – manual selection.

You can also use the eyedrop tool to select a colour.


Click the tool from the menu, and then on the colour
you want to select and it appears in the colour menu.

Figure 18.29: Width, height and resolution options.

File formats
There are a range of file types you can use to save your
image. These can be selected by choosing an option
when saving or exporting the image. Some of these are
in the table 18.1:

Figure 18.28: ‘Eyedrop’ colour selector.


File Image Description
format type
Image resolutions .BMP Bitmap Bitmap Image: There are
a range these formats, for
The image resolution is the amount of detail that is example black and white, 256
within an image: the number of pixels per inch. The colours, four-bit (16 colours),
more pixels you have, the more individual pieces of eight-bit (256 colours). The
detail you can have. However, this has an impact smaller the number of colours,
on other areas. The more pixels you have, the more the smaller the file size, but the
information you have to store, so the file size is larger. quality also decreases.

408

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

File Image Description TIP


format type
.GIF Bitmap Graphics Interchange Format: When choosing a file type, do not overwrite
This is a compressed format the original file as, if the compression reduces
that will reduce the file size and the quality, you may be unable to retrieve the
is commonly used for online original. Save it under a new name.
images. This format allows for
transparency, as long as it was There are two ways you can change the format. The first
not created using an alpha is to Save As and select a different file type.
option, and is also restricted to
256 colours. The second is to Export the image. Click File then
Export As to give you the options of PNG, JPG,
.JPEG Bitmap Joint Photographic Experts and so on.
Group: This is a common
format that has a range of
colour options to reduce file PRACTICAL ACTIVITY 18.06
sizes. The image is compressed
when saved and decompressed Open an image you have already created. Save,
when opened. The level of or export, the image in each of the different file
compression can often be types. Compare the images and look at what the
altered to gain a balance of differences are.
compression versus quality. This
type of image does not allow
for transparency. Any areas that Questions
are transparent will be stored as
white or black. 11 Name three bitmap image formats.
.PNG Bitmap Portable Network Graphics: 12 Name one vector image format.
This format uses lossless
compression to reduce the
file size. It has a range of
Opacity
colour options, and it keeps Opacity means a lack of transparency, that is how
transparency in all images, which solid and non-see-through the image is. Opacity is a
is not the case for all other percentage, which represents how transparent an image
options. is. For example, 20 per cent opacity means that the
.TIFF Bitmap Tagged Image File Format: image is 80 per cent transparent. This can be added as
In this format, the number of a mask to the entire image, or a small area of an image
colours can be adjusted to can be selected (using an appropriate selection tool) and
reduce the file size. This file then the opacity can be altered just in this area.
type can save effects, such as
the use of layers, if saving and
KEY WORDS
reopening an image in the same
software. opacity: the lack of transparency of an image; at
.SVG Vector Scalable Vector Graphic: It 0% opacity the image is fully transparent
supports animations.
transparency: being able to see through an
.PDF Vector Portable Document Format: object or surface
This is a format used by Adobe
products. It keeps documents
as they were designed but in a You can change the transparency (opacity) of a layer
common format. by selecting the layer in the layer menu, and then using
the drop-down menu next to Opacity and the slider to
Table 18.1: File formats. adjust the value.

409

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

18.3 Vector images


Vector drawing tools
Freehand drawing
There are a range of freehand drawing tools, all selected
from the Brush Tool menu. Hold the left mouse button
down on the menu to see the additional options.

Figure 18.30: Opacity option.

WORKED EXAMPLE 18.04

Change the opacity of the magenta rectangle, so that


the green rectangle can be seen through it.
First click on the layer for the magenta rectangle.

Figure 18.33: Freehand drawing tools.

Once you have selected your tool, and colour from the
right-hand menu, draw your image on the canvas.

KEY WORD
canvas: the area in the software where you add
and edit your images

Figure 18.31: Layer option for magenta rectangle.

Click on the opacity button and drag the arrow to the Bezier curves
left. Watch the magenta rectangle as you move it to Bezier curves are named after the person who developed
get the transparency you need. the now common way of drawing arcs in a computer.

KEY WORD
bezier curve: smooth curves made of paths that
can be scaled indefinitely

A curve is created using the Curvature Pen Tool to


draw a straight line first.

Figure 18.32: Transparency slider for layer.

410

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Figure 18.34: Pen tool menu.

Figure 18.36: Line tool.


Then select a midway point on the line and drag it
outwards to create a curve.
Shape tools
The Shape menu has inbuilt shapes to allow you to draw
rectangles, ellipses (e.g. circles) and polygons.
Arcs, stars and other shapes such as arrows are all
accessed from the Custom Shape Tool option. The
drop-down menu gives other options such as arcs, stars
and spirals.

Figure 18.35: Curve ‘mid’ point.

Straight line
To draw in Adobe Photoshop hold the left mouse button
down on the Shapes Tool and select Line Tool.

Figure 18.37: Custom shape tool.

Selection tools
A selection tool lets you access, edit and manipulate just
one part of an image. You can choose which parts to
change. There may be a range of different tools that you
can access depending on your software. For example, the
Lasso Tool lets you draw freehand around the area of
an image you want to select. Hold the left mouse button
down to select the area.

411

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

TIP
When making your selection, make sure you
are on the correct layer. If not, then you will be
selecting that area of a different layer, which will
not give you the image required

PRACTICAL ACTIVITY 18.07

Use a selection tool on 18.01 Background.jpg.


Select one of the trees. Create a new instance
of this object (copy and paste it into a new
layer), then use the Transform tools to adjust its
Figure 18.38: Lasso tool.
position and size. Repeat this with the bench in
18.02 Bench.jpg.
A Rectangular Marquee Tool provides you with a
shape, such as a rectangle, that you can ‘draw’ over your
image to select a rectangular area.
Fill tools
A Fill Tool lets you select a colour, then fill a selected
area with that colour. For example, if you select red,
then the Fill Tool, then click inside a rectangle, it will
change the rectangle to red. Some software may require
you to select the Fill Tool, then the colour.
To fill an image, select the Fill Bucket Tool,
choose your colour and then click the image you want
to change.

Figure 18.39: Selecting a rectangular area.

A Magnetic Lasso Tool will stick to an edge within


an image, for example a line or a specific colour, which
means you don’t need to follow the line precisely.

Figure 18.41: Fill tool options.

Fill gradient lets you select two colours and Adobe


Photoshop will change the colour from one to the
second. First you need to select the area that you want
the gradient to be applied to, for example using the
Figure 18.40: Magnetic lasso selection tool. rectangle select tool.

412

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Select the first colour, and then the second.


Node and path editing
First colour Second
Existing shapes
Shapes are made up of nodes (points that can be edited)
and paths (between nodes). You can change these by
right clicking an object and selecting Warp. This shows
you the nodes and, by dragging these with the left mouse
button, you can change the shape.

Figure 18.42: Colour gradient options.

There are a range of pre-set gradient fills that you can


select from. Once you have chosen the Gradient Fill
Tool these appear at the top of the screen.

Figure 18.44: Warping option.

PRACTICAL ACTIVITY 18.09

Select the nodes on one of the mountains on


18.01 Background.jpg. Manipulate the shape
of the mountain. Make it higher and change the
angles of each side. Repeat this with the copy of
a tree you have made and change the shape of
Figure 18.43: Pre-set gradient fills. the trunk.

PRACTICAL ACTIVITY 18.08 Pen tool


If you use the Pen Tool you can add new nodes and
Use a Fill Tool to change the colour of the sky, edit these to tailor your shape.
trees and mountains in 18.01 Background.jpg.
Make sure you have the correct layer selected When you have drawn your line, or shape, with the pen,
first. Change the fill colour of the bench in 18.02 right click where you want a new node and select Add
Bench.jpg by use a fill pattern or gradient. Anchor Point. This will give you,

413

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 18.47: Menu option for deleting node.


Figure 18.45: Adding an anchor point.
You can align multiple paths by using the Path
Choose the Direct Selection Tool to select one Selection Tool from the left-hand menu. Hold down
of the nodes and adjust it. This will give you a Bezier Shift to select two or more paths, then choose the
handle, which allows you to alter the curve by moving drop-down menu for Align. Distribute is also in
the squares to adjust the angles. this menu, so you can create the same distance between
the paths.

Figure 18.46: Direct selection tool.

Right clicking a node gives you the option to delete


that node, which will simplify the shape (there are fewer Figure 18.48: Alignment and distribution options.
points to edit).

414

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Convert bitmap images into


editable vector shapes
The images displayed in Adobe Photoshop will be
bitmaps, but you can export these to vector shapes.
First highlight the area that you want to export, for
example by using the Magnetic Lasso Tool.
Make sure the Paths menu is open (window from the
top menu, then Paths).
From the Paths menu, choose Make Work Path.

Figure 18.51: Export menu.

Vector graphics are better for images that you need


to create in different sizes, for example to enlarge for
a poster, and make smaller for items such as business
Figure 18.49: Make work path menu. cards. This is because they do not pixelate when
you change the size. However, not all images can be
Set the tolerance: the lower the number, the more precise converted into exact vector graphics. For example, you
the shapes are. can take some elements of a photo and convert it into
a separate vector, but a whole photograph cannot be
converted and retained with the same content.

TIP
You can trace bitmap images to convert them
into vector images. An example of how to do this
is shown in Chapter 19, Importing an image.

PRACTICAL ACTIVITY 18.10

1 J.B. Garden Landscaping need an image


Figure 18.50: Setting tolerance.
to put on their website. They would like a
brown arrow pointing to the right, on top of
a green rectangle. Create the image for J.B.
Once you have the path, you need to export it as a
Garden Landscaping.
vector. To do this, click File, Export and then Paths
to Illustrator. This creates an illustrator vector file
with your image.

415

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

colours it will select. The lower the number, the more


CONTINUED precise the colour needs to be.
2 Haven’s Creations would like you to create a For example, by selecting the red of the lighthouse
logo of a series of clouds of different shades there can be a high tolerance because there are no
of grey overlapping each other. Create the other colours similar around it. However, to select
image for Haven’s Creations. the top part of the lighthouse will need a very small
number, because the white is very similar to the clouds
3 Robson’s Refreshments would like you to
and if the tolerance is too high then the clouds will be
create an image of a table with drinks bottles
selected as well.
of different sizes on the top. Create the
image for Robson’s refreshments.
PRACTICAL ACTIVITY 18.11
4 Bhavin’s Buildings would like you to create
a logo of a high-rise building. It should have 1 Open 18.03 New York.jpg. Add a new
at least 10 storeys and have the image of a layer and add the image from 18.04
cloud behind the top of the building. The Helicopter.jpg.
building should be an appropriate colour to 2 Move the helicopter to an appropriate
stand out against a pale blue background. position in the sky and rotate it so it fits into
the skyline.
3 Open 18.03 New York.jpg and 18.04
Helicopter.jpg. Add further copies of the
18.4 Bitmap images helicopter onto the New York image in the
same layer. Select all of these layers (you
Selection tools may need to use the Shift or Ctrl button
to select more than one), then group or
The selection tools available with vector graphics can merge the layers into one layer. You should
also be used with bitmaps, such as the Lasso Tool, but now be able to move them together.
there are other tools as well. 4 Use a selection tool (for example the
Hold the left mouse button down to select the Magic Magnetic Lasso Tool) to highlight one of
Wand Tool. This allows you to select pixels based on the buildings in 18.03 New York.jpg. Copy
their colour. this image and paste it into a new layer.
Move the building so it looks as if it belongs
in the city. Repeat this with other buildings
to create your own version of New York.
5 Open 18.05 Frog.jpg. Crop the image so
only the face and eyes of the frog are visible.

Colour levels
An entire image, or just part of one, can be converted
from colour into black and white, or duotone.
Figure 18.52: Quick selection tool. Greyscale can be selected by selecting the Image menu,
then Mode and Grayscale.
Hold Shift as you left click the area you want to select.
The tolerance lets you adjust which elements it selects.
The tool works by selecting pixels that are of a similar TIP
colour (RGB colour for example) to the one you have
Grayscale is the American spelling of greyscale.
clicked. The higher the tolerance, the wider range of

416

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Colour Balance allows you to change the colour that


you have selected. You can add, or remove, the different
colours to, or from, the image to change the colour of
the area you selected. Adobe Photoshop will keep the
shades as they are because each pixel will be adjusted by
the same amount, so if one was lighter to begin with, it
will be lighter after the change.

Figure 18.53: Selecting Greyscale mode.

This changes the whole image. If you only want one


part to be in greyscale, then select the area you want
Figure 18.55: Colour balance sliders.
using one of the selection tools. From the menus choose
Adjustments and then Desaturate. Only the area you
selected will become greyscale. Within the colour balance there are options for Shadows
and Highlights. These can be used to adjust images
that may be too dark, or too bright. By adjusting the
shadows or highlights you can make the image brighter,
or darker.
Brightness allows you to increase the brightness of
the image, or the part of the image selected. Contrast
increases the difference between the different colours
in the image. Both of these are selected from the Image
menu, Adjustments and then Brightness/Contrast.

Figure 18.54: Selecting desaturate in adjustments menu.

This menu has other colour changes, such as Hue/


Saturation, Black & White, and so on. Figure 18.56: Brightness and contrast sliders.

417

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 18.12

1 Open 18.06 Village.jpg. Change the colour


to black and white, duotone and a range of
other colours. Compare turning an image to
black and white then to duotone, rather than
straight to duotone.
2 Take a photograph and open it in Adobe
Photoshop. Change the image so only the
main focus of the photograph is in colour;
the rest should be in black and white.
Figure 18.58: Red eye tool.

A filter can be used to add effects to an image or to


Tools/filters change a small element of it. There are numerous
filter tools you can use including the Blur Tool, the
There are a range of tools and filters that can be used to
Sharpen Tool, and the Smudge Tool. These are can
edit images.
all be accessed from the left-hand toolbar.
Clone creates an identical copy or part of an image.
For example, if you have a tree that you would like to
duplicate, by using this tool you can ‘paint’ a copy of
the tree in a different place without having to trace the
outline and copy it.
To use the clone stamp, select the Clone Stamp button.

Figure 18.59: Blur, sharpen and smudge tools.

The Blur Tool reduces the focus on areas of the image.


You can adjust the strength of the blur, and the size
using the top toolbar. Drag the tool repeatedly over the
area of the image you want to blur; the more times you
Figure 18.57: Clone stamp button. go over the one area, the more blurred it will become.

Hold Alt and click the area of the image that you want
to copy. Move the cursor to where you want to paint the
image, hold the left mouse button down and move it to
draw the image.
The Red Eye Tool will automatically remove a red eye
effect caused by a photo flash. Click the red eye tool
and draw a box across (or click) the red pupil. You may
need to do it more than once to get the whole area. The
red eye tool uses the other colours from the eye to fill in
the pupil.
Figure 18.60: Percentage of blur.

418

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Distort and Warp both allow you to change the The Sharpen Tool improves, or increases, the contrast
perspective of an image, or part of an image; for between colours. For example, an edge between a
example if you have an image of a high-rise building light and dark area can be sharpened to make it
and the perspective has curved the lines. more defined.
The Smudge Tool lets you change part of the image, for
example expand it or stretch it out, almost as if you have
dragged your finger through the drawing. Used subtly
you can edit the size and shape of images.

PRACTICAL ACTIVITY 18.13

1 Select a photograph of yourself, or of


your friends. (Make sure you have their
permission before using an image of
someone else.) Use the smudge, red eye
remover and clone tools to edit the image
and either make it better, or worse.
Figure 18.61: Warped images. 2 Create a ‘spot the difference’ puzzle. Take an
image and create a copy of it. Make several
Both can be accessed from the Edit–Transform menu. subtle changes to this image and challenge
Dragging in the boxes on the edges of the image can be someone to spot the differences between
used to distort or warp the image. the two images.
3 Open 18.07 Fruit bowl.jpg. Use the
sharpen, distort and blur tools to alter the
image. For example, you could make the
fruit the focus by increasing the contrast
and blurring other elements. You could also
use other tools mentioned, for example the
Clone Tool, to add more fruit to the image.

Resize an image/canvas
An image can be resized or scaled. Bitmap images may
pixelate if they are increased too much in size. If part
of an image needs to be resized, then you can use a
selection tool to select the pixels you want to change and
then use Scale to change the size, the same way as you
would with a vector.
If the canvas needs to be enlarged, this can be done
through the menu system by selecting Image and then
Canvas Size.

Figure 18.62: Selecting warp menu option.

419

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

The new background, outside the image, may appear


as a checkerboard in grey and white. This means it is
transparent. To change this, you will need to either fill
the background with a colour, or colour gradient, or
increase the size of the image to fill the new space.

18.5 Compression
Compression is a mechanism to reduce the file size on
a file, in this case an image. You may need to compress
an image because the file size is too large, for example
to email to someone, or to store on your computer
if you have limited space. On websites images may
be compressed so that they do not take as long to
download. There are two types of compression, lossless
and lossy.
Lossless compression uses an algorithm to reduce the
size of the image. When the image is decompressed, it
is identical to the original. No data is lost. For example,
you may put an image into a zip file format; when you
unzip the image it will be identical. The effect of this is
that the image you get is exactly the same image that you
sent. It will not, however make the file as small as lossy
compression will.
Lossy compression uses an algorithm to reduce the size of
Figure 18.63: Selecting canvas size menu. the image by removing some of the data. When the image
is decompressed, it is not identical to the original. Data
You can then select the measurements (for example, is lost. This means the image you get will not be identical
pixels, cm or inches) and enter your new dimensions. to the original e.g. it may have fewer colours, or a lower
resolution, but the file size will be smaller than lossless.
Lossy compression loses data, but it also compresses
the image further (you can get a smaller file size). Two
examples of lossy compression are changing the colour
depth and changing the resolution.

Colour depth
The colour depth of an image is the number of different
colours that can be represented. The higher the colour
depth, the more colours you can use, but the larger the
file size will become. This is because the colour depth is
related to the bit depth.
The bit depth is the number of bits allocated to each
pixel. If you have 1 bit per pixel, then there are two
possibilities; 0 or 1. Each number is allocated a colour,
e.g. 0 is red and 1 is blue. Therefore, 1 bit can only
Figure 18.64: Canvas size measurement options. represent 1 colour.

420

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Increase the bit depth to 1byte. 1 byte is 8 bits. In 1 byte Changing the resolution by making it smaller will
there are 256 different unique numbers. If each unique reduce the number of pixels per inch of the image. For
number has a different colour, then 1 byte gives you example, for every square inch there might be 50 pixels
256 colours. instead of 100. This means there are half as many pixels,
and therefore half as much data to store.
Increase it again to 2 byte (16 bits). Now there are 65536
different colours. To change the resolution select Image and then Image
Size, and change the number in the resolution box.
This all affects the file size. If your image has 100 pixels,
then with 1 bit each pixel takes 1 bit of memory.
100 × 1 = 100 bits, or 12 bytes.
If each pixel has 1 byte, then 100 × 1 byte = 100 bytes.

KEY WORDS
lossless compression: a method of compression
where the decompressed image is identical to
the original
lossy compression: a method of compression
where the decompressed image is not identical
to the original
colour depth: the number of colours that can be
represented in the image

To change the colour depth, select Image and then Mode.


8 bits means there are 8 bits per pixel; 16 means there are
16 bits per pixel, and therefore a greater range of colours. Figure 18.66: Inage size measurements.

18.6 Text
Add text to your image by selecting the Text Tool. You
get the choice of horizontal or vertical. Click the tool
and then where you want the text, then type the text.

Figure 18.67: Text tool options.

Figure 18.65: Image/Mode menu.

421

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Font style
By clicking your text, you then see font face and size
options at the top of the screen.

Figure 18.70: Inserted text and kerning options.

Changing the amount of space between lines is also


available on this menu.

Figure 18.68: Inserted text and text tool options.

Adobe Photoshop has a character window with


additional options. Select Window and then Character
if it is not already open.

Figure 18.71: Inserted text and line spacing options.

Fit text to path or shape


When you have written your text, you can set it to match
Figure 18.69: Inserted text and character options. a shape. Choose the Shape option from the top menu
and then choose the shape from the menu. Change the
settings to adjust the size of the shape.
Adding space between letters is called kerning. This can
be changed by increasing or decreasing the number in
the character space box.

KEY WORD
kerning: the space between letters

422

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

Figure 18.72: Inserted text with warp text sliders.


WORKED EXAMPLE 18.05

Create the following logo for Sunshine Holidays.


Set text in a shape
To add text within a shape, you first need to draw the
shape (for example, using the custom shape tool). Click
the Text Tool and then click inside the shape, and the
text will be within the shape.

Figure 18.75: Finished logo.

Select the colour yellow from the palette and draw an


ellipse.

Figure 18.73: Inserting text in a shape.

Convert text to curves


You can convert text into an outline shape that you can
then manually manipulate. To do this, select the text you
Figure 18.76: Selecting logo shape and colour.
want to convert, and then from the top menu choose
Type and then Convert To Shape. You can now edit
the text as though it was an ordinary shape. Enter the text Sunshine Holidays in black, select the
Arc shape and then change the Bend value until it is
how you want it to appear.

Figure 18.77: Inserting text with distortion sliders.

Figure 18.74: Converting text to shape option. Adjust the shapes until they are in the correct position.

423

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 18.14 WORKED EXAMPLE 18.06

Draw a curved line, similar to that in Plant Horizons is an online company that sells
Figure 18.78, above the trees in 18.01 houseplants. They want the following logo to be created:
Background.jpg. Give the image a title. Adjust
the text size, colour and so on, so it fits in with
the scene.

Figure 18.78: Curved line. Figure 18.79: Finished logo.

First click on the arrow next to the Shape symbol.


Select Nature from the options.
PRACTICAL ACTIVITY 18.15

1 J.B. Garden Landscaping need a bitmap


image to be the faded background of their
website. It should be made up of different
plants including trees and flowers that have
been combined from a range of images.
Create the image and then fade it to 30 per
cent opacity.
2 Haven’s Creations sell cakes and would
like an image of a single cake to add to
their logo. Extract an image of a cake
and position it in an appropriate place on
their logo.
3 Robson’s Refreshments have a new drink
out named Robson’s Berry Crush. They want
a label that is 20 cm wide by 6 cm high for
the drink. There must be images of a range
of berries and the name of the drink in an
appropriate place. Figure 18.80: Selecting ‘nature’ shapes.

4 Bhavin’s Buildings would like a border for the


Select a shade of green from the palette.
bottom of their website that has a range of
buildings that appear as a skyline. Create the
skyline border.

Figure 18.81: Selecting green shade.

424

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

CONTINUED WORKED EXAMPLE 18.07


Select the leaf and draw it on the screen. Plant Horizons would like the following background
image creating for their website.

Figure 18.84: Flower images.


Figure 18.82: Selecting leaf shape.
Open the pink flower image and select the magnetic
Click on the text tool to add the company name. lasso tool.
Choose your font style and size from the top menu.
Choose the colour black, and centre-align the text.

Figure 18.85: Image of pink flower.

Drag the tool around the image, click the left mouse
button if it won’t lock exactly where you want it to.

Figure 18.83: Selecting text options.

Type the company name; Plant Horizons.

Figure 18.86: Flower selected with magnetic lasso tool.

425

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Copy the image and paste it into a new file that is 1000 Open the image of the orange flower and repeat the
pixels by 1000 pixels. Change the size of the image so it process.
fits.

Figure 18.87: Selected flower image pasted into new file.


Figure 18.89: Orange flower added.
Open the image of the yellow flower and repeat the
process. Change the opacity of both flowers to between Export the image as a gif.
60 and 70 percent.

Figure 18.91: Exporting image.

Figure 18.88: Yellow flower added.

426

Copyright Material - Review Only - Not for Redistribution


18 Graphics creation

REFLECTION

1 What are the moral issues associated with image manipulation?


2 Did you consider the copyright of the images you used to complete the tasks and practise your skills?

EXAM-STYLE QUESTIONS
1 Titania’s Televisions needs a new logo.
The company has asked for there to be a rectangular television with a gradient fill from top to bottom
and a small triangular stand similar to this image:

Figure 18.92: Blank television screen.

The outline should be in dark blue, and no more than 4pt thick.
The word Titania should be inside the television, in a sans-serif font, in an arc. The font colour
should be green.
a Create Titania’s logo and save it as a vector graphic. It should be no more than 250 by 250 pixels. [13]
b Explain why a vector graphic is more appropriate for a logo than a bitmap image. [4]
c Explain how lossy compression can reduce the file size of an image. [6]
[Total 23]
2 Kim’s theme park needs an image for the homepage of her website.
a Draw a rollercoaster using a rectangle and distort the top. Add six evenly spaced circles for
wheels, and a black line to act as a track and as a rectangle. Inside this rectangle should be the
word Rollercoaster in a green sans-serif font, set across an arc to follow the rollercoaster shape. [15]

Rolle r c o a ster

Figure 18.93: Rollercoaster logo.

b Suggest an appropriate file type to save the image. Justify your choice. [3]
c Explain the difference between the RGB and CMYK colour schemes. [4]
[Total 22]

427

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

SUMMARY CHECKLIST
I can work with layers to raise, lower, bring to front and order layers.
I can use transform tools to resize, skew, flip, rotate, move, scale and shear images.
I can use grouping or merging tools to group, ungroup and flatten images.
I can use alignment and distribution tools such as left, right, top and bottom alignment and vertical and
horizontal distributions.
I can use layout tools such as rulers, grids, guidelines, snapping.
I can use colour picker tools.
I can use crop tools.
I can know and understand the properties of different colour systems (RGB, HSL, CMYK, CMS).
I can know and understand the need for different image resolutions (impact of too high/low resolution on an
image on screen/in print).
I can know and understand how to select different bitmap and vector file formats (svg, bmp, jpg, png, gif,
tif, pdf).
I can know and understand how to change the opacity of all or part of an image.
I can create a vector image using vector drawing tools such as:.
freehand drawing, Bezier curves and straight lines
shape tools: rectangles, ellipses, circles, arcs, stars, polygons and spirals.
I can create a vector image using selection tools to select parts of a vector image.
I can create a vector image using fill tools to colour elements (including gradient fills).
I can create a vector image using node and path editing such as:
adding and moving nodes
deleting nodes to simplify paths
using Bezier handles
align and distribute nodes.
I can convert bitmap images into editable vector shapes.
I can know and understand the advantages and disadvantages of converting a bitmap image into an editable
vector shape.
I can create a bitmap image using selection tools to select parts of a bitmap image such as lasso, magic wand,
colour select tools.
I can adjust colour levels in a bitmap image such as brightness, contrast, colour balance, shadows, highlights,
convert to greyscale.
I can use tools/filters to alter parts of a bitmap image, such as distort, clone, blue, sharpen and red
eye removal.
I can resize an image/canvas.
I can know and understand lossy and lossless compression.
I can know how to change the colour depth and resolution of an image.
I can know and understand the effects of different methods of compression on images.
I can select font style (face, size, kerning, letter spacing and line spacing).
I can fit text to path or shape (aligning text along a line or around a shape).
I can set text in a shape.
I can convert text to curves (convert fonts into editable vector shapes).

428

Copyright Material - Review Only - Not for Redistribution


Chapter 19

Animation
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• create an animation (stop motion and key frame) that meets the requirements of its intended application
and audience
• configure the stage/frame/canvas for an animation
• import and create Vector objects
• control object properties
• use Inbetweening (‘Tweening’) tools
• set paths
• use layers
• apply masks
• control animations.
You will also be able to know and understand:
• the basic principles of animation
• the different animation types and methods
• the use of animation variables when creating animations.

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

BEFORE YOU START

• Do you know what an animation is?


• Have you had experience of creating graphics, both vector and bitmap?
• Are you able to manipulate these types of graphics in software?

The basic principle of all animations is a series of


Introduction individual images that are shown rapidly, one after
the other.
In this chapter you will learn about animation and how
to use the animation software Adobe Animate. You Stop motion animation is where you use objects of other
will learn about different types of animations, and the physical materials and take photographs of them in
components of an animation. There are tasks for you to different positions. By making small changes to the
try to explore the skills in the chapter, and to create your positions of the objects, and taking a photograph each
own animations. time, the images can then be viewed as an animation.
Films and TV programs were often made using this
technique.
KEY WORD
animation: a series of images that are played KEY WORDS
one after another to simulate movement
cel animation: (also called cell animation) where
individual images are drawn on separate pages
then photographed, one frame at a time

19.1 Types of animation stop motion animation: photographs are taken


of objects; the objects are moved slightly each
There are many forms of animation, and you have time and the photographs combined to create
probably seen a lot of them without knowing there was the animation
any difference.
object: an image, or combination of images, that
Cel (celluloid) animation was the first to be developed. is manipulated as one item
This involves individually drawn frames (individual
images), often drawn by hand. Each image is on a
separate medium (for example a piece of paper), with
the outlines drawn and then filled in with colour. By
taking a photograph of each cel one at a time, when the
images are viewed quickly it appears as animation. The
original animations were made using cel animation, with
thousands (if not millions) of individual frames.

Figure 19.1: Individual frames.


Figure 19.2: Stop motion animation.

430

Copyright Material - Review Only - Not for Redistribution


19 Animation

Time lapse is a form of photography, where a camera is CGI stands for Computer Generated Imagery. This
set up and automatically takes a photograph at set-time refers to any images, whether still or moving, that
intervals, for example, once a minute. The photographs are created using a computer. This could be 2D (two
are then shown in sequence to create an animation of dimensional) where the images are drawn on the x and y
what has happened. It is often used for events that take axis without any depth. They are usually cartoons which
a long time, for example a plant growing. are created by a computer and not by hand.

KEY WORDS
time lapse: a camera automatically takes a
photograph every set period (for example,
once a minute) and these are combined to
create a film
flip book animation: each page of a book that
has a different image drawn on; when flicked
through they create an animation
CGI: an abbreviation of computer generated
imagery; any image (still or moving) that is
created using a computer
2D (two dimensional): only on the x and y axis,
for example, a traditional cartoon
Figure 19.3: Time-lapse photography.
3D (three dimensional): has an x, y and z axis
A flip book animation is similar to a cel animation in
that each frame is drawn individually, and usually by
hand. In a flip book, the images are drawn in a book, CGI can also be 3D (three dimensional). When most
each frame on a new page. The pages are then flipped by people say, or hear, CGI, they automatically think about
hand very quickly, so that the images appear to move. 3D animations.

Figure 19.4: Flip book animation. Figure 19.5: Computer-Generated Imagery (CGI).

431

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Both 2D and 3D CGI can be animated.

Figure 19.7: Frames showing a puffin landing.

Figure 19.6: 3D animation.

19.2 Stage
Questions The area in animation software where you draw and
1 Describe cel animations. create your animation is called the stage.
2 What is a time lapse animation?
3 How do you create a stop frame animation? KEY WORD
4 Name the animation that involves drawing an
stage: the area where the animation takes place;
image in a book, and then changing the image.
to be within the animation, the object must be
5 What does CGI stand for? on the stage

Frame When you open Adobe Animate you will get a white
Take a blank notepad and draw a shape in the bottom rectangle. This is the stage. Whatever you want to
right-hand corner, then draw the same shape but in a appear in the animation must be in this stage.
slightly different position on the next page. Repeat this The size of this stage is measured in pixels. You can
on a number of pages. You can then create a flip book change the size of the stage to meet your needs by
animation (see Figure 19.4). increasing or decreasing the number of pixels in the
Each of these pages, or individual images, is called a width and height.
frame. A computer animation is made up of a series of To change the stage size in Adobe Animate, click
frames, which are played very quickly to give the illusion Modify and then Document.
of movement. In reality, it is simply a sequence of
individual images. Figure 19.7 shows a series of frames You can then change the width and height in stage
for a puffin landing. size. The drop-down menu lets you change from pixels
to centimetres or inches, depending on which you
want to use.
KEY WORD
frame: one screen, or page, where an image is
drawn; a series of these frames are played one
after the other to create the animation

432

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.8: Changing size of the stage.

The stage has a set of x- and y-coordinates that you can The top-left corner has the coordinates (0, 0) and these
use to position objects with more accuracy. then increase as you move down and across the image.
In Figure 19.9, the ruler is visible at the top and left
of the screen; this gives you the coordinates. This blue
KEY WORD rectangle starts at x-position 0 (the left-hand edge) and
its width is 313 (this is how far to the right the rectangle
coordinates: the position (x and y) of an object
goes). Its x also starts at position y (the top edge) and its
on the stage
height goes down to 163.

433

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 19.9: Position and size options.

When you select Modify and Document, you can also The aspect ratio is the width and height of the stage.
change the colour of the stage by clicking the Stage There are standard ratios depending on what you
color box. want to use the animation for. For example, if you
are producing a film for widescreen televisions, you
This will bring up a range of colours. Click the sphere
don’t want the animation to be in a small square in
in the top right to access even more colours, or you can
the centre.
type the colour code directly into the box.
Common aspect ratios are shown in Table 19.1.
You need to consider where your animation is most
likely to be viewed and when setting up your stage you
must decide on the aspect ratio.
Adobe Animate helps you when you start a new
document, by giving you some common options to
choose from.

Figure 19.10: Colour options.

434

Copyright Material - Review Only - Not for Redistribution


19 Animation

Ratio Description
4:3 This is called standard. It is what old televisions used so is rarely used now.
It is 4 units wide to 3 units high. It could be 2000 pixels wide by 1500 pixels high.
16:9 This is the ratio that is currently most widely used for TV. It is also commonly used in computer
monitors and laptops, for consistency with television.
It is 16 units wide to 9 units high.
2.35:1 This is widescreen and used for films.
It is 2.35 units wide to 1 unit high.
16:10 Most modern mobile phones.
It is 16 units wide to 10 units high.

Table 19.1: Common aspect ratios.

Figure 19.11: Common start options.

435

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Use rulers, guides and grid There is the snapping option Snap to grid. This will
make sure all objects align to one of the grid lines.
settings
The stage has several features that can help you to lay KEY WORDS
out your animation.
ruler: a tool that lets you see the position of
Rulers can be turned on, and off. Click View from the items on the screen, and helps you draw them to
top menu and then click Rulers. the correct size
The grid option displays a grid on the background of grid: a tool that displays a grid on the
the stage. This can help you align objects to the same background of the screen to help with alignment
gridline. To turn the grid on or off, click View from the
top menu, then Grid and then Show Grid. snapping: a feature that will predict where you
want objects placing, by aligning them to other
There are options you can edit in the grid. By selecting objects, images or gridlines
Edit Grid, this brings up the menu. From here you
can choose to display the grid over the objects instead
of behind (the grid does not appear on the final You can also change the space between the grid lines.
animation). Here this is 1 grid line every 10 pixels, but you can
increase, or decrease it.

Figure 19.12: Grid options.

436

Copyright Material - Review Only - Not for Redistribution


19 Animation

There are other snapping options, accessed from the


View menu. These allow Adobe Animate to align KEY WORD
objects automatically to: guides: lines that you can drag on the stage to
• display lines from the object to let you line it up help you position objects
with other elements, using the option Snap Align
• other objects, using Snap to Objects The lines are then dragged down from the top of the
• specific pixels or lines of pixels, using Snap screen as shown by the green arrows. The red lines
to Pixels. are the guides that then appear. You can change the
colour of these by choosing Edit Guides from the
You can add guides to your stage. Guides are lines that
Guides menu.
you can position to help you line up your objects. Turn
on guides by selecting View from the top menu, then
select Guides and then Show Guides.

Figure 19.13: Positioning guides.

Questions 19.3 Importing and


6 What is a frame in animation?
7 Describe what a ratio of 4:3 means and when creating Vector objects
is it used.
Vector graphics are stored as points (or coordinates) and
8 Name two other common ratios and when equations that are used to calculate the position, colour,
they are used. and so on, of the image. There is much more about
9 Explain the purpose of rulers, grids and guides. vector graphics in Chapter 18: Graphics Creation.
10 Explain the advantage(s) of using snapping.

437

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Drawing an image
The side toolbar has a range of shapes you can use to line colours, size, style, and so on, before drawing the
create vector graphics. Clicking one of these brings up shape (or line) on screen. The black arrow lets you
its Properties menu, where you can select fill colours, select items.

Figure 19.14: Properties options.

The Line and Fill options are accessed by clicking them independently.

Figure 19.15: Line and fill options.

438

Copyright Material - Review Only - Not for Redistribution


19 Animation

The menu to choose the colour from will then appear. to as the opacity or the alpha style. This is measured
Select the colour from the block. as a percentage. For example, 0% will have a fully
transparent, invisible image. At 100%, the image is
fully visible.
TIP
The visibility of an object can be set when it is created,
Clicking on the sphere will show you a wider and it can also be manipulated during an animation to
range of colours. make objects appear and disappear.
To change the opacity of an image, select its properties
The lack of transparency of an object or a piece of text and go into its fill options. Here you can change the
can be changed. In the software this may be referred percentage of the opacity.

Figure 19.16: Opacity (Alpha %).

When you have selected a drawing tool, for example the The Stroke option is the size of the line you will
paint brush tool, you have some additional properties to draw. There are a range of styles that produce different
choose from. patterns. There is only a line colour option, and no fill.
This is because these tools only draw lines; they do not
draw shapes to fill.

439

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 19.17: Fill and stroke options.

To change an image you can transform it. Use the KEY WORD
selection tool to select the object you want to change
(hold down Shift and click to select more than one transform: changing the dimensions, rotation,
element). Right click the item, select Transform and colour fill, opacity, etc. of an object over a certain
then Free Transform. This allows you to change the number of frames between two key frames
size of the object, rotate it, change its centre point (so
you can rotate it from a different point). These can be
accessed independently from the Transform menu. You can manually adjust the size, rotation (orientation),
skew, and so on, by selecting the Transform menu from
the properties window and entering the rotation, or size
transformation required.

440

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.18: Transforming options.

Questions The symbol now appears in the library. This is a record


of all the symbols you have in your document. You
11 Describe vector graphics. can create a new instance of a symbol by dragging its
12 What is the difference between line and fill colours? name onto the stage. You could have 20 of the same
symbol, and animate them separately. However, if you
13 Which option do you select to rotate a shape
change the structure of one of the symbols, the rest will
or object?
also change.

Library and symbols KEY WORDS


A symbol is one element that you have given a name.
This allows you to perform motion and morphing symbol: a component, for example, an image,
inbetweening techniques on the symbols. If you select of an animation that has a name and is put in
multiple items and convert them into one symbol, then the library; multiple copies of the object can
they will become grouped together. be created

To convert a selection to a symbol, use the selection morphing: another term for shape tweening; one
tool to right click the item. Then choose Convert image changes into another image
to Symbol.
library: a place that stores a list of images and
A new window will open. You need to give your new objects/symbols in an animation
symbol a sensible name (something that describes it)
because you might have hundreds of symbols and you
need to be able to tell them apart.

441

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 19.19: Naming a symbol.

Importing an image A disadvantage of exporting to a vector graphic is


that you will lose some of the detail. If the image
You can import a pre-existing image into the library, is a photograph then it might not appear exactly as
or onto your stage (that is not as a symbol) for your the original. It will also not be able to be edited in
animation, for example a photograph. the same way, for example using the bitmap image
To import an image, click File from the top menu, then manipulation tools.
Import and either Import to Stage or Import to
Library. Find your image and click Open to import it. KEY WORD
Bitmaps cannot be animated like vector graphics can
be, because they are not made of coordinates and tracing bitmap: a way of converting a bitmap
calculations that can be amended. A second problem image into a vector graphic
with bitmap images is that when you enlarge them, they
might pixelate. To try and prevent this you can try and
First put the bitmap image from the library onto the
convert the bitmap image into a vector graphic. This is
stage by dragging it.
called tracing bitmaps.

442

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.20: Getting an image from the library.

With the symbol selected, select Modify from the top appropriate threshold automatically. Click OK and then
menu, and then Bitmap, then Trace Bitmap. your bitmap will be turned into a vector. You can select
just some sections of the image and manipulate them
The lower the colour threshold, the more accurate it
independently.
will be. Adobe Animate will usually give you the most

Figure 19.21: Bitmap manipulation options.

443

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Text KEY WORDS


Text can be added to the stage using the text tool which layer: an object or image given its own timeline
lets you edit the style, size and colour. Text is treated in for independent manipulation
the same way as objects, so you can use layers, tweens,
change the opacity and manipulate text in the same way. tween: (inbetweening) an animation where
the start and end points are set; the computer
To add text, click the T on the toolbar, then on the
generates the actual images to make the
screen where you want the text to appear.
animation change

Figure 19.22: Text tool button.

Click Properties to change the font name, size, colour, and so on.

444

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.23: Text properties options.

Questions Each layer is shown on the left of the timeline. Each


layer must have an appropriate and descriptive name, for
14 Why do you have to change a shape to a symbol? example if it stores the left arm, then name it left arm.
15 Why can’t bitmap images be used in inbetweening?
KEY WORD

19.4 Layers timeline: the place that controls the order


the frames are run, the positioning of the
An animation is made up of layers which each has its layers, and so on
own set of frames that you animate independently. By
using layers, you can independently manipulate different
parts of an image, otherwise you would be manipulating To create a new layer, click Insert and then Timeline,
the entire image, in the same way, every time. then Layer. To change its name, double click the layer
name beside the timeline and enter your name. The
Think about a stick person that you want to make walk. name cannot have any spaces in it, so multiple words
The elements that need to be separate would be: can be separated by a symbol, for example, arm-Layer.
• left arm • right leg You can even create folders for your layers. Complex
• right arm • head animations may have hundreds of layers, so you can
keep some of them together. Consider the stick person
• left leg • body.
you are trying to make walk. You could make a folder
You might even need to split some of these down called ‘stick_person’ and put all the layers for that
further, for example ‘left arm’ may need to be ‘upper person in the folder. Then they are all kept together,
left arm’, and ‘lower left arm’. It all depends on how so you don’t mix them up with other parts of the
detailed your animation is going to be. animation.

445

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To create a folder, when you click Insert, then If two shapes are in the same layer, then they can delete
Timeline, select Layer Folder. Use your left mouse each other. For example, in Figure 19.24, the two shapes
button to drag layers into the folder, and double click its are in the same layer.
name to rename it.

Figure 19.24: Shapes in the same layer.

If they are moved so the blue oval is over the green rectangle, the part of the rectangle covered is deleted.

Figure 19.25: Oval shape overlapping rectangle in same layer.

446

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.26: Part of rectangle in same layer deleted.

Layers also allow you to order objects. The item(s) in the In Figure 19.27, the layer ‘blue_oval’ is at the top, and
highest layer in the timeline are in front of all the others. on the stage it appears in front of the green rectangle.

Figure 19.27: Blue oval in own layer overlapping the rectangle.

447

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

If the layers are swapped in the timeline then they will be reversed on the stage. The green rectangle is now in front.

Figure 19.28: Order of layers swapped so that there is no deletion of part of the rectangle.

PRACTICAL ACTIVITY 19.01 Timeline


A timeline is made up of frames, in chronological order
1 Create a stick person, with each part of the
from left to right. Each rectangle is one frame. In Adobe
stick person in its own layer. Put the stick
Animate every 5 is numbered.
person into a folder. Save the program as
stickperson to use later. A completely grey rectangle is a frame. A rectangle with
a circle in is a keyframe (which you will learn about in
2 Draw an underwater scene with rocks, the next section). When you create inbetween animations
seaweed, background fish, and so on. Make some of these frames could turn green or blue.
sure each component part has its own layer.
Save the program as underwaterScene to
use later.
3 Write your name, with each letter in its own
layer. Save the program as myName to
use later.

448

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.29: Timelines.

If there is no rectangle for a layer in a specific frame Whereas ‘green_rectangle’ has frames up to frame 15.
(for example frame 30), then the items in that frame This means on the current frame selected (frame 15 as
do not exist when that frame runs. So, in Figure 19.30, shown by the red rectangle on the number 15), only the
‘blue_oval’ does not have a frame beyond frame 10. ‘green_rectangle’ is visible.

Figure 19.30: Green rectangle timeline.

Key frame KEY WORDS


A key frame identifies a change in an image. These key frame: a location on a timeline which marks
changes are represented by a • in the frame. a frame that has a change in the animation, for
example, a drawing has changed, or the start or
end of a tween

Figure 19.31: Key frame dots.

For example, ‘green_rectangle’ is in one position in To add frames and keyframes, you need to right click
frame 1. It then changes in frame 2, and frame 3; it then the frame where you want to add a frame or keyframe,
does not change again. ‘blue_oval’ is created in frame 1; then choose Insert Frame (or Insert Keyframe)
it does not change then until frame 10. from the menu.

449

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 19.02 Timings and frame rate


1 Reopen the file stickperson. Create an A common misconception is that a frame represents
animation with your stick person. Make them a second, so that if there are ten frames, this takes ten
walk across the screen. Challenge yourself seconds. This is not the case. The timing is measured
and make them perform other actions such in frames per second (fps), which can be changed, for
as jumping, running and dancing. You could example, 10 fps means that ten frames will be run each
introduce a second person by copying second. If you have 200 frames, the animation will last
your folder of layers and animating them 20 seconds. The higher the fps rate, the quicker the
separately. frames change and the smoother the animation appears.
When designing an animation, you need to consider the
2 Reopen the file underwaterScene. Add a
fps, as this will affect the number of frames you need,
fish to your underwater scene. Make the fish
and the extent to which you change the images in each
swim around the underwater scene using
frame. If you need an item to stay static for a set time,
keyframes. Add bubbles coming from the
then it can be given frames (not key frames) where it
fish that slowly rise to the surface.
exists but does not change. When it needs to change or
3 Reopen the file myName. Create an move, a key frame is then added.
animation, using frames and keyframes, to You can change the frame rate by entering a different
make your name appear letter by letter. number of frames above the timeline.
4 Create an animation to make a flower grow.
Start with a seed and then make roots and a
stem grow from the seed, before eventually
it becomes a flower.

Figure 19.32: Path for adding frames.

450

Copyright Material - Review Only - Not for Redistribution


19 Animation

Questions When applying a tween to a layer, it will affect every


item in that layer. It is important to make sure that each
16 What is a layer? individual item has its own layer.
17 Why are layers used in animation? There are two types of tween you can use, motion and
18 What effect will increasing the frame rate have on shape (or morphing).
an animation?

Motion tween
Inbetween animation A motion tween only deals with the movement of an
An animation created solely with frames and key object, for example moving from one place to another,
frames can be quite robotic, unless you made very small and rotation. If you use key frames, you have to position
changes in each keyframe, but this is time consuming. the object in each frame. Using a motion tween, the
By inserting an inbetween animation (a tween), the computer fills in the gaps in movement.
computer will generate the animation for you (it fills
The item you tween needs to be set as a symbol before
in the spaces inbetween your frames). For example, if
you start moving it.
you want to move a drawing of a fish across the screen,
you can set the start location (A), the end location (B) To create a motion tween in Adobe Animate, create the
and then the computer will work out how to get the fish first keyframe with the symbol where you want it to
from A to B. start, and frames up to the point where you want the
tween to end.

Figure 19.33: Starting a motion tween.

Then right click the frames you have added and select Insert a keyframe in the frame where you want the
Create Motion Tween. animation to end, and then with this frame selected,
move the object to the position where you want it to be.
You can also rotate it if required.

451

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Figure 19.34: End of motion tween.

WORKED EXAMPLE 19.01


Create an animation where a red circle moves to each corner of the screen using inbetweening.
First rename the layer ‘redcircle’, choose the line colour red and fill colour red, then draw the circle.

Figure 19.35: Rename the layer.

452

Copyright Material - Review Only - Not for Redistribution


19 Animation

CONTINUED
Convert the red circle to a symbol with a sensible name.

Figure 19.36: Convert the red circle to a symbol.

Add frames to frame 15, and then Create Motion Tween.

Figure 19.37: Add frames.

453

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Add a keyframe on frame 15, and move the circle to the top right corner of the screen.

Figure 19.38: Add a key frame.

Repeat for all four corners.

PRACTICAL ACTIVITY 19.03 19.5 Paths


1 Create a ball and make it move around You can draw a path for a symbol to follow, and set a
the screen. motion tween to follow this path.
2 Create a car animation where the car To do this, first add the keyframe where you want the
appears on screen and drives around a track path to start, and another where you want it to end.
that is drawn on the background using a Right click and select Create Classic Tween.
motion tween. Save the file as carAnimation This will turn the frames blue and they will have an
3 Use a motion tween to create an animation arrow in them.
of each letter of your name flying onto the Right click the layer and select Add Classic
screen one by one, eventually displaying Motion Guide.
your full name.
Use the drawing tools to draw the path, for example
4 Add more fish to the file underwaterScene using a paint brush.
that you created earlier. Make each one
move using a motion tween. Add a bubble
for each fish and use a motion tween to
make the bubbles float to the surface.

454

Copyright Material - Review Only - Not for Redistribution


19 Animation

Figure 19.39: Drawing a path.

Select the first keyframe and drag the object so its centre so its centre locks onto the end of the path. That will
(the circle that appears) locks onto the start of your create your motion path tween.
path. Then select the last keyframe and drag the object

Figure 19.40: Creating motion path.

455

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 19.04

1 Create a red ball. Draw a path for the red ball to follow and animate it so it follows the path.
2 Add a second ball with a new path, and animate it to follow that path.
3 Open the file carAnimation that you created earlier. Make the road include a number of bends. Draw a
path to make the car move around the track.
4 Open the file underwaterScene that you created earlier. Add an octopus to your underwater scene.
Draw a path for the octopus to follow and animate it.

Morphing (shape, size and shape, image, line, and so on, and do not convert it to a
symbol. However, it all still needs to be in the same layer
colour) so that other elements are not affected.

Morphing allows a shape to be changed into a new Add your image in the keyframe where you want your
shape, for example, a small, red square could be turned shape tween to start. Add frames to where you want it to
into a large, blue circle. The computer generates each finish, in the same way you would with a motion tween.
step of the transformation for you. This time, right click and select Create Shape Tween.

A shape tween can also include movement. The shape Right click in the frame where you want the tween to
will change while it moves. finish and then select Insert Keyframe.

In Adobe Animate, a shape tween cannot take place on With the new keyframe selected, either change the
a symbol (or object) such as a shape. This is because colour, shape or size of the image. Or, delete the
the symbol is in the library and it cannot be changed contents of the frame, and draw a new image.
by a shape tween. To create the shape tween, draw your

WORKED EXAMPLE 19.02


Create an animation where a black line turns into a blue circle, then a red rectangle, then back to a line.
First create a new file and add a layer with the name shape. Draw the line on the stage.

Figure 19.41: Line drawn on stage.

456

Copyright Material - Review Only - Not for Redistribution


19 Animation

CONTINUED

Add frames, then right click and select Create Motion Tween. Right click on the last frame and create a keyframe.
Delete the line in this keyframe and draw a blue circle.

Figure 19.42: Blue circle in the last key frame.

Repeat the process this time drawing a red rectangle.

Figure 19.43: Red rectangle in the last key frame.

Repeat again but this time copy the line from frame 1 and paste it into your new keyframe.

457

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 19.05

1 Create a shape tween that changes a red circle into a blue square.
2 Create a shape tween that changes a rain cloud into a sun.
3 Draw a scene that shows the changes during a year, for example a river and forest showing
a lush, green, sunny days
b leaves changing to red and orange and falling
c a frozen river with barren trees
d new growth emerging.
4 Open the file underwaterScene. Make the bubbles change shape, for example, get smaller as they
move to the surface.
5 Open the file myName. Make each letter of your name morph into the next letter.

the symbol move at different speeds. In Adobe Animate,


Property keyframes turn on roving keyframes to stop this.
Property keyframes allow you to even out the keyframes
For example, in this tween the orange dots show the
in a tween. For example, if you copy a tween the
keyframe changes. They are not evenly spaced.
keyframes may not be evenly spaced and this will make

Figure 19.44: Key frames uneven spacing.

458

Copyright Material - Review Only - Not for Redistribution


19 Animation

To change this, right click the tween in the timeline, Viewing and controlling
select Motion Path and then Switch keyframes to
roving. This will even out the spacings. animations
To test-run the animation, click Enter on the keyboard,
or click the play symbol above the timeline. There are
other controls here too, such as stepping that lets you
move the animation through one frame at a time.

Figure 19.45: Animation play symbols.

459

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

To watch the video on loop, select the Loop option above the timeline.

Figure 19.46: Animation loop option.

Then drag the grey box over the frames that you want to loop.

Figure 19.47: Selection of frames to be looped.

460

Copyright Material - Review Only - Not for Redistribution


19 Animation

To stop the animation when it is playing, click the play


button. This then becomes the pause symbol. KEY WORD
To view the animation looping continually in a separate mask: a layer that involves shapes, or other
window, hold down Control and click Enter. components, that restrict what can be seen of
the other layers

19.6 Masks Right click the layer you want to become a mask, and
A mask can make it so that only certain parts of an select Mask. The layer beneath automatically becomes a
image are visible. In Adobe Animate, masks are added sub-layer of the mask.
in their own layers.
Draw the shape that you want the mask to be in the
first layer.

Figure 19.48: Mask shape.

461

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Click the padlock to lock this layer. You will then be able to view the image through the masked area.

Figure 19.49: Mask padlock.

You can animate a mask as you would an ordinary normally. Add the tween, add the keyframe, and move
symbol. Remove the padlock to unlock the layer, and the symbol.
then add a motion tween in the same way you would

Figure 19.50: Adding motion tween to a mask.

462

Copyright Material - Review Only - Not for Redistribution


19 Animation

PRACTICAL ACTIVITY 19.06 Export Description


option
1 Create an animated introduction to a TV show Image This creates one image file for every
or film. Make sure you include images of the frame in your animation.
main characters and text introducing the title.
Make use of opacity and tweens. Movie You can create an .swf file, which is a
Flash file commonly used in websites,
2 Extend your underwater scene to include a although this is being phased out of use.
range of sea life. Animate the background and
plants to create a continuous, repeating scene. Video You can create a video through Adobe
Media Encoder, or convert to a .mov file.
3 Create an animated cartoon that shows a day
Animated This will create an animated .gif file that
in the life of cartoon’s central character. Use a
GIF you can integrate into a website.
range of techniques, including some key frame
animation and tweens.
Table 19.2: Animation export options.
4 Choose your favourite TV show. Create a
new show-intro to this show, using a range of
animation techniques.
PRACTICAL ACTIVITY 19.07
5 Create an animation about your school to
advertise it to prospective students. Include a Export your finished animations into an
range of images from the school as well as your appropriate format. When you have developed
own vector graphics. your web development skill, use them to create a
website to display your animations.

Questions
19 What is the difference between a frame and
a keyframe?
19.7 Animation variables
20 What is the difference between a motion tween and A variable is something that can change. In animation,
a shape tween? this can have many different forms.
21 Explain why inbetweening produces smoother Variables can be items that you change as the animator.
animations than frame-by-frame animations. For example, the graphical elements that you have within
22 Describe the purpose of a mask and give an the animation. Each one of these can be manipulated
example of how it can be used. and changed during the animation. These are primary
variables because they are the most important. They are
the fundamental basis of the animation.
Exporting Animations have other elements, known as secondary
Once you have created your animation you will need to variables. These might be sound or other components
export it to a file format for use in other formats. that are in the background. The rippling of water
Click File from the top menu, then Export. behind the objects is secondary, or the movement of
clothing as a person walks, and the movement of trees in
There are several export options to choose from. the wind. They are not the focal point of the animation
but they are animated.

KEY WORDS
primary variable: the foremost parts of the
animation, that is, the graphic components
secondary variable: the background elements of
the animation, for example moving water/trees

463

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Variables can also be used to control, or manipulate,


parts of an animated object. In 3D animations, wire KEY WORD
models are created on the computer of the objects avar: a hinge on a wire-model object that lets
being animated. you manipulate its position

REFLECTION

1 Which type of animation do you think was the


most important to be developed, and why?
2 How can animations be used to enhance
interactive documents? Why do they
enhance them?
3 Can animation ever detract from a document?
How can it do this? Why does it do this?

Figure 19.51: Wireframe.

Within these wire models an animation can create hinges


called avars. By using these avars the position of that
part of the animated object, or even the animated object
itself, can be manipulated. For example, you could
manipulate each part of a finger individually to make it
move realistically.

464

Copyright Material - Review Only - Not for Redistribution


19 Animation

EXAM-STYLE QUESTIONS
1 Saif owns a small independent comic shop named Saif’s Comics.
a Saif wants a short animation that will appear as a banner across the top of his website.
Create an animation to meet the following requirements.
• The aspect ratio must be 2.35:1.
• The background must remain black throughout.
• The name ‘Saif’s’ should appear at the start of the animation, then each letter should fade out
one at a time, taking 1 second for each one to fade.
• The word ‘Comics’ should fade in as a whole word, taking 1 second to appear. It should stay
on screen for 2 seconds, and then fade out one letter at a time (1 second for each fade).
• The words should be in a large white font, taking up the full height of the animation.
• The animation must be set to loop.
• All animations must be smooth.
• The animation must be exported in a suitable format for use on a website. [13]
b Describe the differences and similarities between cel animation, stop motion animation, and
time-lapse animation. [3]
[Total 16]
2 Henry owns a property sales business named Henry’s Homes.
You have been provided with the following file: Henry logo.jpg
a Create a short animation to advertise Henry’s property sales business.
The animation must meet the following requirements.
• The aspect ratio must be 16:9.
• The background should be pale blue.
• The image 19.1 Henry logo.jpg should be on the left-hand side of the animation. It should
start small and then increase in size, before decreasing again. This should repeat throughout
the animation.
• A white ball should come in from the left to the right, revealing the sentence ‘We take pride
in selling your property’ for example,

Figure 19.52: Revealing text.

465

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
• When the ball disappears off the left-hand side of the animation, it should stay off for 1.5 seconds.
• When it returns, it should move from left to right. It should display the text ‘No sale, no fee’ (as a mask)
as it passes over it before disappearing off to the right, for example,

Figure 19.53: Mask.

• The animation should be set to loop.


• All animations must be smooth.
• Animation should be exported in a suitable format for viewing on a computer.
[19]
b Describe what is meant by a frame and a keyframe. [2]
[Total 21]
3 Ying needs an animation for her independent film company: Films by Ying.

Figure 19.54: Films by Ying logo.

Create a short animation for the logo.


The animation must meet the following requirements.
• The screen ratio should be 16:10.
• The background should be white with the green outline already displayed.
• The letters should bounce in from the left. The Y should appear first, then the B, then the F.
• When all the letters are on screen they should remain for 2 seconds, and then fade out.
• The animation should loop.
• All animations should be smooth.
• The file should be exported as an animation gif.
[12]

466

Copyright Material - Review Only - Not for Redistribution


19 Animation

SUMMARY CHECKLIST
I can configure the stage/frame/canvas for an animation by:
setting colour, size, aspect ratio
using rulers, guides and grid settings
setting snapping options.
I can import and create Vector objects including:
tracing bitmaps
adding text.
I can control object properties including:
stroke and fill settings
size position and orientation
transparency.
I can use inbetweening (‘tweening’) tools including:
show motion
show shape, size and colour changes.
I can set paths for animation to follow.
I can use layers.
I can apply masks.
I can control animations by:
adjusting frame rates
looping or stopping animations.
I can know and understand the basic principles of animation including:
frames, key frames, property keyframes, timings, coordinates
inbetweening and the effect it creates
morphing and the effect it creates.
I can know and understand different animation types and methods including:
cell animation, stop motion, time lapse, flip book, CGI, 2D, 3D.
I can know and understand the use of animation variables when creating animations including:
primary, for example graphical elements
secondary, for example sound, components of animation
the use of animation variables to control the position of an animated object or parts of an
animated object.

467

Copyright Material - Review Only - Not for Redistribution


Chapter 20

Programming
for the web
LEARNING INTENTIONS
By the end of this chapter, you will be able to:
• use JavaScript to:
• add interactivity to web pages
• change HTML content
• change HTML styles
• show/Hide HTML elements
• display data in different ways
• react to common HTML events
• provide user interaction
• use correct syntax to:
• create statements
• use JavaScript loops for iterative methods
• create functions
• use JavaScript timing events
• add comments to annotate and explain code

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED
• know and understand the structure and syntax of JavaScript code
• know and understand a range of object-based JavaScript programming techniques and terms
• describe and explain the terms and programming techniques listed here.

BEFORE YOU START

• Do you know how web pages are constructed using HTML code?
• Are you able to read and use HTML tags to create and edit web pages?
• Do you have experience of CSS (Cascading Style Sheet) and know how this is used to set the style, or
presentation, of a website?

JavaScript can be added to an HTML document. It is


Introduction recognised by starting and ending the JavaScript code
with a script tag. For example:
In this chapter you will learn how to use JavaScript to
enhance and add user interactivity to websites. When <script>
you access websites, you are interacting with them by Your JavaScript code would go here
clicking buttons, entering data and selecting from sets of </script>
options. This is often done using the scripting language
JavaScript. JavaScript is written within the HTML code This can be part of a web page. For example here is an
of a web page and the HTML code then calls this code. alert box within an HTML web page:
JavaScript can then be integrated with other languages <HTML>
such as PHP to allow your website to communicate <BODY>
with a database, but that is beyond the scope of this
This is my first web page
specification. JavaScript is useful to learn because you
<SCRIPT>
add additional content to your web pages to make them
perform more actions and engage the user. alert("Hello World");
</SCRIPT>
It is important that you understand how websites are
</BODY>
developed, because this will allow you to edit and create
your own websites, and give you more control over the </HTML>
content because you understand how it works and how As soon as this web page opens, a pop-up box will
the data can be manipulated. This can also be helpful appear saying "Hello World".
when things go wrong, because when you understand
The code does not need to be indented as it is in this
what is happening in the scripts you have a better chance
example, but the indenting does make the code easier
of finding the problem and fixing it.
to read. You can see where you have opened and closed
your tags so you don’t accidentally miss any. alert is
one of the keywords.
20.1 Introduction to
JavaScript
JavaScript uses keywords. These are words that you must
use to tell the web page what to do.

469

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

20.2 Outputting data CONTINUED


Notice that the text inside the brackets is in speech
document.write marks; this is because it is a string (Section 20.6
Variables and operators/Data types). If there aren’t
The code document.write(theOutput)will output the speech marks there, then the website tries to run the
text inside the brackets to the web page. For example: command My, then the command First and so on,
<script> which is meaningless.
document.write("Hello world"); Open your file in a web browser to see the result of the
</script> code.
This will display “Hello world” in the web page.

WORKED EXAMPLE 20.01 KEY WORDS


Create a web page that displays the title: My First string: a data type: data is stored as text which
JavaScript Web Page, at the top of the page. can be characters, numbers and symbols
First, put your basic HTML tags into the file you are data type: the type of data being stored, for
using to create the website. example, a number, string (text)
<HTML>
<BODY>

</BODY>
.innerHTML
</HTML> You can name elements within your HTML code. For
example, you might want to name the first paragraph in
your website paragraph:
Inside the body tags, put your JavaScript tags.
<HTML> <p ID = "paragraph1"></p>
<BODY> In your script tag, you can instruct JavaScript to add
<SCRIPT> the text to the document in the element with the ID
</SCRIPT> paragraph1. For example:
</BODY> <script>
</HTML> document.getElementById("paragraph1").
innerHTML = "Hello World";

Inside the JavaScript tags write your code to output </script>


My First JavaScript Web Page. The first section is always the same:
<HTML> document.getElementById
<BODY> Within the brackets is the name of the element where
<SCRIPT> you want the text to appear.
document.write("My First JavaScript
.innerHTML tells it that you want the text within that
Web Page");
element. Then there is an equals sign, and the text you
</SCRIPT> want to display.
</BODY>
</HTML>

470

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

WORKED EXAMPLE 20.02


Create a web page with two paragraphs and with different text in each paragraph.
The paragraphs are declared with the IDs paragraph1 and paragraph2.
<HTML>
<BODY>
<p id = "paragraph1"></p>
<p id = "paragraph2"></p>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

Add one line of code for each paragraph. The first will say: "This is paragraph1" and the second will say "and
this is my second".
<HTML>
<BODY>
<p id = "paragraph1"></p>
<p id = "paragraph2"></p>
<SCRIPT>
document.getElementById("paragraph1").innerHTML = "This is paragraph1";
document.getElementById("paragraph2").innerHTML = " and this is my second";
</SCRIPT>
</BODY>
</HTML>

Run it in your web browser and see what happens.

PRACTICAL ACTIVITY 20.01

Open file 20.01.html.


Create two paragraphs on the webpage.
Use Javascript to write your first name to the first
paragraph, and your last name to the second
Figure 20.1: A pop-up box.
paragraph.

There are three types of pop-up box: Alert, Confirm


and Prompt.
20.3 Pop-up boxes
Pop-up boxes can be used to display text or information. alert
They do not write text to the web page; it appears in an You have already seen an alert box; this displays text in a
extra box on top of the screen. For example, here is an box over the top of a web page. It is usually used to alert
Alert box, the user of something. In this example, the text "Hello
World" will be displayed in the alert box.
alert("Hello World");
You might sometimes see an alert with the word window
in front of it; it is exactly the same result. For example:
window.alert("Hello World");

471

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

confirm PRACTICAL ACTIVITY 20.02


A confirm box has two options: Ok and cancel. Open file 20.02.html.
For example, this confirm box will display "Ok
to proceed?" First, amend the code to output “Ready to
confirm ("Ok to proceed?"); continue?”.

The option chosen by the user is returned as a value that Then use a confirm box to store their response.
can then be used to decide what to do. In this example, Then output “Let’s go”.
the value returned is stored in the variable answer (see
Chapter 4 Algorithms).
var answer = confirm ("Ok to proceed?"); console.log
Some web browsers allow you to view console mode.
This is where you can make your webpage record events,
prompt write messages to, etc. that do not actually appear on the
A prompt box allows a user to enter some text and gives web page, but appear in a log. It is used for debugging.
them the option of Ok and cancel. For example, if you are writing a selection statement
prompt("What day is it?") (IF statement), and you want to check if the JavaScript
has gone into the statement, you can output a unique
If Ok is selected, then the text input can be stored message to the log to confirm the script has run, for
into a variable. In this example, it will be stored in the example output "in IF statement". If that message
variable answer. does not appear, then you know where to start looking
var answer = prompt("What day is it?") for the error.
To view console mode open your browser with the web
page on, and click F12. There will then be a tab with
console on it.
console.log("In the JavaScript")
Change the text in the speech marks to output a
different message.

WORKED EXAMPLE 20.03


Create a web page that:
• firstly, displays an alert welcoming you to the website
• secondly, asks you to confirm that you want to proceed to the question
• thirdly, asks a question where you have to type an answer.
At each stage it should write a log to the console to say what it has done.
Start with the alert.
<HTML>
<BODY>
<SCRIPT>
alert("Welcome to the website")
</SCRIPT>
</BODY>
</HTML>

472

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED

Add the confirmation using a confirm box.


<HTML>
<BODY>
<SCRIPT>
alert("Welcome to the website")
var confirmed = confirm("Are you sure you want to proceed?")
</SCRIPT>
</BODY>
</HTML>

This is storing the result in the variable confirmed. You are not going to do anything with this at this stage, but when
you have learnt how to use selection, you can stop the next question being asked based on the response.
Add the question.
<HTML>
<BODY>
<SCRIPT>
alert("Welcome to the website")
var confirmed = confirm("Are you sure you want to proceed?")
var userAnswer = prompt("What is 10 + 10?")
</SCRIPT>
</BODY>
</HTML>

After each of the actions write an appropriate message to the console log.
<HTML>
<BODY>
<SCRIPT>
alert("Welcome to the website")
console.log("Alert")
var confirmed = confirm("Are you sure you want to proceed?")
console.log("Confirmation")
var userAnswer = prompt("What is 10 + 10?")
console.log("Question asked")
</SCRIPT>
</BODY>
</HTML>

Open the website with the console log open and watch what happens.

473

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 20.03 20.4 Changing images


1 Create a web page that displays your name You can set, or change, an image by using the
at the top of the page. document.getElementById command. Make sure the
HTML code for your image (or image placeholder) has
2 Create a web page that outputs a story as a
an ID. For example, here there is no image (src is ""
series of alert boxes.
instead of a filename), and the element is named:
3 Add a console log to tasks 1 and 2 to confirm "firstImage":
each box that has been successfully output.
<img src="" id = "firstImage">
4 Create a basic text web page using HTML.
Instead of using .innerHTML there is .src. This is
Edit the web page so that each element
because you are not changing the HTML within the
(for example, paragraph) has a name and
element, you are changing the filename of the image.
display the text in JavaScript instead.
In this case, the element will display the image with the
name "ss1.jpg" that is saved in the same folder as the
web page file.
Questions document.getElementById("firstImage").src =
1 Which keyword(s) will output a box with "ss1.jpg"
a message? You can access and change other properties of images
2 Which keyword(s) will write data to the console? using the same document.getElementById command.
3 Which keyword(s) will output a new box for a user Change the .src to the property you want to edit.
to enter data? For example, this code will set the height and width
of an image:
4 What is the purpose of writing data to the console?
document.getElementById("image1").height =
"500"
document.getElementById("image1").width =
"500"

WORKED EXAMPLE 20.04


Create a web page with the title My Images, and then two images underneath that are set using JavaScript.
First set up the structure of the website, the title and the placeholders for the two images with IDs.
<HTML>
<BODY>
<h1>Welcome to my website.</h2>
<img src = "" id = "image1">
<img src = "" id = "image2">
<SCRIPT>

</SCRIPT>
</BODY>
</HTML>

474

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED

Then add the code to the JavaScript to set the images.


<HTML>
<BODY>
<h1>Welcome to my website.</h2>
<img src = "" id = "image1">
<img src = "" id = "image2">
<SCRIPT>
document.getElementById("image1").src = "IMG_1.jpg"
document.getElementById("image2").src = "IMG_2.jpg"
</SCRIPT>
</BODY>
</HTML>

After the name of your element, put the command


PRACTICAL ACTIVITY 20.04 .style and then the name of the style you are trying to
Open file 20.03.html and edit it to create a change, for example, .color, or .fontSize. After the
webpage that displays four images of your equal sign is the value you want to assign to this style.
favourite animal. Look at the following examples:
Use JavaScript to display four images of your 1 This example sets the paragraph with the ID "p1" to
favourite animal. have red font.
document.getElementById("p1").style.color =
‘red’;

PRACTICAL ACTIVITY 20.05 2 This example changes the font to xx-large.


document.getElementById("p1").style.fontSize
1 Change the web page that displays your = "xx-large";
name at the top, to include an image of you
(or something related to you). 3 This example changes the background colour to blue.
document.getElementById("p1").style.
2 Change your web page that outputs a story backgroundColor = ‘blue’;
using alert boxes. Each time a new alert
box appears, change the image that is on Table 20.1 has a list of some of the styles you can
the web page so it matches the text in the change, but there are many more that you can use.
alert box.

20.5 Changing HTML


style
In HTML you can change the colour and style of font,
the background colour of a section of text, and so on.
These are all different properties of the elements. You
can change these in JavaScript by using the document.
getElementById command.

475

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Style Options Example


Font size xx-small .style.fontSize = "xx-small"
x-small .style.fontSize = "smaller"
small
medium
large
x-large
xx-large
smaller (decreases by 1 unit)
larger (increases by 1 unit
Font style italic .style.fontStyle = "oblique"
oblique
normal
Font weight normal .style.fontWeight = "bold"
lighter .style.fontWeight = "500"
bold
bolder
100 to 900
Font family For example, .style.fontFamily = "Arial"
Arial .style.fontFamily = "Courier New"
Courier New
Verdana
Times New Roman
Background colour For example, .style.backgroundColor = "red"
Red
Yellow
#FF0052
Table 20.1: Styles.

WORKED EXAMPLE 20.05


Create a website that has two paragraphs of text. Make the second paragraph in:
Use JavaScript to make the first paragraph in: • green
• purple • Courier New font
• Arial font • size x-large.
• size small.

Start by creating the two paragraphs; these could be in HTML or in JavaScript.


<HTML>
<BODY>
<p id = "p1">There was no possibility of taking a walk that day. We had been wandering,
indeed, in the leafless shrubbery an hour in the morning; but since dinner (Mrs. Reed,
when there was no company, dined early) the cold winter wind had brought with it clouds
so sombre, and a rain so penetrating, that further out-door exercise was not out of the
question.</p>

476

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED

<p id = "p2">I was glad of it: I never like long walks, especially on chilly afternoons:
dreadful to me was the coming home in the raw twilight, with nipped fingers and toes, and a
heart saddened by the chidings of Bessie, the nurse, and humbled by the consciousness of my
physical inferiority to Eliza, John, and Georgiana Reed.</p>
<SCRIPT>

</SCRIPT>
</BODY>
</HTML>
Set the font style for the first paragraph (p1).
<HTML>
<BODY>
<p id = "p1">There was no possibility of taking a walk that day. We had been wandering,
indeed, in the leafless shrubbery an hour in the morning; but since dinner (Mrs. Reed,
when there was no company, dined early) the cold winter wind had brought with it clouds
so sombre, and a rain so penetrating, that further out-door exercise was not out of the
question.</p>
<p id = "p2">I was glad of it: I never like long walks, especially on chilly afternoons:
dreadful to me was the coming home in the raw twilight, with nipped fingers and toes, and a
heart saddened by the chidings of Bessie, the nurse, and humbled by the consciousness of my
physical inferiority to Eliza, John, and Georgiana Reed.</p>
<SCRIPT>
document.getElementById("p1").style.color = ‘purple’;
document.getElementById("p1").style.fontSize = "small";
document.getElementById("p1").style.fontFamily = "Arial";
</SCRIPT>
</BODY>
</HTML>

Set the font style for the second paragraph (p2).


<HTML>
<BODY>
<p id = "p1">There was no possibility of taking a walk that day. We had been wandering,
indeed, in the leafless shrubbery an hour in the morning; but since dinner (Mrs. Reed,
when there was no company, dined early) the cold winter wind had brought with it clouds
so sombre, and a rain so penetrating, that further out-door exercise was not out of the
question.</p>
<p id = "p2">I was glad of it: I never like long walks, especially on chilly afternoons:
dreadful to me was the coming home in the raw twilight, with nipped fingers and toes, and a
heart saddened by the chidings of Bessie, the nurse, and humbled by the consciousness of my
physical inferiority to Eliza, John, and Georgiana Reed.</p>
<SCRIPT>
document.getElementById("p1").style.color = ‘purple’;
document.getElementById("p1").style.fontSize = "small";
document.getElementById("p1").style.fontFamily = "Arial";
document.getElementById("p2").style.color = ‘green’;
document.getElementById("p2").style.fontSize = "x-large";
document.getElementById("p2").style.fontFamily = "Courier New";
</SCRIPT>
</BODY>
</HTML>

477

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

var name;
PRACTICAL ACTIVITY 20.06
var tells JavaScript that you are creating a variable.
1 Change the web page that displays
name is the name of this variable.
your name and an image of you. Write
an introductory paragraph of text about
yourself. Change the font style of both the
title and the first paragraph using JavaScript. Assignment
The title should be larger and centered Assignment means adding a value to that variable.
in the page. For example:
2 Work in pairs. You will be working together name = "Luca";
to create a web page that instructs a user The name of the variable comes first and = can be read
on how to add JavaScript to a web page. as the word ‘becomes’. This is the assignment operator.
Make sure you have a suitable title that is Luca is what is being stored. Luca is in speech marks
formatted appropriately using JavaScript. (" ") because it is a string (see Table 20.2). For example:
Whenever you use code in the text, this
should be formatted to be Courier New. All age = 18;
other fonts should be Arial. Make sure you This time the variable is called age, and 18 has been
format the text using JavaScript. Take it in put into it.
turns to add statements to format the text.
You can change the value in the variable. For example:
name = "Katerina";
age = 21;
20.6 Variables and operators These values have overwritten the previous data.
A variable is a space in memory that is given a name
(an identifier), where you can store data that can change
while the program is running. Data types
For example, you could create a space in memory called The data stored in a variable will be of a set data type.
name and you could store the name Luca in there. You Table 20.2 shows the main data types used in JavaScript.
could later change it and store Katerina. You can
check what is stored there by asking what is stored in Data Description Example
name. The computer would tell you Katerina. type
Number A numeric age = 16
The identifier must be one word (that is, no spaces) and
start with a letter. It must not be any word that is used value score = 12.4
by JavaScript (these are known as reserved words). For String Letters, name = "Katerina"
example, var is invalid because it is used by JavaScript. characters address = ‘24
and numbers.
Main Street’
Any text string
Declaration must start message = "Hello
A variable declaration tells the program that you need and end with World"
a space in memory and what its identifier will be. An either single
example variable declaration in JavaScript is: or double
quotation
marks, for
KEY WORD example ‘...’
or "..."
declaration: a statement giving the identifier of a
Boolean True or False correct = true
variable or array
correct = false

478

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

Data Description Example KEY WORD


type
Array A series of numbers = [1,2,3] boolean: a data type, either true or false
values of the
same data type
(see Section Converting data to the correct form is important to
20.13 ‘Arrays’) make sure you get the data you expect. You will learn
about addition in the next section ; the + symbol can
Object A series of film =
be used to add together two numbers (for example
named values {title:"The House", 2 + 3 = 5), but it also joins together two strings
of the variable (for example, “2”+”3” = “23”).
genre:"Drama",
length:96,
releaseYear:2013} WORKED EXAMPLE 20.06
Create a webpage that stores the first name, last name,
Table 20.2: Data types. and age of a person in variables. The script should
then output all of this information in separate alerts.
Data types are not declared when declaring a variable;
First create a variable for the first piece of data, first
it is assumed when a value is given to the variable.
name.
For example:
<HTML>
var name;
<BODY>
name could be of any data type. But if instead you put:
<h1>This is all about me</h1>
var name = "";
name is now a string. <SCRIPT>
var firstName = "Katerina";
For example, in:
</SCRIPT>
var age;
</BODY>
age could be of any data type. But if instead you put: </HTML>
var age = 0; Create the next variable for last name, and then one
age is now a number. for age.
<HTML>
<BODY>
Type conversions <h1>This is all about me</h1>
You can convert one type of data into a second
data type. <SCRIPT>
To convert data to a string, use the command String(). var firstName = "Katerina";
For example: var lastName = "Singh";
var stringNumber = String(999); var age = 28;
</SCRIPT>
var stringBoolean = String(true);
</BODY>
To convert data to an integer, use the command </HTML>
Number() for example:
var numberString = Number("999");
Boolean data can be converted to numbers; true is
converted to 1, and false to 0. For example:
var numberBoolean = Number(true);

479

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Table 20.3 shows the arithmetic operators.


CONTINUED
Output each of the variables, one at a time. Operator Function Example
+ Addition x = 1 + 2;
<HTML>
<BODY> x is now 3
<h1>This is all about me</h1> - Subtraction x = 5 – 1;
x is now 4
<SCRIPT>
var firstName = "Katerina"; * Multiplication x = 2 * 3;
var lastName = "Singh"; x is now 6
var age = 28;
/ Division x = 10 / 3;
alert(firstName);
alert(lastName); x is now 3.33
alert(age); ++ Increment x++;
</SCRIPT> (increase by 1)
</BODY>
-- Decrement x--;
</HTML>
(decrease by 1)
% Modulus (return x = 11 % 5;
the remainder part x is now 1
PRACTICAL ACTIVITY 20.07 of a division)
1 Create a web page that stores information floor() Round down x =
a calculation floor(10/3);
about yourself in variables. Output this
information into HTML elements to display (remove the
the information about yourself. remainder)

2 Edit the story program you created before. Table 20.3: Arithmetic operators.
Store each part of the story in individual
variables. Output these variables instead of
In an arithmetic calculation you can use numbers
the text for the story.
(literals) or variables.
3 Swap computers with a partner. Add a new
part of the story in your partner’s web page.
KEY WORDS
Make sure you do not change anything that
is already there. operator: a symbol, or set of symbols,
that perform an operation, for example,
arithmetic operators

20.7 Arithmetic operators arithmetic operator: a symbol, or symbols, that


perform a mathematical calculation; these often
An operator is a symbol, or set of symbols, that appear as algebraic operators that you will be
perform an action. There are a number of these used used to using in mathematics
in JavaScript. These are categorised as arithmetic, comparison operator: a symbol, or symbols,
comparison and logical. that compare the two sides of the operator and
the result is either true or false
logical operator: symbols that represent the
logical operations and, or, not
literal: the actual data being used (instead of
a variable)

480

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

WORKED EXAMPLE 20.07


Create a web page that stores 9999 and 1000 in Add each calculation in turn, and output each result.
variables, and then calculates and outputs the result The same variable, total, has been used for each
of: calculation because this saves memory (each new
variable takes up a space in memory).
• 9999 + 1000
<HTML>
• 9999 – 1000
<BODY>
• 9999 * 1000 <h1>Data Web page</h1>
• 9999 / 1000 <SCRIPT>

• 9999 % 1000 var firstNumber = 9999;


var secondNumber = 1000;
• floor(9999 / 1000).
var total = firstNumber + secondNumber;
First, declare two variables and store 9999 and 1000 document.write(total);
in each. document.write(“ “);
<HTML> total = firstNumber – secondNumber;
<BODY> document.write(total);
<h1>Data Web page</h1> document.write(“ “);
<SCRIPT> total = firstNumber * secondNumber;
var firstNumber = 9999; document.write(total);
var secondNumber = 1000; document.write(“ “);
</SCRIPT> total = firstNumber / secondNumber;
</BODY> document.write(total);
</HTML> document.write(“ “);
Perform the first calculation, store the result in a new total = firstNumber % secodnNumber;
variable, then write this to the document. document.write(total);
<HTML> document.write(“ “);
<BODY> total = floor(firstNumber /
<h1>Data Web page</h1> secondNumber);
document.write(total);
<SCRIPT> document.write(“ “);
var firstNumber = 9999; </SCRIPT>
var secondNumber = 1000; </BODY>
var total = firstNumber + </HTML>
secondNumber; A second document.write(“ “) command is put
document.write(total); between each output, to put a space between each result.
</SCRIPT> Try the code with and without this statement and see
</BODY> what happens.
</HTML>

481

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 20.08 WORKED EXAMPLE 20.08

1 Use prompt boxes to ask the user to enter Create a program that has a function to output
two numbers (you will need one prompt for "Hello World". Call the function several times from
each number). Output the result of these the main program.
two numbers added together. First declare your function in the JavaScript and put
2 Use prompt boxes to ask the user for their the actions inside the { }.
name. Output a message including their <HTML>
age, for example, "Hello Chin Hao". <BODY>
<h1>Welcome to my website</h1>
3 Store 10 numbers in separate boxes.
Add together all the numbers and output <SCRIPT>
the result. function outputText(){
document.write("Hello World");
4 Use a prompt box to ask the user to enter a }
number. Subtract this number from 100 and </SCRIPT>
output the result. </BODY>
</HTML>

Then, call the function in the JavaScript code; this can


go before or after the function.
20.8 Functions <HTML>
A function is a set of instructions that perform a specific <BODY>
task. It is independent code that only runs if it is called. <h1>Welcome to my website</h1>
Functions are very useful for removing repeated code, <SCRIPT>
especially when it may need to be repeated at different outputText();
positions in the program. Instead of rewriting the code function outputText(){
(which gives more opportunity for errors), just call document.write("Hello World");
the function. }
</SCRIPT>
Functions can be a) called (invoked) from within the
</BODY>
JavaScript code, b) called when an event occurs such as
</HTML>
clicking a button, and automatically run (self-invoked).
This section will include all these ways.
Every function has an identifier. In the following A function can take values from the program that calls
example the function is named outputNums. it; these are called the parameters. It can also return a
value back to the program that called it.
function outputNums(){
The following function, addNums, takes two numbers,
document.write(0); num1 and num2, adds these together and returns
document.write(1); the result.
} function addNums(num1, num2){

The code inside this will not run unless the identifier is return num1 + num2;
called. All the code that will run in the function needs to }
be inside the brackets {}.
The addNums function can now be used within the code:
To call the function, add the code:
var result = addNums(2,3);
outputNums();
num1 is given the value 2, num2 is given the value 3. The
function addNums adds these together (5) and returns
the result. 5 is now stored in result.

482

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

WORKED EXAMPLE 20.09

Create a program that has a function to take two Then, the second call with the numbers 4 and 5.
values as parameters and multiply them. The main <HTML>
program should then call the function, first with the
<BODY>
numbers 2 and 3, secondly with the numbers 4 and 5,
thirdly with the result of the first function call and the <h1>Welcome to my website</h1>
second function call. Then, display the result from the <SCRIPT>
third function call. function multiplyNumbers(num1, num2){
First, create the function. It needs two parameters, var result = num1 * num2;
and needs to return the result. return result;
}
<HTML>
<BODY> var value1 = multiplyNumbers(2,3);
<h1>Welcome to my website</h1> var value2 = multiplyNumbers(4,5);
<SCRIPT> </SCRIPT>
function multiplyNumbers(num1, num2){ </BODY>
var result = num1 * num2; </HTML>
return result;
}
Finally, call the function with the result of the two
previous calls (value1 and value2) and output this
</SCRIPT>
result.
</BODY>
</HTML> <HTML>
<BODY>
In this function the result is saved in a variable before
<h1>Welcome to my website</h1>
being returned, but it could just be returned directly.
<SCRIPT>
The first call is with 2 and 3. The function returns a function multiplyNumbers(num1, num2){
value, so this needs to be stored somewhere.
var result = num1 * num2;
<HTML> return result;
<BODY> }
<h1>Welcome to my website</h1> var value1 = multiplyNumbers(2,3);
<SCRIPT>
var value2 = multiplyNumbers(4,5);
function multiplyNumbers(num1, num2){
var value3 = multiplyNumbers(value1,
var result = num1 * num2; value2);
return result;
document.write(value3);
}
</SCRIPT>
var value1 = multiplyNumbers(2,3);
</BODY>
</SCRIPT>
</HTML>
</BODY>
</HTML>

When you create a function, you can create a variable


PRACTICAL ACTIVITY 20.09 inside it (local) or outside it (global). If the variable is
Open file 20.04.html and amend it to store local, then it only exists when that function is running.
two numbers. Then, output the result of the As soon as it ends and returns control, the variable
numbers added together, subtracted, multiplied disappears and is blank. This variable can only be
and divided. accessed (for example output, changed) from within
that function.

483

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

KEY WORDS CONTINUED

local variable: a variable declared within 3 Items in a shop are reduced by 10 per
a function; it can only be accessed within cent. Create a function to take a value as
the function a parameter and return the reduced price.
Create a function to ask the user to input the
global variable: a variable declared outside cost of an item using a prompt. Repeatedly
a function; it can be accessed anywhere call the function to output, and then the
within the code function to calculate the cost. Display the
reduced price each time.
If the variable is global, then it exists as soon as the web
page loads, and permanently exists. It can be accessed
from anywhere in the JavaScript. However, this can Questions
waste memory, because it will always exist.
5 Define the term function.
In this example, number is global. It is declared outside 6 What does the operator % do?
the function, but it can be accessed inside the function.
7 What is the difference between the operator
Although the variable newNumber is local, it is inside the
++ and --?
function and cannot be accessed outside of it.
<HTML>
<BODY>
<h1>Welcome to my website</h1>
20.9 Form elements
You need to tell HTML that you are creating a form
<SCRIPT>
using the <form></form> tag. All the code to display
var number = 0; buttons, drop-down boxes, and so on then comes within
function firstFunction(){ these tags.
alert(number); An event can occur within the HTML code that can be
var newNumber = 10; acted upon by JavaScript, for example when a button
alert(newNumber); is clicked. Within the HTML code for these objects, a
JavaScript function can be called to perform an action.
}
</SCRIPT>
</BODY> KEY WORD
</HTML> object: a series of named values all stored under
one identifier
PRACTICAL ACTIVITY 20.10

1 Create a function for each of the arithmetic


operators. Use a prompt to ask the users to button
enter two numbers, then call the function
for each of the operators and output When the user clicks on an element, for example,
each result. an HTML button, it can be programmed to call a
JavaScript function. For example, every time you click
2 Write a sentence to output to the screen a button, the function calculate() is called and it
with repeated words within it, for example, performs a calculation and outputs a result.
“when a word is repeated, the repeated
This HTML code will create a button that says
word appears several times”. Create a
"Click me":
function for each word, and a separate
function for the space between each word. <button onclick="outputMessage()">Click
Call the functions to output the sentence. me</button>

484

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

The code states that when the button is clicked (onclick), Every time the button is clicked, the message "Hello
the JavaScript function outputMessage() will World" will be displayed on the page.
be called.
This function is then written in JavaScript:
function outputMessage(){
document.write("Hello World");
}

WORKED EXAMPLE 20.10


Create a program that displays an image when a Lastly, put the code in the function to display the image
button is clicked. and change any other of the properties, for example
setting the height and width.
First, create the button.
<HTML>
<HTML>
<BODY>
<BODY>
<button onclick = “showImage()”>Click to
<button onclick = "showImage()">Click to
show image</button>
show image</button>
<SCRIPT> <br>
</SCRIPT> <img src = “” id = “imageHolder”>
</BODY> <SCRIPT>
</HTML> function showImage(){
document.getElementById
Then, create the function. (“imageHolder”).src = “IMG_2.jpg”
<HTML> document.getElementById
<BODY> (“imageHolder”).height = “500”;
<button onclick = "showImage()">Click to document.getElementById
show image</button> (“imageHolder”).width = “500”;
<SCRIPT> }
function showImage(){ </SCRIPT>
} </BODY>
</SCRIPT> </HTML>
</BODY>
</HTML>
Then, create the placeholder for the image.
<HTML>
<BODY>
<button onclick = “showImage()”>Click to
show image</button>
<br>
<img src = “” id = “imageHolder”>
<SCRIPT>
function showImage(){
}
</SCRIPT>
</BODY>
</HTML>

485

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

document.getElementById("enterColour").
PRACTICAL ACTIVITY 20.11 value = "Hello";
1 Create a web page with two images. Change All data accessed from text boxes is stored as a string,
the single image displayed on screen unless you tell it to convert it. For example, if number
according to which button has been clicked. 22 was entered, this would be stored as "22". See Section
20.6 Variables and operators/Type conversions for how
2 Create a button for each arithmetic operator.
to convert it to a number.
When each button is clicked, use a prompt
to get two numbers from the user, perform
the operation they clicked on (for example WORKED EXAMPLE 20.11
if they clicked + then add the numbers) and
output the result. Create a program that asks the user to enter two
numbers, one in each separate text box. When the
3 Create a short story where the user has to button is clicked, add these numbers together and
click different buttons to try and escape output the result to both text boxes.
from a room. Each time they click a button,
First, set up the form, with two text boxes and a
the text on the web page changes and they
button.
are told to click a different button to decide
what happens next. For example, in the first <HTML>
output they are told to click button 1 to try <BODY>
the door, and button 2 to pick up the key. <input type = "text" id = "number1">
The story then continues from the button <input type = "text" id = "number2">
they choose to click.
<button onclick = "addTogether()">Add</
4 Edit the short story task to display an image button>
with each button as well, for example if they <SCRIPT>
pick up the key, display an image of a key </SCRIPT>
with the text. </BODY>
</HTML>

Declare a function. Within it, get the data from each


Text box text box and store each in their own variable.
You can enter text into a text box, and you can then <HTML>
access this data and use it, for example, in a calculation. <BODY>
This HTML code will create a text box with the <input type = "text" id = "number1">
identifier enterColour. <input type = "text" id = "number2">
<input type="text" id="enterColour"> <button onclick = "addTogether()">Add</
button>
The data is accessed using document. <SCRIPT>
getElementByID().value with the text box
function addTogether(){
identifier in the brackets. For example, here the data in
enterColour is stored in the variable colourEntered, var num1 = document.
getElementById("number1").value;
var colourEntered = document. var num2 = document.
getElementById("enterColour").value; getElementById("number2").value;
An action is needed to tell JavaScript to get the data }
from the text box, for example clicking a button. This </SCRIPT>
can then call a function where you get the data from </BODY>
enterColour.
</HTML>
You can write to a text box in a similar way. Put the
command on the left of the assignment. This code will
write "Hello" into the text box.

486

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED Drop-down box


These values are currently strings. A drop-down box gives the user options to choose from.

Add the values together and store the result in a new This HTML code will create a drop-down box called
variable. Then, write this variable to both text boxes. colours. It will create three options: purple, orange
and blue. Each <option> will be a new choice in the
<HTML>
drop-down box:
<BODY>
<select id = "colours">
<input type = "text" id = "number1">
<input type = "text" id = "number2"> <option>purple</option>
<button onclick = "addTogether()">Add</ <option>orange</option>
button>
<option>blue</option>
<SCRIPT>
</select>
function addTogether(){
var num1 = document. The item selected is accessed using:
getElementById("number1").value; document.getElementById("colours").
options[document.getElementById("colours").
var num2 = document.
getElementById("number2").value; selectedIndex].text;
var total = Number(num1) + This is a long piece of code, but there is a way to shorten
Number(num2); it. document.getElementById("colours") appears
twice in the same line. Instead of writing it twice, you
document.getElementById("number1"). can store this in a variable, for example:
value = total; var coloursID = document.
document.getElementById("number2"). getElementById("colours");
value = total;
Then use this variable instead, giving the code:
}
</SCRIPT> coloursID.options[coloursID.selectedIndex].
text;
</BODY>
</HTML> This will need to go within a function that is called, for
example, from a button. This function will access the
chosen option and output it in an alert.
function displayChoice(){
PRACTICAL ACTIVITY 20.12
var coloursID =
1 Create a program that asks the user to enter document.getElementById(“colours”);
their name into a text box. Output their alert(coloursID.options[coloursID.
name in an alert box. selectedIndex].text);

2 Change your calculator program, so }


there are two text boxes for the user to
enter a number into each. When a button
(for example +) is clicked, perform the Radio button
calculation and output it. You can give the user a range of options that they
can see, but can only select one of. This is done with a
radio button.

487

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

This HTML code will create a radio button for Purple, function checkColours(){
Orange and Blue: var colour = document.forms[0];
<form> for(i=0; i<3; i++){
if(colour[i].checked){
<input type="radio" name="colours"
value="purple">Purple<br> document.write(colour[i].value);
}
<input type="radio" name="colours" value
="orange">Orange<br> }
}
<input type="radio" name="colours" value
="blue">Blue<br> • The first line in the function stores the first form
</form> elements in the variable colour (this just saves
having to write it all out every time).
The radio buttons must be within a form so they
are grouped together, otherwise you may be able to • The for loop goes through each element; 0, then
select several. 1, then 2.

In the JavaScript, you need to check which one has been • Each time, it checks if that radio button has
selected using a for loop and an if statement (you will been selected.
learn more about these in Section 20.12 Selection and • The next line only runs if the if is true, then
Section 20.14 Loops). This function needs to check each it outputs the content of the choice (the
of the radio buttons you have created, in turn, to find colour chosen).
out which one has been checked.

WORKED EXAMPLE 20.12


Create a program where a user can choose a colour from a drop-down box, and an animal from a radio button.
The program should then combine these and output the name of the new animal when a button is clicked.
First, create the drop-down box with the colour options.
<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

488

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED

Then, create the radio buttons.


<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<form id = "animals">
<input type = "radio" name = "animals" value = "elephant">Elephant <br>
<input type = "radio" name = "animals" value = "tortoise">Tortoise <br>
<input type = "radio" name = "animals" value = "dolphin">Dolphin <br>
<input type = "radio" name = "animals" value = "kangaroo">Kangaroo <br>
</form>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

Create the button.


<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<form id = "animals">
<input type = "radio" name = "animals" value = "elephant">Elephant <br>
<input type = "radio" name = "animals" value = "tortoise">Tortoise <br>
<input type = "radio" name = "animals" value = "dolphin">Dolphin <br>
<input type = "radio" name = "animals" value = "kangaroo">Kangaroo <br>
</form>
<button onclick = "createAnimal()">Create the animal</button>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

489

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED

Create the JavaScript function and access the data in the drop-down box and store it in a variable.
<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<form id = "animals">
<input type = "radio" name = "animals" value = "elephant">Elephant <br>
<input type = "radio" name = "animals" value = "tortoise">Tortoise <br>
<input type = "radio" name = "animals" value = "dolphin">Dolphin <br>
<input type = "radio" name = "animals" value = "kangaroo">Kangaroo <br>
</form>
<button onclick = "createAnimal()">Create the animal</button>
<SCRIPT>
function createAnimal(){
var dropDownName = document.getElementById("colour");
var colourChosen = dropDownName.options[dropDownName.selectedIndex].text;
}
</SCRIPT>
</BODY>
</HTML>

Add JavaScript code to check the radio buttons and get the value of the one selected.
<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<form id = "animals">
<input type = "radio" name = "animals" value = "elephant">Elephant <br>
<input type = "radio" name = "animals" value = "tortoise">Tortoise <br>
<input type = "radio" name = "animals" value = "dolphin">Dolphin <br>
<input type = "radio" name = "animals" value = "kangaroo">Kangaroo <br>
</form>

490

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED

<button onclick = "createAnimal()">Create the animal</button>


<SCRIPT>
function createAnimal(){
var dropDownName = document.getElementById("colour");
var colourChosen = dropDownName.options[dropDownName.selectedIndex].text;
for(i=0; i<4; i++){
if(animalRadio[i].checked){
var animalChosen = animalRadio[i].value;
}
}
}
</SCRIPT>
</BODY>
</HTML>

Output the two selected values.


<HTML>
<BODY>
<select id = "colour">
<option>red</option>
<option>yellow</option>
<option>purple</option>
<option>orange</option>
<option>green</option>
</select>
<form id = "animals">
<input type = "radio" name = "animals" value = "elephant">Elephant <br>
<input type = "radio" name = "animals" value = "tortoise">Tortoise <br>
<input type = "radio" name = "animals" value = "dolphin">Dolphin <br>
<input type = "radio" name = "animals" value = "kangaroo">Kangaroo <br>
</form>
<button onclick = "createAnimal()">Create the animal</button>
<SCRIPT>
function createAnimal(){
var dropDownName = document.getElementById("colour");
var colourChosen = dropDownName.options[dropDownName.selectedIndex].text;
for(i=0; i<4; i++){
if(animalRadio[i].checked){
var animalChosen = animalRadio[i].value;
}
}
}
alert(colourChosen + " " + animalChosen;
</SCRIPT>
</BODY>
</HTML>

491

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 20.13 onchange


Open file 20.05.html. This can be attached to an element that the user can
change, for example a drop-down box. In this example,
Complete the program to give the user five fruit when the user changes their option in the drop-down
to select, and five colours to select. box, the function will be called.
When the button is pressed, output these two <HTML>
words combined e.g. ‘orange banana’.
<BODY>
<select id = "colours" onchange="outputText()">
<option>purple</option>
PRACTICAL ACTIVITY 20.14
<option>orange</option>
1 Create a form that lets the user choose from
<option>blue</option>
a series of options in a drop-down box.
Change the text displayed in the web page </select>
to the option they have selected. <SCRIPT>
2 Repeat Task 1, using a radio button instead function outputText(){
of a drop-down box.
alert("Hello World")
3 Create a form that lets the user create their
}
own sentence using a series of drop-down
boxes and radio buttons. Users should be </SCRIPT>
able to select the first word of the sentence </BODY>
from one object, then the second from the
next, and so on. When the user clicks a </HTML>
button, output the sentence using an alert.

onmouseover
This will run when the user moves the cursor over
20.10 Detecting events an element, for example an image. In this example,
when the user puts their cursor over the image, the
You have already used onClick() in the section on image will change.
buttons. There are other events that you can detect in
<HTML>
JavaScript, such as the following:
<BODY>
<img src="IMG _ 1.jpg" id =
onload "imageHolder" width=500 height=500
onmouseover="changeImage()">
When onload is attached to an element, it will run when
the element is called or loaded. In this example, when <SCRIPT>
the web page (the body tag) loads, the function will run. function changeImage(){
<HTML> document.
<BODY onload="outputText()"> getElementById("imageHolder").src =
<SCRIPT> "IMG _ 2.jpg"
function outputText(){ }
alert("Hello World") </SCRIPT>
}
</BODY>
</SCRIPT>
</HTML>
</BODY>
</HTML>

492

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

<HTML>
onmouseout
<BODY>
This will run when the user moves the cursor off
an element, for example, an image. In this example, <input type="text"
onkeydown="outputLetter()">
when the user moves the cursor away from the
image, a different function is called. <SCRIPT>
<HTML> function outputLetter(){
<BODY> alert("Letter clicked")
<img src="IMG _ 1.jpg" id = "imageHolder"
}
onmouseover="changeImage1()"
onmouseout="changeImage2()" width=500 </SCRIPT>
height=500 >
</BODY>
<SCRIPT>
</HTML>
function changeImage1(){
document.getElementById
("imageHolder").src = "IMG _ 2.jpg"
}
function changeImage2(){
20.11 Showing and
document.
getElementById("imageHolder").src =
hiding HTML elements
"IMG _ 1.jpg" HTML elements (for example paragraphs) can be made
} visible (so they appear and are on screen), and invisible
(so they disappear and cannot be seen).
</SCRIPT>
</BODY> The .visibility option can be set to "visible" or
</HTML> "hidden". For example, this code will set the element
"text1" to be invisible:
document.getElementById("text1").style.
onkeydown visibility = "hidden";
When attached to an element where the user can A second way of doing this is by using the style.
enter data, for example, a text box, it will run when display option of "none" (hidden) or "inline"
the user clicks a key on the keyboard (types a (visible). To make the text box invisible, use the code,
letter). In this example, every time the user types a
document.getElementById("text1").style.
letter a message will output.
display = "none";

WORKED EXAMPLE 20.13


Make an image disappear when the cursor moves over it, and make it reappear when the mouse moves off it.
First set up the web page with the starting image.
<HTML>
<BODY>
<img src = "IMG_1.jpg" id = "theImage">
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

493

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Create one function to make the image appear, and another to make it disappear.
<HTML>
<BODY>
<img src = "IMG_1.jpg" id = "theImage">
<SCRIPT>
function imageDisappear(){
document.getElementById("theImage").style.visibility = "hidden";
}
function imageAppear(){
document.getElementById("theImage").style.visibility = "visible";
}
</SCRIPT>
</BODY>
</HTML>

Now, set onmouseover and onmouseout for the image.


<HTML>
<BODY>
<img src = "IMG_1.jpg" id = "theImage" onmouseover = "imageDisappear()"
onmouseout="imageAppear()" width = 500 height = 500>
<SCRIPT>
function imageDisappear(){
document.getElementById("theImage").style.visibility = "hidden";
}
function imageAppear(){
document.getElementById("theImage").style.visibility = "visible";
}
</SCRIPT>
</BODY>
</HTML>

PRACTICAL ACTIVITY 20.15 20.12 Selection


1 Create a web page where the user A conditional statement lets you specify which, if
can choose to view an image by any, statements are to be run. This is done through a
clicking a button. condition, and whether that condition is true or false.

2 Create a web page with several images


and a button. Each time the user puts their KEY WORD
mouse over an image, it disappears and
they get a point (stored as a global variable). condition: a statement that can be evaluated
When the user clicks the button it tells them as true or false, for example 5 > 6 (this is false
their score. because 5 is not greater than 6)

494

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

Comparison operators if is always the first in a selection statement. It can


be on its own, or it can be combined with else and
Table 20.4 shows the different comparison operators. elseif statements.

Operator Function Example


> Greater than 5 > 6; else
This is false. An else statement gives you an option to run code if
< 5 < 6; the condition within the if is false:
Less than
This is true. if (myVariable < 6) {
>= Greater than or 5 >= 6; message = "Yes it is!";
equal to This is false. }else{
<= Less than or equal 5 <= 5; message = "No it isn’t!";
to This is true. }
== Equal to 5 == 6;
If the data in the variable myVariable is less than 6,
This is false. then "Yes it is!" will be assigned to message. If
=== Equal to and of the 5 === "5"; it is not less than 6 (so it is 7 or more) then "No it
same data type This is false isn’t!" will be assigned to message instead.
because the first is
a number and the
second is a string. else if
!= Not equal to 5 != 6; else if allows you to have multiple conditions that
This is true. you set to different outcomes. It still starts with an if,
!=== Not equal to or 5 !=== "5"; but you can then have as many else if conditions as
not of the same you need. You can also have an else, but this would
This is true,
data type need to go at the very end.
because they are
not the same data if (myVariable < 6) {
type. message = "Yes it is!";

Table 20.4: Comparison operators. }else if (myVariable == 6){


message = "They’re the same";
}else{
if message = "It’s smaller";
if checks a condition. If it is true, the first block of }
code is run, In this example, if the value in myVariable is less than
if (myVariable < 6) { 6 then "Yes it is!" is assigned to message.
message = "Yes it is!"; If it is not less than 6, it is compared to see if it is equal
} to 6. If it is, then "They’re the same" is assigned
to message.
The code assigning "Yes it is" to the variable
message is only carried out if the data in the variable If it is not less than 6, and not equal to 6, then "It’s
myVariable is less than 6. smaller" is assigned to message.

495

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

WORKED EXAMPLE 20.14


Create a program that displays a different image depending on which option was chosen from a drop-down box.
First, create the web page with a drop-down box, image placeholder and button.
<HTML>
<BODY>

Which image would you like to see?


<select id = "choice">
<option>Image 1</option>
<option>Image 2</option>
</select>

<button onclick = "displayImage()">Display</button>


<img src = "" id = "imagePlaceHolder width = 500 height = 500>

<SCRIPT>

</SCRIPT>
</BODY>
</HTML>

Write the function to get the value from the drop-down box, and then check what the value is using an if statement.
<HTML>
<BODY>
Which image would you like to see?
<select id = "choice">
<option>Image 1</option>
<option>Image 2</option>
</select>
<button onclick = "displayImage()">Display</button>
<img src = "" id = "imagePlaceHolder width = 500 height = 500>
<SCRIPT>
function displayImage(){
var dropDownName = document.getElementById("choice");
var imageChosen = dropDownName.options[dropDownName.selectedIndex].text;
if(imageChosen == "Image 1"){
document.getElementById("imagePlaceHolder").src = "IMG_1.jpg";
}else{
document.getElementById("imagePlaceHolder").src = "IMG_2.jpg";
}
</SCRIPT>
</BODY>
</HTML>

496

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

Logical operators
A comparison can include more than one statement by
including a logical operator.
There are three logical operations: AND, OR and NOT.
These operators can also be used in loops that you learn
about later in this chapter.
The three logical operators are shown in Table 20.5.

Operator Function Explanation Example


&& AND Is true if the condition before and after are (5 < 6) && (7 < 10)
both true. If one is false, then it is false. Both are true, so the result is true.
(5 > 6) && (7 < 10)
The first statement is false, so the result is
false.
|| OR Is true if one or both of the conditions are (5 < 6) ||
true. If both are false, it is false. (7 < 10)
Both are true, so the result is true.
(5 > 6) ||
(7 < 10)
The second is true, so the result is true.
! NOT Replaces a true with false, or a false with !(5 < 6)
true. This is false because 5<6 is true, but the !
will change this to false.
Table 20.5: Logical operators.

WORKED EXAMPLE 20.15

Create a program that asks the user to enter two numbers and output a message depending on the numbers.
• If either number < 10, output "Too small"
• If either number > 100, output "Too large"
• If both numbers < 50 and >= 10, output "below"
• If both numbers are >= 50 and < 100, output "above"
• Otherwise, output "mixed"
Set up the form with two text boxes and a button.
<HTML>
<BODY>
<input type = "text" id = "num1">
<input type = "text" id = "num2">
<button onclick = "calculate()">Calculate</button>
</BODY>
</HTML>

497

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Create the function to get the numbers when the button is clicked.
<HTML>
<BODY>
<input type = "text" id = "num1">
<input type = "text" id = "num2">
<button onclick = "calculate()">Calculate</button>
<SCRIPT>
function calculate(){
var number1 = document.getElementById("num1").value;
var number2 = document.getElementById("num2").value;
}
</SCRIPT>
</BODY>
</HTML>

Write the if statement to check each of the conditions in turn.


<HTML>
<BODY>
<input type = "text" id = "num1">
<input type = "text" id = "num2">
<button onclick = "calculate()">Calculate</button>
<SCRIPT>
function calculate(){
var number1 = document.getElementById("num1").value;
var number2 = document.getElementById("num2").value;
if(number1 < 10 || number2 < 10){
alert("Too small");
}else if(number1 > 100 || number2 > 100){
alert("Too large");
}else if(number1 < 50 && number2 < 50){
alert("Below");
}else if(number1 >= 50 && number 2 >= 50){
alert("Above");
}else{
alert("Mixed");
}
}
</SCRIPT>
</BODY>
</HTML>

498

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

In the worked example, the later elseifs did not need "It’s 4" into the variable message, then run the break
to check that the number was also above 10, or less than statement which forces it to break out of the switch
100. This is because the if statements run in order, statement (that is, it will not then compare the value
so if the first condition is true then none of the other with the next case).
comparisons will take place, and the program will jump
The default catches a value that is not caught by any of
to the last }.
the previous case statements.

Questions
8 What is the result of 10 < 2?
Ternary operator
9 What is the result of 10 === 100? The ternary operator is a special type of selection
statement. It has a single comparison, and can then
10 What is the result of “ten” !=== “eleven”? assign a variable a value dependent on whether this
11 What is the result of “a” == “a”? comparison is true or false.
12 What is the result of 10 > 2 && 10 > 10? var valueToUpdate = (inputData < 10) ?
13 What is the result of “house” == “house” | | "Below":"Above";
10 >= 12?
This statement says: If the value in inputData is less
14 What is the result of !(55 < 66)? than 10, store "Below" in the variable valueToUpdate,
otherwise store "Above" in the valueToUpdate.

switch
PRACTICAL ACTIVITY 20.16
Combining multiple ifs can get difficult to manage. A
switch statement is more efficient because it does not 1 Create a web page that has a person’s age
perform all of the conditions every time. It can take a stored in a variable. Using an If statement,
variable (or expression) and then check its value against output a different message, depending on
a series of options. These options can be values, as in their age. For example, if they are between
the following example, or variables. 13 and 19: “You are a teenager”.
number = 5; 2 Extend your story program. This time ask the
switch(number) { user to enter data, for example an answer to
case 4;
a puzzle and, if they get it correct, or give a
specific answer, then give them the next part
message = "It’s 4"; of the story.
break;
3 Create a web page with one button. Each
case 5; time the button is clicked, a different image
message = "It’s 5"; is displayed (up to five images). You will
need a global variable to keep track of how
break; many times the button has been clicked.
case 6;
4 When the web page loads, ask the user to
message = "It’s 6"; confirm that they want to see the image
break; using a confirm box. If the user clicks OK,
make the image visible, otherwise make it
default; invisible.
message = "It was none of these";
5 Create a web page to allow a user to enter
} their mark in a test. Convert this to a grade
This statement will take the value stored in the variable (for example A is 80%) and output it.
number and compare it to the first case statement;
in this code, case 4. If it is equal to it, it will write

499

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

var colours = ["orange", "purple", "green",


CONTINUED "yellow", "grey"];

6 Create a game where the user has to guess


what number the game has stored. Each KEY WORD
time they guess, the web page will tell them
if they need to guess higher, or lower, or got array: a data structure that can store multiple items
it correct. If they get it correct, tell them how under one identifier; the items are of the same type
many guesses it took. You will need a global
variable to track the number of guesses.
7 Create a function that takes four numbers as This code declares an array, called colours, with five
parameters. Find and output the largest of elements. These are shown as a table in Table 20.6.
these numbers.
Index 0 1 2 3 4
8 Extend Task 7 to find the smallest of the
numbers as well. Value orange purple green yellow grey

Table 20.6: An array.

PRACTICAL ACTIVITY 20.17


Data can be extracted from this array. For example, this
Open file 20.06.html. code would store purple in myFavColour:
Complete the program to input 2 numbers, and var myFavcolour = colours[1];
then output the largest. Data can be replaced in this array. For example, this
code will replace yellow with pink:
colours[3] = "pink";

20.13 Arrays Data can be added to this array. For example, this code
will make a new index, 5, and put blue in it:
An array is a data structure that allows you to store colours.push("blue");
multiple values under one name. It is often represented
as a table, with each value given a number with which to The length of the array can be found. For example, this
access it (known as the array index). For example: code will return 5:
var arrayLength = colours.length;

WORKED EXAMPLE 20.16


Store five words in an array. Create a web page that asks the user to enter a number between 1 and 5
Display the word in that index.
First, set up the web page, declare an array and store the data in it.
<HTML>
<BODY>
Enter a number between 1 and 5.
<input type="text" id="wordToOutput">
<button onclick="outputWord()">Press me</button>
<SCRIPT>
var words = ["One", "Two", "Three", "Four", "Five"];
</SCRIPT>
</BODY>
</HTML>

500

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED
Get the value input. Check its value and subtract 1 to get the index (if they enter 1, this will output index 0).
<HTML>
<BODY>
Enter a number between 1 and 5.
<input type="text" id="wordToOutput">
<button onclick="outputWord()">Press me</button>
<SCRIPT>
var words = ["One", "Two", "Three", "Four", "Five"];
function outputWord(){
var inputNumber = document.getElementById("wordToOutput").value;
inputNumber = inputNumber – 1;
alert(words[inputNumber]);
}
</SCRIPT>
</BODY>
</HTML>

Only the numbers 1 to 5 can be entered, so the input can be checked and an error output if it is not valid.
<HTML>
<BODY>
Enter a number between 1 and 5.
<input type="text" id="wordToOutput">
<button onclick="outputWord()">Press me</button>
<SCRIPT>
var words = ["One", "Two", "Three", "Four", "Five"];
function outputWord(){
var inputNumber = document.getElementById("wordToOutput").value;
inputNumber = inputNumber – 1;
if(inputNumber >= 1 && inputNumber < 5){
alert(words[inputNumber]);
} else {
alert("Invalid number, it must be between 1 and 5");
}
}
</SCRIPT>
</BODY>
</HTML>

501

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

for (count = 0; count < 10; count++){


PRACTICAL ACTIVITY 20.18
total = total + total;
1 Create an array that stores the names of ten }
different films. Output each of these films, in
turn, on a web page. Each film should be on count is a variable that is declared for the loop. It
a new line. usually counts the number of times a loop is run,
although it can be used in other ways. This statement
2 Store a list of image names in an array. Ask can be excluded if, for example, you want to use a
the user to choose an item from a drop- variable that already exists.
down menu. Depending on their choice,
output one of the images (for example the The second element, count < 10, is the condition. As
first option in the drop-down box should long as this is true, the loop will run. This code can be
output the image in index 0). excluded, but then the for loop will run continually
unless you include a break statement. This is a line of
3 Create a web page with a text box and a code that tells the program to stop the construct it is
button. Each time the user enters a number currently in (that is, the loop) and go to the next line of
in the text box, and clicks the button, put code after the loop.
the number into the next array index (you
The third element is what happens each time the
will need to keep track of the number
program gets to the end of the loop, and goes back
of elements in the array using a global
to the beginning. In this case, the variable count
variable). Output the largest number and
increments (increases by one). This statement can be
smallest number of those in the arrays.
excluded if, for example, you want to change the variable
elsewhere within the loop.
This for loop will output the first 12 square numbers:
20.14 Loops for (count = 1; count <= 12; count++){

A loop is a construct that repeats the code inside it a set alert(count * count);
number of times based on a condition. Another name }
for it is iteration.
It can be used when you want to perform the same
action multiple times. For example, you may want to for/in
output a number ten times. Instead of writing the same If you have an object that you need to loop through
line of code ten times, you can put it in a loop, which each element, for example to output them all, you can
reduces the amount of code. use a for/in loop:
You may not know how many times some code needs to var film = {title:"The House",
be run. For example, you want to multiply a number by genre:"Drama", length:96,
itself until it is greater than 1000. You will not know, at releaseYear:2013};
the start, how many times this code needs to be run.
var count;
There are two types of loop: count controlled, and for (count in film){
condition controlled.
document.write(film[count]);
A count controlled, for example a for loop, repeats a set
number of times. A condition controlled, for example }
while and do/while, repeat when a condition is true. This code will output each of the elements within the
object film.

for
In a for loop, you need to know the number of times
the loop is to run. The following code adds the value of
the total to itself ten times:

502

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

while common programming error. The variable would need


to change within the loop so that at some stage it is no
A while loop runs the code while a condition is true: longer true.
var count = 0; A break statement can be inserted into a loop to stop
while(count <= 12){ it running. For example, a loop could run forever,
but a selection (if) statement within it could catch a
document.write(count * count); condition that calls break. This will then break out
count++; of the loop.
}
This loop will display the first 12 square numbers. A do/while
counter (count) is declared before the loop. The value of
this is checked in the condition to see if it is less than or In this loop the condition is checked at the end of the
equal to 12. If it is, it enters the loop, otherwise it skips loop, which means the loop will always run at least once:
it and jumps to the code below the closing. Within the var count = 0;
loop, this counter is incremented.
do{
A while loop does not need to use a counter. document.write(count * count);
For example,
count++;
var check = true;
}
while(check = true){
while(count <= 12);
document.write("It’s true");
In this example, 0*0 will always be output, then the
}
value of count is checked and it decides if the loop will
At the moment this loop will run infinitely. While the run again.
variable check is true, it will continue to run. This is a

WORKED EXAMPLE 20.17


Create a program that asks the user to enter their username and password. All valid usernames and passwords are
stored in a 2D array (username in one index, password in the other). Output whether the user has got it correct, or
not.
First, set up the web page to let the user enter a username and password, and click a button.
<HTML>
<BODY>
Username <input type = "text" id = "txtUsername">
Password <input type = "password" id = "txtPassword">
<button onclick = "checkUsername()">Enter</button>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

503

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
The input box is set to type password, this means that *s will appear instead of the password when text is typed into
the box.
Set up a global array with the valid usernames and passwords.
<HTML>
<BODY>
Username <input type = "text" id = "txtUsername">
Password <input type = "password" id = "txtPassword">
<button onclick = "checkUsername()">Enter</button>
<SCRIPT>
var logins = [["test1","pass123"],["test2","password"]];
function checkUsername(){
}
</SCRIPT>
</BODY>
</HTML>

Store the username and password entered.


Loop through all the array elements and check the first index in each to compare the usernames.
<HTML>
<BODY>
Username <input type = "text" id = "txtUsername">
Password <input type = "password" id = "txtPassword">
<button onclick = "checkUsername()">Enter</button>
<SCRIPT>
var logins = [["test1","pass123"],["test2","password"]];
function checkUsername(){
var username = document.getElementById("txtUsername").value;
var password = document.getElementById("txtPassword").value;
for(count in logins){
if(logins[count][0] === username && logins[count][1] == password){
alert("Welcome");
}
}
}
</SCRIPT>
</BODY>
</HTML>

504

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED
Set a flag to track if they are let in. If they are not, output the username or password are incorrect.
<HTML>
<BODY>
Username <input type = "text" id = "txtUsername">
Password <input type = "password" id = "txtPassword">
<button onclick = "checkUsername()">Enter</button>
<SCRIPT>
var logins = [["test1","pass123"],["test2","password"]];
function checkUsername(){
var username = document.getElementById("txtUsername").value;
var password = document.getElementById("txtPassword").value;
for(count in logins){
if(logins[count][0] === username && logins[count][1] == password){
alert("Welcome");
}
}
if (flag == false){
alert("Sorry that’s incorrect");
}
}
</SCRIPT>
</BODY>
</HTML>

PRACTICAL ACTIVITY 20.19 20.15 Timing events


1 Create a web page that has a series of JavaScript has an inbuilt timer that lets you delay
colours stored in an array. Use a loop to performing a task within a function, or perform an
go through each element in the array and action at a set interval.
output it on a new line on the web page.
2 Create a web page that stores a number in a
variable. Use a loop to output the 12-times-
setTimeout
table for this number. This allows you to set a delay before something happens,
for example before an output appears. The call follows
3 Create a web page that stores a number in a the structure:
variable. Output that number of asterisks (*)
setTimeout(function(){
on a web page
Event to delay;
4 Create a web page that asks the user a
question, such as what is the user’s favourite }, timeToDelay);
colour. It then searches through an array to The time to delay is in milliseconds: 3 seconds = 3000,
output a sentence related to purple. 4 seconds = 4000.

505

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

In this example, the prompt box appears after a two-second delay:


setTimeout(function(){
prompt("Do you want to continue?");
}, 2000);

WORKED EXAMPLE 20.18

Create a web page that makes a line of text appear, then an image, then another line of text, then another image,
with a two-second delay between each.
First, set up the web page; there needs to be space for two images, and two pieces of text.
<HTML>
<BODY>
<p id="firstText"></p>
<img src="" id="firstImage" width = 300 height = 300>
<p id="secondText"></p>
<img src="" id="secondImage" width = 300 height = 300>
</BODY>
</HTML>

Write the function with each element on a separate delay timer. Call the timer when the website first loads (the body
onload).
<HTML>
<BODY>
<p id="firstText"></p>
<img src="" id="firstImage" width = 300 height = 300>
<p id="secondText"></p>
<img src="" id="secondImage" width = 300 height = 300>
<SCRIPT>
function displaySequence(){
setTimeout(function(){
document.getElementById("firstText").innerHTML = "This is the first image"";
}, 2000);
setTimeout(function(){
document.getElementById("firstText").src = IMG_1.jpg";
}, 4000);
setTimeout(function(){
document.getElementById("secondText").innerHTML = "This is the second image";
}, 6000);
setTimeout(function(){
document.getElementById("secondText").src = "IMG_2.jpg";
}, 8000);
}
</SCRIPT>
</BODY>
</HTML>

506

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

setInterval In both setTimeout and setInterval, you can


include more than one line. For example, this code
This allows you to make something happen repeatedly. declares a global variable, counter, and both outputs
For example, every two seconds you can output the its value then increments its value every second:
same alert box.
var counter = 0
The call follows the structure: function delayOutput(){
setInterval(function(){ setInterval(function(){
Event to repeat; alert(counter);
}, timeBetweenRepeats); counter++;
},1000);
In this example the alert appears every second }
setInterval(function(){ You can only have one delay running at a time, because
alert("Hello"); JavaScript is not designed to keep multiple threads
},1000); running; each interval will be one thread that is counting.

WORKED EXAMPLE 20.19


Create a web page that outputs the next element in an This could give an array out of bounds error because
array of colours every two seconds. counter keeps incrementing, and if it gets to 6; there is
no sixth element. So this needs catching and setting back
First, set up the global array of colours, and a counter
to 0 using selection.
to keep track of how many have been output.
<HTML>
<HTML>
<BODY onload="sequence()"> <BODY onload=”sequence()”>

<SCRIPT> <SCRIPT>
var colours=["grey", "purple", "red", var colours=[“grey”, “purple”, “red”,
"green", "yellow", "orange"]; “green”, “yellow”, “orange”];
var counter = 0; var counter = 0;
</SCRIPT> function sequence(){
</BODY> setInterval(function(){
</HTML>
alert(colours[counter]);
Create the function to output the counter element of counter++;
the array and increment counter.
if(counter > 5){
<HTML> counter = 0;
<BODY onload=”sequence()”>
}
}, 2000);
<SCRIPT>
}
var colours=[“grey”, “purple”, “red”,
“green”, “yellow”, “orange”]; </SCRIPT>
var counter = 0; </BODY>
function sequence(){ </HTML>
setInterval(function(){
alert(colours[counter]);
counter++;
}, 2000);
}
</SCRIPT>
</BODY>
</HTML>

507

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

PRACTICAL ACTIVITY 20.20

1 Edit your story from previous tasks so that timers are used to delay different parts of the story. For
example, instead of displaying all of the text for one phase at a time, display one sentence, then the
next, and so on
2 Create a web page that displays an image every few seconds, and if the user clicks on the image then
they get a point and the image is hidden. When they have gained 10 points, output a message telling
them that they have won.
3 Create a program that tells a joke with an alert, after a set time the answer appears.
4 Create an array of JavaScript terms and definitions. Every five seconds display another term and its
matching definition.
5 Edit Task 4 to become a test; the term appears first, and then after a short time the definition appears.

20.16 String manipulation


A string manipulator allows you to perform actions on a string and extract information from it. When counting letters
in a string, the first letter is letter 0, the second letter is letter 1, and so on. Spaces and all symbols all count as letters.
Table 20.7 shows the most common string manipulation methods you may need.

Operator Description Example


substring Return the letters word = "Hello World";
(startLetter, from the position subword = word.substring(7,11);
endLetter); of startLetter to
subword will now hold "World"
endLetter
The variable, word, is used together with the operator, that is
word.substring
substr(start, Starting at the start word = "Hello World";
noOf); letter, return the subword = word.substr(2,4);
noOf (number of)
letters subword will now hold "llo"
replace("string", Finds the first string word = "Hello World";
"string"); and replaces it with newW = word.
the second string
replace("World","Friends");
newW will now hold "Hello Friends"
length Returns the length wordL = "Hello".length;
of a string wordL will store 5.
concat("string1", Concatenate will word1 = "Hello"’;
"string2") join string1 and space = " "’;
string2 together.
word2 = "World"’;
You can have more final = word1.concat(word1, space, word2)’;
than two strings
final will now store "Hello World"

508

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

Operator Description Example


String1 + String2 + works in the same word1 = "Hello";
way as concat on a space = " ";
string and joins two
word2 = "World";
strings together
final = word1 + space + word2;
final will now store "Hello World"
toUpperCase() Converts the string word = "Hello";
to uppercase final = word.toUpperCase();
final will now store "HELLO"
toLowerCase() Converts the string word = "Hello";
to lowercase final = word.toLowerCase();
final will now store "hello"
charAt(number) Returns the word = "Hello";
character in the letter = word.charAt(4);
string at location
number letter will now store "o"

Table 20.7: String manipulation.

WORKED EXAMPLE 20.20


Create a web page that generates a username for a user. The username uses the last three characters of their last
name, the first four characters from their first name, and the year from their date of birth. Output their username to
the user.
First, set up the web page with space for all three pieces of data to be entered, and a button.
<HTML>
<BODY>
First name <input type = "text" id = "txtFirstName"><br>
Last name <input type = "text" id = "txtLastName"><br>
Year of birth <input type = "text" id = "txtYear"><br>
<button onclick = "createUsername()">Create username</button>
<SCRIPT>
</SCRIPT>
</BODY>
</HTML>

509

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
Get the data from the text boxes when the button is clicked.
<HTML>
<BODY>
First name <input type = "text" id = "txtFirstName"><br>
Last name <input type = "text" id = "txtLastName"><br>
Year of birth <input type = "text" id = "txtYear"><br>
<button onclick = "createUsername()">Create username</button>
<SCRIPT>
function createUsername(){
var firstName = document.getElementById("txtFirstName").value;
var lastName = document.getElementById("txtLastName").value;
var yearBirth = document.getElementById("txtYear").value;
}
</SCRIPT>
</BODY>
</HTML>

Get the characters you want from the variables.


<HTML>
<BODY>
First name <input type = "text" id = "txtFirstName"><br>
Last name <input type = "text" id = "txtLastName"><br>
Year of birth <input type = "text" id = "txtYear"><br>
<button onclick = "createUsername()">Create username</button>
<SCRIPT>
function createUsername(){
var firstName = document.getElementById("txtFirstName").value;
var lastName = document.getElementById("txtLastName").value;
var yearBirth = document.getElementById("txtYear").value;
firstName = firstName.substring(0,3);
var lengthLN = lastName.length;
lastName = lastName.substring(lengthLN-3, lengthLN);
}
</SCRIPT>
</BODY>
</HTML>

510

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

CONTINUED
Concatenate the data and output it.
<HTML>
<BODY>
First name <input type = "text" id = "txtFirstName"><br>
Last name <input type = "text" id = "txtLastName"><br>
Year of birth <input type = "text" id = "txtYear"><br>
<button onclick = "createUsername()">Create username</button>
<SCRIPT>
function createUsername(){
var firstName = document.getElementById("txtFirstName").value;
var lastName = document.getElementById("txtLastName").value;
var yearBirth = document.getElementById("txtYear").value;
firstName = firstName.substring(0,3);
var lengthLN = lastName.length;
lastName = lastName.substring(lengthLN-3, lengthLN);
username = lastName + firstName + yearBirth;
alert(username);
}
</SCRIPT>
</BODY>
</HTML>

PRACTICAL ACTIVITY 20.21 CONTINUED

Open file 20.07.html 3 Create a form that takes a person’s first


name, second name and favourite number.
Amend the program to take two words as input, Create a username for them in a function,
and then output alternate letters from each word using the first letter of their first name, their
until there are no letters left in one word. second name and their favourite number.
For example, ‘horse house’ would output Output their username in a sentence.
‘hhoorussee’, and ‘red yellow’ would output r’yeedl’

20.17 Comments
PRACTICAL ACTIVITY 20.22 A comment is text that you add to your code, which
the interpreter (the software that runs your program)
1 Create a program that stores the first name, does not run. Comments can be used to make notes
second name and age of a person. Output about how your code works so other developers can
these in a sentence, for example Roberto understand what you have done.
Mantovani you are 20 years old.
To add a comment, write //, then anything after that
2 Create a program that stores the first name will be a comment. For example:
and second name of a person in variables. var count = 0; //number to act as
Combine and output the first two letters of // counter in loop
their first name with the first two letters of while(count <= 12){ //loop 0 to 12
their second name. //displaying square numbers
document.write(count * count);
//output square numbers
count++; //increment counter
}

511

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

You can make a comment go over several lines without


having to put // in front of each line. Start the comment
some
with /* and end it with */. For example: The some method checks if at least one item meets the
condition:
/* This program will generate the username
function equalTen(item){
It takes 3 characters from the last name
return (item == 10);
And 2 characters from the firstname */
};
var numbers = [10, 20, 30, 40, 50, 60];
PRACTICAL ACTIVITY 20.23
var someCheck = numbers.some(equalTen);
Open your story program and add comments to
explain the main elements of the code. This time, the method will return true, because at least
one of the elements is equal to 10.

filter
20.18 Iterative methods The filter method will return an array with all the
An iterative method is a function (or task) that elements that meet the criteria:
is repeated, for example applied to each element
function lessThirtyFive(item, index,
in an array.
array){
return (item <= 35);
every };
This iterative method will check every element in an var numbers = [10, 20, 30, 40, 50, 60];
array against a condition. It will return true if every
item meets the condition, or false if at least one element var filterArray = numbers.
does not meet it. filter(lessThirtyFive);

The following code creates a function called isTen with This time, the method will return [10, 20, 30] because
item as a parameter. these are all the elements that are less than, or
equal to, 35.
function isTen(item){
return (item == 10);
}; forEach
An array, numbers, is declared. The function isTen is forEach runs a task, or command, on every element
applied to the array using the every method: within the array. It does not return any value:

var numbers = [10, 20, 30, 40, 50, 60]; function addOne(item, index, array){

var everyCheck = numbers.every(isTen); item = item + 1;


document.write(item);
This code:
}
• declares an array called numbers
var numbers = [10, 20, 30, 40, 50, 60];
• calls an every method and sends the array elements
using the code function(item, index, array) numbers.forEach(addOne);

• the condition is item == 10 This time, the method will take each item, add 1 to it,
then output the new value. The actual value stored in
• the result of this is returned and stored in the the array is not changed.
variable everyCheck.
It will return false, because not all elements in
numbers are equal to 10.

512

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

map This time, the method will take each item and add 1 to
it. It will return the following edited values that are now
map runs a task, or command, on every element within stored in mapArray: 11, 21, 31, 41, 51, 61.
the array and returns the new, edited array:
function mapOne(item, index, array){
item = item + 1;
}
var numbers = [10, 20, 30, 40, 50, 60];
var mapArray = numbers.map(mapOne);

WORKED EXAMPLE 20.21


Create a web page that checks if every number stored Call the function from the array.
in an array is greater than 0. <HTML>
First, set up a button to run the code. Set up an array <BODY>
with numbers. <button onclick = “checkValues()”>Create
<HTML> username</button>
<BODY> <SCRIPT>
<button onclick = "checkValues()">Create var numbers = [–1, 0, 2, 5, -6, -8,
username</button> 1.5, 6];
<SCRIPT> function isGreaterThan0(item, index,
var numbers = [–1, 0, 2, 5, –6, –8, array){
1.5, 6]; return(item > 0);
function isGreaterThan0(){ }
} function checkValues(){
</SCRIPT> var result = numbers.
</BODY> every(isGreaterThan0);
</HTML> alert(Result);
In the function, add the three parameters and the }
condition. </SCRIPT>
<HTML> </BODY>
<BODY> </HTML>
<button onclick = "checkValues()">Create
username</button>
<SCRIPT>
var numbers = [–1, 0, 2, 5, -6, -8,
1.5, 6];
function isGreaterThan0(item, index,
array){
return(item > 0);
}
</SCRIPT>
</BODY>
</HTML>

513

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

This code checks if the value of x is greater than 20.


PRACTICAL ACTIVITY 20.24
If it is, it sets the error (e) to be "over 20".
1 Create an array with a series of numbers.
If it isn’t, it compares it to <= 10.
a Create a function that will multiply each
If it is, it sets the error (e) to "less than 11".
number in the array by two and output
the result, but do not store the result. The catch takes this error, if it is generated, and then
displays it.
b Create a function that will multiply each
number in an array by ten, store the This code can be used to validate data on entry.
results and output them. Using ifs in this way will ensure all conditions are
met, whereas a case statement may not catch all
c Create a function that will check if any of possible errors.
the numbers are greater than 20.
d Create a function that will check if all the PRACTICAL ACTIVITY 20.25
numbers are greater than 20.
1 Create a web page that asks the user to
e Create a function that will return an guess a stored number that is between
array with all elements in that are 1 and 100. Throw appropriate errors if
greater than or equal to ten. numbers outside of this range are entered.
2 Create a web page that asks the user to
enter registration information for a website.
Throw an error if any inappropriate or
20.19 Trap errors invalid data is entered, for example an
inappropriate date of birth.
Errors can occur in a variety of places in a program and
3 Ask a partner to feedback on your web
for a variety of reasons. For example, a user may have
pages. Discuss what other features you
input invalid data, a calculation may not be possible or
could add to enhance the pages. Add any
on the wrong data type, or the programmer may have
of the comments that you feel would be
made an error themselves. These errors might stop the
appropriate.
web page working.
To trap these errors, try and catch code is used. Within
the try block are the statements that are attempting to
run. You can throw a specific error message to be output
after each statement. The catch block states what to do
with the error message if generated:
20.20 Using external
var x = 21; scripts
try{ You can write your JavaScript code in a
if(x>20) throw "over 20"; separate document and then import it into your
HTML document.
if(x<=10) throw "less than 11";
Create a separate document and write your JavaScript
}
code inside it. Save the file with a sensible name and the
catch(e){ extension .js
message.innerHTML= e; Inside this document write the JavaScript code that
} would usually go within the script tags, for example:
var value1 = 5;
var value2 = 10;
document.write(value1 * value2);

514

Copyright Material - Review Only - Not for Redistribution


20 Programming for the web

You then call this code within your HTML document.


The name of the file goes within the script tag, in this REFLECTION
example the JavaScript file javascriptparagraph.js 1 How did you solve errors that you
is being imported into this webpage: encountered while writing web pages?
<html>
2 What approach did you take to solving a
<script src="javascriptparagraph.js"> task? Did you plan the web page first, or
x</script> start programming straight away? Why did
</html> you choose this approach?
3 Did you find any extra code that was outside
PRACTICAL ACTIVITY 20.26 of the requirements? How did you learn
how to use this code? Did you learn better
Take one of the webpages you created as part of through independent experimentation?
this unit. Remove the JavaScript code and put it
into a separate document. Remember to give the
file the extension .js
Import this external JavaScript file into your
HTML program.

EXAM-STYLE QUESTIONS
1 Kim runs a theme park. She wants a web page to allow a customer to submit a question. The web page must:
• include space for the customer to enter their first name, last name, query, and email address
• check that none of these data items have been left blank
• check that the email address includes an @ symbol
• give the user a confirmation that their request has been submitted (if there is no error).
Suitable error messages must be used if any of the requirements are not met.
Add comments to explain each JavaScript construct used.
a Create the web page and error messages. [11]
b Explain why comments are added to the code of a website. [3]
c Explain the importance of trapping errors and giving appropriate error messages in a web page. [4]
d Kim would like an image adding to the web page. When the user moves their cursor over the Image 1

Figure 20.2: Image 1. Figure 20.3: Image 2.

515

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

CONTINUED
it should change to the second Image 2 from the provided files, 20.08 Image1.jpg and
20.09 Image2.jpg.

Edit the web page for Kim. [3]


[Total 21]
2 Terry owns a restaurant. People can put in a request for a reservation using an online form.
The form needs to allow a user to:
• select a day from Tuesday, Wednesday, Friday, Saturday or Sunday
• select a time (bookings are made every half an hour from 17:00 to 20:30)
• enter the number of people; there is a minimum of 1, and a maximum of 10
• select whether they would like the set menu, or not
• enter their name and a contact telephone number.
a Create the web page. Make sure all fields have been validated so only acceptable data can
be entered, and cannot be left blank. There should be suitable error messages if any data
is not valid. The data should only be successfully submitted if it is all valid. [12]
b Comment on your code from part (a) to explain the key constructs used. [2]
c Explain how you used selection in your answer to part (a). [3]
[Total 17]
3 Two loops are while and do while.
Explain the difference between how these two types of loop run. [2]
4 Describe what an array is in programming. [3]

SUMMARY CHECKLIST
I can add interactivity to web pages.
I can change HTML content and styles.
I can show/hide HTML elements.
I can display data in different ways.
I can react to common HTML events.
I can provide user interaction.
I can create statements.
I can create loops for iterative methods.
I can create functions.
I can use timing events.
I can add comments to annotate and explain code.
I can describe the structure and syntax of JavaScript code.
I can describe a range of object-based JavaScript programming and terms.

516

Copyright Material - Review Only - Not for Redistribution


Answers

Answers
• At the end of each month, the telephone
1 – Data processing and company will produce the telephone bills
overnight by reading data about phone calls
and payments from the transaction files and
information updating the master file as a batch process.
1 For example, #000000 (there must be no 13 • A video-conference requires participants to be
explanation, just the data). able to see and hear each other at the time that
2 For example, context is added to #000000 because communication takes place.
we are told it is a colour code. Meaning is added by • If the conference is not in real-time, then the
telling us it is the colour code for black. participants will be waiting to hear what other
3 For example, measure it himself. participants have said – and this may be several
seconds or minutes after it has happened.
4 For example, accept measurements given by
the customer. • Real-time is required so that the participants
can communicate at the same time with each
5 For example, he can rely on the measurements he other rather than having to wait long periods
has taken himself to be accurate. of time before being able to respond.
6 Accuracy, relevance, age, level of detail,
completeness.
7 The user guide could be written for an old
Exam-style questions
operating system that has since been updated on 1 Data that has context/meaning [1], for example,
the phone. EW1 5RG is a postcode [1].
8 WELL DONE 2 a Any four from the following [4]:
9 To ensure data that is input matches the Credit card information is sensitive [1] because
source data. it could be used for fraud [1].
10 Presence, range, type, length, format, check HTTPS is an encrypted method of passing
digit, lookup. information over the web [1] which will mean
the credit card information will be scrambled [1]
11 Data can match the rules but still be incorrect (for
and unusable by anybody without a key [1].
example, date of birth of 29/1/13 matches the rule
of a data type but it may be that the date should b The sender encrypts the message using an
have been 29/1/03). encryption key [1]. The same key is used to
decrypt the message by the recipient [1].
Data can be checked against the source, but the
source maybe incorrect (for example, the name c Any two from the following [2]:
‘Siohan’ is written on the original source and is The sender uses the public key of the recipient
visually checked to have been entered as ‘Siohan’ to encrypt the message [1]. The message is sent
but the actual spelling should have been ‘Siobhan’). in an encrypted format [1]. The recipient uses
12 • When a customer makes a payment, they will their private key to decrypt the message [1].
phone the telephone company and an operator The sender and recipient need to exchange
will record the payment using a graphical user digital certificates [1].
interface as an interactive process.

517

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

d For example, the user could be asked to enter upon how quickly stock is used and any
their password twice [1] or the user could type discounts that are applied for bulk purchasing.
their password and then visually check it [1].
• Stores information about planned deliveries of
3 a To ensure that data matches a given set of replacement stock.
rules [1].
• Stores information about the cost of
b For example, presence check [1] to ensure news purchasing each product and, for the
story [1] is present [1]. retail industry, the prices to be charged for
each product.
Or, for example, format check [1] to ensure
email address [1] contains @ symbol [1]. • Stores information about dates that each batch
of stock was supplied so that the oldest stock
4 All of the following [4]:
can be used first.
• An online processing system processes data in
• Stores information about suppliers that can be
transactions
used to supply each type of product.
• … whereas a real-time processing system
• Stores information about location of each
process data as soon as it is input.
product in stock so that it can be found
• Online processing systems are often used when needed.
in booking systems, where all the data
7 Any four from the following [4]:
for the transaction can be collected and
then processed • System stores current stock level, minimum
stock level and re-order amount.
• … whereas real-time processing systems are
used when the immediacy of the data is vital, • As each stock item is sold or used, the current
such as air traffic control systems. stock level is reduced by one.
5 Any two from the following [2]: • When the current stock level reaches the
minimum stock level, a new order for stock
• A collection of fields about a main element of
is placed.
a data system.
• The amount ordered for the stock will be the
• Stores all of the more permanent data about
re-order amount.
the customer / employee.
• When the stock delivery arrives, the number
• A transaction file is normally used to update a
of items received is added to the current
master file.
stock level.
6 Any three from the following (2 marks for each) [6]:
• Stores information about minimum stock
levels that should be maintained for each
2 – Hardware and
product – these will depend upon how quickly
stock is used and how long it takes to order software
new stock. 1 Any two from the following [2]:
• Stores information about up-to-date current • serving multiple terminals
stock levels of each product.
• serve ATMs
• Stores information about re-order amounts
for each product – how many of each product • host business databases
should be ordered when the minimum stock • host web sites
level has been reached – these will depend

518

Copyright Material - Review Only - Not for Redistribution


Answers

• transaction processing 14 Any two from the following [2]:


• batch processing • they are difficult to learn
• statistical analysis. • users have to remember the commands
2 Any two from the following [2]: • typing errors can be easily made.
• quantum mechanics calculations 15 Windows, Icons, Menus, Pointers.
• weather forecasting
16 Examples are:
• climate research.
No hands are required [1], which makes them useful
3 Reliability, availability and serviceability. when cooking / driving a car [1].
4 Data centres / mainframes / supercomputers The user does not need to have access to a physical
generate a lot of heat so natural cold air can be device [1], which means commands can be given
circulated, which is cheaper than artificial cooling. from anywhere in a room [1].
5 MFLOPS measure floating point instructions per
second and supercomputers use floating point
instructions for scientific calculations. Exam-style questions
6 Allocating memory to software; sending data and 1 a 1 MIPS [1] or FLOPS / MFLOPS [1].
instructions to output devices; responding to input b Reliability: Disruption to a mainframe
devices such as when a key is pressed; opening and computer could be extremely expensive when
closing files on storage devices; giving each running lots of users are affected [1] so it’s important
task a fair share of processor time; sending error that hardware is self-checking and can recover
messages or status messages to applications or automatically [1] / so it’s important that
users; dealing with user logons and security. software has been tested extensively to avoid
7 To translate source code into object code ready for failure [1].
execution. Availability: Mainframe computers can be
8 When testing a program, an interpreter can used by thousands of users at a time [1] so it’s
translate just the code that is being tested which important that the system is available at all
saves translation time; source code can be times [1].
translated into object code for more than one Serviceability: Mainframe computers can be
operating system. serving users or batch processing tasks 24 hours
9 For example, antivirus; backup; data a day [1] so any downtime for upgrades or
compression; disk defragmentation; format; file- replacement hardware needs to be minimal [1].
copying; deleting. 2 The device driver includes instructions for
10 To stop viruses or malware from being executed the printer [1] so the operating system can
and causing damage to files and programs communicate with the printer [1].
11 Software that already exists and is readily available 3 a Any from the following [4]:
to be purchased. Data is stored in track sectors [1] which are
12 For example, the client has to wait a long time segments of a track [1] on a magnetic platter
for it to be developed; it is expensive because the [1]. The read/write head moves to the correct
client has to cover the whole development cost; the track [1] and magnetises/demagnetizes sectors
software won’t have been used by other customers [1]. Data is stored in clusters of adjacent track
before so bugs are likely to be found when the sectors [1] (where possible).
software is used; the only support available will be b Over time data has been deleted from the disk
from the company that developed the software. [1] leaving only small clusters of space [1]
13 The device may not have much memory to carry meaning that new large files have to be written
out complex operations.

519

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

across multiple clusters [1], which will be in b Any two from the following [2]:
different locations on the disk [1].
• Command Line Interface / CLI [1]
4 Any six from the following [6]:
• dialogue / voice-controlled interface [1]
Custom written software will meet all of the
• gesture (based) interface [1]
requirements for waste management [1] because
it is written especially for the council [1]. Custom • menu interface [1].
software can be designed especially to be
6 Any two from the following (2 marks each
compatible with existing systems [1] such as the
point) [4]:
web interface used by residents [1]. Custom written
software will be very expensive [1] compared • Compiler translates source code all at once [1];
with off-the-shelf software [1]. The council will interpreter translates one line at a time [1].
have to wait a few months [1] for the system to be • Compiled code will only work on target
developed for them [1]. There may be very good operating system [1]; interpreter can translate
alternative off-the-shelf solutions [1], which would code for current operating system [1].
be able to be used instantly [1] at a much lower
cost [1] and with a lot of support available [1]. In • Compiled code is ready to be executed
conclusion, the council should investigate existing immediately [1]; interpreter has to
off-the-shelf solutions before committing to the generate code a line at a time which delays
cost and development time of a custom-written execution time [1].
solution [1]. • Compiling code can take a while to complete
5 a Any three from the following (3 marks each [1]; interpreting parts of code can be done
point) [9]: immediately for on-the-fly testing [1].
• Labels [1] text that can’t be edited by
user [1], for example, an instruction to
the user [1]. 3 – Monitoring and
• Text boxes [1] for the input of text [1], for
example, input of a postcode where waste
control
collection has been missed [1]. 1 Students may notice things like:
• Tick boxes [1], which can be selected or not • the temperature of the room
selected [1], for example, selecting which • any sounds in the room
waste collections have been missed [1].
• any sounds outside the room
• Option buttons / radio buttons [1] where • how light it is in the room
only one option can be selected from a
group [1], for example, selecting whether it • whether anyone is moving in the room.
is just one property or the whole street that 2 Infrared sensors can collect data about the infrared
has been missed [1]. radiation given off by lifeforms.
• Drop down box / combo box / list box [1] Electromagnetic field sensors collect data about
where user can select an item from a list electromagnetic fields that are often given off by
[1], for example, selecting an address for a man-made electronics.
postcode [1]. Touch sensors can collect data about force/pressure
• Buttons [1] that user can click on to or about electrical fields. A resistive touch sensor
confirm an action [1], for example, to move collects data about the pressure that is placed upon
to the next question about the missed it. A capacitive touch sensor collects data about
collection [1]. changes in an electrical field.
• Spinner [1] which can be used to select a A proximity sensor collects data about how close a
number by increasing/decreasing value [1], nearby object is. This can be done through emitting
for example, number of people who live in an electromagnetic field, or infrared light and
a household [1]. measuring the change in return.

520

Copyright Material - Review Only - Not for Redistribution


Answers

3 a A sensor could provide incorrect readings if it 6 Possible algorithm could be:


has not been calibrated correctly or the sensor
• Infrared sensor continually sends data to
hardware may be faulty.
microprocessor.
b A control system will be reliant on the accuracy
of the readings from the sensor. If the sensor is • Data is converted from analogue to digital so
measuring a dangerous situation, then human that it can be processed.
lives could be at risk if the control system does • Microprocessor compares data received from
not take the correct safety action. sensor to stored values.
4 A pH sensor could be used to measure the level of • If the data is outside the accepted range, the
pollution in the river. The pH sensor could be placed microprocessor sends a signal to sound an
in the water and continually send data back to a alarm. It will also send signals to actuators to
microprocessor. The microprocessor can check the trigger metal bars to drop to block each door
data against a storage range of values. The stored and window.
range of values represent the correct pH level for
the river. If the data from the sensor falls outside 7 Possible flowchart could be:
this range, an alert can be raised to tell staff at the Start
factory that there may be pollution coming from
the factory into the river. The factory can then Acoustic sensor
collects data
investigate this.
The data from the sensor could also just be Data converted from
continually collected and stored on a computer, analogue to digital
so that an employee at the factory can manually
analyse the data to see if there is any change in Microprocessor compares
data to stored values
the pH that might indicate that pollution from the
factory is present in the river.
Data
No
5 a Possible flow chart could be: out of
range ?
Start
Yes
Microprocessor
Sensor sends signal
collects data

Alarm sounds
Data converted from
analogue to digital

8 Possible algorithm could be:


Microprocessor
analyses data • Pressure sensor continually sends data to
microprocessor.
Yes Data • Data is converted from analogue to digital so
>25°C that it can be processed.
? Heater
turned on
No
• Microprocessor compares data received from
sensor to stored values.
Signal sent Data Yes Signal sent
to actuator <22°C to actuator • If the data is < 5kg, the microprocessor sends
? a signal to sound an alarm. It will also send
Window
No signals to actuators to trigger metal bars to
open drop to block each door and window.

b • Closing the window when too cold.


• Turning off the heater when too hot.

521

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Exam-style questions • The microprocessor compares the data to


stored values.
1 It is an input device that collects data from the
surrounding physical environment. [1] • If the cooling liquid level is too low, the
microprocessor sends a signal to an actuator
2 It is an integrated circuit that is used in monitoring to open a value and allow more cooling
and control systems. [1] liquid to enter.
3 It is a type of motor that is used to move and
• If the cooling liquid level is too high, the
operate another mechanism or systems.. [1]
microprocessor sends a signal to an actuator
4 Any three from the following [3]: to open a value and allow cooling liquid to
• Take two different readings with the sensor drain out.

• Compare the readings to a device measured at • The process will be continually repeated until
the ideal standard. the system is switched off.
8 All of the following [6]:
• Calculate the range for the sensor readings
by subtracting the low reading from the • Input for sensor.
high reading. • Process for converting data to digital.
• Calculate the range for the ideal readings • Process for comparing data.
by subtracting the low reading from the
• Decision for comparing data to 12 microns.
high reading.
• Process to send signal to turn screen off if
• Use a formula to calculate the correct value for greater than 12 microns.
each reading.
• Screen turns on/stays on if less than
5 Any two from the following [2]: 12 microns.
• It means a human doesn’t need to carry out the Possible flowchart:
task of analysing the data.
Start
• Automatic action can be triggered as a result
of the analysis by the microprocessor.
Proximity sensor
• A microprocessor is likely to be more accurate collects data
than a human when analysing data.
6 All of the following [4]: Data converted from
analogue to digital Screen turns
• A monitoring system takes in data readings on / stays on
and simply records them for human analysis
Microprocessor compares
• … or can output a simple alert so that manual data to stored values
action can be taken.
• A control system requires no human Data
No
interaction. >= 12
micron ?
• A control system takes in data readings that
Yes
are analysed and an automated action is taken.
Microprocessor
7 Any five from the following [5]: sends signal

• The touch sensor continually sends data to the


microprocessor.
Screen turns off
• The microprocessor converts the data from
analogue to digital.

522

Copyright Material - Review Only - Not for Redistribution


Answers

19 0
4 – Algorithms and 20 A section of code, that has its own name, that is
separate from the main program and can be called
flowcharts from anywhere in the code.
1 A series of steps that perform a task or solve 21 To create reusable components.
a problem. To avoid repeated code.
2 A series of steps, flowchart, pseudocode. 22 A value that is sent to a subroutine.
3 A rectangle with rounded corners . 23 A construct within another construct, e.g. selection
inside iteration.
4 The text ‘Enter a number’ is output.
24 Change decision box from 'Is counter = 10?' to 'Is
The user inputs a number, it is stored in the counter = 20?'
variable number.
25 largest = -9999
The words ‘Your number is’ and the contents of the FOR counter = 0 to 50
variable number are output. INPUT number
5 An operation that changes something. If number > largest THEN
largest = number
6 Power of ENDIF
7 x=3*7 NEXT counter
answer = largest * largest
8 The user inputs two numbers, the first is stored in OUTPUT answer
the variable num1, the second in num2.
The number in num1 and num2 are added together
and stored in the variable total.
Exam-style questions
The value of num1 is output, with a + symbol, 1 Series of instructions; Flowchart; Pseudocode [2].
then the value in num2, then an = sign and then the 2 Process; Input/Output; Start/Stop [3].
value in total. 3 20 [1].
The value in total then becomes the value in num1 4 Change process box 'answer = count * 5' to 'answer
minus the value in num2. = count * 9' [1].
The value of num1 is output, with a − symbol, then 5 Change continue = False to continue = True [1].
the value in num2, then an = sign, and then the
6 a generate1 [1]
value in total.
b Two [1]
9 2
c symbol; number; value1; value2; outputS;
10 Code is run dependent on a condition.
count [2]
11 Yes
d ***** [1].
12 No
7 1 mark per bullet [6].
13 No
• Start and stop symbol.
14 Code is repeated a set number of times or until a • Looping from 0 to 100 (or equivalent)
conditions is met or unmet.
• … using correct selection statements.
15 Code is repeated a set number of times.
• A mechanism for working out if it's odd
16 When you know the number of times iteration must (mod or incrementing by 2).
take place.
• Outputting the numbers.
17 Starting value, end value, amount value changes in
each loop. • Correct data flows with no lost connectors.

18 When you don't know how many times a loop 8 1 mark per bullet [9].
should run, or the loop runs until a condition is • Taking two numbers as input.
met or unmet. • Taking a symbol as input.

523

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• Checking if the symbol is + data will be used. It also gives them the right to
• … and all other symbols. decline the collection of their data.
• Use of a subroutine for one calculation 5 Mobile phones are often infected with spyware as
it is buried into the download of apps. This is why
• … that has the two numbers as parameters it is important to make sure that only trustworthy
• … and performs the correct calculation apps are downloaded.
• … and outputs the result. Spyware can be used to track data such as contacts,
• All other subroutines work correctly. images, call logs, messages, browsing habits and it
can make audio recordings of calls.
6 One example of its use is to hide a rootkit on a CD/
5 – eSecurity DVD that is downloaded onto the user’s computer
when the CD/DVD is inserted. The rootkit could
1 • A VPN can improve security as it encrypts be used to limit the user’s ability to copy the CD/
data that is sent across the network. DVD. This can stop user’s creating pirated copies
• A VPN can allow data to be sent anonymously, of the CD/DVD.
so if data is intercepted, the intruder may not 7 a Search engines use bots as web crawlers to build
be able to find the identity of the sender. an index of all the webpages available on the
2 It is a type of malicious software. When it is world wide web.
unknowingly installed on a user’s computer, it can b User’s computers are infected with malware
allow a hacker to have remote access and control of that turns the computer into a bot. The name
a computer system. given to a computer in this state is a zombie
3 The Confiker worm targeted windows operating bot. When a perpetrator wants to launch an
system. It infected millions of systems. Its purpose attack on a web server, to bring it down, it
was unclear as the authors never used much of wakes up all the zombie bots, by accessing them
its potential. It created the ability for the authors from a remote location, and causes each bot to
to install and run software on computers from a send numerous requests to the webserver. All
remote location. It could also be used to remotely the bots together create a bot net.
control those computers and use them in some 8 The practice of POLP is based on the principle that
type of botnet attack. One popular method that a user should only be given access to the data and
the worm used to spread was through the use of resources that they required for legitimate reasons.
memory sticks. This is created by making sure that every user or
This caused many businesses to ban the use of process in a system should have the least authority
memory sticks for transporting data and anti-virus possible to perform the job.
and anti-malware software to be repeatedly run
on computers on a network until the worm was no
longer detected. It can still, however, be detected on Exam-style questions
many computers today. 1 Any three from the following [3]:
4 Many companies were making use of spyware to • Set strong passwords.
monitor the actions of users online. This data was
• Encrypt personal data.
being analysed and collated and results could be
sold to target users in what was felt to be unethical • Use a firewall to monitor traffic.
ways, e.g. targeting specific people with certain • Regularly scan computer with detection and
kinds of voting marketing to try and influence their prevention software.
choices further.
• Only visit and use trusted sources.
The GDPR is a regulation that now exists to make
• Do not open any email attachments from
sure that data is not collected and sold in this way
unknown and untrusted sources.
without a user’s consent. The law requires users
to be transparently informed about what data is • Check the URL of any link.
collected about their online habits and how that

524

Copyright Material - Review Only - Not for Redistribution


Answers

• Be cautious about any personal data shared. • If a patter is identified, this could be data that
• Set all privacy settings to the most is used as a password.
secure setting. 7 a A rootkit is a computer program that enables a
• Report and block suspicious activity. person to gain administrator access to a victim’s
computer [1].
2 Phishing involves clicking a link in an email that
b Any one of the following (2 marks per bullet) [2]:
takes a user to the fake website, whereas pharming
downloads malicious code onto a user’s computer • Set a strong password for the computer.
that redirects them to the fake website [1]. • Only download data from trusted sources.
3 All of the following [2]: • Don’t insert a USB that you find into
• They can both involve a user receiving a your computer.
fake email. c All of the following [2]:
• They are both designed to collect a user’s • Steal a user’s personal data.
personal data. • Use the user’s computer as part of a larger
4 Any four of the following [4]: cyber security attack.
• virus • adware 8 a It encrypts the data [2].
• trojan • rootkit b Any two from the following [2]:
• worm • malicious bots • Store data in the cloud.
• spyware • ransomware. • Keep an up-to-date backup of data, away
from the computer system.
5 All of the following [5]:
• Only open and use software from
• Firewall monitors incoming and outgoing trusted sources.
traffic from a computer system.
• User can set rules and criteria for the data,


which could include detecting known viruses.
User can close certain ports on firewall that are
6 – The digital divide
often used by hackers to infiltrate a firewall. 1 a If a person does not have high-speed internet,
they may not be able to use all the resources
• Firewall compares traffic to rules and
available on learning platforms, such as
criteria set.
streaming videos and taking part in video-
• Firewall can decline traffic if it does not meet conferences.
the rules and criteria set.
b This could increase the digital divide between
6 Any five of the following [5]: those living in a city and those living in rural
• A user could click a link / open an attachment locations. It is likely that those living in a rural
/ download software that could trigger the location will not be able to get as high speeds
download of spyware onto the user computer. for their internet connection as those in a city.
• The spyware could be software, such as a 2 a They may not be able to use facilities such as
key logger. video conferencing (e.g. facetime and skype) on
• The spyware will record all the keypresses the their mobile telephone, so they cannot enjoy the
user makes. increased communication method that seeing
the other person face to face can bring.
• The recorded keypresses are sent to a
third party. b They may not be able to access their social
media and the instant messaging facilities that
• The third party analyses the data looking for are often built into social media platforms.
patters and trends.

525

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

c The lack ability to communicate using these


services may make them feel isolated and they
Exam-style questions
may feel like they are left of out of online social 1 The term refers to the technology divide between
situations. countries, demographic groups and economic
areas [1].
3 They may have better access to high education.
They may have better access to job opportunities 2 Any two from the following [2]:
and promotion prospects. • people living in cities vs people living in
4 Possible responses could be: rural areas.
• people educated in using technology vs people
Task Pre-technology Post-
uneducated in using technology.
technology
• older people vs younger people.
Sending a list Writing them Sending them a
of places you a letter and text message. • areas that are more industrially developed vs
want to visit, to sending it by areas that are less industrially developed.
a friend. post. • different socio-economic groups.
Arranging to Calling them Calling them 3 All of the following [4]:
meet a friend on a landline on a mobile • The infrastructure in place to allow the use
for lunch. telephone. telephone. of effective technology can differ greatly
depending on a person’s geographical location.
Buying a Going to the Using a mobile
cinema ticket. ticket office at application • Those in rural locations may have less
the cinema. to buy the infrastructure that those in cities.
ticket and
• Those in third world countries may have
downloading
less infrastructure that those in third world
the ticket to the
countries.
mobile phone.
• If the infrastructure is not available, a person
Researching Going to the Using a search may not be able to use the technology available
recipes for your library to look engine to
4 All of the following [4]:
favourite food. at recipe books. research the
recipes. • Lots of resources are available on online
learning platforms.
Finding out Going to the Using online
how much cashier desk at banking • People can use these resources to enhance their
money is left the bank. facilities. own learning.
in your bank • This can lead to improved opportunities for
account. people, including better job opportunities.

5 People could use the online circumstances to • If people cannot access these learning
improve their education, or learn new skills, and resources, they may find that they are behind
this could lead to better job opportunities. others in their education and cannot access the
same opportunities.
6 High-speed internet for education purposes could
mean that movies and television shows could be 5 Any four from the following [4]:
streamed in high definition, improving the viewing • The use of satellite technology
experience for the audience.
• … this can provide access to the internet
to those in remote locations and where the
infrastructure is not in place.

526

Copyright Material - Review Only - Not for Redistribution


Answers

• Government promotes the business and • Person may get an incorrect diagnosis and get
products that could be on offer incorrect medication as a result.
• … in hope that other countries will invest in 6 Questions could include:
their infrastructure to allow them to utilise the
• How old are you?
necessary technology.
• Do you smoke?
• Company initiatives that encourage the
recycling and donation of technology • How much alcohol do you drink in a week?
• … these can then be given to those in • How much exercise do you do in a week?
circumstances that may mean they cannot
• Have you had any previous illnesses?
afford to but the technology.
• Have you ever had surgery?
• The use of classes to teach the use of the
technology 7 Questions could include:
• … this can be especially useful for older • How many legs does it have?
people who may not feel confident in using • Does it have a tail?
technology.
• Does it have fur?
• How tall is it?
7 – Expert systems • What colour is it?
1 A user may become frustrated as they are not able • What kind of noise does it make?
to input the data and get the result that they are
looking for.
The user may not understand the data that is being
Exam-style questions
presented to them. 1 Knowledge base [1].
2 The knowledge could not be updated, and the data 2 Inference engine [1].
stored could be incorrect or outdated. This means
3 All of the following [2]:
that the results produces by the expert system may
be incorrect or outdated. • The role of an expert system is to attempt to
reproduce the decision-making process of a
3 Any scenario in which a decision or diagnosis can
human being.
be provided based on factual data.
• The role of an expert system is to try and
4 Any scenario in which a decision or diagnosis would
replicate the judgement of a human that has an
need to be given based on an emotional response.
expert knowledge in a certain field.
5 Advantages could be:
4 Any three from the following [3]:
• Person may not need to visit the doctor.
• Forward chaining is based on data driven
• Person may be able to go straight to a reasoning.
pharmacy and get correct medication.
• It is dependent on the data that it is
• Person may be able to get an understanding provided with.
of whether the medical condition could be
• It is better for solving open-ended problems.
serious, and how quickly they need to visit
the doctor. • The system takes data input by the user,
then moves from rule to rule to provide a
Disadvantages could be:
possible outcome.
• Person may not go to the doctors with a
serious condition.

527

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

5 A goal driven problem [1].


6 Any two from the following (2 marks per bullet) [4]:
8 – Spreadsheets
1 The named range can be referenced directly
• An expert system could be used to self-diagnose
by name instead of by cell references; it can be
medical conditions
used as an absolute reference when replicating a
… a user can input medical symptoms and gain lookup function.
an understanding of what medical conditions
2 A formula is a simple calculation using basic
this could be.
arithmetic of +, -, x, ÷ whereas a function is a
• An expert system could be used to diagnose a predefined complex calculation that can be called
fault on a car by name and includes a series of formulas that the
user is unaware of.
… a car can be attached to an expert system that
will analyse data from the car and find the fault. 3 When formulas and functions are replicated,
absolute cell references remain the same whereas
• An expert system can be used to act as an
relative cell references change in relation to the row
opponent in a game
or column.
… the game could use the data input by the
4 A tax rate could be stored in a single cell. A set
user to make decisions about the game play of
of prices would be stored in a column. When
the opponent.
calculating the tax to be applied to the first price in
• An expert system can be used as a tool in the column, the price would be a relative reference
financial planning (for example, B3) and the tax would be an absolute
reference (for example, $F$1). These two references
… the user can input their financial details
would be multiplied together and then replicated
and the system can help with processes such as
down the spreadsheet. B3 would change to B4, B5,
managing their debt.
etc. as it is replicated to each row below but $F$1
• An expert system can be used as a tool in would remain the same.
providing insurance
5 a Any three from the following:
… the user can input their personal data
• Length check: to check the product code is
and the system can tell them what insurance
six characters long.
products are available to them.
• Format check: to check the product code is
• An expert system can be used to find out the
three letters, two numbers, one letter.
identification of a plant or an animal
• Lookup check: to check the product code
… the user can input data about the features
exists in a list of product codes.
and characteristics of the item and the
system can provide information about what it • Presence check: to check the product code
thinks it is. has been input.
• An expert system can be used to help plan out b Any two from the following:
delivery schedules
• Type check: to check the value is
… the deliveries a driver needs to make can be an integer.
input into the system and the system can plan
• Range check: to check the value is more
the best route for making the deliveries..
than zero.
• Presence check: to check a quantity has
been input (if not used for a).

528

Copyright Material - Review Only - Not for Redistribution


Answers

6
Test data input Type of test data Expected result Reason for choosing data
value
Customer = Null Abnormal/Invalid/ Error: ‘You must It will check to see if a customer has not
Erroneous input a customer’ been input
Customer =‘Any Normal/Valid Value accepted It will check to see if a customer can be
Customer Name’ input
Product Code = Normal/Valid Value accepted It will check to see if a valid product code
XYZ12AB can be input
Product Code Abnormal/Invalid/ Error: ‘You must It will check if a product code is not 6
= XY21C (any Erroneous input a product characters
code that is not 6 code with 6
digits) characters’.
Quantity = ‘a’ Abnormal/Invalid/ Error: ‘Quantity It will check to see if the quantity is not an
Erroneous must be an integer’ integer
Quantity = 1 Extreme Value accepted It’s the smallest allowable quantity.
Quantity = 3 Normal/Valid Value accepted It will check to see that an integer above
(any number 3 or 0 will be accepted
more)

7 Line, because it shows how data has changed over a b Any two of the following [2]:
period of time.
Apply conditional formatting [1] to fuel type
8 Pie, because it is showing each piece of data in column [1] where diesel, petrol and lpg are each
proportion to the rest of the data. set to a different colour [1].
3 Any four from the following [4]:
Exam-style questions Relative referencing used for cost per gallon [1] so
when the formula is replicated [1] it refers to the
1 a Horizontal set of cells [1], for example, for cost per litre on the next row down [1]. Absolute
one car [1]. referencing used for the fuel type table [1] within
b i Arithmetic calculation [1] any example the lookup function for cost per litre [1] so that
using plus, minus, divide, multiply, when replicated down the lookup function keeps
exponent [1]. referencing the fuel type table [1].
ii E2*4.55 [1]. 4 a Any three of the following [3]:
iii Any two of the following [2]: Variables can be used to change the distances
travelled [1], what-if questions can be asked
Complex calculation [1]; reserved word in
such as ‘what will be the cost if the car travels
spreadsheet [1]; ready-made formula [1].
300 miles?’ [1], formulas and functions can
iv Lookup or vlookup or hlookup or be used to calculate the total cost [1]; graphs
index [1]. and charts can be used to compare the costs
of each car [1]; formulas and functions will
2 a Any two of the following [2]:
automatically recalculate so results can be seen
Select column D [1] apply a filter [1] of fuel type instantly [1]; conditional formatting can be
= petrol [1]. used to show cars that cost a specific amount
[1]; goal-seek can be used to find out the
optimum speed to travel at [1].

529

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

b Any one of the following [1]: • Formulas and functions can be used to
calculate the total cost [1].
the model will only be as good as the rules
[1]; the speed the car is travelling out will • Graphs and charts can be used to compare
need to be taken into account [1]; unforeseen the costs of each car [1].
circumstances such as traffic jams will affect the
• Formulas and functions will automatically
costs [1].
recalculate so results can be seen
instantly [1].
• Conditional formatting can be used to
9 – Modelling show cars that cost a specific amount [1].
1 The ability to change variables within the • Goal-seek can be used to find out the
software; asking what-if questions to see what the optimum speed to travel at [1].
result of changing variables might be; formulas
b Any one of the following [1]:
and functions to carry out the mathematical
calculations that form the basis of the model; • The model will only be as good as the
automatic recalculation of formulas and functions; rules [1].
rules that define how the model behaves; layers of
• The speed the car is travelling at will need
abstraction so that different parts of the model can
to be taken into account [1].
be viewed and analysed separately.
• Unforeseen circumstances such as traffic
2 Variables can be used to change the rental costs;
jams will affect the costs [1].
formulas and functions can be used to calculate
the total cost of each of the premises; graphs can 2 a Any four of the following [4]:
be used to show the distances from important Dangers such as hazards, other cars,
locations for each of the premises; goal-seek can pedestrians, etc. can be avoided [1] because
be used to find out what the rental cost would the simulator can model these instead of
need to be to match the current costs; conditional using the real road [1]. Learners do not always
formatting could be used to show the cheapest and need to have an instructor present [1] because
most expensive options. the simulator does not pose any danger [1].
3 Fuel costs can be saved by not having to fly real Learners can experience circumstances they
aircraft; wear and tear of aircraft does not take may not normally encounter [1] such as a child
place during training, which saves on maintenance running into the road [1] because these can be
costs; instructors do not need to be present for modelled [1]. The learner can practice complex
all training sessions; unforeseen or dangerous manoeuvers without holding up other road
circumstances can be invoked to test the pilot’s users [1] because the simulator can model the
reaction without experiencing the real danger. presence of other traffic [1].
4 The learner driver does not get to experience the b Any two of the following (2 marks for each
real reaction of a car; the simulator is only as point) [4]:
good as the model it is based upon, meaning that • There are too many variables to be
the simulator will not react exactly the same as a modelled [1] and so the simulator won’t
car would. always match a real car [1].
• There is no consequence for making a
Exam-style questions mistake in a simulator [1], which may lead
1 a Any three of the following [3]: to drivers becoming over confident when
using a real car and making mistakes
• Variables can be used to change the which cause damage or an injury [1].
distances travelled [1].
• Not all driving situations can be replicated
• What-if questions can be asked such as [1], meaning that the simulator won’t give a
‘what will be the cost if the car travels 300 full experience of driving a car [1].
miles?’ [1].

530

Copyright Material - Review Only - Not for Redistribution


Answers

• Simulators can cause nausea [1] that For example, an order must have a customer. If a
wouldn’t happen in a real car [1]. customer that does not exist is entered, then this
can create mismatched orders which can be lost
• The driving school would need to invest in
because they are not linked to the customer.
the purchase [1], which could be extremely
expensive for a small school [1]. 6 Non-atomic data; no repeating groups of data;
unique primary key.
3 Any four from the following (2 marks for each) [8]:
7 No attributes can be dependent on a non-key
• Nuclear science is very dangerous so
attribute.
experimenting with simulations is much safer.
8 Duplicate data is removed from a database, which
• Variables such as coolant temperature can be
reduces the database size and removes the potential
changed to see the effect on nuclear reactions.
for errors and inconsistencies; the database will
• What-if questions can be asked to see what the perform better because searches can be carried
effect of changes to variables would be. out on indexed fields; maintenance tasks such as
rebuilding indexes can be completed more quickly
• Goal-seek could be used to see what variables
because there is no longer any redundant data; the
need to change to achieve a desired reaction.
database is more flexible because it is easy to add
• The simulation could be sped up rather than new fields to tables without affecting other columns
waiting several days or years to see a real and new tables can be added without affecting
world outcome. existing tables.
• Nuclear simulations require a lot of computing 9 Any three data dictionary components listed with
power due to the large number of reactions related description, for example, field size is the
taking place. maximum length of data for a field.
• Not all possible inputs can be simulated 10 • text
meaning the results of the simulation would • date/time
not reflect exactly what might happen in the • date/time
real world. • text
• integer
• text
• Boolean/logical
10 – Databases and file 11 Starts with zeros and numbers can’t start with zero;
concepts may contain spaces, which requires a text data
type which allows spaces; may contain hyphens or
1 A field that is a unique identifier for each record. brackets, which can’t be stored as a number data.
2 Simple query uses one criterion, whereas a complex 12 Different software applications store files in
query can use multiple criteria. different ways and so generic file types are needed
to transfer data between software applications.
3 To allow the user to decide the parameter value of
the query, such as choosing the class for which to 13 Read through the index until the required data is
display student records. found in the key column; identify the corresponding
storage address; go directly to the storage address;
4 Decide the file format; decide whether to use fixed
read sequentially until the record is found.
length or variable length fields; decide whether to
include field names; decide where to save the file. 14 Sequential access requires the data to be stored in
order, which is a problem when new records need
5 Referential integrity is a form of lookup validation
to be added and old records are deleted, whereas
that ensures data exists in a related table. It is
direct access does not require a sequential order
important because it prevents data from being
and so new records can be added using a hashing
entered that is not valid and that does not have
algorithm and found again using the same
any related data, so it ensures data is linked.
hashing algorithm.

531

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

15 Collates data from databases and other sources; • primary keys [1] which are unique to each
interconnects data from different sources; analyses table [1].
data to provide the data that is required by
• data types [1] to define the type of data
management; produces summary reports and charts
that is stored in each field, for example,
for managers that will help with decision making.
alphanumeric [1].
3 All of the following [4]:
Exam-style questions • STUDENT (Student ID, Forename, Surname,
1 a All of the following [3]: Address 1, Address 2, Address 3, ZIP,
Telephone, Tutor Group) [1].
charity [1]; donor [1]; donation [1].
• TUTOR (Tutor Group, Forename, Surname) [1].
b Both of the following [2]:
• LOAN (Book ID, Student ID, Return Date) [1].
One charity has many donations [1]; one donor
makes many donations [1]. • BOOK (Book ID, Title) [1].
c Both of the following [2]: 4 Both of the following [2]:
Each donation will need to be for a charity Proprietary formats are used by manufacturers of
that already exists and from a customer that software applications for their applications only [1]
already exists [1]. This will prevent donations whereas open-source file formats can be used by
from unknown donors or to unknown charities any application that supports them [1].
and therefore ensure the money gets to where it
needs to go [1].2
2 a Both of the following [2]: 11 – Sound and video
Apartment ID [1]; Customer ID [1].
b i alphanumeric or text or string [1]. editing
1 3840 × 2160 pixels (or 4096 × 2160 in the movie
ii Boolean [1].
industry).
iii integer [1].
2 Black bars are sometimes added to make a video
c All of the following [4]: the correct aspect ratio for the screen. If the video is
Query would include all three tables [1]; a different aspect ratio to the screen, the black bars
dynamic parameter would be used for the will fill the empty parts of the screen.
Apartment ID or Apartment Name [1]; 3 Formats could include:
dynamic parameters would be used to compare
• MP4
the start date and end date [1]; the names of
the customers would be included as fields in the • MOV
query [1].
• AVI
d Both of the following [2]:
• FLV.
Complex queries have two or more criteria [1];
4 Compression methods are:
there are three criteria for Apartment ID, start
date and end date [1]. • MP4 – lossy
e Any three of the following (2 marks for each • MOV – lossy
point) [6]:
• AVI – can be both
• field names [1] to identify each field [1].
• FLV – lossy.
• validation rules [1] to restrict data entry
5 a 10.58 MB
for each field [1].
b It increases to 21.17 MB, so it doubles in size.
• relationships [1] between each table [1].

532

Copyright Material - Review Only - Not for Redistribution


Answers

Exam-style questions • A cryptocurrency uses encryption algorithms


and cryptographic techniques as a
1 The proportion of a screen or video width to its security method.
height [1].
2 Four from the following (two per advantage and
2 One from the following [1]: disadvantage) [4]:
• The video clip may be too long. Advantages
• To remove part of the video clip. • Don’t need to carry physical money.
3 Both of the following [2]: • User can stop transactions if digital method is
• They can be used to provide further lost/stolen.
information about the image or video shown. • All transactions are encrypted.
• They can be used to provide further • Can speed up payment.
information about where a user can learn more
• Don’t need to exchange physical currency in
about the context of the image or video.
foreign countries.
4 Both of the following [2]:
Disadvantages
• It makes the video file smaller, so it is quicker
• Always the risk that a transaction can
to download / stream.
be hacked.
• It makes the video file smaller to it takes less
• Some people may lose track of their spending
storage space.
as they don’t hand over actual money.
5 It will not reduce the file size as much as lossy, so it
• Some people are anxious about using digital
will take up more storage space [1].
payment methods, especially contactless ones.
6 Both of the following [2]:
3 Four from [4]:
• The sample rate is the number of times sound
• A chatroom is an online service that
is sampled in a second.
allows multiple users to send each other
• If the sample rate is increased, it will increase instant messages
the overall size of the file.
• … whereas a forum allows users to post
questions and thoughts for other users to
respond to.
12 – IT in society • A chatroom is designed to be a live
1 The business could mine data about what kind conversation
of qualifications and what kind of people are • … whereas a forum is designed to allow user
employed by its competitors. to return to the forum at any time to see what
The business could use data mining to find out other users have posed as a response.
what characteristics of an employee are a good • A chatroom is not normally monitored by
match for their company. a moderator
• … whereas a forum will often have a
moderator checking the posts meet the rules.
Exam-style questions
4 Eight from [8]:
1 All of the following [3]:
• Stage 1 is the business understanding stage
• A cryptocurrency is a type of digital currency.
• … it is where the objectives are set and the
• A cryptocurrency is decentralised.
criteria for success are established.
• Stage 2 is the data understanding stage

533

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• … this involves the initial collection of data • … so people do not have to wait for a place to
from the various sources available. become available.
• Stage 3 is the data preparation stage • User can learn at their own rate
• … this is where the data is taken through • … this means that users are more able to fit the
a whole process of selection, cleansing, learning around the own schedule.
construction and formatting.
Disadvantages
• Stage 4 is the data modelling stage
• There are a huge selection of courses available
• … during this stage various test scenarios are
• … this may overwhelm a learner if they do not
generated to model the data.
know which one to choose.
• Stage 5 is the evaluation stage
• There are often a large number of people
• … this is when the results generated by the on a course
models are evaluated.
• … so the tutor/educator may not have a lot
• Stage 6 is the deployment stage of dedicated time to help each person on
the course.
• … this is when a report is created to present
the findings of the data mining to stakeholders. • … it may also be difficult for a tutor/education
to keep track of the progress of each person on
5 Four from [4]:
the course.
• It can be used by businesses to aid planning
• Some learners may struggle to complete
• … informing any actions that are taken on a the tasks
daily basis.
• … and may choose to only complete those
• It can be used by governments to aid ones that they know will be assessed.
national security
7 Six from [6]:
• … by analysing intelligence gathered to
• This would mean that banks create their own
highlight current activity in a country.
version of a digital currency.
• It can be used in surveillance
• This may mean that physical currency
• … surveillance data can be analysed to predict disappears altogether.
issues such as criminal activity.
• This could save money for the government as
6 Six from (max four for advantages) [6]: they do not need to think about the cost of
Advantages creating the physical currency.

• A large selection of courses are available • This could save the bank money as they do not
need to have huge security system in places,
• … so a user can enhance their learning in like vaults, in which physical currency is stored.
anything that they are interested it.
• This could cost the banks money as they will
• Can provide an employee with a need to have very strong security systems for
competitive advantage their digital currency.
• … as it demonstrates their motivation to learn • The speed of the exchange of money from
and improve in their own time. bank to bank could be improved.
• They are free of cost • Criminal activity such as money laundering
• … so all users who can access them will be may decrease.
able to learn. • Some people do not like the idea of the
• The number of people on a course is invasion of privacy that will exist by tracking
often unlimited each digital currency transaction.

534

Copyright Material - Review Only - Not for Redistribution


Answers

8 All of the following [6]: 4 The user will be required to have a high-speed
internet connection. The technology will need to
• Banks heavily rely on IT to keep all the records
have a large amount of RAM so that it can process
about their customers. If they had to store
and handle the amount of data streaming to the
paper versions of this data, it would take up
device. The computers used to edit the video files
huge amounts of physical storage space.
will need to have powerful graphics cards to be able
• IT can be used in the form of ATMs to access to render the amount of data required to create the
physical currency that we have stored in our video file.
bank account. This means that a user no
longer needs to go into a bank branch to queue
to get money out of their account. Exam-style questions
• IT can be used for online banking, allowing 1 Two from (max one per advantage/disadvantage) [2]:
a user to access many financial and banking Advantages can include:
facilities online, without the need to go into a
bank branch. • Allow greater access to important health
statistics.
• IT can be used for online banking, allowing
users to access many banking and financial • Users can sync their devices and challenge
services 24/7. each other to improve motivation for exercise.
• IT can be used for online banking, allowing • User can get alerts without the need to check
users to see all the transactions instantly, their mobile phone.
without needing to wait for a paper statement
Disadvantages can include:
to be delivered.
• People can become obsessed with their health
• People can use comparison websites to
statistics, developing an unhealthy relationship
compare the offers of banks and financial
and damaging thoughts.
services. This means they can easily find the
best and right deal for their circumstances. • There can be compatibility issues
between devices.
• The accuracy of some health trackers can
13 – New and emerging be dubious.
• Some people are concerned about the security
technologies of their data that is gathered by the device.
1 Possible uses could be: 2 Three from [3]:
• It could be used to limit access to certain areas. • 3D printing could be used to create
• It could be used to provide doctors with prosthetic limbs.
information about patients. • 3D printing could be used to create
• It could be used to provide patients with blood vessels.
information about the hospital.
• 3D printing could be used to engineer tissue.
2 It could use lossless compression methods to
• 3D printing could be used to create
compress the data.
medical tools.
3 Advantage could be:
3 All of the following [4]:
If the surgeon can see a very detailed image of
the patient, this can improve the accuracy of • It will allow the surgeon to have a very detailed
their surgery. image of the patient
Disadvantage could be: • … this can increase the accuracy of
the surgery.
It would require a high-speed internet connection
and if this is not available there may be a lot of lag • It can allow the level of detailed required to
on the stream, or it may not be able to stream at all. carry out remote surgery

535

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• … this means that specialist surgeons do not 7 Six from [6]:


need to make tiring journey around the world
Advantages:
to perform surgery.
• The organisation will be able to store very
4 Two from (2 marks each) [4]: large amounts of data in a much smaller space
• They often require more power consumption • … this can save costs such as warehouse space
• … therefore, more carbon emissions may be and hardware costs to store the data.
released to create the level of power required. • The organisation will be able to make their
• They often encourage users to replace previous data storage much more portable
versions of devices • … this can help move data to archive much
• … resulting in technology being thrown away more easily
into landfill, that can leach dangerous metals • … it can also mean that very large amounts
into soil if not disposed of correctly. of data can be transported to other locations
around the world without the need for an
5 All of the following [3]:
internet connection, which could compromise
• NFC has allowed electronic payments to its security.
become contactless.
• The organisation will be able to transfer
• The user no longer needs to put a PIN into a data at a much faster speed than other
device for small transactions storage methods
• … they can just touch their device or card to • … as millions of bits of data can be stored in a
the NFC base device. very short space of time.
6 Eight from [8]: Disadvantages:

• AI can replace the need for employees to do • The organisation may find that the data
tedious tasks in manufacturing storage is not compatible with their previous
methods of data storage
• … so an employee does not need to become
• … therefore, they may find that they cannot
bored and unmotivated by completing a
read and write data from one storage to
repetitive task.
another, if required
• AI can replace the need for employees to do
• … therefore, they may find it costly to replace
dangerous tasks in manufacturing
all the technologies involved.
• … so an employee’s life does not need to be
put in danger to complete dangerous tasks.
• AI can allow manufacturing to be carried out
for longer periods of time
14 – Communications
• … as it does not need to rest like a employee. technology
• AI can allow tasks to be carried out to a 1 Example could include:
higher standard
• It could be used in a remote control.
• … as it is capable of a greater level of accuracy
than an employee. • It could be used in a game controller.

• … it can also have faster reaction time than 2 The stream would keep stalling all the time as it
an employee. would be waiting for the data to download.

• AI can be used to replace employees in 3 Example could include:


manufacturing • Seasonal products, so more resources can be
• … which can be very concerning to humans as available when the seasonal product is at its
they may lose their job. height of business.

536

Copyright Material - Review Only - Not for Redistribution


Answers

• When they have a new product available, so 4 Four from the following (one for protocol name,
may have a sudden influx of traffic. one for description) [4]:
• SMTP.

Exam-style questions • Used to send emails from a computer to a mail


server, and between mail servers.
1 All of the following [2]:
• POP.
• The function of the presentation layer • Used to retrieve emails from a mail server.
is to prepare data ready for use in the
application layer • IMAP.

• Preparation could involve translating, • Used to retrieve emails from a mail server.
encrypting and compressing the data 5 All of the following [4]:
2 Any two from the following [2]: • The network is broken down in cells.
• It breaks data down into packets • The data is sent from the mobile telephone to
• It transmits the data from network to network the radio base station in the current cell that
the mobile telephone is created.
• It uses two main protocols, the IP
and the ICMP • The data is routed through each cell until
it reaches the cell of the receiving mobile
3 a One for network, two for justification [1]: telephone.
• He should set up a LAN network. • The data is then sent from the base station to
• He will need limited network hardware. the mobile telephone.

• Any other network functionality would be 6 a Both of the following [2]:


redundant. • Data required for biometric device is
b Any four from the following [4]: unique to each person and therefore very
difficult to replicate.
• Transmission media
• Biometric devices can be expensive to
• … this will create a wired connection if purchase and implement.
needed between any of the devices.
b All of the following [4]:
• Wireless access point
• The firewall will monitor data coming into
• … this will create a wireless connection and out of the network.
between the devices.
• The user can set rules and criteria for
• … this will allow all devices to be the traffic.
connected using a single component.
• The firewall compares the traffic to the
• Router rules and criteria
• … he will need this to connect his • … and will reject any traffic that does not
network to the internet if he wants this meet them.
functionality.
7 Six from the following [6]:
c All of the following [2]:
• By implementing a disaster recovery plan and
• The bandwidth and the bit rate will limit organisation has a plan in place for recovering
the download time for the data. data in the event of a disaster.
• If the bandwidth and the bit rate are not • The process of the plan will force the
high enough, the data will not stream organisation to assess what poses a risk to their
in a timely enough fashion for it to data and resources
play smoothly.

537

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• … they can then begin to think about what 2 Any four of the following [4]:
measures they can put in place to minimise
Calendars can show what each team member is
the risks.
doing [1]; instant messaging / video chat / video-
• As part of the process they will carry out run conference can enable remote workers to share
throughs of what will be done in the event of ideas and discuss progress [1]; documents can be
different disasters shared in one place [1] with tracked changes so any
modifications can be monitored [1]; discussions /
• … this can mean that employees are
forums can be setup so team members can discuss
familiar with what they need to do should a
specific tasks / documents / milestones [1]; current
disaster occur.
progress can be updated by team members so
• The process of planning for disaster recovery the project manager can see how the project is
can be time consuming and expensive progressing [1].
• … however, the cost of not having a plan in 3 a Any two of the following [2]:
place could be far greater, if the organisation
Both charts can show the critical path [1];
loses all of its data.
both charts show the length of time each
task takes [1]; both charts show predecessors/
dependencies [1].
15 – Project management b Any two of the following [2]:
1 During monitoring and control of the execution, Resource allocation [1]; start/finish dates [1];
resources may become unavailable, timescales may task progress [1].
not be met and the budget may be exceeded. If this
4 Software development projects have tasks with
happens, plans will need to be revised to allocate
unknown timescales [1] and PERT is designed to
different resources, adjust timescales and adjust
deal with uncertainties [1] by calculating estimated
expenditure.
times for each activity [1].
2 Resources will have been defined within the software
5 Any three of the following [3]:
including their availability and costs. The project
manager can then select available resources and The WBS will break the project down into sub
allocate them to tasks where they are required. projects [1] which can be managed separately by
Allocation of already assigned resources at specified assistant project managers [1]. Each team member
times will be prevented by the software. The project only needs to be concerned with their phase of the
manager will be able to assign an amount of time to project [1] and can ignore other phases [1]. The
each resource for each task. The project manager will project manager can organise activities into phases
be able to see the costs involved for each resource or sub-tasks so they are more manageable [1].
and how much each task will cost.

Exam-style questions 16 – System life cycle


1 a Any four of the following [4]: 1 Feasibility; analysis; design; implementation/
development/coding/programming; testing;
Objectives [1]; scope [1]; risks [1]; budget [1]; installation/implementation; maintenance;
approximate timescales [1]; stakeholders [1]; documentation; evaluation.
resources [1].
2 The analyst can expand upon questions that have
b Any three of the following [3]: been asked during the interview to gain further
Planning [1]; execution [1]; monitoring/control information from the user; questionnaires take
[1]; close [1]. time to create and so it is unnecessary when a small
group of users can all be interviewed.
3 To identify the hardware and software required to
operate the developed system.

538

Copyright Material - Review Only - Not for Redistribution


Answers

4 To show the data flows within a system. 18 If a bug or error is found within a system.
5 Each data flow must have a process attached to it. 19 Evolutionary prototyping develops each prototype
A data flow cannot move directly from one external further whereas throw-away prototyping involves
entity to another or from one data store to another disposing of the prototype. Evolutionary
or between an external entity and a data store. prototyping involves refining user requirements
after each evolution of the prototype and
6 A tick box allows more than one response where as
throw-away prototyping also involves refining
an option button only allows one response.
requirements after the prototype is developed.
7 To test that a validation rule accepts data that is Both methods involve producing a basic version of
within the acceptable range. what the user interface will look like. Both methods
8 Alpha testing is carried out by the development involve getting feedback from the user early during
team whereas beta testing is carried out by users; the project.
alpha testing is planned and structured whereas 20 With incremental development, a part of the
beta testing is ordinary everyday use; alpha testing software is fully developed before moving on
uses test data whereas beta testing uses real data. to the next part of the software whereas with
9 Tester will use input data to test part of a system iterative development, the phase of a system (e.g.
or a whole system and check the expected design) is completed before feedback is sought and
results against actual results without knowing or improvements made.
understanding the code inside the black box. 21 JAD involves both users and developers working
10 A test plan will identify all the tests that are needed together to develop a working prototype with the
for every input, every button, every link, every user being able to refine the design and layout as
report, every screen and all other elements of a the development progresses. Software application
system. The test plan will include different types frameworks will be used to develop the prototype
of test data including valid, invalid and extreme and end-solution.
so that inputs are tested to their limits. Without
this planning, important parts of testing would be
missed out and errors could be left untested. The Exam-style questions
plan will also cover all the user’s requirements and 1 a Any one from the following [1]:
ensure that they are tested.
To find out how the current system works [1];
11 Parallel; direct; phased; pilot.
to find out the requirements of the client [1].
12 If it would be too costly or take too long to input
b All of the following [4]:
data into both systems, then direct would be more
appropriate. There will be lots of staff in several hotels [1]
13 If there are a lot of users then pilot changeover so there won’t be time to interview them all but
will enable training to take place in stages rather questionnaires can get information from all
than all at once; If the new system is not very big staff [1]; the data will need analysing [1] and so
and doesn’t have features that can be separated the questions can be written in a way that will
then pilot could be used instead of trying to phase gather responses in a structured manner [1].
something that can’t be broken into parts. c All of the following [3]:
14 Cover, contents, introduction, hardware/ Interviews [1]; observation [1]; document
software requirements, instructions, glossary, analysis [1].
troubleshooting, index.
2 To identify what the client needs the new system
15 To give definitions of any technical terms used in to do [1].
the user documentation.
3 a Any three from the following [3]:
16 When a system requires maintenance.
Use of colour [1]; consistent use of fonts
17 Working relationship; efficiency of system; bugs
[1]; avoiding clutter [1]; legibility of fonts
or errors in the system; ease of use of the system;
[1]; instructions to the user [1]; optional vs
possible improvements to the system.

539

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

compulsory questions [1]; sufficient space for c All of the following [3]:
answers [1]; tick boxes or drop down boxes or
It’s needed to check that the system can cope
option buttons for multiple choice lists [1].
with invalid data [1] and reject it appropriately
b Any three from the following [3]: [1] without system errors occurring [1].
Example could identify the input data [1], type 6 a Any four from the following [4]:
of validation [1], rule [1] and error message [1].
There are lots of hotels [1] so one hotel could
For example, Number of nights, Type check,
pilot the system and identify any problems [1],
Must be numeric, Please enter a numeric value.
which could be rectified before the system is
c Any three from the following [3]: implemented in other hotels [1]. Only a small
group of staff need to be trained in how to use
Printer to print invoices for the customer [1];
the system initially at the one hotel [1]. The
barcode scanner to read barcodes on customer
hotel that pilots the system could be used to
booking printout or mobile phone display [1];
train staff from the other hotels how to use the
magnetic stripe / smart card reader/writer to
new system [1].
initiate room keys [1]; touch screen for the point
of sale terminal in the bar and restaurant [1]. b Troubleshooting will show common errors
and how to solve them [1] so if the staff come
4 a A ‘mock-up’ of a software solution; partially
across one of these errors they can find out
completed product used for evaluation/
what to do [1]. Glossary will include definitions
feedback [1].
of technical terms used in the documentation
b All of the following [4]: [1] so if staff don’t understand a term in the
Evolutionary prototyping develops each documentation they can look it up [1].
prototype further whereas throw-away c Errors may need correcting [1]; the system may
prototyping involves disposing of the prototype need to be adapted due to organisational or
so the prototype can grow rather than having external changes [1]; to prevent problems from
to start again [1]. Evolutionary prototyping occurring [1]; to improve on the software [1].
involves refining user requirements after
each evolution of the prototype which will
enable the landscape gardening company to
better understand their own requirements 17 – Mail merge
as the prototype develops [1]. The landscape
gardening company can canvass opinion from
customers on what the user interface will look
Exam-style questions
like [1]. The project team can get feedback from 1 a Both of the following [2]:
the landscape gardening company early during Mail merge is the automatic addition of
the project [1]. data from a source file [1] such as names and
5 a All of the following [4]: addresses into a master document such as a
letter [1].
White box testing requires understanding of the
module or system being tested [1] whereas black b Any six from the following [6]:
box testing only requires input data and output Create the master document [1]; link the
data to be used [1]; white box testing is usually master document to the data source[1]; insert
carried out by the developer [1] whereas black merge field codes[1]; spell check the master
box testing is usually carried out by the user or document[1]; visually inspect the master
specialist testers [1]. document to check for accuracy[1]; set up
b Both of the following [2]: any filters that are required[1]; preview the
mail merge[1]; check the preview for accuracy
Beta testing requires a very large user base [1] including the correct records and layout[1]; run
and usually applies to off-the-shelf software the mail merge to produce the letters [1].
whereas the hotel system will need to be used
consistently by all staff within all the hotels [1].

540

Copyright Material - Review Only - Not for Redistribution


Answers

2 All of the following [4]: 4 Images are edited before being presented to
the public.
Filter will be required [1] that compares the date
of service [1] from the source file [1] with the date People think the images are real and aspire to meet
specified by the user [1]. their unrealistic standards.
3 Any four from the following [4]: 5 Red, Green, Blue
• Read the text carefully to find/correct 6 Red
typographical errors/mistakes in grammar/ 7 Green
style/spelling [1].
8 Blue
• Printing a copy to read on paper rather than 9 Black
reading on screen [1].
10 White
• Read the invitation out loud to himself [1] so
he hears problems he may not read [1]. 11 Any three from: BMP, GIF, JPEG, PNG, TIFF
12 Any one from: SVG, PDF
• Use a blank sheet of paper to cover up the
lines below the one he is reading [1].
• Use the search function to find mistakes he is Exam-style questions
likely to make [1], or example ‘its’, ‘there’.
1 a 1 mark per bullet [13]:
• Compare the spelling of names with a list
• Rectangle created.
of names spelt correctly [1], for example, a
class list [1]. • Triangle created and positioned central to
rectangle.
• Run the mail merge and check for errors on the
merged documents [1]. • Outline of both objects is dark blue
• Check the data for the merged fields is • … … less than 4 pt thick.
displayed correctly [1]. • Gradient fill used for television.
• If he has used a filter, check the correct records • Text says Titania
have been included [1] by comparing the
• … inside the television
merged invitations with his filtered list [1].
• ..in green
4 Any two from the following [2]:
• … sans-serif font
Embedding is inserting data from a source
document into the current document [1] {then either • … in an arc.
of the following} so that any changes to the source • Font is a suitable size for the television.
document are updated in the current document [1], • Image saved as vector
for example, any changes to the source data for the
graph will automatically update the graph in the • … no more than 250 by 250 pixels.
report [1]. b 1 mark per bullet [4]:
• Vector is made of points and calculations
• … when it is resized the
18 – Graphics creation proportions are kept
1 Image made of small squares called pixels • … it does not pixelate
Each pixel can have one colour • … unlike a bitmap.

2 Image stored as coordinates and calculations. c 1 mark per bullet [6]:

3 They do not pixelate when enlarged • Lossy compression removes some data.
• … the decompressed image is not the same
The file size is usually smaller
as the original.

541

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• Reduce the number of colours Photographs of the frames are taken.


• … fewer colours means less data to store The photographs are run through very quickly.
per pixel.
2 Photographs are taken of an object.
• Reduce the resolution
Every set number of seconds.
• … means fewer pixels to store therefore
less data. The photographs are run one after the other.
2 a 1 mark per bullet [15]: 3 Position an object/series of objects.
• Rectangle created Take a photograph.
• … warped/distorted on the top edge only Move the objects minutely and take another
• … appropriate level of distortion to photograph.
match image. The photographs are run one after the other.
• Six circles added
4 Flip-book animation.
• … in black
5 Computer-generated imagery.
• … all identical
6 An individual image.
• … and evenly spaced.
7 The stage is 4 units wide to 3 units high.
• Black rectangle drawn
Old televisions.
• … outline only.
• Word rollercoaster added 8 16:9 – modern televisions, monitors and laptops.

• … in green 2.35:1 – widescreen and films.


• … in sans-serif font 16:10 – modern mobile phones.
• … set to an arc 9 Help you layout objects.
• … inside the rollercoaster rectangle Help you align objects.
• … an appropriate size. 10 Objects will be automatically aligned.
b For example [3]: Saves time in attempting to align them.
• .jpg
Increases precision.
• Compresses the image to reduce the
file size. 11 Images are stored as coordinates and calculations.

• There is no transparency. Images can be resized without pixelating.


c 1 mark per bullet [4]: 12 Line changes the line around the edge of an image.
• RGB colours are made up of red Fill changes the colours inside the image (inside
green and blue the lines).
• … values between 0 and 255/FF for 13 Orientation
each colour.
14 To allow you to perform motion tweening and
• CMYK are made of cyan, magenta, morphing on it.
yellow and black
15 Because they are not stored as coordinates so their
• … values are a percentage between 0 and 100. coordinates cannot be changed.
16 A self- contained image / set of images that have
19 – Animation their own independent animations.
1 Each frame was drawn individually by hand. 17 To allow different images / parts of images to be
animated independently, that is, without affecting
Each frame was a different medium/sheet. the other images.

542

Copyright Material - Review Only - Not for Redistribution


Answers

18 Increase the speed. frame (by moving items or drawing items)


whereas time-lapse animation is automatic.
19 A frame keeps the same content, a key frame is
used when something needs to be changed, or 2 a 1 mark per bullet [19]:
added or removed.
• Animation is 16:9 ratio.
20 Motion can only move an object. Shape can move
• Background is pale blue.
it, change its shape, size and/or colour.
• Logo is on left-hand side of the animation.
21 It calculates all the spaces between the two
key frames and fills in the gaps so that it is not • Logo starts small
jumping from one position to the next, but is • ..increases gradually to full size
smoothly moving.
• … then decreases small again
22 Only the elements inside/outside the mask can be
seen, for example, a shape moves across the screen • … repeatedly throughout animation.
and you can only see the image inside that screen. • Ball appears from right-hand side and
moves to the left

Exam-style questions • … and out of sight

1 a 1 mark per bullet [13]: • … displays text as it rolls

• Aspect ratio is 235:1. • … leaving correct text behind it.

• Black background throughout. • Ball is off screen for 1.5 seconds

• Starts with Saif’s name clearly visible. • … then returns and moves from
left to right
• Letters fade
• … as a mask
• … 1 at a time
• … displays text as it moves over it
• … taking 1 second for each to fade.
• … and only as it moves over it.
• Comics appears when Saif’s name åhas
disappeared • Animation is set to loop.

• … taking 1 second to fade in • Animations are smooth.

• … stays on screen for 2 seconds • Export to a suitable format.

• … fades out one letter at a time with 1 b Frame: one single image of an animation [1].
second for each fade. Key frame: a frame where a change happens for
• Font is white and appropriate size (takes that object/symbol [1].
up full height of animation). 3 1 mark per bullet [12]:
• Animation loops. • Screen ratio is 16:10.
• Animation is exported in a suitable format • Background is white.
for a website.
• Green outline matches that on logo.
b 1 mark per bullet [3]:
• … and is displayed throughout.
• All have individual images as frames.
• Letters bounce in from left.
• Cel uses hand-drawn images whereas
stop-motion animation and time-lapse • … in correct order.
animation are photographs of real-life • All letters stay on screen for 2 seconds
objects/items.
• … then they all fade out
• Stop-motion animation and cel animation
both require a person to manipulate each • … together.

543

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

• Animation loops. • … and suitable error message if here is not.


• Animations are smooth. • Confirmation given if no errors
• File is exported as a .gif. b 1 mark per bullet [3]:
• To explain how the code works.

20 – Programming for • So other developers know how your


code works
the web • … so they can change it/improve it.
1 alert c 1 mark per bullet (up to 4) [4] :
2 console.log • To stop the web page crashing.
3 prompt • So the web page outputs a message
4 To view what is running/happening in the webpage. • … instead of doing nothing.
For debugging purposes. • Otherwise the user will not know what
5 A self-contained piece of code that can be called they have done wrong.
from another part of the program, it runs and then • Otherwise the user will not know what to
returns control back to the code that called it. do to correct the error.
6 Modulus, the remainder after division. d 1 mark per bullet (up to 3) [3]:
7 ++ increments/adds 1 to a value, -- decrements/ • Web page still contains and works as
subtracts 1 from a value. required in part (b).
8 False • Image1 appears in web page when loads
9 False • … changes to Image 2
10 True • … when the user moves their
11 True cursor over it.

12 False 2 a 1 mark per bullet [12]:

13 True • Field to select day

14 False • … limited to only valid options.


• Field to select time

Exam-style questions • … limited to only valid options.

1 a 1 mark per bullet [11]: • Field to select number of people

• Suitable input for first name • … limited to only valid options.

• … with suitable error if blank. • Option to select set menu.

• Suitable input for last name • Fields to enter name and


telephone number.
• … with suitable error if blank.
• Appropriate error messages for invalid
• Suitable input for query data on one field
• … with suitable error if blank. • … and on all other fields where
• Suitable input for email address appropriate.

• ..with suitable error if blank • Confirmation of submission given

• … detecting if there is an @ • … only if all valid.

544

Copyright Material - Review Only - Not for Redistribution


Answers

b 1 mark per bullet [2]: 3 1 mark per bullet [2]:


• At least one appropriate comment • While may never run the code inside it;
Do while will always run the code once.
• … and all constructs commented.
• While checks condition at start of loop;
c 1 mark per bullet (up to 3) [3]:
Do while checks condition at end of loop.
• Description of checking data entered
4 1 mark per bullet [3]:
• … against criteria.
• Stores multiple pieces of data
• Outputting error messages if invalid.
• … under one identifier
• If no error messages then
• … all of the same data type.
submission allowed.

545

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Glossary
Absolute cell reference: a cell reference that does not Bandwidth: the range of frequencies available for
change when it is copied into other cells, usually by a communication method which determines the
placing a $ sign before the cell reference transmission rate
Actuator: a type of motor that is used to move and Batch processing: sets of data are processed all at one
operate another mechanism or device time without user interaction
Algorithm: a set of instructions or steps to be followed Beta testing: a sample of users test a pre-release version
to achieve a certain outcome of the software
Align: make objects start at the same position Bezier curve: smooth curves made of paths that can be
scaled indefinitely
Alignment: positioning text so that it is in line, for
example on the left, right or centre Biometric: unique physical characteristic of a person
that can be used by a computer for identification
Alpha testing: initial testing of the software by a limited
purposes
group of people
Bitmap: an image made up of small squares, called
Analysis: finding out how the current system works
pixels; each individual pixel can only be one colour
and what the requirements of the client are for the new
system Bit rate: the rate at which bits can be transferred in data
transmission
Animation: a series of images that are played one after
another to simulate movement Black box testing: testing of inputs and outputs to a
system or part of a system with no consideration for the
Anti-malware: software that is used to identify malware
workings of the system
on a computer and remove it
Boolean: a data type, either true or false
Anti-virus: software that is used to identify a virus on a
computer and remove it Bridge: a network component that connects segregated
parts of a LAN
Arithmetic operator: a symbol, or symbols, that perform
a mathematical calculation; these often appear as Broadband: a method of data transmission that is
algebraic operators that you will be used to using in capable of transmitting a high level of traffic
mathematics
Calculated field: an arithmetic calculation on a field
Array: a data structure that can store multiple items from the data source
under one identifier; the items are of the same type
Calibration: the process of testing and modifying a
Artificial intelligence: a computer system designed to device to make sure that it is taking the correct readings
simulate human intelligence
Canvas: the area in the software where you add and edit
Aspect ratio: the proportion of a screen or video width your images
to its height
Cel animation: (also called cell animation) where
Assignment: giving a variable a value individual images are drawn on separate pages then
photographed, one frame at a time
Attribute: a category of information within an entity
Cell: a single unit/rectangle of a spreadsheet formed at
Automation: the ability to operate automatically
the intersection of a column and a row where data can
Avar: a hinge on a wire-model object that lets you be positioned; its reference (name/address) is based on
manipulate its position its column and row
Backward chaining: breaking a goal down into sub-goals CGI: an abbreviation of computer generated imagery;
that allow the system to work backward from any image (still or moving) that is created using a
the goal computer

546

Copyright Material - Review Only - Not for Redistribution


Glossary

Client: a computer in a network that is not a central Database: a structured method of storing data
point of control
Database management system: software used to manage
Clip: short piece of a video or audio file a database
CMYK: Cyan/Magenta/Yellow/Black colour system; all Data dictionary: metadata (information) about the
colours are a combination of these four colours database
Collaborate: work together Data driven: a system dependent on the data that it is
provided with
Colour depth: the number of colours that can be
represented in the image Data mining: the process of collecting large sets of data
and analysing them to identify patterns and trends
Comparison: comparing two items of data resulting in
True or False Data type: the type of data being stored, for example, a
number, string (text)
Comparison operator: a symbol, or symbols, that
compare the two sides of the operator and the result is Decision: a comparison is used to decide if code is run,
either true or false or not

Compiler: translates high-level programming language Declaration: a statement giving the identifier of a
into an executable file in machine code variable or array

Compound key: two or more fields that form the primary Demographic: a particular section of a population
key. Each field that comprises the compound key are Design: the stage in the life cycle when the design
themselves keys from another table specification is produced
Compression: reducing the file size of a file, for example, Design specification: illustration of how the system
an image will look, what the data structures will be and how the
Concatenate: to join two strings together system will work

Condition-controlled loop: a loop that runs based on a Development: the stage in the system life cycle when the
condition, not the number of times it will run software is produced
Device: a hardware component of a computer system
Condition: a statement that can be evaluated as true or
consisting of electronic components
false, for example 5 > 6 (this is false because 5 is not
greater than 6) DFD: data flow diagram which shows how data moves
around a system
Construct: a control structure, such as a loop or a
conditional statement Direct data source: data that is collected for the purpose
for which it will be used
Control system: a system that manages or regulates a
process by physically changing aspects of the system Distribute: make the space between objects the same
depending on collected data DPI/dots per inch: the resolution of an image
Coordinates: the position (x and y) of an object on the Economic: considering a country in terms of their
stage production and consumption of goods and services
Count-controlled loop: a loop where you know the Electronic currency: a payment method that occurs in a
number of times it will run digital form
CPM: critical path method, also sometimes known as Embedding: importing data from a data source so that
CPA (critical path analysis) any changes to the data source are shown in the new
Critical path: the tasks which must be completed on time document
for a project to complete on time Emerging technologies: a technology that is still in
Custom-written software: software that is written development to allow it to reach its full potential
especially to meet the requirements of a client Encryption: scrambling data so it cannot be
Data: raw numbers, letters, symbols, sounds or images understood without a decryption key so that it is
without meaning unreadable if intercepted

547

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Entity: a set of data about one thing (person, place, Gantt chart: a chart used for planning a project
object or event)
Gateway: a network component that joins different
Entity relationship diagram: a diagram that represents LANs together
the relationships between entities
Geotag: an electronic tag that assigns a geographical
Evaluation: a formal review of a project location
Execution: the development stage of a project Global variable: a variable declared outside a function; it
Explanation system: a component of an expert system can be accessed anywhere within the code
that provides an explanation of how an outcome was Goal driven: a system that is dependent on a finding a
achieved desired goal
Export: to prepare data for use in another application Goal seek: looking to see what a variable needs to
Field (databases): a common word for attribute change to for a goal in terms of output to be achieved

Field (mail merge): a category of information from the Grid: a tool that displays a grid on the background of
data source the screen to help with alignment
Filter (mail merge): selecting records from the source file Group: join several images together
based on conditions Guides: lines that you can drag on the stage to help you
Firewall: a security measure that can be implemented position objects
to monitor traffic into and out of a computer and Heuristic: the ability to use a value to determine which is
prevent external users gaining unauthorised access to a the best pathway to select
computer system
Hologram: a 3D image that is created using laser beams
Flat file: a database stored in a single table and mirrors
Flatten: merge all layers into one single layer
HSL: Hue/Saturation/Lightness colour system; all
Flip book animation: each page of a book that has a colours are a combination of the hue saturation and
different image drawn on; when flicked through they lightness selected
create an animation
HTTPS: Hypertext Transfer Protocol Secure
FLOPS: floating point operations per second – used to
Hub: a network component that joins computers
measure the performance of supercomputers
together and forwards data packets to all connected
Flowchart: a set of symbols put together with commands devices
that are followed to solve a problem
Identifier: the name given to a variable, subroutine or
Foreign key: a field in a table that refers to the primary function
key in another table
Implementation: the stage in the system life cycle when
FOR loop: a count-controlled loop the software is installed for the user
Formula: a mathematical calculation using +, −, × or ÷ Import: to bring in data from another application
Forward chaining: a system that moves forward from Increment: add 1 to something
rule to rule until it reaches a possible outcome
Incremental development: creating a system or adding
Frame (sound and video): a single image in a video file new functionality in small parts
Frame (animation): one screen, or page, where an image Index: a list of keys or keywords which identify a unique
is drawn; a series of these frames are played one after record and can be used to search and sort records more
the other to create the animation quickly
Function (Algorithms): a separate piece of code that has
Indirect data source: data that was collected for a
an identifier and performs a task; it can be called from
different purpose (secondary source)
elsewhere in the code and returns a value
Information: data with context and meaning
Function (Spreadsheets): a ready-made formula
representing a complex calculation Infrastructure: the facilities that are needed for the

548

Copyright Material - Review Only - Not for Redistribution


Glossary

operation of a society, such as roads, buildings and MAC address (Media Access Control address): a unique
utilities address given to a device by the manufacturer
Initiation: start of a project Macro: a set of instructions that can be completed all at
once
Input: putting data into an algorithm
Mail merge: the automatic addition of data, such as
Integer division: where only the whole number is given
names and addresses, from a source file into a master
from a division
document, such as a letter
Interpreter: translates and executes a high-level
Mainframe computer: powerful computer serving several
programming language a line at a time
terminals
IP address (Internet Protocol address): a unique address
Maintenance: changes made to a system after its
given to a device, normally by a router
implementation
Iteration: a loop to repeat a section of code for a fixed
Malware: software that is malicious
number of times or until a required outcome is achieved
Mask: a layer that involves shapes, or other components,
Iterative development: creating a system or adding new
that restrict what can be seen of the other layers
functionality in a repetitive cycle
Master document: the main document that will be used
Key frame: a location on a timeline which marks a
for all records
frame that has a change in the animation, for example, a
drawing has changed, or the start or end of a tween Master file: a table in a database containing information
about one set of things, e.g. employees
Kerning: the space between letters
Microprocessor: an integrated circuit that is used in
Knowledge base: a component of an expert system that
monitoring and control systems
stores the knowledge provided by experts
Model: a representation of a process
Knowledge base editor: a component of an expert system
that is used to amend or update the knowledge base Modulus division: when the remainder is given from a
division
Layer (Graphics): a ‘surface’ onto which an image or
object is placed; each object is placed on a separate layer Monitoring system: a system that observes and often
and they are stacked on top of each other (as though on records the activities in a process
different pieces of paper)
Mono: a sound clip that has a single track
Layer (Animation): an object or image given its own
Morphing: another term for shape tweening; one image
timeline for independent manipulation
changes into another image
Library: a place that stores a list of images and objects/
Nested loops: one construct that is inside another
symbols in an animation
construct
Literal: the actual data being used (instead of a variable)
Network: two or more computers or devices connected
Local area network (LAN): a relatively small network together so they can communicate and share data and
that is located within a single building or site resources
Local variable: a variable declared within a function; it Network interface card: a network component required
can only be accessed within the function to attach a computer to a network
Loop: code that is repeated Normal form: the extent to which a database has been
normalised
Logical operator: symbols that represent the logical
operations and, or, not Normalisation: process of structuring data in a database
Lossless compression: a method of compression where Object (Animation): an image, or combination of
the decompressed image is identical to the original images, that is manipulated as one item
Lossy compression: a method of compression where the Object (Programming): a series of named values all
decompressed image is not identical to the original stored under one identifier

549

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Off-the-shelf software: general purpose software Pseudocode: a syntax-less language that is used to
available to a large market convey an algorithm
Online processing: also known as interactive processing, Query: a request for data from a table or combination of
data is input by the user and feedback given in the form tables
of outputs
rapid application development (RAD): use of prototyping
Opacity : the lack of transparency of an image; at 0% to develop a system in a very short time frame
opacity the image is fully transparent
Range: a selection of cells
Operating system: software that manages the hardware
within a computer system Real-time processing: data is processed as soon as it has
been input and outputs are generated immediately
Operator: a symbol, or set of symbols, that perform an
operation, for example, arithmetic operators Record: a common word for entity

Orientation: the direction of text, for example horizontal Referential integrity: data in the foreign key of the
or vertical table on the many side of a relationship must exist
in the primary key of the table on the one side of a
Output: displaying data from an algorithm to the user relationship
Packet: a unit of data in data transmission Relationship: the way in which two entities in two
Parameter (Algorithms): a piece of data that is sent to a different tables are connected
subroutine Relative cell reference: a cell reference that changes when
Parameter (Databases): data used within the criteria for it is copied into other cells
a query Repeater: a network component that is used to boost a
Peer: a computer of equal importance in a peer-to-peer signal in data transmission
network REPEAT UNTIL loop: a condition-controlled loop that
PERT: performance evaluation and review technique runs until the condition is true
Pixel: a small square of one colour; these are combined Requirements specification: what a user needs a new
to create a bitmap image system to do
Pixilation: when a bitmap image is enlarged, the pixels Resolution: the number of pixels per ‘measurement’ an
are enlarged and become visible causing the image to image or a single frame in a video contains (for example,
appear blurry dots per inch)
Predecessor: a task in a project that must be completed Resources: people, equipment, facilities or funding
before another task can start required to complete a project
Primary key: a field that contains the unique identifier Reverberation: the number of echoes of the sound
for a record and the way that they decay – reverberation can be
natural (caused by the room in which the sound is
Primary variable: the foremost parts of the animation, played) or introduced by editing software
that is, the graphic components
RGB: Red/Green/Blue colour system; all colours are a
Procedure: a type of subroutine that does not return a combination of quantities of red, green and blue
value to the main program
Router: a network component that uses a computer’s IP
Process: an action performed to some data to make a address to send data packets to a destination outside the
change current network
Prompt: a question asked to the user which requires a Ruler: a tool that lets you see the position of items on
response the screen, and helps you draw them to the correct size
Protocol: a set of rules or standards that ensure data is Rules base: a part of the knowledge base that contains
transferred between devices correctly all the rules to be analysed by the expert system
Prototype: a ‘mock-up’ of a software solution in a Sample rate: the number of times sound is sampled in a
primitive form second

550

Copyright Material - Review Only - Not for Redistribution


Glossary

Sample resolution: the number of bits that are used to Symbol: a component, for example, an image, of an
represent each sound sample animation that has a name and is put in the library;
multiple copies of the object can be created
Secondary variable: the background elements of the
animation, for example moving water/trees System flowchart: an overview of how a system works in
a diagrammatic format
Selection: use of a conditional statement to decide a
course of action or which section of code to run System software: software needed to operate a computer
system
Sensor: an input device that collects data from the
surrounding physical environment System specification: the hardware and software needed
to run the system
Server: a computer in a network that is a point of
control Table: a collection of related data, organised in rows
and columns (for example, about people, places, objects
Simulation: using a model to predict real-life behaviour
or events)
Snapping: a feature that will predict where you want
objects placing, by aligning them to other objects, Technical documentation: an overview of the structure of
images or gridlines the system, how it was put together and how it works

Social networking: the use of websites and apps that Test data: data that will be used for testing a system
allows users to communicate and interact Test plan: a detailed and structured plan of how testing
Software: programs which give instructions to the should be carried out
computer Time lapse: a camera automatically takes a photograph
Source file: the file containing the data that will be every set period (for example, once a minute) and these
merged into the master document are combined to create a film
Splice: join together two or more sound or video clips Timeline: the place that controls the order the frames are
run, the positioning of the layers, and so on
Spreadsheet: software that can organise, analyse and
manipulate data organised in a grid of rows and TLS: Transport Layer Security
columns Tracing bitmap: a way of converting a bitmap image into
SSL: Secure Socket Layer a vector graphic
Stage: the area where the animation takes place; to be Track: a specific recording, for example, of one
within the animation, the object must be on the stage instrument or voice – the tracks can then be edited
separately and combined to play concurrently
Stereo: a sound clip that has multiple tracks
Transaction file: data that is used to update a master file
Stop motion animation: photographs are taken of
objects; the objects are moved slightly each time and the Transform: changing the dimensions, rotation, colour
photographs combined to create the animation fill, opacity, etc. of an object over a certain number of
String: a data type: data stored as text which can be frames between two key frames
characters, numbers and symbols Transition: the method with which one video clip
Subroutine: a set of instructions that have an identifier merges into a second clip
and that are independent from the code. It is called from Transparency: being able to see through an object or
another part of the program and returns control when it surface
was finished
Triangulation: the process of pinpointing the location of
Supercomputer: large computer with parallel processing a device, using radio signals from satellites
to complete highly complex tasks quickly
Tween: (Inbetweening) an animation where the start and
Switch: a network component that uses a computer’s end points are set; the computer generates the actual
MAC address to send data packets to a destination images to make the animation change
within a network
2D: two dimensional: only on the x and y axis, for
example a traditional cartoon

551

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

3D: three dimensional: has an x, y and z axis Virtual Private Network: an encrypted connection that
can be used to send data more securely across a network
User documentation: a user guide giving instructions to
the user on how to use the software Wide area network: (WAN) a relatively large network
that is normally two or more LANs that are linked
User interface: communication between the user and the
computer system What-if analysis: experimenting with changing variables
to see what would happen to the output if those
Utility software: software that performs some sort of
variables changed
maintenance on the computer system
WHILE loop: a condition-controlled loop that runs
Validation: the process of checking data matches
while the condition is true
acceptable rules
White box testing: testing the whole system in terms of
Variable: a space in the memory of a computer that has
structure and logic covering all paths through the system
an identifier, where you can store data; this data can be
changed Wireless access point: a network component that receives
and transmits radio signals to allow wireless (Wi-Fi)
Vector: an image that uses geometric points and shapes;
connection to a network
calculations are used to draw the image
Verification: ensuring data entered into the system
matches the original source

552

Copyright Material - Review Only - Not for Redistribution


Index

Index
2D animations 431–2 application software 28, 307 Bluetooth 286, 318–19
3D animations 431–2, 464 apps 28, 266, 273, 281 blur tool 418
3D printing 298–9 AR (augmented reality) 290–1 BMP (bitmap image file) 408
architecture 296 Boolean data 232–3, 478
absolute cell references 132–3 archival 297–8 Boolean (logical) operators 113,
access rights 325 ARP (address resolution 154, 208, 214, 480, 497–9
activity dependence tables 335–6 protocol) 305, 313 botnets 323–4
actuators 48, 49–50, 51 arrays 479, 500–2, 503–4, 507, bots 98, 323–4
adaptive maintenance 365 512–14 malicious 98–9
adware 96–7 aspect ratio 244–5, 434–5 bridges 316
agile software development assignment 60, 478 brightness 417
371–2 ATMs 281 broadband 102–3
AI (artificial intelligence) 112, attributes 189 buffers 261, 320
289–90, 301 audio clips see sound clips business, data mining use in
airbrushing 400 augmented reality 290–1 270–1
alert box 471 automation 293 buttons 219, 484–6, 487–93
algorithms 50, 54–6, 290 avars 464 byte 16, 17
correcting 79–82
editing 78–9 backdoors 324 cables 317–18
align tool 402–3 backup 34, 326–7 CAD (computer aided
alignment 129, 402–3 backup routines 362 design) 178, 298
alpha style 439 backward chaining 114 Caesar cipher 7–8
alpha testing 358 bandwidth 95, 262, 317, 318, calculated fields 388–9
analogue 260–1, 312, 315 320–1 calendars 332
analysis 344–8 banking, IT in 281–2 calibration 45–7
document 346–7 bar charts 165–6 cameras 248, 283, 292, 319,
mathematical 178 barcodes 13, 14, 22 398, 431
qualitative 345 batch processing 18–21, 28, 30, accurate 41
quantitative 345 236 dashboard 284
scientific 290 beta testing 358 digital video 234, 290, 319
anchor points 413–14 Bezier curves 410 cancer treatment 294
animation 248, 430–64 binary format 28, 304 canvas 410
exporting 463 biomedical printing 299 resizing 419–20
inbetween 451 biometrics 88, 324 captions 247
masks 461–3 BIOS (Basic Input/Output car driving 185
types 430–2 System) 31 car engine fault diagnosis 115–16
variables 463–4 bit depth 420–1 cars, self-driving 290
viewing and controlling bit rate 320–1 CASE...END CASE 63–4
459–61 Bitcoin 267 CBDC (central bank digital
see also layers; paths; stage; bitmap images 415–20, 442 currency) 268
vector graphics converting into vector CCTV 283–4, 324
anti-malware 96, 324 shapes 415–16, 442–3 CDs (compact discs) 234
anti-spyware 96, 324 use 398–9 cel animation 430
anti-virus 34, 88, 92, 93, 95, 324 BitTorrent protocol 313 cells (in networks) 312
application layer 304, 305 black box testing 358 cells (in spreadsheets) 122–3
application servers 309 blogs 275 formatting contents 127–9

553

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

formatting emphasis 129–31 satellite 322–3 cryptography 8, 10


named 133–4 see also cloud computing; CSV (comma separated
protecting 124–5 data packets; disaster values) 200, 224, 236
referencing 131–4 recovery management; currency 265–8, 296
cellular communication 312, 322 networks curves, converting text to 422–4
central bank digital base comparison 62 custom-written software 37–8
money 268 compilers 32–3
CGI (computer generated complex queries 208–10, 213 dashcams (dashboard
imagery) 431 compound keys 201–2, 227–8 cameras) 284
chaining 114 compression 35, 252–3, 261–2, data 2–3
charts 165–72 420–1 archiving 297–8
analysing and selecting lossless 252–3, 262, 420–1 embedding 390
165–70 lossy 252–3, 261–2, 420–1 exporting 161, 224
embedding 391 computer-assisted translation importing 161, 200–1
formatting 170–2 294–5 redundant 198–9, 225, 229
chat rooms 273 computer-based training 277 sorting 156, 217
chatter bots 98 concatenation 57–8 summarising 156–60
check boxes 219 conception 330 data allowance 261
check digit 13–14 conditional formatting 130 data collection forms 353–4
checksum 17 conditional functions 146 data compression 35
chess player 116 conditional statistical functions data dictionary 229–31, 352–3
cinema 289 148–50 data driven reasoning 114
circuit switching 306 conditions 494–500 data entry
circuits 49, 306 confidential data 88, 89, 310, 325 double 14–15
CLI (command line interface) 38–9 confirm box 472 forms 217–20
client-server networks 308–10 consistency check 13 data extraction 154–6
clients 308 console mode 472–4 data link layer 304
climate change models 179–80 construction 179, 183 data mining 269–72
clips 244 constructs 76–8 data packets
see also sound clips; contrast 417 structure 305
video clips control, project 332 transmitting 306–7
clone tool 418 control systems 44, 48–52 data processing 18–24
closure, project 331 control total 15 data protection 5, 96
cloud computing 321–2, 327 cookies 96 data sources 3–6
cloud storage 321–2 coordinates 433 data storage 297–8, 321–2, 352–3
CMS 407 corrective maintenance 366–7 data type functions 140–1
CMYK 407, 408 corrupt data 93, 326 data types 127–8, 190–1, 231–3,
coaxial cables 317 costings 332 470, 478–80
coding systems see encryption CPA (critical path analysis) 334–7 conversions 479
collaborative working 332–3 CPM (critical path method) 334–7 databases 189–240
colour, choosing 439 CPU (central processing unit) 28, calculations within 215–16
colour balance 417–18 32, 49 creation 189–201
colour depth 420–1 crashing 337 data dictionary 229–31, 352–3
colour gradients 413 credit cards 265–6, 296 data entry forms 217–20
colour levels 416–18 credits 252 data types 231–3
colour picker tools 407–8 critical path 333, 338 data validation 204–5
colour systems 406–8 CRM (customer relationship data verification 206
combination charts 168–9 management) 270 file and data management
comments 130, 511–12 crop growing 51 233–40
communication tools 332–3 crop tools 405–6 keys see keys
communications technology cross-tab queries 212–13, 214 normalisation 225–9
303–27 cryptocurrency 267–8 reports 221–5

554

Copyright Material - Review Only - Not for Redistribution


Index

searches see searches echo 257 finance, IT in 281–2


sorting of data 217 economic areas 102 financial modelling 179
date and time fields 389–90 economic trends prediction 271 financial planning 116–17
date and time functions 137 education, IT in 281 fingerprints 324
date/time data 232 electronic currency 265–8 firewalls 88, 92, 93, 99, 325
DBMSs (database management electronic wallets 287 fitness trackers 300
systems) 189 else if statements 495 flash memory 9
hierarchical 237–8 else statements 495, 496 flat files 189
DDoS (distributed denial of email 274–5 compared with relational
service) 99, 324 email encryption 10 databases 197–200
decision making 333 embedding 390–1 flatten tool 403
decisions 56, 62–5 emerging technologies 286–301 flight simulators 184
declaration 478 encoding 7 flip book animation 431
decryption 8, 9, 10, 88, 304, 325 encryption 7–11, 314, 320, 325 flip tool 402
delay 257 Enigma machine 289 float time 336–7
demographic groups 102 entities 189 flowcharts 54, 56–81
design 348–56 environmental issues 301 correcting 79–81
design specification 347, 348 equalisation 258–9 decisions 62–3
development 356–60 ERDs (entity relationship editing 78–9
device drivers 32 diagrams) 194–7 input and output 57
DFD (data flow diagram) 348–50 errors, trapping 514 loops 66–8
DHCP (dynamic host ethernet 306, 307 nested constructs 76–7
configuration protocol) 313 ethical issues 271 processes 59–60
diagnosis 115, 271 evaluation 364–5 string manipulation 70
dialogue interface 41 events subroutines 72, 73
digital currency 265–6 detection 492–3 system 350–1
timing 505–8
digital divide 102–9 folders 237, 445–6
evolutionary prototyping 368
direct changeover 360, 361 fonts 217, 422, 476–8
e-waste 301
direct data source 3–4, 5–6 forecasting 179, 183
execution, project 331
direct file access 237 foreign key data 203
expert systems 112–18
disaster recovery management structure 56
explanation system 114
325–7 foreign key value 191
export 161, 224, 252–3, 261–2, 463
discussions, project 333 foreign keys 191–4, 196–7, 202–3
extensions 233–5
disk defragmentation 35–6 foreign-language websites 295
distort tool 419 format check 12
fade effect 248
distribute tool 403 family, IT use in 283 formatting 36
documentation 362–4 fibre optic cables 318 forms 484–92
documents fields 189, 379, 380 formulas
analysis 346–7 calculated 388–9 creation 131–4
shared 333 date and time 389–90 nested 145
domain names 274 sizes 190–1 testing 152–3
double data entry 14–15 file access 236–8 forums 274, 333
downlink 322 file design 353 forward chaining 114
DPI (dots per inch) 399 file formats 235–6, 408–9 frame rate 450–1
drop-down boxes 487, 488, 490, file management 37 frame relay 306
492 file servers 309 frames 244–5, 432, 448–9
drop-down menus 219 file-sharing bots 98 freehand drawing 410
dynamic parameters 214–15 file types 233–5 freezing 125–6
fill option 438, 439, 440 FTP (file transfer protocol) 305, 313
earliest finish time (EF) 336–7 fill tools 412–13 FTP servers 309
earliest start time (ES) 336–7 filters 154–6, 251, 345, 386–7, functions 72, 134–50, 482–4
e-business 282 393, 418 conditional 146

555

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

conditional statistical 148–50 holographic imaging 295–7 indexed sequential access 236–7
data type 140–1 home, IT in 283 indexes
date and time 137 hosts 313 in arrays 500–1, 502, 503, 504
indices (powers) 131, 136–7 hotspots 10, 109 in databases 193–4, 229,
in JavaScript 482–4 HSB 408 234, 237
lookup 141–5 HSL 406–7 indices (powers) 131, 136–7
nested 145 HTML (hypertext markup indirect data source 4–6
nested IF 146–8 language) 469 inference engine 113–14
rounding 136 element visibility 493–4 information 3
summary 135 importing JavaScript file quality of 6–7
testing 152–3 514–15 infrared connections 319–20
text 137–40 styles 475–8 infrastructure 104, 107–8
HTTP (hypertext transfer initiation, project 330
gaming 291, 292 protocol) 9, 305, 313 input 56–9
Gantt charts 330–1, 332, 338–41 HTTPS (hypertext transfer input devices 31, 41, 44
gateways 316–17 protocol secure) 9, 313 input forms 353–4
generic file formats 236 hubs 314–15 installation see implementation
geotags 89 hyperlinks 363 installation guide 362
gesture-based interface 41 instant messaging 273–4
GIF (graphics interchange IaaS (infrastructure as a insurance planning 117
format) 409 service) 321 integer division 59
global variables 483–4 ICMP (internet control message interfaces 23, 104
goal driven reasoning 114 protocol) 305, 313 command line 38–9
goal seek 180–1, 183 identification number 13 dialogue 41
government, IT use in 283 identifiers 57 gesture-based 41
GPS (global positioning systems) unique 189, 201 graphical user 39–40
322–3 if statements 495, 496 user see user interfaces
graphics cards 28 IF...THEN...ELSE rules 386–7 internet connection 103–4, 107–9
graphs 165–72 IM (instant messaging) 332–3 interpreters 33, 511
embedding 391 image manipulation 400–1 interviews 345–6
formatting 170–2 image resolutions 408, 421 IP (internet protocol) 305, 306, 307
greyscale 416–17 image size 408, 419–20, 426 IP address (internet protocol
grids 404, 436 images address) 305, 316–17
group tool 403 bitmap see bitmap images IPSec (internet protocol
grouping 403 changing 474–5 security) 313
GUI (graphical user interface) text in see text ISO (International Organization
39–40 vector see vector graphics for Standardization) 237
guidelines 405 IMAP (internet message access IT impact 280–4
guides 437 protocol) 314 iterations 65
implementation 360–2 iterative development 370
hackers 7, 17, 92, 272, 311, 324 phased 360, 361 iterative methods 512–14
hash total 15 pilot 361, 362
HD (high definition) 245, 287, 288 import JAD (joint application
HDD (hard disk drive) 35 data 161, 200–1 development) 372, 373
health care 271 image 442–3 JavaScript 469–515
health trackers 300, 301 sound file 254 arrays 500–2, 503–4, 507,
heuristics 289 video file 246 512–14
hierarchical database InARP (inverse address resolution changing HTML style 475–8
management systems protocol) 313 changing images 474–5
237–8 inbetween animation 451 comments 511–12
holograms 295–6 incremental development 370 error trapping 514
holographic data storage 297–8 incremental prototyping 368 event detection 492–3

556

Copyright Material - Review Only - Not for Redistribution


Index

external script usage 514–15 logo creation 424–6 merging 403


form elements 484–92 lookup check 12 message switching 307
functions 482–4 lookup functions 141–5 metadata 229–30
HTML element visibility 493–4 loops 56, 65–9, 502–5 microblogs 275
iterative methods 512–14 condition-controlled 67–8, microprocessors 48–9, 50, 51
loops 502–5 502, 503–5 microwaves 320
operators 478–82 count-controlled 66–7, 502, milestones 332, 333, 338
outputting data 470–1 503–5 mineral prospecting 118
pop-up boxes 471–4 video 460 MISs (management information
selection 494–500 systems) 238
string manipulation 508–11 MAC address (media access mobile networks 312
timing events 505–8 control address) 305, 314, mobile telephones 323, 324
variables 478–80, 483–4 316, 317 models 178–85
JPEG (Joint Photographic Experts machine learning 289 effectiveness evaluation 183
Group)/JPG 409 macros 161–3 need for 179–80
magnetic lasso tool 412, 415, simulations 178, 183–5
kerning 422 416, 425 software characteristics 178–9
key cards 349, 350 magnetic tape 350, 351 testing 182–3
key fields, highlighting 219 mail merge 377–94 what-if-analysis 180–2
key loggers 95 arithmetic operators 388–90 modulus division 59
keyframes 448, 449, 454–8 checks 392–3 monitoring, project 331
property 458–9 document properties 390–1 monitoring systems 44, 47–8,
keys 201–4 error-free accuracy 392–3 283–4
compound 201–2, 227–8 labels 381–3 mono sound 260
foreign 191–4, 196–7, 202–3 letters 378–83 MOOCs (massive open online
primary 189, 191–4, 196–7, manipulating documents courses) 278–9
201, 225, 227–8
383–8 morphing 441, 456–8
keywords 469
mail servers 309 motherboard 28, 314
knowledge base 113
mainframe computers 28–31 motion tweens 451–4, 457, 462
knowledge base editor 113
uses 28 move tool 402
knowledge engineering 289
maintenance 365–7, 370 mp3 234, 262
maintenance process model mp4 234, 253, 262
LAN (local area network) 310–11,
366–7 MPEG (Moving Pictures Experts
316–17
malicious bots 98 Group) 234, 235
LAN messengers 274
malicious code 91–2 MTD (maximum tolerable
laser beam 295, 297
lasso tool 411–12 malware 92–9, 323–4 downtime) 326
layers 401–2, 444, 445–54 manufacturing, IT in 280–1
layout tools 404–5 many-to-many relationships nano-robots 294
learning, technology enhanced 192–3, 194, 196 nanotechnology 281
277–80 masks 461–3 national security 270
length check 12 master documents 377 natural disaster planning 184
library 441 content rules 386–7 navigation buttons 219
line graphs 167 linking to source files 379–80 nested constructs 76–8
line option 438 recipient selection rules 388 nested formulas 145
link editors 34 structure creation 378 nested functions 145
link layer 305 media, IT use in 282–3 nested IF functions 146–8
linkers 34 medical diagnosis 115 nested queries 210–11, 213
literals 480 medicine 281, 291 network activity diagrams
live data 356, 357 memes 400 334–7, 338
local variables 483–4 memory cards 28 network connections 317–20
logical data (Boolean data) 232–3, menus 223–4 network layer 304, 305
478 drop-down 219 network protocols 305–7, 313–14

557

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

network security 323–5 comparison 480, 495–6 Pokémon Go 291


network simulators 178 ternary 499 politics 400
networked learning 278 optical data storage 297–8 IT use in 283
networks 303 orientation 128 POP (post office protocol) 305, 314
components 314–17 OSI (open systems pop-up boxes 471–4
fundamental models 303–4 interconnection) 303–5 population growth models 179
structures 307–13 output 56–9, 470–1 predecessors 334, 336, 338, 339
news, IT use in 282–3 output devices 31 preparatory analysis 326
NFC (near field communication) output reports 355–6 presence check 11
286–7 overdubbing 257 presentation layer 304
NICs (network interface cards) 314 pressure sensors 48
night vision 299–300 PaaS (platform as a service) 321 preventative maintenance 366
node editing 413–14 packet switching 306–7 primary keys 189, 191–4, 196–7,
non-volatile memory 21 packets 304 201, 225, 227–8
normal form 225–9 padlocks 9, 462 primary variables 463
first (1NF) 225–7 page formatting 121–2 print servers 309
second (2NF) 227–8 panning 248, 249 printed copy layouts 355–6
third (3NF) 228–9 parallel running 360, 361 printing, 3D 298–9
normalisation parameters 73, 214 privacy issues 271, 284
database 225–9 dynamic 214–15 private key 8, 10, 313
sound clip 259–60 static 214 procedures 72
nuclear science research 185 parity check 16 processes 56, 59–61
numeric data 231–2, 478 path editing 413–14 progress, project 333
paths 454–61 project management 330–41
object code 33, 235 PDF (portable document software 332–4
objects 430, 436–7, 479, 484 format) 409 stages of life cycle 330–2
peer-to-peer networks 307–9 tools and techniques 334–41
ordering 447–8
peers 307 prompt box 472
observation 346
pen tool 413–14 prompts 383–5
off-the-shelf software 37–8
perfective maintenance 365 proofreading 392–3
onchange 492
personal data 88–92 property keyframes 458–9
one-to-many relationships 192,
PERT (performance evaluation proprietary file formats 235
193, 194, 237
and review technique) 338 proprietary software 38
one-to-one relationships 191–2,
pharming 91–2 prosthetic limbs 293
193–4
phased implementation 360, 361 prosthetics, bespoke 298–9
onkeydown 493
phishing 89–90 protocols 286
online banking 9, 281–2 photographs 398 prototyping 368–9, 373
online courses 277, 278–9 physical layer 304 proxy servers 309
online processing 21–3 pie charts 168 pseudocode 54, 56
online shopping 282 pilot implementation 361, 362 public key 8–9
online tutorials 278 pilot training 184
onload 492 PIN (personal identification QR codes 287
onmouseout 493 number) 22, 81, 91, 266 queries 199–200, 206–15
onmouseover 492 pivot charts 159–60 complex 208–10, 213
opacity 409–10, 426, 439 pivot tables 156–9, 160 cross-tab 212–13, 214
open-source file formats 235 pixelation 397, 398, 399–400, 442 data export from 224
open source software 38 pixels 398, 437 nested 210–11, 213
operating systems 31–2 planning, project 330–1, 332 simple 206–8, 213
operators 478–82 plant identification 117 summary 212–13, 214
arithmetic 388–90, 480–2 platter 35 to find duplicate records
assignment 478 play symbols 459, 461 211–12
Boolean (logical) 113, 154, PNG (portable network graphics) questionnaires 344–5, 346, 365
208, 214, 480, 497–9 409 queue management 180

558

Copyright Material - Review Only - Not for Redistribution


Index

RAD (rapid application robotics 280, 292–4 fitting text to 423–5


development) 372–3 ROM (read only memory) 28 sharpen tool 418, 419
radio buttons 219, 487–92 rootkit 97–8 shear tool 402
radio waves 311, 320, 322–3 rotate tool 402 simple queries 206–8, 213
RAM (random access memory) rotation 402, 440, 451 simulations 178, 183–5
21, 28 rounding functions 136 skew tool 402
range check 11–12 route planning 117–18 SKIP IF rule 388
ranges 125 routers 304, 316–17, 318 slowing down 93, 259
filtering for 156 RTF files 224 smart glasses 290
named 133–4 RTO (recover time objective) 326 smart watches 265, 266, 286, 287
ransomware 99 rulers 404, 436 smartphones 21, 106, 290
rapid prototyping 368–9 rules base 113 smishing 90–1, 92
raster images 226, 235 SMS (short message service) 92
RDBMS (relational database SaaS (software as a service) 321 SMTP (simple mail transfer
management system) 189, sample rate 260–1 protocol) 305, 314
195 sample resolution 260–1 smudge tool 418, 419
see also relational databases satellite communication systems snapping 405, 436–7
real-time processing 24 322–3 social networking 272–7
records 189 satellite navigation 322–3 social trends prediction 271
recovery management 326–7 satellite technology 104, 108 socio-economic groups 108–9
recycling 301 satellites 29, 104 software development, WBS for
red eye tool 418 saturation 417 341
referential integrity 203–4 scale tool 402, 419–20 software development
relational databases scheduling, task 332 methods 370–3
compared with flat files scientific analysis 290 sorting 156, 217
197–200 scientific research 292 merged documents 386
creation 201 screen formatting 121–2 sound, removing 251–2
see also RDBMS screen layouts 354 sound cards 28
relationships 189, 191–3 script tag 469 sound clips 253–60
creating and using 193–4 SDLC (software development life echo addition 257
relative cell references 131–2 cycle) 366, 367 equalisation 258–9
rendering 252–3 searches 199–200, 206–15 exporting 261–2
repeaters 315 see also queries fading in 255
reports 221–5 secondary variables 463 fading out 255–6
repository, document 333 security, holograms in 296 joining 255
requirements specification 346, security control systems 51–2 noise reduction 257–8
347, 365 security methods 9, 286, 319–20 normalising 259–60
research 271 security protocols 320 overdubbing 257
nuclear science 185 security systems 324–5 pitch changing 255
scientific 292 security threats, impact 325 speed change 259
research methods 344–7 selection 62–3, 165–70, 494–500 splicing 255
reserved words 478 selection tools 411–12, 416 stereo to mono change 260
resizing 402, 419–20 self-driving cars 290 trimming 254
resolution 245, 398–9, 408, 421 sensors 44–8, 50, 51 sound editing 244, 253–60
sample 260–1 calibration 45–7 importing sound file 254
resources 330, 333, 338 server farms 310 sound tracks 254
allocation 332 servers 308–10 source files 377
reverberation (reverb) 256–7 session layer 304 creation 378–9
review, project 364–5 shape tools 411 editing data in 381
RGB 406, 408 shape tweens 441, 451, 456 linking master documents
risk analysis 326 shapes to 379–80
risk testing 326 changing 413

559

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

space supercomputers 28–31 text boxes 486–7


printing in 299 uses 28–9 text data 231
taking data into 297 surgery 288–9, 294 text files 200, 224, 233
spacing 217–18 surround sound 260 text functions 137–40
SPAM 98, 309 surveillance 270, 283–4 text orientation 128
specifications SVG (scalable vector graphics) 409 thermal vision 299–300
design 347, 348 swarms 313 threads 274
requirements 346, 347, 365 switch statements 499 three-dimensional (3D)
system 347, 348 switchboards 223–4 animations 431–2, 464
spell check 295, 392 switches 304, 314–15 three-dimensional (3D)
splicing 255 switching 306–7 printing 298–9
sport, IT in 280 symbols 441–2 throwaway prototyping 368–9
spreadsheets 121–74 system flowchart 350–1 tick boxes 219
automation of operations system life cycle 344–73 TIFF (tagged image file format) 409
161–5 see also analysis; time lapse 431
formatting creation 127–31 design; development; timeline 445, 448–9
in models 178, 182–3 documentation; timers 505–8
structure creation 121–7 evaluation; installation; timings 450–1
structure testing 151–3 maintenance; prototyping; title slides 246
using 154–61 software development TLS (transport layer security) 9, 313
validation rules 150–1 methods; testing tokens 32–3, 267
see also charts; formulas; system processing 348–51 tolerance 415, 416
functions; graphs system software 31–4 tourism 292
spyware 95–6 system specification 347, 348 traffic flow 180
SSH (secure shell protocol) 314 training 179, 183, 184
SSL (secure sockets layer) 9, 313 tables 189, 224 transform options/tools 402–3, 440
stage 432–8 embedding 390–1 transition 248
aspect ratio 434–5 pivot 156–9, 160 translation 294–5
colour 434 TCP (transmission control translators 32–3
coordinates 433 protocol) 305, 306, 307 transparency 409, 439
size 432–3 TCP/IP (transmission control transport layer 304, 305
standard definition 245 protocol/internet protocol) triangulation 323
static parameters 214 303, 305 Trojans 94
stereo sound 260 technical documentation 362, 364 troubleshooting guide 363–4
stock control system 22–3 technology enhanced tunnelling protocol 313
stop motion animation 430 learning 277–80 Turing, Alan 289
storage 297–8, 321–2, 352–3 technology uneducated 104–5 TV white space 108
stored value cards 266 telecommunications 312 tweens 441, 444, 451–4, 456–7, 462
straight line 411 television systems 287–9 twisted pair cables 317
strings 470, 478 Telnet 314 two-dimensional (2D)
manipulation 70–2, 508–11 ternary operator 499 animations 431–2
stroke option 439–40 test data 356–7 type check 12
subforms 219 extreme 357
subroutines 72–6 invalid 356 UDP (user datagram
subtitles 247 valid 356 protocol) 305, 306, 307
summary functions 135 test plans 358–60 UHD (ultra-high definition) 287–9
summary queries 212–13, 214 testing 356–60 unnormalised form (UNF) 225
text 421–5, 444–5 UPC (Unique Product Code)
converting to curves 422–4 13–14
fitting to path or shape 423–5 uplink 322
font style 422 URL (uniform resource locator)
89, 90

560

Copyright Material - Review Only - Not for Redistribution


Index

USB (universal serial bus) 9, 93, speed alteration 249–50 weather stations 48
97, 98 still image extraction 251 web browsers 10, 90, 365, 472
user documentation 363–4 trimming 247 web servers 309
user interfaces 38–41, 112 video conferencing 103, 279–80, WEP (wired equivalent privacy) 320
customising 163–5 332–3 what-if-analysis 180–2
utilities 34, 35, 37 video editing 244–52, 262 white box testing 358
utility software 34–7 virtual currency 266–7 white space 218
virtual reality 291–2 Wi-Fi 10, 318
valid data 356 virtual servers 309 public 92
validation 11–14, 18, 204–5 viruses 93–4 wildcards 207
validation routines 355 vishing 91 WIMP (windows icons menus
validation rules 150–1, 204–5, vision enhancement 299–300 pointers) 39
355, 362 Visual Basic 33 wire models 464
VAR (video assistant referee) 280 visual checking 14 wireless communication methods
variables 57, 463–4, 478–80, 483–4 vloggers 275 312, 314–16, 318–20
vector 397 voiceover 256, 257, 259 Wizards Unite 291
vector drawing tools 410–13 VPN (virtual private network) 89, WNICs (wireless network interface
vector graphics 397–8, 410–16, 311–12 cards) 314
437–45 VR (virtual reality) 291–2 worms 94–5
drawing image 438–41 WPA (wi-fi protected access) 320
importing image 442–3 WAN (wide area network) 310–11,
use 399 312, 317 x-coordinate 433
verification 14–17, 18, 206, 355 WAPs (wireless access points)
video chat 332–3 315–16, 317, 318 y-coordinate 433
video clips 244 warp tool 413, 419 YouTube 277, 278
exporting 252–3 waterfall method 370–1
inserting 246 WBS (work breakdown structure) zombie bots 98
joining 250 341 zooming 248–9
sound removal 251–2 wearable computing 300–1

561

Copyright Material - Review Only - Not for Redistribution


CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK

Acknowledgements
The authors and publishers acknowledge the following sources of copyright material and are grateful for the
permissions granted. While every effort has been made, it has not always been possible to identify the sources
of all the material used, or to trace all copyright holders. If any omissions are brought to our notice, we will be
happy to include the appropriate acknowledgements on reprinting.
Thanks to the following for permission to reproduce images:
Cover image: adventtr/Getty Images
Inside: Chapter 1 opener Agsandrew/Shutterstock; fig 1.01 MBI/Alamy Stock Photo; fig 1.02 gilaxia/GI; fig 1.03
Anatolii Babii/Alamy Stock Photofig 1.18 Monty Rakusen/GI; fig 1.20 Image Source/GI; Chapter 2 opener Sergey
Nivens/Shutterstock; fig 2.01 MediaNews Group/GI; fig 2.02 Sean Gallup/GI; fig 2.08 Encyclopaedia Britannica/
GI; Chapter 3 opener Lucapierro/GI; Fig 3.01 Andriy Onufriyenko/GI; Fig 3.05 Jonathan Kitchen/GI; Fig 3.06
Dennis Galante/GI; Fig 3.07 Petegar/GI; Fig 3.08 4FR/GI; Fig 3.09 Andrew Brookes/GI; Fig 3.10 Westend61/
GI; Fig 3.11 Std/GI; Fig 3.13 Kosamtu/GI; Chapter 4 opener Yagi Studio/GI; Chapter 5 opener Wk1003mike/
Shutterstock; fig 5.01 sorbetto/GI; fig 5.03 Westend61/GI; fig 5.04 Jasper James/GI; fig 5.05 Peter Dazeley/
GI; fig 5.06 Jon Feingersh/GI; fig 5.07 Artpartner images/GI; fig 5.08 Jeffrey Coolidge/GI; fig 5.09 Troy Aossey/
GI; fig 5.10 Vladwel/GI; fig 5.11 Seksan Mongkhonkhamsao/GI; fig 5.12 Wutthichai Luemuang/GI; fig 5.13 AFP
Contributor/GI; Chapter 6 opener Aeriform; fig 6.01 Imaginima/GI; fig 6.02 Marques Madayag/GI; fig 6.03 Luis
Alvarez/GI; fig 6.04 Construction Photography/Avalon/GI; fig 6.05 Filadendron/GI; fig 6.06 AAMIR QURESHI/
GI; fig 6.07 Eternity in an Instant/GI; fig 6.08 Klaus Vedfelt/GI; fig 6.09 Vitranc/GI; Chapter 7 opener KrulUA/
GI; fig 7.01 JGI/Jamie Grill/GI; fig 7.02 Busakorn Pongparnit/GI; fig 7.03 Compassionate Eye Foundation/Mark
Langridge/GI; fig 7.06 WebMD symptom checker screenshort used by permission of WedMD; fig 7.07 Matsou/
GI; fig 7.08 STAN HONDA/GI; fig 7.09 Audtakorn Sutarmjam/GI; fig 7.10 Alistair Berg/GI; fig 7.11 Jonathan
Minster/GI; fig 7.12 Mabus13/GI; Chapter 8 opner Gregor Schuster/GI; fig 8.58 Image Professionals GmbH/Alamy
Stock Photo; Chapter 9 opener Viaframe/GI; Chapter 10 opener Jorge Rey/GI; Chapter 11 opener Don Farrall/
GI; fig 11.01 Patrick Daxenbichler/GI; fig 11.02 Tetra Images/GI; fig 11.16 BrianAJackson/GI; Chapter 12 opener
Violetkaipa/GI; fig 12.01 Yuoak/GI; fig 12.02 EyeEm/GI; fig 12.03 Jonathan Evans/GI; fig 12.04 FrankRamspott/
GI; fig 12.05 MediaProduction/GI; fig 12.06 Jason Butcher/GI; fig 12.07 Maskot/GI; fig 12.08 Moment/GI; fig 12.09
Hoch Zwei/GI; fig 12.10 Klaus Vedfelt/GI; fig 12.11 Monty Rakusen/GI; fig 12.12 John Lamb/GI; fig 12.13 Stephen
Brashear/GI; Chapter 13 opener Martin Barraud/GI; fig 13.01 DAVID MCNEW/GI; fig 13.02 Jasmin Merdan/GI; fig
13.04 THOMAS SAMSON/GI; fig 13.05 Patra Kongsirimongkolchai/GI; fig 13.06 Busakorn Pongparnit/GI; fig 13.07
Flashpop/GI; fig 13.08 SolStock/GI; fig 13.09 MrPliskin/GI; fig 13.11 Yuichiro Chino/GI; fig 13.12 Charles O’Rear/
GI; fig 13.13 Westend61/GI; fig 13.15 Dean Mouhtaropoulos/GI; fig 13.16 Vgajic/GI; fig 13.17 Peter Macdiarmid/
GI; fig 13.18 Guido Mieth/GI; Chapter 14 opener Mina De La O/GI; fig 14.02 luxxtek/GI; fig 14.03 Jelena83/GI;
fig 14.04 Vtls/Shutterstock; fig 14.05 Yangyang/GI; fig 14.07 Bortonia/GI; fig 14.08 Tomasz Zajda/GI; Chapter 15
opener Hero Images/GI; Chapter 16 opener MimaCZ/GI; Chapter 17 opener Yagi Studio/GI; Chapter 18 opener
Artishokcs/GI; fig 18.01 & 18.02 Lilu330/Shutterstock; fig 18.03 & 18.04 Yadid Levy/Alamy Stock Photo; fig 18.05
Wavebreak Media ltd/Alamy Stock Photo; fig 18.06 kris Mercer/Alamy Stock Photo; fig 18.07 petoei/Shutterstock;
fig 18.61 1Photodiva/GI; Chapter 19 opener Jauhari1/GI; fig 19.01 Hakule/GI; fig 19.02 Photofusion/GI; fig 19.03
N-Photo Magazine/GI; fig 19.04 Rakop Tanyakam/GI; fig 19.05 VasjaKoman/GI; fig 19.06 Pagadesign/GI; fig 19.07
Mike Turtle/GI; fig 19.51 Duncan1890/GI; Chapter 20 opener BEST-BACKGROUNDS\Shutterstock; fig 20.02
Thomas Barwick/GI; fig 20.03 Thomas Barwick/GI
Video source files: SimonSkafar/GI, maradek//GI, Eternity In An Instant/GI, Photolibrary Pty Limited/GI
Keys: GI: Getty Images

562

Copyright Material - Review Only - Not for Redistribution


Copyright Material - Review Only - Not for Redistribution
Copyright Material - Review Only - Not for Redistribution
Copyright Material - Review Only - Not for Redistribution
Copyright Material - Review Only - Not for Redistribution
Copyright Material - Review Only - Not for Redistribution
Copyright Material - Review Only - Not for Redistribution

You might also like