0% found this document useful (0 votes)
3K views

IB CS Revision Notes

IB Computer Science-Revision notes

Uploaded by

N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views

IB CS Revision Notes

IB Computer Science-Revision notes

Uploaded by

N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 146

Topic 1.

1: Systems in Organisations
Topic 1.1.1: Identify the context for which a new system is planned
Considerations
 Two important considerations when considering a new system’s context are:
 The extent of the new system
 The limitations of the new system
Example: What would be the context of introducing a new payment system for school trips?
Questions to consider:

 Will there be any organisational issues related to the new system?


 How will user roles be affected/change?
 Will any underlying technologies be affected/changed?

Topic 1.1.2: Describe the need for change management


Changing a system can be difficult for a variety of reasons:
 Users don’t like change (too often/at all)
 New systems might exclude old features
 Old systems might be faster in certain circumstances
 People find change complex
 From a technology perspective, change might lead to incompatibility
 There might be data loss during migration
 It might be expensive (either in terms of money or time)

Change must be managed


Before any change is applied, the following steps might make the process easier:
1. Plan: Before undertaking any change, a business needs to have a clear and valid
reason and mission for the change process.
2. Communicate: The most important factor in changing anything within a business, small or
large, is to communicate the change, and its many factors, to the key stakeholders within the
organisation.
3. Integrate: If it’s possible for the change program of your business to be adjusted, then open
your plans for consultation with your stakeholder group.
4. Evaluate: It’s crucial that the organisation, its passage through the change program, and the
wider organisation’s reactions to that change program are evaluated at every feasible
opportunity.
Topic 1.1.3: Outline compatibility issues resulting from situations
including legacy systems or business mergers
Legacy system
A legacy system is an old method, technology, computer system, or application program,
that may or may not be supported/available for purchase any more.
Hardware:

 Floppy disks
 Parallel printer cables
 Connections like PS2 and USB 1.0
Software:

 Windows XP
 Movie Maker
Computer Systems:

 Amiga
 Commodore 64

Merger
A combination of two entities or more, especially companies, into one.
Famous mergers

 Vodafone & Mannesmann


 ABC and Disney
 Exxon and Mobile

Mergers can be VERY tricky


If companies/organisations merge across international borders, there may be several issues,
such as:

 Issues of software compatibility


 Language differences
 Time zone differences
 Workforce cultural differences
Topic 1.1.4 Compare the implementation of systems using a client’s
hardware with hosting systems remotely
Local software vs Remote software
 There are two competing models of distributing software: Local and Remote (also
called SaaS/cloud).
 You can either buy a program or install it on a computer (called local)
 Or you can buy/rent/use software that is installed on a computer somewhere on the
internet and then use it though a browser or dedicated local application (called
remote)

SaaS (Software-as-a-Service)
SaaS is a software distribution model in which a third-party provider hosts application and
makes them available to customers over the Internet.
SaaS does away with the traditional software installation, maintenance and management
approaches in favour of delivering cloud-based applications via the internet. With SaaS,
service provider partners shoulder the burdens of security, availability and performance.
Examples

 Microsoft Office 365


 Google Apps
 Amazon Web Services
 Dropbox

Benefits of SaaS
 SaaS is great for any organisation that wants to minimize its IT responsibilities and
costs.
 SaaS is particularly well suited for small businesses. Instead of investing in additional
in-house server capacity and software licenses, companies simply can adjust their
SaaS subscription on a monthly basis.
 There’s also a reduction in staff workload. In-house IT workers are liberated from the
tasks associated with on-premise hardware and software.
 Because the IT infrastructure resides in the service provider’s data centre, the
organization can get back up and running immediately in the event of a service
outage or more dramatic disruption.
Drawbacks of SaaS
 Companies that adopt multiple SaaS applications or plan to connect hosted software
with existing on-premise apps may encounter software integration headaches along
the way.
 Security is another common concern: whenever sensitive company data and business
processes are entrusted to a third-party service provider, issues such as identity and
access management must be addressed.
 Businesses must also consider the government compliance regulations inherent to
storing customer data in a remote data centre, i.e. laws might be different in different
countries.

Topic 1.1.5: Evaluate alternative installation processes


There are four ways of implementing/installing a new system:
1. Direct changeover: Old system is stopped, and new system is started.
Advantages: minimal time and effort, new system is available immediately
Disadvantages: if the new system fails, there is no fall back
2. Parallel running: The new system is started, but the old system is kept running
alongside it. Data must enter into both systems.
Advantages: if the new system fails, the old systems runs a backup (no loss of
productivity); outputs from the two systems can be compared to see if new
one is running correctly
Disadvantages: running two systems is costly in terms of time and money
3. Pilot running: The new system is tested with a small subset of the organisation. Once
it is running correctly and all bugs have been fixed, it is implemented across the
whole organisation.
Advantages: all features are fully trialled; if the new system fails, only a small part
of the organisation suffers; staff who were part of the pilot can train other staff
Disadvantages: for the subset of users in the pilot group, there is no backup if the
new system fails
4. Phased conversion: The new system is introduced in phases as parts of the old
system are gradually replaced with the new system
Advantages: allows people to get used to the new system; training of staff can be
done in stages
Disadvantages: if the new system fails, there is no fall back for that part of the
system
Topic 1.1.6: Discuss problems that may arise as a part of data
migration
Data migration = moving data
 Data migration can be as simple as putting a file on a USB flash drive and opening
it on another computer.
 It is can also be very complex involving big databases exchanging information
across countries into different time zones.

Possible problems that may arise:


 Incompatible file formats
 As the same piece of software might have different versions, the data
created in one version, might not be compatible with another version.
 Data structure differences
 Moving data from a table to a flat file, or from an array to a linked list,
might cause a lot of problems.
 Validation Rules
 Moving data from a table to a flat file, or from an array to a linked list,
might cause a lot of problems.
 Incomplete data transfers
 If the actual transfer is interrupted, only part of the data will be at the
destination, leading to loss.
 Differences in data/currency/character set
 In the UK, 3/5/18 means 3 May 2018, but it means 5 March in the USA
 The $ might mean US dollars but could be taken to mean Zimbabwe dollars
which use the same symbol but is worth significantly less.
 A set of character used in one country, e.g. ‫ ﷼‬in Saudi Arabia, might be
copied as ?? on Russian computer.

Topic 1.1.7: Suggest various types of testing


Testing is important
 Testing is very important in developing a computerized system as it tries to ensure
that the system works as expected.
 A system that does not work as expected (i.e. it has bugs) greatly reduces
productivity and end user satisfaction.

Static vs Dynamic testing


 Reviews, walkthroughs, or inspections are referred to as static testing, whereas
actually executing programmed code with a given set of test cases is referred to as
dynamic testing.
 Static testing is often implicit, like proofreading, such as when the IDEs check source
code or syntax.
 Dynamic testing takes place when the program is run.
 Dynamic testing may begin before the program is 100% complete in order to test
particular sections/modules of code
 Static testing involves verification, whereas dynamic testing also involves validation.
Together they help improve software quality.

Alpha vs Beta testing


Alpha testing Beta testing
Alpha testing performed by testers who are Beta testing is performed by clients or end
usually internal employees of the users who are not employees of the
organization organization
Alpha testing performed at developer's site Beta testing is performed at client location
or end user of the product

Black-box vs White-box testing


 Black-box testing (also known as functional testing) treats software under test as a
black-box without knowing its internals. Tests are using software interfaces and
trying to ensure that they work as expected.
 White-box testing (also known as structural testing) looks inside the software that is
being tested and uses that knowledge as part of the testing process.

User acceptance testing


 Testing any new/updated system with its ultimate end users to see if it meets their
expectation is very important.
 Happy users = more productive users = good for developers
Automated testing
 Automated testing is a method in software testing that makes use of special
software tools to control the execution of tests and then compares actual test
results with predicted or expected results.
 All of this is done automatically with little or no intervention from the test engineer.
 Automation is used to add additional testing that may be too difficult to perform
manually of when the body of code that needs to tested is vast.

Topic 1.1.8: Describe the importance of user documentation


What is user documentation?
 User documentation is any document that explains how to use the features and
functions of a system to its end-users.
 It comes in many forms: books, PDFs, websites, videos, etc.

User documentation is important


 Whether you read user manuals or not, in general, having a reference guide on how
to use a system is critical to users.
 Without detailed, simple, clear instructions, users might be unaware of particular
features or unable to use features that are not immediately obvious.

Users are not developers


 A well-made user documentation guides the user through using the system and thus
increases productivity.
 If the user documentation is simple, system implementation can happen faster because
users require less training to learn how to use the new system.

Simpler is better
 Users are non-technical people; they only need to know how to use the system.
 Therefore, the user documentation does not involve detailed explanations of how
the system works.
Quality is important
 The quality of the user documentation can greatly affect the rate of implementation of (how
fast users start using) the new system.

Topic 1.1.9: Evaluate different methods of providing user


documentation
Types of User Documentation
 Help files: Files supplied together with the system. They can usually be called up
with a button in the system.
Advantages:
 Accessible at any time when using the program
 Give general instructions on how to use the system
 Give general instructions on how to solve some major errors
Disadvantages:

 They can only be used after system has been installed.


 They don't give any help when installing the solution
 They often only deal with very general errors
 They often lack a search capability; you have to look to find help for
your problem
 Online support: Special web service hosted by the system's developer to provide
user documentation.
Advantages:
 They are often extensive compared to help files
 They often provide an option for live support, talking to a real human
operator if a problem arises which the user documentation has no
answer to
 They often have search capabilities built-in so that users can easily
search through them
Disadvantages:

 They are useless if users have no internet connection


 Live support does not work quite well with users unfamiliar with
computers when they have to explain their problem (“I clicked 'that'
button and then something happened!”)
 Printed manuals: Manuals printed on paper and supplied together with the system.
Advantages:
 They can be read through by users before starting to work with the
new system
 Always available
 Give help installing the system
Disadvantages:

 Can be lost / misplaced / limited in number


 Often limited to a little booklet supplying little information apart from
how to install the system
 Not be updated every time the system is updated

Topic 1.1.10 Evaluate different methods of delivering user training


Training is important
 Training end-users in using a new system is very important as productivity greatly
depend on how familiar they are with a system.
 Effective user training is an essential part of introducing a new system.

Methods of delivering user training


 Self-instruction
 Users can learn how to use a new system on their own, provided they have
the right material to learn from.
 It can take the form of reading a manual or watching a tutorial.
Advantages:
 Lowest cost – only materials needed, no teachers/buildings
 Flexible timeline
 Training tailored to exactly what users wants to learn
Disadvantages:
 With no guidance, user might feel lost/overwhelmed
 Unstructured learning means certain features might be misunderstood/ignored

 Formal classes
 Users sitting in a classroom listening to an instructor who shows and explains
how to use the system.
 This type of training is useful to train large amounts of staff as it is effective
and relatively cheap, but if the size of the classes is too big, there is little time
to deal with individual problems and questions.
Advantages:
 Structured learning environment
 Expert on hand to answer questions
 Curriculum designed to teach all aspects, including ones that might be
misunderstood or difficult to grasp
Disadvantages:
 Expensive – teachers, buildings and facilities needed
 Rigid schedule and curriculum
 Not much personalisation possible
 Remote/Online training
 An instructor training one user or a small group of users by some kind of
remote connection (Skype, Google Hangouts, Face time, etc.).
 This is the most effective way of training as training can be suited to user's
needs and abilities, while being instructed by a professional that caters to
specific needs.
Advantages:
 Structured learning environment
 Expert on hand to answer questions
 Curriculum designed to teach all aspects, including ones that might be
misunderstood or difficult to grasp
 Flexible locations
Disadvantages:
 Expensive – teachers & internet connection needed
 Has to be computer-based

Topic 1.1.11 Identify a range of causes of data loss


Causes of data loss
 Hardware/System malfunctions
 Human error: clicking CLOSE instead of SAVE, saving over another file, deleting the
wrong file…
 Software corruption
 Malicious software (viruses)
 Natural disasters
 Threat from within: Malicious activity may be a result of activities by employees
within organisations or intruders.

Topic 1.1.12 Outline the consequences of data loss in a specified


situation
Consequences vary in severity
In an exam you may be asked what the consequences of data loss for a variety of
situations. Here are a few things to keeps in mind:

 Can the data be replaced?


 How easy is the data to replace?
 Who will be affected by the data loss?
 Are there financial implications to the data loss?
 Are the ‘life-and-death’ consequences to the loss?
 Who is responsible for data recovery?
Examples:

 Loss of a hotel reservation


 Loss of a patient’s medical record
 Loss of a financial transaction
 Loss of a search engine request
 Loss of a student’s test score
 Loss of a password
Topic 1.1.13: Describe a range of methods that can be used to
prevent data loss
Key data loss prevention methods
 Failover system:
 Failover is the constant capability to automatically and seamlessly switch
to a highly reliable backup system.

 This can be operated in a redundant manner or in a standby operational
mode upon the failure of a primary server, application, system or other
primary system component.

 Redundancy:
 Data redundancy is a condition created within a database or data storage
technology in which the same piece of data is held in two separate places.
 This can mean two different fields within a single database, or two
different spots in multiple software environments or platforms.
 Whenever data is repeated, this basically constitutes data redundancy.

 Removable media:
 Removable media is any type of storage device that can be removed from
a computer while the system is running.
 Examples of removable media include CDs, DVDs and Blu-Ray disks, as
well as tapes and USB drives.
 Removable media makes it easy for a user to move data from one
computer to another.

 Offsite storage
 An offsite backup is a backup process or facility that stores backup data or
applications external to the organization or core IT environment.
 It is similar to a standard backup process but uses a facility or storage
media that is not physically located within the organization’s core
infrastructure.
 Online storage
 Cloud backup is a type of service through which cloud computing
resources and infrastructure are used to create, edit, manage and restore
data, services or application backup.
 This is done remotely over the internet.
 Cloud backup may also be called online backup or remote backup.

Topic 1.1.14: Describe strategies for managing releases and updates


Release
 A product release is the process of launching a new product for a specific market or
user base.
 In software development, a product release is sometimes done with a beta version
so that core developers/users can assist with debugging and feedback prior to the
release of the actual software

Update
 An update is a software file that contains fixes for problems found by other users or the
software developer.
 Installing an update fixes the code and prevents the problems from happening on your
computer.
 Because updates fix problems with a program, they are almost always free and available
through the program or the company’s website.

Patches
 A patch is a software update comprised code inserted (or patched) into the code of
an executable program.
 Typically, a patch is installed into an existing software program.
 Patches are often temporary fixes between full releases of a software package.
 Patches may do any of the following:
 Fix a software bug
 Install new drivers
 Address new security vulnerabilities
 Address software stability issues
 Upgrade the software
How to get updates
Manually (download and install them yourself)
 Pro: Full control
 Con: Time consuming

Automatically (software automatically contacts the developer, downloads and installs any
updates)
 Pro: Don’t have to think/worry about updates, always up to date
 Con: No control – bad update might crash the system

Continuous delivery
 Continuous delivery is a software engineering approach in which teams produce
software in short cycles, ensuring that the software can be reliably released at any
time.
 It aims at building, testing, and releasing software with greater speed and frequency.
 The approach helps reduce the cost, time, and risk of delivering changes by allowing
for more incremental updates to applications in production.

Agile development
 Agile software development describes an approach to software development under
which requirements and solutions evolve through the collaborative effort of self
organizing and cross-functional teams and their customers/end users.
 It advocates adaptive planning, evolutionary development, early delivery, and
continual improvement, and it encourages rapid and flexible response to change.

DevOps (Development Operations)


 DevOps is a software engineering culture and practice that aims at unifying software
development (Dev) and software operation (Ops).
 The main characteristic of the DevOps movement is to strongly advocate automation
and monitoring at all steps of software construction, from integration, testing,
releasing to deployment and
infrastructure management.
 DevOps aims at shorter development
cycles, increased deployment
frequency, and more dependable
releases, in close alignment with
business objectives.
Topic 1.2: System Design basics
Topic 1.2.1 Define the terms: hardware, software, peripheral,
network, human resources

Hardware
 Computer hardware refers to the physical parts of a computer and related devices.
 Internal hardware devices include motherboards, hard drives, and RAM.
 External hardware devices include monitors, keyboards, mice, printers, and
scanners.
 The internal hardware parts of a computer are often referred to as components,
while external hardware devices are usually called peripherals.

Peripherals
 A computer peripheral is any external device that provides input and output for the
computer.
 For example, a keyboard and mouse are input peripherals, while a monitor and
printer are output peripherals.
 Computer peripherals, or peripheral devices, are sometimes called I/O devices
because they provide input and output for the computer.

Network
 A network consists of multiple devices that communicate with one another using a
transmission medium.
 It can be as small as two computers or as large as billions of devices.
 While a traditional network is comprised of desktop computers, modern networks
may include laptops, tablets, smartphones, televisions, gaming consoles, smart
appliances, and other electronics.
 Many types of networks exist, but they fall under two primary categories: LANs and
WANs

Software
 Computer software is a general term that describes computer programs or sets of
instructions.
 Related terms such as software programs, applications, scripts, and instruction sets
all fall under the category of computer software.
 Software can be difficult to describe because it is "virtual," or not physical like
computer hardware.
 Instead, software consists of lines of code written by computer programmers that
have been compiled into a computer program.
 Software programs are stored as binary.

Human resources
 Human resources is used to describe both the people who work for a company or
organization and the department responsible for managing resources related to
employees.
 They are often referred to as the end-users of a system

Topic 1.2.2: Describe the roles that a computer can take in a


networked world
1 computer = many possible roles
Depending on what software is installed on a networked computer, it can do a variety of
different tasks
Client/Server vs Peer-to-Peer (P2P)

Client
 In the real world, businesses have clients.
 In the computer world, servers have clients.
 The "client-server" architecture is common in both local and wide area networks.
 For example, if an office has a server that stores the company's database on it, the
other computers in the office that can access the database are "clients" of the
server.

Server
 A server is a computer that provides data to other computers.
 It may serve data to systems on a local area network (LAN) or a wide area network
(WAN) over the Internet.
 Many types of servers exist, including web servers, mail servers, and file servers.
 Each type runs software specific to the purpose of the server.
 For example, a Web server may run Apache HTTP Server or Microsoft IIS, which both
provide access to websites over the Internet.
 A mail server may run a program like Exim or iMail, which provides SMTP services for
sending and receiving email.
 A file server might use Samba or the operating system's built-in file sharing services
to share files over a network.
 While server software is specific to the type of server, the hardware is not as
important. In fact, a regular desktop computers can be turned into a server by
adding the appropriate software.
Client-Server Model
 The client-server model describes how a server provides resources and services to
one or more clients.
 Examples of servers include web servers, mail servers, and file servers.
 Each of these servers provide resources to client devices, such as desktop
computers, laptops, tablets, and smartphones.
 Most servers have a one-to-many relationship with clients, meaning a single server
can provide resources to multiple clients at one time.
 When a client requests a connection to a server, the server can either accept or
reject the connection.
 If the connection is accepted, the server establishes and maintains a connection with
the client over a specific protocol.

Router
 A router is a hardware device that routes data (hence the name) from a local area
network (LAN) to another network connection.
 It can be a separate hardware device or software loaded onto a server.

DNS server
 Stands for Domain Name System server
 Domain names serve as memorisable names for websites and other services on the
Internet.
 However, computers access Internet devices by their IP addresses, not domain
names (also called web addresses).
 DNS translates domain names into IP addresses, allowing you to access an Internet
location by its domain name.

Firewall
 A physical firewall is a wall made of brick, steel, or other inflammable material that
prevents the spread of a fire in a building.
 In computing, a firewall acts as a barrier between a trusted system or network and
outside connections, such as the Internet.
 However, a computer firewall is more of a filter than a wall, allowing trusted data to
flow through it.
 A firewall can be created using either hardware or software
Topic 1.2.3, 1.2.11 & 1.2.16: Discuss the social, ethical, moral,
economic and environmental issues associated with a networked
world, new IT systems and interaction between humans and
machines
What is a social issue?
 A social issue is a problem that influences a considerable number of the individuals
within a society
 Examples of social issues are:
 Crime
 Health
 Education
 Media & Propaganda
 Poverty
 Terrorism

What is an ethical issue?


 A problem or situation that requires a person or organization to choose between
alternatives that must be evaluated as right (ethical) or wrong (unethical).
 Examples of ethical issues are:
 Computer crime
 Responsibility for computer failure
 Protection of computer property, records and software
 Privacy

What is a moral issue?


 A problem or is presented as any issue with the potential to help or harm anyone,
including oneself.
 Examples of moral issues are:
 Death
 Hurt
 Disadvantaging someone/a group
 Freedom/restriction
 Social constructs (marriage/divorce)

What is an economic issue?


 A problem or situation that is concerned with the organization of the money, industry, and
trade of a country, region, or society.
 Examples of economic issues are:
 Generating income
 Costs
 Wealth
 Working

What is an environmental issue?


 A problem or situation that is concerned with the protection of the natural world of
land, sea, air, plants, and animals.
 Examples of economic issues are:
 Global warming
 Electronic waste
 Plastic waste
 Power generation
 Loss of habitat
 Dangerous chemicals

Possible areas of discussion


 Robots replacing humans
 AI algorithms replacing human workers
 New systems being addictive/frustrating/less efficient
 New systems prompting new markets (mPesa/Amazon)
 Accessibility changing work-patterns
 Software changes driving hardware changes and vice versa

Topic 1.2.4: Identify the relevant stakeholders when planning a


new system
Stakeholder
 A person, group or organization that has interest or concern in an organization.
 Some examples of key stakeholders are creditors, directors, employees, government
(and its agencies), owners (shareholders), suppliers, unions, and the community
from which the business draws its resources.
 Not all stakeholders are equal. A company's customers are entitled to fair trading
practices, but they are not entitled to the same consideration as the company's
employees.
Internal vs External stakeholders

When identifying stakeholder for a new system, be sure to ask:


 Who will be affected by the new system?
 Who will the new system affect?
 Who will the end-users be?
 What are their needs?

Utilitarianism
 When designing a new system, we usually try to design it for the greatest good for
the greatest number of people.
 This is approach is called utilitarianism.
Topic 1.2.5: Describe methods of obtaining requirements from
stakeholders
What does the client want?
 Before designing a new system, it is crucial to determine exactly what the client’s
requirements are.
 There are several ways/methods of obtaining these requirements.

Direct Observation
Involves walking around the organisation watching how things are done with his/her own
eyes.
Advantages:
 Possibility of gathering first-hand, unbiased information

Disadvantages:
 Often people might not work the way they normally do when being observed

Interviews
Involves the interviewing key people within the system to find out how it works.
Advantages:
 Allows a lot of very detailed information to be gathered
 People can be asked about what they don't like on the system

Disadvantages:
 Takes a long time

Questionnaires/Surveys
Involves handing out questionnaires for people to fill out
Advantages:
 Large amount of data from a large group can be gathered
 Takes little time to analyse (if done electronically)
 Simple

Disadvantages:
 Takes a long time
 Information gathered is limited by questionnaire, can be biased
 Quality of responses not ensured
Collecting documents
Involves looking in the documents currently being used in the system to try to find out how
the present system works
Advantages:
 Detailed information about the present system can be gathered
 It can be seen where the old system has problems

Disadvantages:
 Time consuming
 Just looking at the forms/outputs may be confusing

Topic 1.2.6: Describe appropriate techniques for gathering the


information needed to arrive at a workable solution
Examining current system
Before you do anything new, see what is currently being done.
 Who does what?
 How do they do that?

Think about the 5 components of a computer system: hardware, software, network,


peripherals, human resources…

Competing products
Look at what the competitors are doing. The aim is not copy them, but to get an idea of
what is possible/being done at the moment.

Intellectual property
Intellectual property is something unique that you physically create. For example, an idea
for an app doesn’t count, but the lines of code you’ve written do.

You own intellectual property if you:


 created it (and it meets the requirements for copyright, a patent or a design)
 bought intellectual property rights from the creator or a previous owner
 have a brand that could be a trademark, e.g. a well-known product name

Organisational abilities
A big consideration before creating a new system is determining what the organisation
would be capable of.
 Can they afford a new system/new equipment?
 Can the staff use the new system? Training needed?
 Can they have any ‘downtime’ to upgrade?

Literature search
 Finally, have you consulted literature to see what else might be out there?
 In IB terms, the term “literature” refers to book, magazines, web sites, journals,
videos, academic papers

Topic 1.2.7: Construct suitable representations to illustrate system


requirements
Three types of diagram to explain how a new system works
1. System flow chart
 A flow chart is a type of diagram representing a process using different
symbols containing information about steps or a sequence of events.
 Each of these symbols is linked with arrows to illustrate the flow direction of
the process.
 The IB only uses two shapes for all commands:

2. Data flow diagram


 A data flow diagram (DFD) maps out the flow of information for any process
or system. It uses defined symbols like rectangles, circles and arrows, plus
short text labels, to show data inputs, outputs, storage points and the routes
between each destination.
 Video link: https://youtu.be/oV6gPbS67vc

3. Structure chart
 Diagram representing the organization of a system, usually with showing the
different parts in hierarchical order.

Topic 1.2.8: Describe the purpose of prototypes to demonstrate the


proposed system to the client
Prototypes
 Prototypes are abstract representations of the system, often focusing on only one or
two key aspects of the system.
 They are important in testing as each component of the system can be tested before
implementing, and to illustrate the working of the future system to the client.

Purpose of prototypes
 Fail early and inexpensively – by building a prototype, you can quickly weed out the
approaches that don’t work to focus on the ones that do.
 Gather more accurate requirements – interviews and focus groups can fall short
because many people find it difficult to conceptualize a product before they see it.
By developing a working prototype, you can demonstrate the functionality to help
solidify requirements for the final design.
 Technically understand the problem – by developing a functional prototype, you are
forced to address both the foreseen and the unforeseen technical challenges of a
device’s design.
Topic 1.2.9: Discuss the importance of iteration during the design
process
Iteration: The action/process of iterating or repeating

Meaning 1: a procedure in which repetition of a sequence of operations yields results


successively closer to a desired result

Meaning 2: repetition of a sequence of computer instructions a specified number of times


or until a condition is met

Topic 1.2.10: Explain the possible consequences of failing to involve


the end-user in the design process
Not involving end user = trouble
 User may be unsatisfied
 System may be unsuited for user's problem, affecting productivity

Topic 1.2.12: Define the term usability


Ergonomics
The discipline of understanding of interactions among humans and other elements of a
system, and the profession that applies theory, principles, data and methods to design in
order to optimize human well-being and overall system performance.

Accessibility
Refers to the design of products, devices, services, or environments for people with
disabilities or specific needs e.g. Braille keyboards, eye-typers, screen readers, voice
synthesizers.

Usability
The ease of use and learnability of a human-made object. The object of use can be a
software application, website, machine, process, or anything a human interacts with.

Topic 1.2.14: Identify methods that can be used to improve the


accessibility of systems
Types of Disabilities
There are four different types of disabilities that can affect the way people use and interact
with digital devices: Visual, Auditory, Mobility and Dexterity, Cognitive

4 specific ways to improve accessibility of a system:


 Touch screen
 Voice Recognition
 Text-to-speech
 Braille Keyboard

Topic 1.2.15: Identify a range of usability problems that can occur in


a system
Possible systems:
 Ticketing
 Online payroll (paying salaries)
 Scheduling
 Voice Recognition
 Systems that provide feedback

Possible Issues:
 What would happen if someone can’t access the system?
 What would happen if they can only access certain parts?
 What happens if they misunderstand what the system requires as input?
 What would happen if they can’t access the output?

Example: AI Recognising Accents


Video link: https://youtu.be/gNx0huL9qsQ

Topic 2: Computer Organisation


Topic 2.1.1: Outline the architecture of the central processing unit
(CPU) and the functions of the arithmetic logic unit (ALU) and the
control unit (CU) and the registers within the CPU.
CPU (Central Processing Unit)
The key component of a computer system, which contains the circuitry necessary to fetch,
decode and execute program instructions from and to main memory (RAM).

Simplified model: CPU, RAM


Simplified Model: CPU, I/O devices, Storage

You must be able draw and label both of these block models from memory.

Function of the ALU


 Part of the CPU that does all the arithmetic and logical calculations
 Sometimes an ALU is referred to as ‘core’, hence computers with dual core
technology have two ALUs to process two calculations simultaneously.

Two functions of the CU


 It handles the loading of new commands into the CPU and the decoding of these
commands. Also, it directs the data flow and the operation of the ALU.

Programs are loaded from storage, into memory (RAM) and executed one instruction at a
time by the CPU

CPU needs its own memory


 Registers: they are small, very fast circuits that store intermediate values from
calculations or instructions inside the CPU.
 There are many registers, but the three most important ones are:
 MAR
 MDR
 Accumulator

MAR (Memory Address Register)


 MAR is connected to the address bus.
 MAR contains a memory address.
 MAR’s sole function contain the RAM address of the instruction the CPU wants next.
MDR (Memory Data Register)
 MDR is connected to the data bus.
 MDR holds data that will be written to the RAM or that was read from RAM.
 Relationship between MAR & MDR: The MAR gives the address the data of the MDR
will be read from or written to.

Busses
Busses are the connecting wires that connect the CPU to other devices, carrying instructions
to/from components (built into the motherboard).
The three most important busses are:
 Data bus (links RAM to CPU via MDR)
 Control bus (links RAM to CPU via CU)
 Memory bus (links RAM to CPU via MAR)

Topic 2.1.2: Describe primary memory.


Primary memory = RAM
As RAM is so important, it is often referred to as primary memory (even though it is actually
only a branch of primary memory, alongside the cache and ROM). In an exam/test, if you
see memory, unless explicitly stated otherwise, it would normally be referring to RAM.

RAM = Random Access Memory


 Contains the data and instructions the computer has loaded since starting up and
everything the user has opened/loaded.
 Is volatile = loses its contents if power is lost
 Has a special link to the CPU (via busses)?

ROM = Read Only Memory


 Originally its contents were static (hence ‘read only’) and could not be changed – not
true anymore (flash upgrades).
 Non-volatile = does not lose its contents if power is lost
 Stores the BIOS (Basic Input Output System) – a small program that allows the
computer to know what to do to find the operating system to ‘boot’ the computer
after power is restored.

RAM ROM
Volatile Non-volatile
Contains user’s programs and data that Contains the BIOS
has been loaded since ‘booting up’
Usually upgradeable, can be increased Usually part of motherboard, difficult to
upgrade
Topic 2.1.3: Explain the use of cache memory
Definition: cache
A type of small, high-speed memory inside the CPU used to hold frequently used data, so
that the CPU needs to access the much slower RAM less frequently

Video link: https://youtu.be/Zr8WKIOIKsk


(This video explains cache memory in detail)

Topic 2.1.4: Explain the machine instruction cycle


The Fetch-Execute cycle
The basic operation of a computer is called the ‘fetch-execute’ cycle (also called the
‘machine cycle’). The computer fetches the instruction from its memory and then executes
it. This is done repeatedly from when the computer is booted up to when it is shut down.

1. Fetching the instruction


The first step the fetch-execute cycle carries out is fetching the instruction. The CPU
fetches this from the main memory (RAM) and stores it in the CPU temporary
memory, called the registers.

2. Decoding the
instruction
Once the instruction has been fetched, the CPU will need to understand the
instruction to action it. This is called decoding

3. Executing the instruction


When the instruction has been decoded, the CPU can carry out the action that is
needed. This is called executing the instruction. The CPU is designed to understand a
set of instructions - the instruction set.

Example: A single piece of program code might require several instructions. Look at this Java
code:
First, the computer needs to load in the value of the variable length into the immediate
access store (registers).
Next it needs to load in the value of the variable width.
Then it needs to multiply the two numbers together, and finally it needs to store the result
in the variable area.

Simplified Model: Machine cycle

Topic 2.1.5: Identify the need for persistent storage


Why do we need storage?
The reason for persistent storage is illustrated in the steps of CPU processing below
1. Processing done in CPU: Has no permanent storage (only registers)
2. Stores results/data in RAM: RAM is volatile (loses contents if power is lost)
3. Needs to be stored on persistent storage: HDD/SSD

Topic 2.1.6 Describe the main functions of an operating system


Hierachy of software

Functions of an operating system


A. Provides a user interface
 OS must provide a link between the user and the computer hardware.
 Types of user interfaces:
 Graphical User Interfaces (GUIs) that have menus and icons,
 Command Line Interfaces (CLIs) where the user types in codes,
 Natural Language Interface (NLIs) where the user speaks to the
interface
 Menu Based Interface (MBIs) which gives the user a selection of
options.
B. Does memory management
 Memory management is done by keeping track of storage devices (like HDD)
and controlling which application has access to which area of memory (RAM).
 Each location in memory can be read, modified, and written to by the OS.
When the memory location is full the OS sends a confirmation message.
 Similarly, the OS provides file management services by sorting out where
data is stored on the disk drives and memory.
 The OS allows users to organise files in folders as well as to copy and delete
files.
C. Does peripheral management
 Keyboard, mouse, monitor and printers are controlled through device drivers.
 A device driver is a software program which allows hardware devices to be
used by the OS. They act as translators between the devices and the
computer system.
D. Allows multi-tasking
 The OS coordinates the working of different programs by allocating the CPU
time between different programs based on time and priority of the software
application.
 Each task running is given a slice of time, or a turn on the CPU.
 Each task must wait its turn unless it is given a higher priority by the OS in
which case it gets more or longer time slices.
E. Provides security
 OS prevents unauthorised access.
 It ensures security of the system through usernames and passwords.
 The OS protects files from other users reading or writing files

Topic 2.1.7: Outline the use of a range of applications software


Common application software
A. Word Processor
A program for storing, manipulating, and formatting text entered from a keyboard
and providing a printout.
B. Spreadsheets
A program in which data is arranged in the rows and columns of a grid and can be
manipulated and used in calculations.
C. Database Management Systems (DBMS)
A database management system (DBMS) is system software for creating and
managing databases. The DBMS provides users and programmers with a systematic
way to create, retrieve, update and manage data.
D. Email clients
A computer program used to access and manage a user's email
E. Web browsers
A software application for retrieving, presenting, and traversing information
resources on the World Wide Web.
F. Computer Aided Design (CAD)
Programs that use computer systems to assist in the creation, modification, analysis,
or optimization of a design.
G. Graphic Processing Software
In computer graphics, graphics software or image editing software is a program or
collection of programs that enable a person to manipulate visual images on a
computer.

Topic 2.1.8: Identify common features of applications


Common features of most programs are:
 Toolbars
 Menus
 Dialogue Boxes
 GUI components

OS vs Application features
 Certain parts of the interface are provided by libraries in the OS and certain parts are
specific to each application.
 For example: the menu bar and buttons are standard, but the specifics/pictures are
up to the individual application.

Topic 2.1.9: Define the terms: bit, byte, binary, denary/decimal and
hexadecimal
Definition: bit
Computers use binary - the digits 0 and 1 - to store data. A binary digit, or bit, is the smallest
unit of data in computing. It is represented by a 0 or a 1.

Definition: byte
Bits can be grouped together to make them easier to work with. A group of 8 bits is called a
byte.

Definition: binary
 Computers use binary - the digits 0 and 1 - to store data
 Because it only has 2 symbols (0 & 1) it is also called BASE-2 numbering
 Binary also refers to the format in which numbers are transmitted and calculated in a
computer system.
How to convert from binary to denary:

Definition: denary / decimal


Denary is a numbering system with 10 symbols: 0123456789 It is, therefore, often referred
to as BASE-10 numbering.
96 = 64 + 32

128 64 32 16 8 4 2 1
0 1 1 0 0 0 0 0

96 = 01100000

Definition: hexadecimal
 Hexadecimal is a numbering system with 16 symbols: 0123456789ABCDEF
 It is, therefore, often referred to as BASE-16 numbering.
 Hex, as it is often called, is used to represent very large numbers quickly, such as
those used in colour representation.

Hexadecimal to Denary
Binary to Hexadecimal

Topic 2.1.10: Outline the way in which data is represented in the


computer

ASCII vs Unicode
Different data types take up more space

Topic 2.1.11: Define the Boolean operators: AND, OR, NOT, NAND,
NOR and XOR
What is logic?
 It’s how a machine will solve problems
 Machines (at basic level) do not understand semantics like humans – no grey areas.

The Basic 3 gates

The Next 3 gates


Useful tool:
https://www.wolframalpha.com/widget/widgetPopup.jsp?p=v&id=4c86f3bbcab249f879058d18258
87571&title=Boolean%20Algebra%20Calculator&theme=green

This is a useful tool to practise boolean algebra, a skill that is needed for IB Computer
Science

Topic 3: Networks
Topic 3.1.1: Identify different types of networks
Definition: Network
 A computer network is a group of computer systems and other computing hardware

devices that are linked together through communication channels to facilitate


communication and resource-sharing among a range of users.
 Networks are commonly categorized based on their characteristics.

LAN = Local Area Network


 LAN stands for local area network. It covers, as the name suggests, a local area.
 This usually includes a local office/building and they're also common in homes now,
thanks to the spread of Wi-Fi.
 Whether wired or wireless, nearly all modern LANs are based on Ethernet, a set of
protocols for exchanging data.
 There are two ways to implement Ethernet: twisted-pair cables (UTP) or wireless
(Wi-Fi radio waves).
WAN = Wide Area Network
 The name is exactly what it sounds like: a network that covers an area wider than a
LAN.
 Beyond that, the definition is less clear. Distances can range from a network
connecting multiple buildings on a corporate or college campus to satellite links
connecting offices in different countries.
 The most popular WAN is the internet.
 It's actually a collection of other networks, including other LANs and WANs – hence,
the name.
 WANs can be wired (using fibre-optic cable) or wireless (using microwave or
satellite transmission technology).

VLAN = Virtual Local Area Network


 A virtual local area network (VLAN) is a logical group of workstations, servers and
network devices that appear to be on the same LAN despite their geographical
distribution.
 A VLAN allows a network of computers and users to communicate in a simulated
environment as if they exist in a single LAN.
 VLANs are implemented to achieve scalability, security and ease of network
management and can quickly adapt to changes in network requirements and
relocation of workstations and server nodes.

SAN = Storage Area Network


 A storage area network (SAN) is a secure high-speed data transfer network that provides
access to consolidated block level storage.
 A SAN makes a network of storage devices accessible to multiple servers.
 SAN devices appear to servers as attached drives, eliminating traditional network
bottlenecks.
 SANs are sometimes also referred to (albeit redundantly) as SAN storage, SAN network,
network SAN, etc.

WLAN = Wireless Local Area Network


 A wireless local area network (WLAN) is a wireless distribution method for two or
more devices that use high frequency radio waves and often include an access point
to the Internet.
 A WLAN allows users to move around the coverage area, often a home or small
office, while maintaining a network connection.
 A WLAN is sometimes called a Wi-Fi network, but can include other transmission
technologies.

Internet = network of networks


 The internet is a globally connected network system that uses the TCP/IP protocols
to transmit data via various types of media.
 The internet is a network of global exchanges – including private, public, business,
academic and government networks – connected by wired, wireless and fibre-optic
technologies.
 The terms internet and World Wide Web are often used interchangeably, but they
are not exactly the same thing; the internet refers to the global communication
system, including hardware and infrastructure, while the web is one of the services
communicated over the internet.

Extranet
 An extranet is a controlled private network allowing customers, partners, vendors,
suppliers and other businesses to gain information, typically about a specific
company or educational institution, and do so without granting access to the
organization's entire network.
 An extranet is often a private part of a website.
 It is restricted to select users through user IDs, passwords and other authentication
mechanisms on a login page.

VPN = Virtual Private Network


 It uses the internet to allow people to log into a network remotely and access its
resources but encrypts the connection to thwart eavesdroppers.
 If your company sets you up with a VPN, you can access your corporate intranet, file
servers or email from home or a coffee shop – just as if you were using it in your
office.
 This makes VPN a popular way to support remote workers, especially in fields where
privacy is paramount, such as health care.

PAN = Personal Area Network


 It's exactly what it sounds like: a network covering a very small area, usually a small
room.
 The best-known wireless PAN network technology is Bluetooth, and the most
popular wired PAN is USB.
 You might not think of your wireless headset, your printer or your smartphones as
components in a network, but they are definitely talking with each other.
 Many peripheral devices are actually computers in their own right.
 Wi-Fi also serves as a PAN technology, since Wi-Fi is also used over a small area
(especially in cars).
P2P = Peer-to-Peer
 Peer-to-peer is a network model in which computers or hardware devices exchange
files.
 Some experts describe it as an “equal client” system where instead of accessing files
from a server, the “peer” computers just swap them amongst each other.

Topic 3.1.2: Outline the importance of standards in the construction


of networks
Standards are important!
 Standards play an important role in networking.
 Without standards, manufacturers of networking products have no common ground
on which to build their systems.
 Interconnecting products from various vendors would be difficult, if not impossible.
 Without agreed standards, communication would be difficult (if not impossible)

Topic 3.1.3: Describe how communication over networks is broken


down into different layers
7-layer OSI model
Layers OSI Model Description
Layer 7 APPLICATION: HTTP, Interface for end point service.
SNMP, FTP Examples: web browsing and email
Layer 6 PRESENTATION: WMV, Formats application data for
JPEG, PNG delivery. Examples: compression
and encryption
Layer 5 SESSION: Connection Manages sessions between
Management application process
Layer 4 TRANSPORT: TCP, UDP Host to host communications,
segments and diagrams
Layer 3 NETWORK: IP Source and destination IP addresses
www.google.com = IP address
packets
Layer 2 DATA LINK: MAC, FCS Source and destination MAC
addresses Ethernet Frames
Layer 1 PHYSICAL: Data Encoding Physical media
Simplified TCP/IP Model
1. Application
Program that sends out the data (HTML/SMTP)
2. Transmission
Data is broken into packets (TCP)
3. Network
Packets are addressed with destination and sender’s address
4. Link
Packets are converted into binary and sent

Topic 3.1.4: Identify the technologies required to provide a VPN

Two fundamental VPN technologies


 Encryption is the process of encoding data so that only a computer with the right
decoder will be able to read and use it.
 Tunnelling involves establishing and maintaining a logical network connection (that
may contain intermediate hops). On this connection, packets constructed in a
specific VPN protocol format are encapsulated within some other base or carrier
protocol, then transmitted between VPN client and server, and finally de-
encapsulated on the receiving side.

Video Link: https://youtu.be/_wQTRMBAvzg


(this explans in deatil how VPNs work)

Basic checklist for VPN


 A LAN that is connected to the internet.
 One computer outside of the LAN that is also connected to the internet.
 VPN client and server running on the lone machine and the original LAN.
 Internet connection.

Topic 3.1.6: Define the terms: protocol & data packet


Definition: Protocol
Set of rules for data communication over a network

Definition: Data Packet


Data: Anything in a form suitable for use with a computer… such as binary. Typically, data is
meaningless.
Packet: A small unit of data used in network communication.
Make up of a data packet

Topic 3.1.7: Explain why protocols are necessary


Summary
 Protocols are the set of rules computers follow when communicating across a
network.
 Without them, no information can be transmitted as computers don't know how to
interpret the signals coming through the network.

Essential functions of protocols


 Ensure data integrity
 Manage flow control
 Prevent deadlock
 Manage congestion
 Perform error checking

Data integrity
 Data integrity, in the context of networking, refers to the overall completeness,
accuracy and consistency of data.
 Data integrity must be imposed when sending data through a network.

Flow Control
 Flow control is the mechanism that ensures the rate at which a sender is
transmitting is in proportion with the receiver’s receiving capabilities.
 Flow control is utilized especially in cases where the sending device can send data
much faster than the receiver can digest.
Deadlock
 A deadlock is a situation where two nodes or processes are trying to access the same
node at the same moment, causing neither to be able to proceed.
 It is then up to the relevant protocol to stop both, and requeue them so that they
can happen sequentially, letting traffic flow.

Congestion Control
 Congestion refers to a network state where a node or link carries so much data that
it may deteriorate network service quality, resulting in queuing delay, frame or data
packet loss and the blocking of new connections.
 In modern networks, avoiding congestive collapse involves the application of
network congestion avoidance techniques along with congestion control.

Error checking
 Error checking or detection refers to the techniques used to detect noise or other
impairments introduced into data while it is transmitted from source to destination.
 Error detection often makes use of parity bits, bits at the end of a packet that are
calculated to be either a 1 or 0.

Topic 3.1.8: Explain why the speed of data transmission across a


network can vary
Connection speed averages
 Dedicated LAN connections
 UTP Copper cable (100Mbps)
 Fibre optic cable (5-100Gbps)
 Wi-Fi (10-150Mbps)

 Broadband (WAN) connections


 DSL (2-16Mbps)
 Fibre optic (20-100Mbps)
 3G (± 1 Mbps)
 4G (± 20 Mbps)

Primary concept: Traffic


 The primary concept is that speeds vary due to traffic.
 The more network traffic, the slower the data transfer on a connection will be.
Secondary causes: Time of day

Secondary causes: Distance

Secondary causes: infrastructure


If a countries infrastructure is insufficient because it doesn’t have the money resources to
put in the correct infrastructure, then it will have an impact on network speeds. Therefore,
developed countries tend to have higher average speeds than the undeveloped countries.

Tertiary causes of speed variance


 Environmental issues (like temperature, interference, etc.)
 Infrastructure limitations due to financial reasons (cheaper equipment, etc.)
 The type of data being transmitted (large files, streaming data, etc.)
Topic 3.1.9 Explain why compression of data is often necessary
when transmitting across a network
Definition: Compression
Data compression involves encoding information to use fewer bits than the original data
entity.

Key concept: Time!


 The smaller we can compress data, the more data we can send in the same amount
of time.
 The consequence of this is that data can be spread out more rapidly.

Lossless vs Lossy Compression


 Lossless: Lossless compression reduces bits by identifying and eliminating statistical
redundancy. No information is lost in lossless compression.
 Lossy: Lossy compression reduces bits by removing unnecessary or less important
information. The process of reducing the size of a data file is often referred to as
data compression.

Video link: https://youtu.be/OtDxDvCpPL4


(this explains compression in detail)
Topic 3.1.10: Outline the characteristics of different transmission
media
UTP – Unshielded Fibre-optic (glass) Radio waves
Twisted Pair (metal) (WLAN/Wi-Fi)
Security OK security, if Very secure, difficult Very unsecure, unless
encrypted to break in encrypted
Reliability Susceptible to EMI Generally fragile Susceptible to
interference
Cost <£1 per meter £2-£8 per meter Technically free
Speed 100Mbps – 1 Gbps 5 – 100 Gbps 5-200 Mbps

Topic 3.1.11: Explain how data is transmitted by packet switching


Definitions: packet and packet switching
 Packet: A packet is the unit of data that is routed between an origin and a
destination on the Internet or any other packet-switched network.
 Packet switching: Packet-switching describes the type of network in which relatively
small units of data called packets are routed through a network based on the
destination address contained within each packet.

Video link:
https://www.youtube.com/watch?v=ewrBalT_eBM&feature=iv&src_vid=WwyJGzZmBe8&annotatio
n_id=annotation_667002
(this explains packet switching in detail, very important for paper 1)
Video link:
https://www.youtube.com/watch?v=IlAJJI-qG2k
(this explains undersea cabling, the basis of the internet.)

Topic 3.1.12: Outline the advantages and disadvantages of wireless


networks
Advantages
 Uses unlicensed radio spectrum
 Doesn’t cost anything
 LANs can be set up without cabling
 Doesn't take space or time to lay the cables. No extra cost on cables
 Wi-Fi can support roaming between access points
 People can switch from router to router automatically depending in which
connection is best
 Global standards (e.g. 802.11n)
 Setup costs are minimal
 Many types are available on the market and they are affordable

Disadvantages
 Interference
 As 2.4GHz spectrum is often crowded
 Limited Range
 WEP
 this encryption is not difficult to hack and WPA2 has solved this problem
 Access Points – these can be
 these can be used to steal data
 Health Concerns

Topic 3.1.13: Describe the hardware and software components of a


wireless network
Hardware components
 Node: PC, Laptop, Tablet, Printer
 Wireless network interface card
 Radio waves (Bluetooth/Wi-Fi)
 Connection point: Wireless AP / Router

Software components
 Network Operating System (with drivers)
 Protocol stack (TCP/IP)
 Applications (Browser/File explorer)

Topic 3.1.14 Describe the characteristics of wireless networks


Wi-Fi (Wireless Fidelity)
 Also called Wireless LAN (WLAN)
 Used in laptops/mobile devices to connect wirelessly to home network
 Most preferred network type to implement a home network
 Allows relatively slow to fast data transmissions (depending on the version)
 Backwards compatible with most older Wi-Fi standards (a/b/g/n)
 Small transmitting radius makes it suited for homes, usually <20m

WiMAX (Worldwide Interoperability for Microwave Access)


 Designed for large distance high speed internet access
 Relatively cheap method of providing internet over a large area - suited for poorer
countries
 Rivalled by Long Term Evolution
(LTE) standard
 Can be used as a form of wireless
variant of DSL phone
transmission lines

3G (Third Generation)
 The primary way mobile phones access the internet today
 Allows the tunnelling of phone lines (mobiles don't have to switch back to phone
network when receiving a call
 Relatively fast

Topic 3.1.15: Describe the different methods of network security


Security properties
It’s much easier to think of these three factors when talking about security.
1. Confidentiality
2. Integrity
 Maintaining accuracy of data
3. Availability
 DoS attacks

Authentication
Is someone who they claim to be?
One factor authentication: Something you know? (password/pin number)
Two factor authentication: Something you have? (card, E key)
Three factor authentication: Something you are? (touch ID, iris scanner)

Firewalls
 Hardware or Software (or hybrid of both).
 Controls incoming and outgoing network traffic.
 Analyse data packets based on pre-determined set of rules.

MAC Address (Media Access Control address)


 Hard coded into devices by manufacturers
 Managed by the IEEE (institute of Electrical and Electronics Engineers).
 Are used to identify specific pieces of hardware.

Physical security
 Locked doors
 Security personnel
 Cages / sealed units
 Reinforced/secure rooms
 Walls with barbed wire
 Ravenous guard dogs

Encryption
 UserID (and passwords)
 PSK (pre-shared key)
 WEP (dead)
 WPA / WPA2

Topic 3.1.16: Evaluate the advantages and disadvantages of each


method of network security
userID
 Advantages
 Access rights to the network can be set for each user
 User groups can be created to manage user rights in batches
 Disadvantages
 A userID can be stolen
 system can be bypassed
 Does not protect against intercepting messages in the network
Encryption security
 Advantages
 A strong encryption is very hard to break
 Computer are fast enough to encrypt data on-the-fly
 Disadvantages
 Often, users are lazy and take a password that is easy to guess
 The password needs to be transmitted over the network to receiver to allow
them to read the message
 Some encryptions are designed to have backdoors built in.

Topic 4: Computational thinking

Warning: This part of the course has a high emphasis on programming, so a lot of it will be
learnt by practising Java. So, not all parts of the syllabus will be covered here.
Pseudocode is very important in this topic. Go through the IB Computer science
pseudocode booklet to learn the correct pseudocode standards. Here is a link:
https://computersciencewiki.org/images/c/c6/IB-Pseudocode-rules.pdf
https://computersciencewiki.org/images/3/3e/Approved_notation_for_developing_pseudocode.pdf
Topic 4.1.1 – 4.1.3: Thinking procedurally
This will include identifying steps and putting them in the correct order e.g. recipes,
instructions.
Working out the order

For this part of the course practice some java problems on coding bat
Topic 4.1.4 – 4.1.8: Thinking logically
Topic 4.1.9 – 4.1.13: Thinking ahead
Inputs vs Outputs

Pre & post conditions


Preconditions: A precondition is a condition that must always be fulfilled (true), before
executing of an action/code.
 Example: If you eat a sandwich at lunchtime the precondition would be
buying/making the sandwich.
Postcondition: A condition that must always be fulfilled (true), after executing some section
of code or after executing an action.
 Example: add something here //
Topic 4.1.14 – 4.1.16: Thinking concurrently
Concurrent: when two or more processes are using the same resources at the same time.
Gantt chart can be useful to show this.

 Concurrent processing system one job uses several processors to execute sets of
instructions in parallel.
 Increases computation speed
 Increases complexity of programming language and hardware (machinery &
communication among machines)
 Reduces complexity of working with array operations within loops, of performing
matrix multiplication, of conducting parallel searches in databases, and of sorting or
merging files.
You must be able to evaluate the use of concurrent processing. Refer to time
(saved/wasted), cost, is concurrency possibly, consequence of not using concurrency.

Topic 4.1.17 to 4.1.20: Thinking Abstractly


Definition: Abstraction
Abstraction is the process of removing characteristics from something in order to reduce it
to a set of essential characteristics.
In CS, abstraction manages complexity of computer systems by reducing them down to their
simplest form.
 Example: A user doesn’t need to know how a smartphone works to use it.

Why use abstraction?


 Abstraction can be viewed both as a process and as an entity.
 Abstraction enables a person to concentrate on the essential aspects of the problem
on hand, while ignoring details that tend to be distracting.
 The real world is sufficiently complex and presents to many items simultaneously to
be dealt with.
 Abstraction is a convenient way to deal with complexity.

Levels of abstraction through successive decomposition


Topic 4.2.1 – 4.2.9: Connecting computational thinking and
program design
The four key standard algorithms
1. Sequential search
 Linear/sequential search is an algorithm to find an item in a list.
 It starts at the first element and compares each element to the one it’s
looking for until it finds it.
 Commonly used with collections (which are unsorted lists of items) and
text/csv file reading.
Video link: https://www.youtube.com/watch?v=CX2CYIJLwfg
(here is a video that explains sequential search in detail)
Pseudocode:

2. Binary search
 Binary search, also known as half-interval search, is a search algorithm that
finds the position of a target value within a sorted array.
 It works by comparing the target value to the middle element of the array;
 If they are unequal, the lower or upper half of the array is eliminated
depending on the result and the search is repeated in the remaining sub-
array until it is successful.
 It only applies to SORTED arrays (where there are usually no duplicate values,
or duplicates do not matter)
Video link: https://www.youtube.com/watch?v=D5SrAga1pno
(explains binary search in detail)
Pseudocode:
3. Bubble sort
 Bubble sort is a simple sorting algorithm that repeatedly steps through the
list to be sorted, compares each pair of adjacent items and swaps them if
they are in the wrong order.
 The pass through the list is repeated until no swaps are needed, which
indicates that the list is sorted.
 The algorithm, which is a comparison sort, is named for the way smaller
elements "bubble" to the top of the list.
 Although the algorithm is simple, it is too slow and impractical for most
problems.
Video link: https://www.youtube.com/watch?v=8Kp-8OGwphY
(explains bubble sort)
Pseudocode:

4. Selection sort
 Selection sort is a sorting algorithm and it is inefficient on large lists
 Selection sort is noted for its simplicity, and it has performance advantages
over more complicated algorithms in certain situations, particularly where
memory is limited.
 The algorithm divides the input list into two parts: the sublist of items already
sorted, which is built up from left to right at the front (left) of the list, and the
sublist of items remaining to be sorted that occupy the rest of the list.
 Initially, the sorted sublist is empty and the unsorted sublist is the entire
input list.
 The algorithm proceeds by finding the smallest (or largest, depending on
sorting order) element in the unsorted sublist, exchanging (swapping) it with
the leftmost unsorted element (putting it in sorted order), and moving the
sublist boundaries one element to the right
Video link: https://www.youtube.com/watch?v=f8hXR_Hvybo
(explains selection search in detail)

Pseudocode:
Standard operations for collections are all must be learnt, these are located in the IB
pseudocode booklet

Basic comparisons
 A binary search is faster - O(log N ), but can only be performed in a SORTED list
 A sequential search is slower - O(N) but can be performed whether the list is sorted
or not
 A bubble sort can "quit early" if no swaps are made in a pass. But it makes lots of
swaps.
 A selection sort must always perform N passes - it cannot "quit early". But it makes
fewer swaps - maximum of N swaps
 Both bubble and selection sort are O() = equally complex

Flowchart symbols
What affects run time of an algorithm?
 computer used, the hardware platform
 efficiency of compiler
 competence of programmer (programming skills)
 complexity of underlying algorithm
 size of the input

Definition: Complexity
 Complexity of an algorithm is a measure of the amount of time and/or space
required by an algorithm for an input of a given size (n).
 Time for an algorithm to run t(n) is characterised by the size of the input.
 We usually try and estimate the WORST CASE, and sometimes the BEST CASE, and
very rarely the AVERAGE CASE.

Best vs Worst vs Average case


 Worst case
 is the maximum run time, over all inputs of size n, ignoring effects (a) through
(d) above? That is, we only consider the "number of times the principle
activity of that algorithm is performed".
 Best Case
 In this case we look at specific instances of input of size n. For example, we
might get best behaviour from a sorting algorithm if the input to it is already
sorted.
 Average case
 Arguably, average case is the most useful measure. It might be the case that
worst-case behaviour is pathological and extremely rare, and that we are
more concerned about how the algorithm runs in the general case.
Unfortunately, this is typically a very difficult thing to measure.

Example: Growth rate of t(n)


 Let’s say that that the worst-case time for Algorithm A is t(n) = 60*n*n + 5*n + 1 for
input n. Ignore the coefficient that is applied to t(n) and this only affects the units in
which we measure worst case time.
 Using these assumptions, we cans say that t(n) grows like n*n as n increases or we
can say t(n) = O(n*n) or O()

Tyranny of growth
 A = ( n) {log to base 2 of n}
 B = n {linear in n}
 C = (n * (log2 n)) {n log n}
 D = (n²) {quadratic in n}
 E = (n³) {cubic in n}
 F = () {exponential in n}
 G = () {exponential in n}
 H = (n!) {factorial in n}

Topic 4.3.1 – 4.3.13: Introduction to programming


Fundamental operations
All CPUs have sets of instructions, also called the fundamental operations, that enable
commands to be processed.

The four most fundamental operations are:


 ADD
 COMPARE
 RETRIEVE (sometimes called LOAD)
 STORE (sometimes called SAVE)

Fundamental vs Complex
Fundamental:
Complex:

Compound operation:

Difference between fundamental and compound


Key difference: complexity
 A fundamental operation could be something like add two numbers, store a
number, move a number to another location in RAM etc.
 These are operations that do not require the processor to go through many sub
operations to reach a result.
 A compound operation is an operation that involves several stages/other
operations. Think of it as a group of operations that combine to form an operation.

Most popular high-level languages

Translation
 Compiler: If the translator translates a high-level language into a lower level
language (done in a batch)
 Interpreter: the translator translates a high-level language into an intermediate code
which will be immediately executed by the CPU (done line by line)
 Assembly: the translator translates assembly language to machine code (mnemonics
to binary)
Levels of language

Java virtual machine


 Java applications run on a virtual machine (the Java Virtual Machine or JVM).
 This virtual machine is installed on the computer (e.g. PC, Mac, Smart Phone, Ticket
Machine) and allows the same java code to be run on many different types of
hardware.
 Even though the hardware architecture and instruction set of each of these devices
is different the virtual machine is the same.
 The trick is that the virtual machine software needs to match the hardware it will be
installed on, so you need to get the correct version of the virtual machine, but once
you have it then you can run any java program.
 This is good for the java programmer as he does not have to write lots of different
versions of the program he is writing, for each of the devices he wants it to run on.
 After the java program is written it can be deployed to any device that has the Java
Virtual Machine installed on it.

Definition: Variable
 Variables are storage location for data in a program.
 They are a way of naming a memory location for later usage (to put a value
into/retrieve a value).
 Each variable has a name and a data type that is determined at its creation (and
cannot be changed)
Definition: Constant
 A constant is an identifier with an associated value which cannot be altered by the
program during normal execute -the value is constant.
 This is contrasted with a variable, which is an identifier with a value that can be
changed during normal execution – the value is variable.

Definition: Operator
 A character/set of characters that represents an action
 Types:
 Boolean operators (AND, OR, &&, ||) for working out true/false situations
 Arithmetic operators (+, -, ++, --, /, %, div, mod) for doing simple
mathematical calculations
 Assignment operators , which assign a specified value to another value and (
=)
 Relational operators , which compare two values (, >=, <=, ==, !=, .equals() )

Definition: Object
 In Object-oriented programming (OOP), an object is an instance of a class.
 Objects are an abstraction: they hold both data (states), and ways to manipulate the
data (behaviours).

Advantages to modular design


 Modular programming is an important and beneficial approach to programming
problems. They make program development easier, and they can also help with
future development projects.
 Key benefits/advantages:
 Usefulness of reusable code
 Eases program organization, both for the individual programmer, team
members
 Makes future maintenance easier – you only have fix/update a module, not
the whole program

Manageable tasks
 Breaking down a programming project into modules makes it more manageable.
 These individual modules are easier to design, implement and test.
 Then you can use these modules to construct the overall program.

Distributed development
 Modular programming allows distributed development.
 By breaking down the problem into multiple tasks, different developers can work in
parallel.
 And this will shorten the development time.

Code reusability
 A program module can be reused in programs.
 This is a convenient feature because it reduces redundant code.
 Modules can also be reused in future projects.
 It is much easier to reuse a module than recreate program logic from scratch.

Program readability
 Modular programming leads to more readable programs.
 Modules can be implemented as user-defined functions.
 A program that has plenty of functions is straightforward.
 But a program with no functions can be very long and hard to follow.

Topic 5: Abstract Data Structures


Warning: You need to learn the pseudocode for certain data structures off by heart. You
learn these from the IB pseudocode guide. The link is here:
https://computersciencewiki.org/images/c/c6/IB-Pseudocode-rules.pdf
Topic 5.1.1 – 5.1.3: Identify a solution that requires the use of
recursive thinking
Recursion
 a method where the solution to a problem depends on solutions to smaller instances
of the same problem
OR
 a method that calls itself

Some good
real-life
examples of recursion are snowflakes and
fractals as they are an infinite repeat of the
same thing over and over.

There are a lot of good recursion practise


questions on coding bat. Practise them to
familiarise yourself with the code.

Video link: https://www.youtube.com/watch?v=KEEKn7Me-ms&t=68s


(this explains recursion very well)
Topic 5.1.4: Describe the characteristics of a two-dimensional array
Array in general (1D/Linear)

2D Array (grids/tables)
Topic 5.1.6: Describe the characteristics and applications of a stack
Stacks – all about the PUSH and POP
LIFO – Last in, first out
The way a stack data structure works is items pushed on and popped off to add and remove
from the stack. This means that the last item to be added to the stack is the first value to be
removed, like a stack of plates.

You will need to know how to use stacks in pseudocode algorithms, so learn how to do
this with practise questions and the pseudocode guide.

Video link: https://www.youtube.com/watch?v=wjI1WNcIntg


(explains stacks and queues very well)

Example 1: Write an algorithm that will move all the elements from a linear integer array
LINE to a stack called S.

Example 2: Write an algorithm that will print all the String values of a stack called S

Topic 5.1.8: Construct algorithms using the access methods of a


queue
Stacks – all about the ENQUEUE and DEQUEUE

FIFO – First in, first out


Queues work the same way as any queue in a shop, first person to join the queue is the first
out of the queue, because that person is at the front of the queue. So, the first piece of data
to enqueue, is the first to dequeue.

You will need to know how to use queues in pseudocode algorithms, so learn how to do
this with practise questions and the pseudocode guide.

Video link: https://www.youtube.com/watch?v=wjI1WNcIntg


(explains stacks and queues very well)
Example 1: Write an algorithm that will move all the elements from a linear integer array
LINE to a queue called Q

Example 2: Write an algorithm that will print all the String values kept in a queue called Q.
Topic 5.1.10: Explain the use of arrays as static stacks and arrays
 Arrays are static data structures (can’t change size)
 Stacks & queues are dynamic data structures (can change size)
 You can use an array to behave like a stack or a queue, provided you give it enough
elements to allow the stack or queue to function.

Video link: https://www.youtube.com/watch?v=sFVxsglODoo


(explains implementation of stacks and queues very well)

Topic 5.1.11: Describe the features and characteristics of a dynamic


data structure
Types of data structures
Static data structures
 Size/length is determined at creation
 Might be/might not be good use of memory space
 Associated with FOR loops

Dynamic data structures


 Size/length is determined by contents
 Uses nodes/pointers
 Usually a good use of memory space
 Associated with WHILE loops

Head = contains pointer to data


Data = contains the data
Tail = contains pointer to next head
Topic 5.1.12: Describe how linked lists operate logically
Linked list
 A linked list is a linear collection of self-referential structures, called nodes,
connected by pointer links.
 A linked list is accessed by keeping a pointer to the first node of the list.
 This pointer to the first node of a list is typically named head.
 Subsequent nodes are accessed via a link pointer member that is stored in each
node.

Video link: https://www.youtube.com/watch?v=njTh_OwMljA&t=5s


(explains linked lists very well)

Linear & Circular Linked Lists

Inserting into a linked list


An empty list
 When list is empty, which is indicated by (head == NULL) condition, the insertion is
quite simple.
 Algorithm sets both head and tail to point to the new node.

Inserting at the BEGINNING


 In this case, new node is inserted right before the current head node.

 Update the next link of a new node, to point to the current head node.

 Update head link to point to the new node.


Inserting at the END
 In this case, new node is inserted right after the current tail node.

 Update the next link of the current tail node, to point to the new node.

 Update tail link to point


to the new node.

Inserting in the MIDDLE


 In general case, new node is always inserted between two existing nodes. Head and
tail links are not updated in this case.

 Update link of the "previous" node, to point to the new node.


 Update link of the new node, to point to the "next" node.

Topic 5.1.13: Sketch linked lists (single, double and circular)


Single linked list (a.k.a. linear lists)
 Single head, single tail (first and last element)
 Each pointer works in one direction only

Doubly linked list


 Single head, single tail (first and last element)
 Two pointers for each element (one to next, one to previous)
Circular linked list
 Single head
 One pointer for each element (one to next element)
 Last element’s pointer points to head (creating a circle)

Topic 5.1.14: Describe how trees operate logically (both binary and
non-binary)
Binary tree
 A binary tree is made of nodes, where each node contains a "left" pointer, a "right"
pointer, and a data element.
 The "root" pointer points to the topmost node in the tree.
 The left and right pointers recursively point to smaller "subtrees" on either side.
 A null pointer represents a binary tree with no elements -- the empty tree.
 The formal recursive definition is a binary tree is either empty (represented by a
null pointer), or is made of a single node, where the left and right pointers (recursive
definition ahead) each point to a binary tree.

Topic 5.1.15: Define the terms: parent, left-child, right-child,


subtree and leaf

Definitions
 Parent: A node in a tree that has children (left, right or both)
 Left child: A node on the left-hand side below a parent node
 Right-child: A node on the right-hand side below a parent node
 Root: The top node in a tree
 Subtree: A parent with children with-in another parent child relationship
 Leaf: A node with no children

Video link: https://www.youtube.com/watch?v=oSWTXtMglKE


(explains binary trees very well)

Topic 5.1.16: State the result of inorder, postorder and preorder


tree traversal
The Flag Rule
The order in which the nodes are visited during a tree traversal can be easily determined by
imagining there is a flag attached to each node, as follows:

To traverse the tree, collect the flags:

(Root, Left, Right) (Left, Root, Right) (Left, Right, Root)

Topic 5.1.18: Define the term: dynamic data structure


Dynamic data structures
 These data structures can change size during the execution of a program
 Dynamic data structures grow and shrink as required by the program
 The size of the structure is determined during runtime
 They are a very efficient use of memory space

Dynamic data structures


Advantages:
 Can change in size while program is running
 Only uses the space needed at any time
 Makes efficient use of memory
 Storage no longer required can be returned to system for other use
Disadvantages:
 Difficult to program
 Can be slow to implement searches
 A linked list only allows serial search
Static data structures
Advantages:
 Cannot change in size during run time
 Computer can allocate space during compilation
 Easy to program
 Easy to check for overflow
 An array allows random access
Disadvantages:
 Programmer must estimate maximum amount of space needed before hand
 Can waste space

Topic 5.1.20: Suggest a suitable structure for a given situation


Stacks? Best used for:
 Perhaps the most important application of stacks is to implement function calls
(methods).
 Most compilers implement function calls by using a stack.
 This also provides a technique for eliminating recursion from a program: instead of
calling a function recursively, the programmer uses a stack to simulate the function
calls in the same way that the compiler would have done so.
 Conversely, we can often use recursion instead of using an explicit stack.

Queues? Best used for:


 Computing applications: serving requests of a single shared resource (printer, disk,
CPU),
 Buffers: MP3 players and portable CD players, iPod playlist.
 Playlist for jukebox: add songs to the end, play from the front of the list.
 Interrupt handling: When programming a real-time system that can be interrupted
(e.g., by a mouse click or wireless connection), it is necessary to attend to the
interrupts immediately, before proceeding with the current activity. If the interrupts
should be handles in the same order they arrive, then a FIFO queue is the
appropriate data structure.

Linked list? Best when:


 You need constant-time insertions/deletions from the list (such as in real-time
computing where time predictability is absolutely critical)
 You don't know how many items will be in the list. With arrays, you may need to re-
declare and copy memory if the array grows too big
 You don't need random access to any elements
 You want to be able to insert items in the middle of the list (such as a priority queue)

Arrays? Best when:


 You need indexed/random access to elements
 You know the number of elements in the array ahead of time so that you can
allocate the correct amount of memory for the array
 You need speed when iterating through all the elements in sequence.
 Memory is a concern. Filled arrays take up less memory than linked lists. Each
element in the array is just the data. Each linked list node requires the data as well
as one (or more) pointers to the other elements in the linked list.

Binary trees? Best for:


 Binary Search Tree - Used in many search applications where data is constantly
entering/leaving, such as the map and set objects in many languages' libraries.
 Heaps - Used in implementing efficient priority-queues, which in turn are used for
scheduling processes in many operating systems, Quality-of-Service in routers, and
A* (path-finding algorithm used in AI applications, including robotics and video
games). Also used in heap-sort.
 GGM Trees - Used in cryptographic applications to generate a tree of pseudo-
random numbers.
 Syntax Tree - Constructed by compilers and (implicitly) calculators to parse
expressions.
Topic 6: Resource Management
Topic 6.1.1: Identify the resources that need to be managed within
a computer system
Primary Memory (RAM)
What it does:
 Place where all data/programs currently being processed are kept
Common capacities:
 Gigabytes (GB): 1/2/4/8/16
Effect on system if too limited:
 If too little physical memory exists, the system will need to use secondary storage,
which is much slower, by means of virtual memory.
 If virtual memory cannot be created or is insufficient, the program/data simply
cannot be loaded.
 It influences how many processes can be done simultaneously.

Secondary Storage (HDD/SSD/Optical)


What it does:
 Place were data/program can be stored if powered is lost (RAM is volatile).
Common capacities:
 Gigabytes (GB) / Terabyte (TB):
 HDD: 500GB / 1TB / 2TB
 SDD: 256GB / 512GB
 Optical: CD 650MB / DVD 4.7GB
Effect on system if too limited:
 No place to ‘save’ work – so data might be lost
 Can also prevent the OS from using storage as virtual memory if RAM fills up
 Limits how much data can be kept

Processor: Speed
What it does:
 Processor does all calculations in a computer system.
 Speed is measurement of how many calculations can be done per second (1Ghz = 1
billion calculations per second)
Common capacities:
 Gigahertz (GHz): 1/1.2/2/2.4/3.2
Effect on system if too limited:
 Processor will take longer to perform tasks

Bandwidth (network transmissions)


What it does:
 Measurement of how much data can be sent at same time in a certain time frame
(also called bitrate)
Common capacities:
 Measured in bits per second (bps): Broadband = 16-100Mbps; LAN = up to 1Gbps
(note: 1 Gbps = 1/8 GBps)
Effect on system if too limited:
 Limiting the bandwidth means data will take longer to move between two points.
 It affects how long it takes before data can be processed in its entirety.

Screen resolution
What it does:
 Measurement of number of pixels in height x width of display
Common capacities:
 1024×768 (XGA)
 1366×768 (HD 720p)
 1920x1080 (HD 1080p)
 4096x2304 (4K)
Effect on system if too limited:
 If resolution is too limited, the number of pixels that can be displayed is less – display
might be pixelated (blocky)
 Lower resolutions = smaller file size but poorer quality images

Sound processor
What it does:
 Sound reproduction is done by a separate processor, freeing up the CPU to do other
calculations.
 Can also contain a bank of ‘sampled’ sounds to reproduce better quality music/audio
Common capacities:
 Home theatre systems
 Cinemas
Effect on system if too limited:
 CPU is taxed with having to processes sounds, slows down system overall.
 Overall quality is not as high as in a system with a dedicated sound processor

Graphics processor (GPU)


What it does:
 Does complex graphic processing (like 3D rendering)
Commonly seen as:
 Nvidia GeForce graphics card
 AMD Radeon graphics card
Effect on system if too limited:
 If CPU has to do graphics processing, it will take longer or be limited.

Cache (physical cache)


What it does:
 Contains the instruction/data the CPU is likely to request next from RAM – it
massively speeds up processing as the CPU does not have to ‘wait’ for instructions to
arrive from RAM.
Commonly capacities:
 Megabytes (MB): 1 to 128
Effect on system if too limited:
 CPU will have to ‘wait’ for instructions/data to be fetched from RAM – slowing down
system. User experiences ‘sluggish’ system.

Network connectivity (NIC/WNIC/Bluetooth)


What it does:
 Each network card connects to a particular type of network media (cable/wireless
signal)
Commonly found as:
 NIC = LAN/ethernet cables
 WNIC = Wi-Fi signals
 Bluetooth = Bluetooth signals
 3G radio = cellular signals
Effect on system if limited:
 Limited connection types limit the way data can be sent or received in a system.
 Speed can also be a factor.

Topic 6.1.2: Evaluate the resources available in a variety of


computer systems
Mainframes
Processor: Thousands of cores
Primary memory: Vast amounts
Secondary memory: Vast amounts
Common use:
 Used in large companies
 Used for weather/financial models and predictions
 Used to ‘virtualize’ smaller computers
 Main players: CRAY/IBM

Server & Server farms


Processor: Many high spec PCs running in parallel (3-4GHz)
Primary memory: Big capacity (32GB+ per machine)
Secondary memory: Terabyte per machine
Common use:
 Used to ‘serve’ networks
 Used as data centres for ‘cloud storage’
 Size varies according to use

PCs (Desktop)
Processor: Single processor (multiple cores) 1-4 GHz
Primary memory: 2-16 GB
Secondary memory: 256 GB to 2 TB
Common use:
 Used in companies/schools (where portability is not needed)
 Can be expanded by adding expansion cards (graphics cards)
 Used to be the most common type of personal computer

Sub-laptops (netbooks)
Processor: Single/multiple core (1-2 GHz)
Primary memory: 1-2 GB
Secondary memory: Normally SSD – 16- 128 GB
Common use:
 Fuelled by ‘netbook boom’ of early 2000s (before tablets)
 Runs stripped down OS (Linux, Chrome OS)
 Portability and battery life are key features

Cell phones/mobiles
Processor: Single/Multicore
Primary memory: 1-3 GB
Secondary memory: Usually limited, but can be upgraded (MicroSD card)
Common use:
 Most common personal computing device in the world
 Getting more capable, rivalling PCs/laptops
 Biggest constraint is screen size and input options (lack of physical keyboard)

Tablets
Processor: Single/Multicore
Primary memory: 1-4 GB
Secondary memory: Usually limited, but can be upgraded (MicroSD card)
Common use:
 Very common for media consumption
 Getting more capable, rivalling PCs/laptops
 Biggest constraint is lack of physical keyboard

PDAs (Personal Digital Assistants)


Processor: Single core (<1GHz)
Primary memory: Limited (<500MB)
Secondary memory: Limited (<128MB)
Common use:
 Not used that much any more
 Used for calendars/emails
 Was overtaken by smartphones and mobiles in early 2000s

Digital Camera
Processor: Single core
Primary memory: Limited
Secondary memory: Expandable through use of memory cards (SD/Compact flash/Memory
Stick)
Common use:
 For higher end photography
 Most digital cameras now integrated in mobile phones/laptops/tablets

What would the consequence be if you had to limit…


 Primary memory?
 Secondary storage?
 CPU speed?
 CPU cores?
 Connectivity?
Topic 6.1.4: Describe the possible problems resulting from the
limitations in the resources in a computer system
What is the consequence to the user?
 If the processor is too slow?
 If the processor has only one core?
 If the amount of primary memory is limited?
 If the amount of cache is limited?
 If network connectivity is limited?
 If user access is limited to a single user per device?
Specific examples in syllabus
 User time wasted if primary memory is too small or processor speed inadequate
 Multi-access and multi-programming environments should be considered as well as
single-user systems

Multi-user system
 Either many users on the same machine
 Or many users connected to the same network

Multi-programming system
 Multi-programming system = system that can have different programs (apps)
installed
 Single programming system = can only run one program/set of programs

Topic 6.1.5: Explain the role of the operating system in terms of


managing memory, peripherals and hardware interfaces
Functions of an operating system
Controls (peripheral) devices
 Through the use of drivers (specially written, individualised) ‘translation’ programs,
the other programs (and ultimately the user) can use and control peripheral devices
(like a keyboard, mouse, printer, etc.)

Managing (primary) memory


 The OS has to ensure that each process (program) runs in its own allocated memory
space.
 If programs interfere with each other’s memory space it could cause many problems
including corruption and security issues.

Virtual memory
 Virtual memory is a feature of an operating system (OS) that allows a computer to
compensate for shortages of physical memory by temporarily transferring pages of
data from random access memory (RAM) to disk storage.

Managing (secondary) storage


 The OS manages the secondary storage by providing structure and access methods
to these structures
 We often refer to this as the folder-structure but in some OSes, it is referred to as
the directory structure.
 The OS also manages the security access of these folders

Provides an interface
 User interface is used to interact with the computer to performs various tasks. User
gives commands to computer and enters the data into computer. The operating
system then translates the input/output and sends it to the correct memory
address/folder address to be processed.
 Types of Operating Systems: Based on the user interface, there are two types of
operating systems.
 Graphical User Interface Operating System (Windows)
 Command Line Operating System (Linux Terminal)

Android vs Windows Phone (GUI)


Windows vs Linux vs OSX

terminals

Time-slicing
 With a multi-user system, a time-slice is the set amount of processing time each
user gets.
 With a single-user system, a time-slice is the set amount of processing time each
program gets.
 Slices (also called threads) are alternately processed to give the illusion of many
tasks happening at once.

Interrupt handling
 An interrupt handler is a function in of the OS or a device driver, whose execution is
triggered by the reception of an interrupt.
 In general, interrupts are used to handle high-priority conditions that require the
interruption of the current code the processor is executing.
 For example, pressing a key on a keyboard, or moving the mouse, triggers interrupts that call
interrupt handlers which read the key, or the mouse's position, and copy the associated
information into the computer's memory.

Topic 6.1.7: Outline OS resource management techniques:


scheduling, policies, multitasking, virtual memory, paging,
interrupt, polling
Scheduling
 Scheduling is the method by which work is assigned to resources that complete the
work.
 The work could be processes which are in turn scheduled onto hardware resources
such as processors, network links or expansion cards.
 The algorithm used may be as simple as round-robin in which each process is given
equal time (for instance 1 ms, usually between 1 ms and 100 ms) in a cycling list. So,
process A executes for 1 ms, then process B, then process C, then back to process A.

Policies
 The policies what is to be done while the mechanism specifies how it is to be done.
 For instance, the timer construct (limiting the time a process can use the CPU for)
thereby ensuring CPU protection is mechanism.
 On the other hand, the decision of how long the timer is set for a particular user is a
policy decision.
 The separation of mechanism and policy is important to provide flexibility to a
system.

Multitasking
 Multitasking, in an operating system, is allowing a user to perform more than one
computer task (such as the operation of an application program) at a time.
 The operating system is able to keep track of where you are in these tasks and go
from one to the other without losing information.
 Almost all of today's operating systems can do this.
 When you open your Web browser and then open Word at the same time, you are
causing the operating system to do multitasking
Virtual memory
 Virtual memory is a feature of an operating system (OS) that allows a computer to
compensate for shortages of physical memory by temporarily transferring pages of
data from random access memory (RAM) to disk storage.
 Eventually, the OS will need to retrieve the data that was moved to temporarily to disk
storage -- but remember, the only reason the OS moved pages of data from RAM to disk
storage to begin with was because it was running out of RAM

Paging
 When using virtual memory, the OS needs to retrieve the data that was moved to
temporarily to disk storage; the only reason the OS moved pages of data from RAM to disk
storage to begin with was because it was running out of RAM.
 To solve the problem, the operating system will need to move other pages to hard disk so it
has room to bring back the pages it needs right away from temporary disk storage.
 This process is known as paging or swapping and the temporary storage space on the hard
disk is called a page file or a swap file.
 Swapping, which happens so quickly that the end user doesn't know it's happening, is
carried out by the computer’s memory manager unit (MMU).
 The memory manager unit may use one of several algorithms to choose which page should
be swapped out, including Least Recently Used (LRU), Least Frequently Used (LFU) or Most
Recently Used (MRU).

Interrupt
 An interrupt is a signal to the processor emitted by hardware or software indicating
an event that needs immediate attention.
 An interrupt alerts the OS to a high-priority condition requiring the interruption of
the current code the processor is executing.
 The OS responds by suspending its current activities, saving its state, and executing a
function called an interrupt handler to deal with the event.
 This interruption is temporary, and, after the interrupt handler finishes, the
processor resumes normal activities.
 There are two types of interrupts:
 hardware interrupts
 software interrupts

Polling
 Polling is the process where the computer or controlling device waits for an external device
to check for its readiness or state, often with low-level hardware.
 For example, when a printer is connected via a parallel port, the computer waits until the
printer has received the next character.
 Alternative to polling: interrupts (signals generated by devices or processes to indicate that
they need attention)
 Although polling can be very simple, in many situations (e.g., multitasking operating
systems) it is more efficient to use interrupts because it can reduce processor usage and/or
bandwidth consumption.

For the techniques above you must know when and why they are used for your exam

Topic 6.1.8: Discuss the advantages of producing a dedicated


operating system for a device
Examples of dedicated OS
 Apple’s iOS 9 for iPhones/iPads only
 Ubuntu Kylin for Chinese users
 OS for a digital camera
 OS for satellite TV receiver box
 OS for satnav
 Different versions of Linux, particular to each case – example Raspbian for the
Raspberry Pi

Advantages
 Security: A dedicated operating system ensures a higher level of security.
 Example: Banks would require a dedicated operating system to prevent
cyber-attacks on financial transactions
 Customisability: Dedicated operating systems custom made to do a specific function
at maximum efficiency.
 Example: A ‘dumb phone’ OS
 Modify priorities: can make running some devices easier to use or better suited to
their audience. By having a custom OS, you can eliminate certain aspects of the OS
which are not needed, reducing the size of the OS, therefore reducing the amount of
secondary memory and RAM being used.
 Example: Raspbian Linux on Raspberry Pi

Topic 6.1.9: Outline how an operating system hides the complexity


of the hardware from users and applications
Abstraction leads to simplicity
 Users and applications do not see the hardware directly but view it through the OS.
 This is used to hide certain hardware details from users and applications (called
abstraction).
 Due to this abstraction, users cannot see changes in the hardware. Can be used is to
make related devices appear the same from the user’s point of view.
 For example, hard disks, floppy disks, CD-ROMs, and USB keys are all very different
media, but in many OSes, they appear the same to the user.

Drive letters
 A ‘drive letter; is a single alphabetic character A through Z that has been assigned to
a physical drive or drive partition in the computer.
 For example, a computer with a floppy drive has a drive letter of A: assigned to the
drive.
 All computers with a hard drive will
always have that default hard drive
assigned to a C: drive letter
 CD-ROM or other drive is the next
drive letter (e.g. D:) etc.

Java Virtual Machine


 A Java virtual machine (JVM interprets compiled Java binary code (called bytecode)
for a computer's processor (or "hardware platform") so that it can perform a Java
program's instructions.
 Each platform gets its own JVM so that Java code can run on any platform.
Topic 7: Control
Topic 7.1.1: Discuss a range of control systems
Control system
A control system is a device, or set of devices, that manages, commands, directs or
regulates the behaviour of other devices or systems.

Automated doors
Taxi meter
Video link: https://youtu.be/2iAgggixkO8
(explanation of GPS)

Topic 7.1.2: Outline the uses of microprocessors and sensor input in


control systems
 Microprocessor: an integrated circuit that contains all the functions of a central
processing unit of a computer
 Sensor: a device which detects or measures a physical property and records,
indicates, or otherwise responds to it.

Types of sensors
Topic 7.1.3: Evaluate different input devices for the collection of
data in specified situations
When to use what input device?
Will depend on scenario – below the most common types

Accessibility input devices (disabled)


Medical sensors

Topic 7.1.4: Explain the relationship between a sensor, the


processor and an output transducer
Basic I-P-O model
 Simplistically, sensors take analogue input and convert them to digital data.
 Digital data can then be processed by a microprocessor, producing digital output.
 Output transducers can then turn the digital data into analogue signals to power
‘real world’ devices

Analogue signals are


converted to digital
ADC (Analogue to Digital Converter) and vice versa

Sensors record analogue signals which are then converted to digital signals for processing in
the microprocessor. The processor’s digital output can then be converted to analogue
signals again (if needed).

SIDENOTE: Transducers as input


Rule of thumb:
Input = sensor (via transducer)
Output = actuator (via transducer)

Topic 7.1.5: Describe the role of feedback in a control system


What is feedback?
It is the modification or control of a process or system by its results or effects, for example
in a fridge the thermometer provides feedback to the sensor that switches the refrigeration
system on/off.
Video link: https://www.youtube.com/watch?v=5NVjIIi9fkY&feature=youtu.be
(explains feedback control in detail)

Processes that use feedback


 A missile tracking a moving target
 A heating system in a house
 A life-support system on a spacecraft
 … any situation that changes constantly that needs the system to react according to
the new input

Video link: https://youtu.be/FCdYq3AhCFc


(how self-driving cars work)

Topic 7.1.6: Discuss the social impacts and ethical considerations


associated with the use of embedded systems
What is a social issue?
 A social issue is a problem that influences a considerable number of the individuals
within a society
 Examples of social issues are:
 Crime
 Health
 Education
 Media & Propaganda
 Poverty
 Terrorism
What is an ethical issue?
 A problem or situation that requires a person or organization to choose between
alternatives that must be evaluated as right (ethical) or wrong (unethical).
 Examples of ethical issues are:
 Computer crime
 Responsibility for computer failure
 Protection of computer property, records and software
 Privacy

Tagging prisoners
Arguments for:
 Allows non-dangerous criminals to move
 Reduces number of people needed to be in prison
 Allows for tracking at all times
Arguments against:
 Loss of freedom of movement
 Could be hacked to track innocent people
 Tracking data could be sold off to make money

Surveillance
Arguments for:
 Allows for greater security
 Could be used as effective evidence in court cases
 Allows fewer people to have monitor others
Arguments against:
 Loss of privacy
 Could be hacked and used for unintended purposes
 Could be used to spy on people (drones)

Topic 7.1.7: Compare a centrally controlled system with a


distributed system
Definitions:
 Centralised system: is computing done at a central location, using terminals that are
attached to a central computer. The computer itself may control all the peripherals
directly (if they are physically connected to the central computer), or they may be
attached via a terminal
 Distributed system: is a system in which components located on networked
computers communicate and coordinate their actions by passing messages. The
components interact with each other in order to achieve a common goal.

Centralised system
Distributed system

Advantages
Advantages of centrally controlled system:
 Easier to administrate
 More control
Advantages of distributed systems:
 Quicker access
 Shared load
 Response more specific to environment

Disadvantages
Disadvantages of centrally controlled system:
 If the main sensor/controller fails, the whole system fails
disadvantages of distributed systems:
 Much more expensive to have multiple controllers/sensors
 Much more complex than a centralised system
Topic 7.1.8: Outline the role of autonomous agents acting within a
larger system
Definition: Autonomous agent
Intelligent agents are software entities that carry out some set of operations on behalf of a
user or another program with some degree of independence or autonomy, and in so doing,
employ some knowledge or representation of the user's goals or desires (IBM definition)

Features of Autonomous agent


A. Autonomy
Agents activate alone for a task and are note invoked for a task. Agents can select
the task themselves (based on priorities or goal-directed search) without human
intervention.

B. Reactive behaviour
Agent senses the environment in which it is and decides what to do, reacting on its
perceptions

C. Concurrency/sociality
Agents can interact with other agents through communication, in different modes:
coordination, cooperation and competition.

D. Persistence
The code describing an agent runs continuously like a process, and it not executed
on demand.
Video link: https://youtu.be/JIz2L4tn5kM
(video playlist that explains autonomous agents in great detail)

Option D: OOP
Topic D.1.1: Outline the general nature of an object
Object
 It has two components:
 data (also called states) which can be variables or data structures likes
arrays/lists
 actions (also called behaviours) which can be functions/procedures (methods in
Java)

Object vs Class
 Object – refers to a particular instance of a class, where the object can be a
combination of variables or data structures (called states) and functions, procedures
or methods (called behaviours)
 Class – an extensible program-code-template for creating objects, providing initial
values for states (variables) and implementations of behaviours
(functions/procedures/methods)

Example of a class as object template:

Steps in object creation:


 A class provides the blueprints for objects.
 An object is created from a class.
 In Java, the new key word is used to create new objects.
 There are three steps when creating an object from a class:
 Declaration: A variable declaration with a variable name with an object type.
 Instantiation: The 'new' key word is used to create the object.
 Initialization: The 'new' keyword is followed by a call to a constructor. This
call initializes the new object
Example of object being instantiated

Java’s implementation of OOP


 Rather confusingly, Java called both classes and objects a “class”
 To make matters “even more interesting” we can differentiate between different
types of Java classes by what they do.
 For example, in every Java project, there can be multiple object-classes (templates
for making new objects that will essentially contain data), but only ONE class that
contains the ‘main’ method.
 The class that contains the ‘main’ method is referred to as the driver class (and
there can be only ONE in each project)

Typical Java project structure

Driver vs Providers
Topic D.1.2: Distinguish between an object (definition, template or
class) and instantiation
Array of Objects

When adding objects to an array, you either instantiate the object and THEN add it to the
array (at a specific slot); OR you can instantiate the object directly into a particular slot of
the array.

Linked List of Objects


When adding objects to a linked list, it is customary to first instantiate a temporary object
containing all the values you need, before adding it onto the linked list.

Instantiating objects uses RAM


Every time a new object is instantiated from a base class,
a space equivalent to the WHOLE object is reserved in
RAM.

Depending on the number of states in the object, a lot of


RAM can be wasted / reserved but not used.

Therefore, it is best to use the most memory efficient


variable types.
Variable in RAM vs. Object in RAM

Object Variable
The more RAM being used by a program, the more processor time is needed to
read/write/process the data. The more processor cycles being used, the more ‘sluggish’ the
computer would be to the user.

Topic D.1.3: Construct unified modelling language (UML) diagrams


to represent object designs.
Class Diagrams
 Classes (object), variables (state) & methods (behaviours)

Example:
Associations (shown with lines/arrows)
 As projects contain multiple classes (driver & providers), it is important to show the
relationship between two objects.

 This is a basic example where class A1 (driver) has a main method in which an object
of class B1 (provider) is instantiated.
Topic D.1.4: Interpret UML diagrams
UML Class diagram = Java code
Topic D.1.6: Describe the relationship between objects for a given
problem
Four types of relationships
 Dependency – “uses”

 Aggregation – “has a”

 Inheritance – “is a”

 Association – “uses

Comparison
Generally speaking, Association is the most generic relationship. The other three are more
specific and are used in particular situations.

Key concepts: Dependency


 We use a dependency relationship to show when one element depends on another
element
 It points from the independent entity to the dependent entity in the system.
 This is a unidirectional kind of relationship between two objects.

Example:
 In the figure below, an object of Player class is dependent (or “uses”) an object of
Bat class.

Key points: Association


 Association is relation between two separate classes which establishes through their
Objects.
 Association can be one-to-one, one-to-many, many-to-one, many-to-many.
 In Object-Oriented programming, an Object communicates to other Object to use
functionality and services provided by that object.
 Aggregation is a particular type of Association.

Example:

Association vs Dependency
 Association and dependency are often confused in their usage.
 There are a large number of dependencies in a system.
 We only represent the ones which are essential to convey for understanding the
system.
 We need to understand that every association implies a dependency itself.
 However, we prefer not to draw it separately

Key points: Aggregation


It is a special form of Association where:
 It represents “has a” relationship.
 It is a unidirectional association i.e. a one-way relationship. For example,
department can have students but vice versa is not possible and thus unidirectional
in nature.
 In Aggregation, both the entries can survive individually which means ending one
entity will not affect the other entity

Key points: Inheritance


 Inheritance is the mechanism by which one class is allowed to inherit the features
(states and behaviours) of another class.
 Super Class: The class whose features are inherited is known as super class (or a
base class or a parent class).
 Sub Class: The class that inherits the other class is known as sub class (or a derived
class, extended class, or child class). The subclass can add its own states and
behaviours in addition to the superclass states and behaviours.

Topic D.1.7: Outline the need to reduce dependencies between


objects in a given problem
Dependency? Why so bad?
 It increases maintenance overheads
 Maintenance overheads refer to the changes that need to be made to the entire
system if you make a change to a component.
 If you change one thing it could have an impact on other parts of the program, so
time needs to be spent fixing these issues.

Topic D.1.9: Explain the need for different data types to represent
data items
Four key data types
 integer (Java: int), e.g. 3, -4, 999, 23
 real (Java: double), e.g. -3.1415, 9.999
 String (Java: String) e.g. “strange”
 Boolean (Java: Boolean) e.g. true / false

Why do we need different types?


 Data is stored as a combination of binary values in the computer.
 Data types are used to store different kinds of data.
 They are needed because they specify to the computer how to interpret the binary
values in the storage

Is one type better than another?


 Each data type (in Java) takes up a different amount of RAM:
 Boolean = 1 byte
 Integer = 4 bytes
 Real = 8 bytes
 String = … a lot!
 multiply the number of characters of the String by two;
 add 38;
 if the result is not a multiple of 8, round up to the next multiple of 8;
 E.g. “I love cheese” = 12-character x 2 = 24 + 38 = 62  64 bytes

Topic D.1.10: Describe how data items can be passed to and from
actions as parameters
Parameters
 Parameters allow us to pass information or instructions into functions and
procedures.
 Parameters are the names of the information that we want to use in a function or
procedure.
 The values passed in are called arguments.

Example:
 We can create a procedure that draws a square - but for it to be useful we need to
also be able to specify how large it should be.
 The following example creates a procedure called 'square'.
 In the line where we define the name for this procedure, we have included a
variable called 'distance' inside the brackets.
 Distance is a parameter - it allows us to pass a value into the procedure for it to use.
Parameter vs Argument

Distance is a parameter - it allows us to pass a value into the procedure for it to use.
Running the following code would create a square of size 50 for each side:

The 50 here is called the argument - because it is a value passed in.

Topic D.2.1 Define the term: encapsulation


Definition: Encapsulation
 Encapsulation is the technique of making the states in a class private and providing
access to those states via public behaviours (methods).
 In short: data and actions are limited to the object in which they are created

Encapsulation = Data Hiding


 If a state is declared private, it cannot be accessed by any method outside the class,
thereby hiding the states (and their contents) within the class.
 For this reason, encapsulation is also referred to as data hiding.

Side note: Java keyword this


Within a method/constructor, this is a reference to the current object (the object whose
method/constructor is being called)

Topic D.2.2: Define the term: inheritance


 Process whereby one object inherits the properties (states and behaviours) of
another object (pairs called super/sub or parent/child classes)
 The Java keyword that implies inheritance is extends

Topic D.2.6: Explain the advantages of polymorphism


Reminder: Method signatures

Reminder: Parts of a method


Definition: Polymorphism
 Polymorphism means many forms; specifically, in Java it means that two methods can have
the same name but different contents/functions.
 In short: methods (behaviours) have the same name but different parameter lists and
processes

Overloading
 Overloading allows different methods to have same name, but different signatures
where signature can differ by number of input parameters or type of input
parameters or both.

Overriding
 Overriding allows a sub class to provide a specific implementation of a method that
is already provided by one of its super classes.
 When a method in a subclass has the same name, same parameters or signature
and same return type as a method in its super-class, then the method in the subclass
is said to override the method in the super-class.

Overloading vs Overriding
 Overloading is about same function have different signatures (usually in the same
class).
 Overriding is about same function, same signature but different classes connected
through inheritance
Overloading Example: Java
Overriding Example: Java

Topic D.2.7: Describe the advantages of libraries of objects


Biggest advantage: Time saving!
 Sorting algorithms do not have to be re-invented
 Complex algorithms and processes can be reused

5 Most used Java libraries


 #1: JUnit (imported by 64% of top Java projects)
 JUnit is a unit testing framework for Java programs
 #2: SLF4J (imported by 22% of top Java projects)
 SLF4J is a simple facade for logging systems allowing the end-user to plug-in
the desired logging system
 #3: Log4j (imported by 16.76% of top Java projects)
 Log4j is a tool to help the programmer output log statements to a variety of
output targets
 #4: Google Guava (imported by 15.6% of top Java projects)
 Google Guava is a set of common libraries for Java, mainly developed by
Google engineers
 #5: apache-commons (imported by 12.63% of top Java projects)
 Commons Proper is dedicated to one principal goal: creating and maintaining
reusable Java components
Topic D.2.8: Describe the disadvantages of OOP
Disadvantages of OOP
A. Increased complexity
 OOP typically involve more lines of code than procedural programs.
 OOP are typically slower than procedure-based programs, as they typically
require more instructions to be executed.
B. Unsuited to particular problems
 There are problems that lend themselves well to functional programming
style, logic-programming style, or procedure-based programming style, and
applying object-oriented programming in those situations will not result in
efficient programs.
 These problems tend to small and involving only one data source.

Topic D.2.9: Discuss the use of programming teams


Team vs. Individuals
A. Speed of completion
 Because tasks can be completed concurrently, the overall project can be
completed in a shorter time
B. Information hiding to reduce module dependencies
 Because developers only need to know the name and required parameters
to use a behaviour, they can use code without needing to understand how it
functions.
 There is also a security benefit to coders not having access to the actual data
items themselves.
C. Expertise in a narrow field (e.g. testing, documentation)
 Assembling a complex project needs many different skills.
 By allowing each part to be programmed by an expert in that field, the quality
of the final product is significantly higher than expecting one person to be a
‘jack-of-all-trades’.

Topic D.2.10: Explain the advantages of modularity in program


development
Advantages
A. Easier debugging and testing
 By having smaller modules to test, it is easier to find and fix bugs
 The number of tests that have to be run to confirm that module is fully
operational is also drastically reduced according to the number of functions
in a particular module
B. Speedier completion
 By breaking the project into smaller modules, you could save time by finding
modules that already exist in libraries that do the function you are looking
for.
 By splitting the task into different modules, each module can be worked on
concurrently (except for particular circumstances) thus leading to a speedier
completion of the overall project
C. Code blocks reusable
 Some problems/functions are very common and possibly occur in multiple
different programs (for example the need to make a text box or a clickable
button to start a task)
 By reusing blocks of code, the development time is slashed, and the project is
completed sooner.

WARNING: This part of D relates closely to the JETS booklet (link below). You need to
know all the conventions in this booklet although you will not get a copy in the exam
http://ib.compscihub.net/wp-content/uploads/2015/04/JETS-Java-rules.pdf

Topic D.3.1: Define the terms: class, identifier, primitive, instance


variable, parameter variable, local variable
Definition: Class
Class – an extensible program-code-template for creating objects, providing initial values
for states (variables) and implementations of behaviours (functions/procedures/methods)
Example:

Definition: identifier
 An identifier is a named pointer that explicitly identifies an object, class, method, or
variable.
 It allows a programmer to refer to the item from other places in the program.
 To make the most out of the identifiers you choose make them meaningful and follow the
standard Java naming conventions.

Example:

Definition: primitive
 Primitive types are the most basic data types available within the Java language.
 There are 8: boolean, byte, char, short, int, long, float and double.
 These types serve as the building blocks of data manipulation in Java.
 Such types serve only one purpose: to contain pure, simple values of a particular
kind.

Definition: variable
 A variable provides us with named storage location for a value that a program can
manipulate.
 They must be declared before they can be used and can only contain data of a
particular type (in Java).

Definition: instance variable


 Instance variables are non-static variables and are declared in a class outside any
method, constructor or block.
 As instance variables are declared in a class, these variables are created when an
object of the class is created and destroyed when the object is destroyed.
 Unlike local variables, we may use access modifiers (public/private/protected) for
instance variables.
 If we do not specify any access modifier then the default access modifier of the class
will be used.

Example:

Definition: parameter variable


 Parameters allow us to pass information or instructions into functions and
procedures.
 Parameters are the names of the information that we want to use in a function or
procedure.
 The values passed in are called arguments.

Example:
Definition: local variable
 A variable defined within a block or method or constructor is called local variable.
 These variable are created when the block is entered, or the function is called and
destroyed after exiting from the block or when the call returns from the function.
 The scope of these variables exists only within the block in which the variable is
declared; we can access these variables only within that block.

Example:

Topic D.3.2:
Define the terms: method, accessor, mutator, constructor,
signature, return value
Definition: method
A method is a set of code which is referred to by name and can be called (invoked) at any
point in a program simply by utilizing the method's name.
A method can be described as a subprogram that acts on data and often returns a value.
Each method has its own name (identifier).

Example:

Definition: accessor
An accessor is a type of method used in Java OO programming that which returns the value
of a private instance (class) variable.
It is also known as a getter method.
Example:

Definition: mutator
A mutator method is a method used to control changes to an encapsulated instance (class)
variable/state.
They are also widely known as setter methods.

Example:
Definition: constructor
A constructor method is an instance method (defined inside a class) that is invoked when an object
of that class is created (by using the new keyword)
Object creation rule in Java: When an object is created, one of the constructor method in the class
must be invoked (to initialize the instance variables in the object)

Example:

Difference: Constructor vs Method


Definition: signature
 A method signature is part of the method declaration. It is the combination of the
method name and the parameter list.
 The reason for the emphasis on just the method name and parameter list is because
of overloading methods that have the same name but accept different parameters.

Example:

Definition: return value


 return is a reserved keyword in Java; it cannot be used as an identifier.
 It is used to exit from a method, with or without a value.
 return can be used with methods in two ways:
A. Methods returning a value: For methods that define a return type, return
statement must be immediately followed by return value.
B. Methods not returning a value: For methods that don’t return a value,
return statement can be skipped.

Example: return-type method

Example: non return-type method


Procedures vs Functions
 Methods are also known as Procedures or Functions:
 Procedures: don't return any value (void).
 Functions: return a value
 No method can return more than one value at a time in Java.

Topic D.3.3: Define the terms: private, protected, public, extends,


static
Access modifiers
 Access level modifiers determine whether other classes can use a particular field or
invoke a particular method.
 A class may be declared with the modifier public, in which case that class is visible to
all classes everywhere.
 If a class has no modifier (i.e. the default position) it is visible only within its own
package.
 There are three Java access modifiers:
 public
 protected
 private

Definition: public
 A class, method, field or constructor that is declared public can be accessed from
any other class.
 Therefore, fields, methods, blocks declared inside a public class can be accessed
from any class belonging to the Java Universe.
 Because of class inheritance, all public methods and variables of a class are inherited
by its subclasses.
Example:

Definition: private
 Methods, variables, and constructors that are declared private can only be accessed
within the declared class itself.
 private is the most restrictive access level.
 Classes cannot be private, but methods and variables can.
 Variables that are declared private can be accessed outside the class, if public getter
methods are present in the class.
 Using the private modifier is the main way that an object encapsulates itself and
hides data from the outside world.

Definition: protected
 Variables, methods, and constructors, which are declared protected in a superclass
can be accessed only by the subclasses in any class within the package of the
protected members' class.
 protected cannot be applied to classes.
 protected access gives the subclass a chance to use the helper method or variable,
while preventing a nonrelated class from trying to use it.
Example:

Definition: extends
extends is the keyword used in a sub class to inherit the properties of a super class

Definition: static
static is a non-access modifier in Java which is applicable for the following:
 blocks
 variables
 methods
 nested classes
To create a static member (variable, method, etc.), precede its declaration with the keyword
static.
static variables are used for any property that is common to all objects of that type

Example:

More on static
 Declares a static member of a class that will be the same for all members.
 The static keyword in Java means that the variable or function is shared between all
instances of that class as it belongs to the type, not the actual objects themselves.
 So, if you have a variable: private static int i = 0; and you increment it ( i++ ) in one
instance, the change will be reflected in all instances.

Summary of access modifiers

 The first data column indicates whether the class itself has access to the member
defined by the access level - a class always has access to its own members.
 The second column indicates whether classes in the same package as the class have
access to the member.
 The third column indicates whether subclasses of the class declared outside this
package have access to the member.
 The fourth column indicates whether all classes have access to the member.
Arrays
Practice reading from an array, moving data to/from the array, printing out selections from
it… etc.

Topic D.3.9: Discuss the features of modern programming


languages that enable internationalization
Internationalisation
 Use of common character sets among many platforms and languages, like UNICODE
 Platform independent high-level languages (like Java) enable code to run on many
platforms

Topic D.3.10: Discuss the ethical and moral obligations of


programmers
What is an ethical issue?
 A problem or situation that requires a person or organization to choose between
alternatives that must be evaluated as right (ethical) or wrong (unethical).
 Examples of ethical issues are:
 Computer crime
 Responsibility for computer failure
 Protection of computer property, records and software
 Privacy

What is a moral issue?


 A problem or is presented as any issue with the potential to help or harm anyone,
including oneself.
 Examples of moral issues are:
 Death
 Hurt
 Disadvantaging someone/a group
 Freedom/restriction
 Social constructs (marriage/divorce)

Open Source movement


 The open-source software movement is a movement that supports the use of open-
source licenses for some or all software.
 The open-source movement was started to spread the concept/idea of open-source
software.
 Programmers who support the open-source movement philosophy contribute to the
open-source community by voluntarily writing and exchanging programming code
for software development.

Examples of Open Source software


 Firefox
 MySQL
 OpenOffice
 Libre Office
 Android

Possible topics for discussion


 Adequate testing of products to prevent possibilities of commercial or other damage
 Acknowledging the work of other programmers (to avoid plagiarism)
 Open Source movement
 Robotics and artificial intelligence

Topic D.4.1: Define the term: recursion


Recursion
 Recursion is a process in which a function calls itself as a subroutine.
 This allows the function to be repeated
several times, since it calls itself during
its execution.

Factorial (n!)

Possible answer
 Recursive versions of many routines may execute a bit more slowly than the
iterative equivalent because of the added overhead of the additional function calls.
 Many recursive calls to a method could cause a stack overrun. Because storage for
parameters and local variables, it is possible that the stack could be exhausted. If this
occurs, the java run-time system will cause an exception. However, you probably will
not have to worry about this unless a recursive routine runs wild.
 The main advantage to recursive methods is that they can be used to create clearer
and simpler versions of several algorithms than can their iterative relatives. For
example, the Quicksort sorting algorithm is quite difficult to implement in an
iterative way.

D.4.3: Construct algorithms that use recursion


In the exam you will only have to deal with methods that return a single value and contains
only 1 or 2 recursive calls. If you look at the earlier example, think about how it would work
if counter starts with a value of 4.

D.4.4: Trace Recursive Algorithms


D.4.5: Define the term object reference
A reference to the object in memory, in Java it is shown by the use of the dot notation to
access fields and methods e.g.

Person p = new Person()


;
p.setName(“Fred”);

p is the object reference. You cannot call the method without it.

A reference to the object in memory, in Java it is shown by the use of the dot notation to
access fields and methods e.g. Person p = new Person(); p.setName(“Fred”); p is the object
reference. You cannot call the method without it.

D.4.7: Identify the features of the ADT list

A list is a generic ADT and usually comes with the following basic methods:
add, size, get, isEmpty and remove
Add adds an element to the list, size returns the number of elements in the list, get returns
an element from the list but the element remains in the list, remove removes the element
from the list for ever. IsEmpty returns true if there are no elements in the list and false if the
list contains elements.
Lists can be indexed to allow the program to add and remove elements from specified
positions in the list.

D.4.8: Describe applications of Lists


Lists can be implemented as Stacks or Queues.
Stacks can be visualised liked a stack of trays of plates. The first element added to the stack
sits at the bottom. The last one added is the first one to be removed. LIFO(Last In First Out).
The add method for a stack is usually called ‘push’ and the remove method is usually called
‘pop’. Queues act like a queue of people. The elements are added to the end of the queue
and removed from the front. FIFO(First In First Out). The add method for a Queue is usually
called Enqueue and the remove method is usually called Dequeue.

D.4.9 & D.4.10: Construct algorithms using a static implementation


of a list and object references
In the exam you will be expected to be able to write, explain and trace java code for a linked
list written within a class and from the calling program. You need to be familiar with the
methods: add(head and tail i.e. to the front and back of the list), insert(in order), delete,
list(print), isEmpty, isFull.

D.4.11 & D.4.12: Construct algorithms using the standard library


collections ArrayList and LinkedList
You need to be familiar with the methods available, not how the methods are coded
internally. In exam questions, definitions of ArrayList and LinkedList methods will be given
where necessary. You need to be able to call them correctly.

D.4.14: Outline the features of ADTS stack, queue and binary tree
Refer to topic 5: Abstract data structures

D.4.15: Explain the importance of style and naming conventions in


code
When working on code, especially in a team it is very important to code in a certain way, to
follow coding conventions. These are things like starting class names with a capital letter
and objects with a little letter, using meaningful names for the fields and variables you are
using, indenting the code, inline annotation etc.

The main point is that code is read more often than it is written. If everyone codes in the
same way it becomes more easily read. This cuts down time on maintenance and reduces
the chance of error through misinterpretation. This in turn saves time, money and effort.

This point is even more important when working remotely i.e. away from your colleagues.
You might be working across the country or across the world. If everyone follows the
conventions, code is easy to read and update.

You might also like