Final Notes Form 5
Final Notes Form 5
ii
© GBHS Dschang 2021-2022
FORM 5
5. Database models ................................................................................................................................... 24
A. Entity Relationship Model (ER): ................................................................................................... 24
B. Relational Model ........................................................................................................................... 26
C. Other type of database models....................................................................................................... 27
6. Database Management Systems (DBMS) ............................................................................................. 27
A. Features of a DBMS ...................................................................................................................... 28
B. The main objectives of DBMS: ..................................................................................................... 28
7. Database languages ............................................................................................................................... 28
CHAPTER 9: PROJECT MANAGEMENT ................................................................................................... 29
Introduction .................................................................................................................................................. 29
1. Definitions............................................................................................................................................. 30
2. Characteristics and resources needed for a project ............................................................................... 30
3. Concept and/or Notion of Project Planning .......................................................................................... 30
4. Duties and Qualities of a Project Manager ........................................................................................... 31
5. Project Management Life Cycle (PMLC) ............................................................................................. 32
a. Project conception and Initiation: ..................................................................................................... 32
b. Planning and design: ...................................................................................................................... 32
c. Execution and construction: .............................................................................................................. 32
d. Monitoring and Controlling: .......................................................................................................... 32
e. Completion and finish point: ............................................................................................................. 33
6. Project Management Tools ................................................................................................................... 33
a. PERT chart ........................................................................................................................................ 33
b. Gantt chart ..................................................................................................................................... 38
7. Difference between PERT chart and Gantt chart .................................................................................. 39
8. Report writing ....................................................................................................................................... 40
MODULE III: SOFWARE DEVELOPMENT, PROJECTS .................................................................... 40
CHAPTER 9: ALGORITHMS AND PROGRAMMING LANGUAGES ..................................................... 40
Lesson 1: Algorithms ....................................................................................................................................... 40
I. Algorithmic concepts ............................................................................................................................ 40
1. Definition of terms......................................................................................................................... 40
2. Steps to resolve a problem (Computer problem solving approach) .............................................. 41
3. Characteristics of Algorithms ........................................................................................................ 41
A good algorithm should have the following characteristics: ................................................................. 41
3. Effectiveness of a solution ............................................................................................................. 42
II. Representing algorithms .................................................................................................................... 42
iii
© GBHS Dschang 2021-2022
FORM 5
1. Structured English ......................................................................................................................... 42
2. Flow charts .................................................................................................................................... 42
3. Pseudo code ................................................................................................................................... 43
b. Variables, Constants and Literals .................................................................................................. 44
c. Basic Instructions .............................................................................................................................. 45
d. Basic Algorithmic Control Structures ........................................................................................... 46
Lesson 2: Programming ................................................................................................................................... 49
Introduction .................................................................................................................................................. 49
1. Characteristics of a good Computer Program and software ................................................................. 49
2. Programming Languages ...................................................................................................................... 49
a. Low Level Languages ....................................................................................................................... 50
b. High Level Languages ................................................................................................................... 50
3. Language Translators ............................................................................................................................ 50
a. Assembler .......................................................................................................................................... 50
b. Compiler ........................................................................................................................................ 51
c. Interpreter .......................................................................................................................................... 51
Advantages of an Interpreter ......................................................................................................... 51
4. Program Errors and Correction ............................................................................................................. 51
6. Key Words and Operators ..................................................................................................................... 52
a. Key Words......................................................................................................................................... 52
b. Operators ....................................................................................................................................... 52
7. Programming paradigms ....................................................................................................................... 52
8. Software development tools .................................................................................................................. 52
9. Stages in the program development cycle ............................................................................................ 53
Lesson 3: Introduction to C Programming Language ...................................................................................... 53
Introduction .................................................................................................................................................. 53
1. Why to use C? ....................................................................................................................................... 53
2. Software needed for a C program ......................................................................................................... 53
3. Reserved/Key words in C ..................................................................................................................... 53
4. Basic C code ......................................................................................................................................... 54
5. Using Variables ..................................................................................................................................... 55
6. C input and output................................................................................................................................. 55
7. Learn the basic operators in C .............................................................................................................. 57
8. Using Conditional Statements............................................................................................................... 59
9. Loops..................................................................................................................................................... 60
iv
© GBHS Dschang 2021-2022
FORM 5
CHAPTER: WEB AUTORING ...................................................................................................................... 61
Lesson 1: Hypertext Markup Language (HTML) ............................................................................................ 61
1. HTML overview ................................................................................................................................... 61
2. Basic HTML document......................................................................................................................... 62
3. HTML Tags .......................................................................................................................................... 62
4. General HTML Document Structure .................................................................................................... 63
5. HTML Elements ................................................................................................................................... 63
6. HTML Tag vs. Element ........................................................................................................................ 63
7. HTML Attributes .................................................................................................................................. 64
8. Core Attributes ...................................................................................................................................... 65
9. HTML Lines ......................................................................................................................................... 65
10. HTML Comments ............................................................................................................................. 65
11. HTML ―White Space‖ ....................................................................................................................... 65
12. HTML Headings ............................................................................................................................... 65
13. HTML Paragraphs ............................................................................................................................. 65
14. HTML Formatting ............................................................................................................................. 66
15. HTML Links ..................................................................................................................................... 66
16. HTML Link Syntax ........................................................................................................................... 66
17. HTML Head ...................................................................................................................................... 67
18. HTML Images ................................................................................................................................... 67
19. HTML Tables .................................................................................................................................... 67
20. HTML Lists ....................................................................................................................................... 68
CHAPTER: DATA COMMUNICATION ..................................................................................................... 69
Introduction .................................................................................................................................................. 69
1. Communication Channels ..................................................................................................................... 69
a. Simplex Mode ................................................................................................................................... 69
b. Half duplex Mode .......................................................................................................................... 70
c. Full duplex Mode .............................................................................................................................. 70
2. Data transmission modes ...................................................................................................................... 70
a. Digital vs. Analogue transmission .................................................................................................... 70
b. Asynchronous vs. Synchronous Transmission .............................................................................. 70
c. Serial vs. Parallel transmission.......................................................................................................... 71
3. Communication media and devices ...................................................................................................... 71
a. Wired communication media and devices ........................................................................................ 71
b. Wireless communication media..................................................................................................... 71
v
© GBHS Dschang 2021-2022
FORM 5
4. Types of attacks on networks ................................................................................................................ 72
5. Network classification based on communication ................................................................................. 72
7. Network/communication protocols ....................................................................................................... 73
CHAPTER: COMPUTER NETWORK AND THE INTERNET ................................................................... 74
Lesson 1: Computer Network .......................................................................................................................... 74
Introduction .................................................................................................................................................. 74
Lesson 2: The internet (See form 3 notes). ...................................................................................................... 74
CHAPTER: CLASSIFYING COMPUTERS .................................................................................................. 75
Introduction .................................................................................................................................................. 75
1. Generation ............................................................................................................................................. 75
2. Size and performance ............................................................................................................................ 75
a. Super computers ................................................................................................................................ 76
b. Mainframe computers .................................................................................................................... 76
c. Midrange computers .......................................................................................................................... 76
d. Microcomputers ............................................................................................................................. 76
3. Base on purpose .................................................................................................................................... 76
4. Based on Data Representation .............................................................................................................. 76
CHAPTER: COMPUTER ETHICS AND LEGISLATION............................................................................ 77
I.Computer Ethics ............................................................................................................................................ 77
Introduction .................................................................................................................................................. 77
1. Fundamental principles of Ethics.......................................................................................................... 77
2. Codes of Ethics and Professional Conduct ........................................................................................... 77
a. The BCS (British Computing Society) Code of Ethics ..................................................................... 77
b. The ACM (Association for Computing Machinery) Code of Ethics............................................. 78
c. The IEEE (Institute of Electrical and Electronics Engineer) code of ethics ..................................... 79
II.Legislation .................................................................................................................................................... 79
1. The Data Protection Act........................................................................................................................ 79
2. The Computer Misuse Act .................................................................................................................... 80
3. Copyright, Design and Patent Act ........................................................................................................ 80
4. Health and Safety Act ........................................................................................................................... 80
CHAPTER: COMPUTER CRIME AND MEASURES TO COMBAT THEM ............................................. 80
Introduction .................................................................................................................................................. 80
1. Types of Computer Crimes ................................................................................................................... 81
2. Measures to Combat Computer Crimes ................................................................................................ 82
3. Computer Security ................................................................................................................................ 82
vi
© GBHS Dschang 2021-2022
FORM 5
a. Authentication ................................................................................................................................... 82
b. Encryption ..................................................................................................................................... 83
c. Firewall.............................................................................................................................................. 83
d. Intrusion Detection ........................................................................................................................ 83
e. Digital Signatures .............................................................................................................................. 84
CHAPTER: SOCIAL AND ECONOMIC IMPACTS OF COMPUTERS ..................................................... 84
Introduction .................................................................................................................................................. 84
1. Positive impacts .................................................................................................................................... 85
2. Negative impacts ................................................................................................................................... 85
IMPACTS OF SOCIAL NETWORKS ........................................................................................................... 86
TYPES OF COMPUTING ENVIRONMENTS .............................................................................................. 87
PRACTICAL: WORD PROCESSING, SPREADSHEET, POWERPOINT PRESENTATION, and
PUBLISHER .................................................................................................................................................... 88
I. WORD PROCESSOR APPLICATIONS the case of MICROSOFT WORD ...................................... 88
II. SPREADSHEET APPLICATIONS the case of MICROSOFT EXCEL .......................................... 89
SBA POJECTS ............................................................................................................................................... 94
GCE PAST QUESTIONS……………………………………………………………………………..…..106
vii
© GBHS Dschang 2021-2022
FORM 5
COMPUTER SCIENCE 2021-2022
1. Definition
An information system is a set of integrated elements or components that collect manipulate and
disseminate information and provide a feedback mechanism to meet an objective. The minimal information
system consists of people, procedures and data. People follow processes to manipulate data to produce
information.
CBIS uses computer technology as the main component of the IS of the organization e.g. computerized
library management system, computerized hospital management, computerized school management system,
computerized reservation systems for: flights, hotels, and football matches, Employee and pay roll
processing system.
Advantages of CBISs:
Many people can access information at the same time through a network.
Large filling cabinet is replaced by the computer‘s large storage capacity.
Save time, resources and money by processing information automatically,
Facilitate communication and resource sharing to multiple users over a network.
Provide fast and accurate information to support decision making.
Improve productivity.
Reduces duplication of information.
1
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Disadvantages of CBISs:
Security is needed to protect data/information.
To use the system, the user has to be trained.
Computers hold personal information which may be misused.
Expensive to develop.
If system crashes, all data/information can be lost.
2
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
d. Information in an organization
It can be internal, external, objective or subjective. These are also called attributes of information
in an organization.
Internal information: it will describe specific operational aspects of the organization.
External information: it describes the environment surrounding an organization.
Objective information: it describes something that is known.
Subjective information: it attempts to describe something that is currently not known.
In operational level, information flow is primarily vertical upward, from the supervisors to middle
management or tactical management level.
In middle management, information flow is vertically upward to top management and downward to
operational level, horizontal across different unit managers.
In top management, information flow is vertically downward as strategies tactical management, upward to
reach external partners and horizontal amongst members of top management.
Strategic level
Strategic
Tactical level
Strategic
Operational level
Strategic
Figure 2: Information flow pyramid
3
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
In any given organization, information system can be classified. The most common classification is the
four level model based on the people who use the systems (see figure below).
4
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Characteristics of EIS:
Are concerned with ease of use.
Are concerned with predicting the future.
Are effectiveness oriented.
Are highly flexible.
Support unstructured decisions.
Use internal and external data sources.
Used only at the most senior management levels.
__________________________________________________________________________
Introduction
A system is a set of hardware and software operating in a computer. Generally, there is many types of
systems among which we have modeling systems and simulation systems.
1. Modelling Systems
System modeling is the process of using models to conceptualize and construct systems in business and
IT development. We analyze and simulate a model to answer questions.
A model is a precise representation of how a system works. It can also abstract representation of an
object or set of objects having common characteristics.
2. Simulation systems
A simulation system is a system that imitates the real system in order to find out what happens under
different situations and condition. It involves the creation of models of a situation (problem or possible
5
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
solution) and then tests to see how the models behave. Simulations are usually performed to avoid the
expense or danger of making mistakes in the real system and have developed to represent systems such as
traffic, training pilots, etc.
1. Monitoring systems
Monitoring systems seek to observe and record data about an environment through sensors. It checks
new data against stored values and if new data is outside acceptable range, a new warning message is sent
but the system does nothing further to effect the change, e. g. recording temperature of a greenhouse.
Some examples of monitoring systems include:
Heart Rate monitoring systems
6
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
They are commonly used both in hospitals and by individuals who want to track their health. The
system usually gives visual output on the display and often data is logged in persistent file
storage for future analysis.
Monitoring of intruders in a burglar alarm system.
Checking the temperature levels in a car engine.
Monitoring pollution levels in a river.
2. Control systems
A control system is a set of hardware and software that‘s used to regulate the operation of a system such
that if new data is outside acceptable range the output from the system affects the next set of inputs.
Control systems seek to actively maintain or change the state of a system through the use of actuators. There
are two basic types of control systems:
Dedicated control systems: They are basic systems that carry out a pre-programmed set of
instructions. For example, traffic light system where the lights change at fixed time intervals.
Computer-controlled systems: These systems use a computer to control the output device and
this computer can be connected to a sensor making the system more flexible.
Some examples of control systems include:
Turning street lights on at night and turning them off again during daylight.
Regulating the temperature in a central heating/air conditioning system.
Changing the traffic light at a road junction.
Operating anti-lock brakes on a car when necessary.
Regulating the environment in a greenhouse.
Other type of control system is the Numeric Control System (NC) which refers to the automation of
machine tools that are operated by programmed commands encoded on a storage medium as opposed to
manually controlled via hand wheels or levers or mechanically automated.
seek to observe and record data about an seek to actively maintain or change the state
environment through sensors of a system through the use of actuators
Warning sent (screen, alarm) if new data is Signals sent to control valves, motor, if new
outside acceptable range data is outside acceptable range
__________________________________________________________________________
7
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
A system can be defined as an organized body of interrelated parts to achieve an objective. System
development involves the use of various methodologies, models, tools and techniques to build and
implement an IS.
Tools are software that helps create models or other components required in a project. Examples of tools
that help a system analyst and designers are: Project management application, Drawing/graphics application,
Word processor/text editor, IDE, DBMS, Computer-Aided System Engineering (CASE tools).
Techniques: Techniques are a collection of guidelines that help the analyst to complete a system
development activity or task. Examples are Project management techniques, User interviewing techniques,
structured analysis and design techniques, Software testing techniques…
a. Planning phase
It is the initial phase of the SDLC process that sets out to discover, identify and define the scope of the
project to decide the course of action and specifically address the issues that are going to be solved by the
new system. This phase includes problem definition, feasibility studies, project plan...
Some activities in this phase are:
Define clearly in unambiguous terms the problem/opportunity.
Carry out an assessment of initial feasibility of the project and.
Prepare a system development project plan.
b. Analysis phase
During this phase, there is investigation on how the current system works (if it exists) and the
identification of weaknesses and the opportunities to improve. Modeling techniques like data flow diagrams
8
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
can also be use and interviews, questionnaires, observation and inspection of documents currently in used
can be used. Activities in this phase are:
Creating a logical model of the new system and specifying the objectives for the new system;
Specifying the input, processing and output of the new system;
Preparing a plan for implementing the new system;
Specifying the performance criteria of the new system.
c. Design phase
The system design phase involves generating several alternatives technical solutions for the new logical
model. Activities in this phase are:
selecting the best technical alternative;
developing detailed software specifications and again reviewing the project plan;
creating detailed physical model.
d. Development phase
The goal of the system development is to actually create the new system which involves a number of
tasks including acquiring and installing new hardware, writing software, testing software and reviewing
project plans. Most of the efforts deployed in SDLC are devoted to this phase.
Writing software requires that programmers use the software specifications and a programming
language or tool to actually create the working software.
Testing software will employ testing techniques such as: integration testing, acceptance testing and
beta testing.
Integration testing is to test to see if everyone in the organization is able to use the part of
the software developed for the functioning of the IS.
Acceptance testing is a formal documented process in which users use the new system,
verify that it works correctly under operational conditions and note any errors that needs to be
fixed.
Beta testing is a form of testing involving a limited audience of external users.
e. Implementation
The system implementation phase involves training users, converting existing information to the new
system, converting users, carrying out acceptance testing, and reviewing the project plan.
The project team installs the new software on the new hardware, trains all users on how to use the
software, and goes through a process of acceptance testing.
Conversion: This is the act of moving from the old way of doing things to the new system. Four
conversion methods in common include;
Parallel conversion: Both the old and new systems are allowed to run until it‘s sure the new system
works correctly. Though it delays final handover, it is the safest as it allows for gradual change over.
It is expensive in terms of time, money and resources.
Plunge conversion (direct): Here, the old system is unplugged and the new system is used
exclusively. It carries relatively a high risk. However, it may be the option for a system
commissioned from scratch or where resources are limited.
Pilot conversion: Only a selected group of users are targeted to convert to the new system before
converting everyone.
9
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Piecemeal: Here, only a porting of the new system is allowed to run and when it works correctly, the
remaining system is then converted.
1. Outsourcing
Outsourcing is the process of by which an organization hands over parts of the system development
steps or activities to another organization. These may include the design, development, implementation, and
support steps of the SDLC. However, the source organization is still responsible for investigation, analysis,
and some few steps.
The process of outsourcing:
Problem definition and feasibility: This must be performed by the source organization no matter
who will develop the proposed system. Possible reasons that can make a system to be outsourced
include:
The IT specialists may not have enough time or resources to build a system.
The organization may not possess the expertise to develop a given system.
It may be cheaper to buy pre-written software than to develop from scratch.
10
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
System analysis: The report generated during systems analysis is used as the foundation for the
outsourcing document. Thus, the systems analysis step must be carried out for any proposed system
and a request for proposal sent out to possible outsourcing organizations.
Evaluate Request for Proposal (RFP) returns and select a vendor: Several potential outsourcing
vendors are examined and a selection is made based on the RFP received.
Contract: Once an outsourcing vendor is selected, a legal documentation that binds both
organizations is prepared and signed by each party. This document states exactly what work is to be
carried out, how and when payments will be made, the project time frame, and how the outsourcing
organization can get out of the contract if the outsourcing vendor fails to deliver.
Test and accept the solution: When the system is complete by the outsourcing vendor, a complete
test of the system is carried out, users are train, old information is converted to the new system, and
users are converted to the new system. If something fails to work as intended during the testing, the
system is rejected and the outsourcing vendor is called upon to correct the problem(s).
System support: Once the system is installed and in use, the IT specialist is expected to provide for
the many support tasks such as performing a periodic review of the system, providing a formal
mechanism through which users can request changes, and evaluating their worth.
The relationship with the outsourcing vendor may be reassessed since they also provide support and
maintenance activities as part of the overall cost of the system.
2. Data capture
Data capture refers to the process of getting data into a format that can be processed by a computer.
Paper-based data capture and computerized data entry are data techniques used to get data in the format
for processing.
In paper-based data capture, people fill forms with information such as their personal details for
example; name, address, telephone number, date of birth, etc.
In computerized data entry, answers from questions are typed directly into the computer and stored in
the appropriate database.
While manual data capture techniques usually use forms, automated data capture method uses automated
data capture devices such as: Barcode reader, Magnetic Ink Character Reader (MICR), Optical Mark
Reader (OMR), Optical Character Recognition (OCR), Sensors, etc.
b. Data control
It refers to the mechanisms that are implemented to ensure an accurate and reliable data capture.
Verification and validation are typical methods used to check for accuracy in data.
Verification: This involves checking that what is on the source document or what is intended is
exactly the same as what has been entered into the computer. Techniques used for verification are
double entry and proof reading.
11
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Double entry: With manual data entry, two people enter the same data and the data is
accepted for further processing only when the two entries are identical. This is cost
ineffective since two people are to be paid for doing the same job.
Proof reading: This involves carefully checking data that has been entered against what was
in the original document.
Validation: This has to do with detecting any data that is inaccurate, incomplete or unreasonable.
Validation can be done by software and it can be se to reject any data that does not conform to set
rules. Validation can be done using some or all of the following types of checks.
Character Character checks make sure that the right types of characters have been entered.
Types check Type checks are used to check that the correct type of data has been entered in a
field. E.g. number instead of text and vice versa.
Check digits A digit check is usually placed at the end of an original number. E.g. bank
account number.
Range check Checks if a number lies within a specific range. E.g. >=60.
Parity check A parity check is used to make sure that data has not been corrupted during
transmission. Even number, even parity. Odd number, odd parity.
Presence When entering data into a database the completion of some fields may be
check optional. E.g. certain fields like telephone number may be optional. There are
certain fields which must contain data and the system may come to a halt if left
blank.
__________________________________________________________________________
Introduction
Today‗s organizations cannot survive or succeed without quality data about their internal operations and
external environment. Organizations typically make use of databases (both internal and external) to store
data related to their operations.
12
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Data resource management is an activity that applies information systems technologies to the task of
managing an organization‘s data resources to meet the information needs of their business stakeholders.
1. What is data?
Data are pieces of information or fact related to the object being considered. For example, examples of
data relating to an individual would be the person‘s name, age, height, weight, ethnicity, hair, colour, and
birthday. Data is not limited to the facts themselves, as pictures, images, and files are also considered data.
Each data is associated with an attribute that tells a computer system how to interpret its value. This
attribute is called a data type. Understanding data types ensures that data is collected in the preferred format
and that the value of each property is as expected. The following are the common Data types:
Floating point It is used to store numbers that may have a fractional component. -32.345; 234.002
Character It is used to store a single letter, digit, punctuation mark, symbol or ‗A‘; ‗7‘; ‗?‘; ‗ ‘
blank space
Boolean It is used to stored data with only two possible values. True or false; 1
or 0; yes or no.
Date It is used to store date generally a date in the YYYY-MM-DD format 2021-10-03
Date time Stores values containing both date and time together in the YYYY- 2021-10-23
MM-DD hh:mm:ss format. 11:20:55
2. What is a database?
A database refers to a collection of logically related information organized so that it can be easily
accessible, managed, and updated. Databases are generally accessed electronically from a computer system
and are usually controlled by a database management system. (DBMS). The database administrator (DBA)
is the individual responsible for managing the databases, including database security, access control, backup,
and disaster recovery.
13
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Data warehouses contain data collected from several sources, and the data contained within are generally
not used for routine activities. Instead, data warehouse are usually used for business intelligence purposes.
b. Components of a Database
The five major components of a database are:
Hardware: refers to physical, electronic devices such as computers and hard disks
Software: refer to set programs used to manage and control the database and includes the database
software, operating system, network software.
Data: refer to raw facts and information that need to be organized and processed to make it more
meaningful.
Procedures: refer to instruction used in the DBMS and encompass everything from instructions to
setup and install, login and logout.
Database Access Language: It is a language used to write commands to access, update and delete
data stored in a database.
14
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Data Dependence: programs must include information about how the data is stored so a change in
storage format requires a change in programs.
Note: Data mining refers to the process of analyzing massive volumes of data from different angles in order
to identity relationships between data and transforms them into actionable information.
_________________________________________________________________
15
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
The invention and evolution of the computer resulted in millions of new types of computer related jobs.
From those who enter data into the computer to those who maintain the largest computer systems, there
continue to be a worldwide demand for workers who are trained to play a role in the development and use of
Information Technology. A wide variety of career opportunities are available in computing and mainly
being categorized under two heads: Hardware and Software.
16
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
IT Consultant: These are those who undertake strategic or operational missions, they help a
client in implementation; they help develop or roll out a prototype or software to respond to a
specific need.
Web developer: A web developer is a programmer who is specialized in the development of
web applications and network applications that are run over HTTP (Hypertext Transfer Protocol)
from a web server to a web browser. They are found working in large corporations and
government agencies, small and medium size companies or alone as freelancers.
Mobile Application Developer: They main responsibility is to develop and create apps for iOS
and Android systems, etc.
System Analyst: Design IT solutions and existing systems to improve business efficiency and
productivity.
Cloud Architect: It is an IT specialist who develops a company‘s computing strategy. This
strategy incorporates cloud application plans, cloud application design as well as cloud
management and monitoring.
Information specialist: They are responsible for analyzing and managing a company‘s
information databases, such as filing, record-keeping, or stocktaking. They specialize in
streamlining company processes, disseminating information to personnel, clients, and
shareholders, as well as preparing annual data summary reports for management review.
Introduction
It is a binding fact that are computers are very productive, efficient and make our personal and professional
lives more rewarding. These 'magical' machines can do just about anything imaginable; moreover they really
excel in certain areas
b. Communication industry.
The integration of computers & telecommunication facilities has made the transmission and reception of
messages very fast and efficient.
They are used in telephone exchanges to switch incoming & outgoing calls.
For sending & receiving electronic messages, e.g. fax and e-mails, if connected to a computer
network.
c. Transport industry.
Computers are used in:
Automobile traffic control, e.g., to monitor vehicle traffic in a busy town.
Railway corporations to co-ordinate the movement of their goods & wagons.
17
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
f. Multimedia applications.
Computers are used to prepare business presentations for advertisement purposes.
The presentations are done using overhead projectors attached to computers running slide shows
& digital video clips.
Computers are used in music related equipment such as Synthesizers.
In entertainment (i.e., games & movies), computers are used to add stereo sound & digital video
clips, which make games more realistic
g. Defense
Computers are largely used in defense. Modern tanks, missiles, weapons etc. Military also employs
computerized control systems.
Some military areas where a computer has been used are:
Missile Control
Military Communication
Military Operation and Planning
Smart Weapons.
h. Government Institutions.
Computers play an important role in government. Some major fields in this category are:
Budgets;
Sales tax department;
Income tax department;
Male/Female ratio;
Computerization of voters lists;
Computerization of driving licensing system;
E-citizen online services;
Weather forecasting.
18
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
i. Health Care
Computers have become important part in hospitals, labs, and dispensaries. The computers are being used in
hospitals to:
Keep the record of patients and medicines.
Scanning and diagnosing different diseases.
To control life-supporting machines in the Intensive Care Units (ICU).
To enable medical experts in different countries to share their expertise or labor, thus reducing
the transportation of patients & professionals.
Diagnostic System: Computers are used to collect data and identify cause of illness.
Lab-diagnostic System: All tests can be done and reports are prepared by computer.
Surgery: Nowadays, computers are also used in performing surgery.
j. Banks/Insurance industries
Computers are used by Banks & Insurance industries:
To manage financial transactions. They use special cash dispensing machines called Automated
Teller Machines (ATMs) to enable them provide cash deposit & withdrawal services.
For processing of Cheques.
For preparation of Payrolls.
For better record keeping and processing of documents.
To provide electronic money transfer facilities.
k. Research.
Computers can be used for research in various fields. They are used by:
Scientists to analyze their experimental data, e.g., in weather forecasting.
Engineers & Architects to design & test their work.
__________________________________________
Lesson 3: Ergonomics
Competences:
Define Ergonomics
Explain some computer health hazards(RSI, CTS,CVS, etc) and methods of prevention
Describe a computer work environment
Introduction
Ergonomics is the science that studies how workers interact with their work environment. Proper
ergonomics means designing objects in the workplace that provides a correct match between the human
body, work-related tasks, and work tools such as chairs to provide safety and comfort for the worker.
Ergonomics is alternatively called Human Engineering. Ergonomic principles helps reduce stress and
eliminate many potential injuries and disorders associated with the overuse of muscles, bad posture, and
repeated tasks.
Symptoms may be felt during typing, when using a mouse, or at other times when no work with the
hands is being performed especially at night when these symptoms might awaken you.
The main risks associated with using the computer include the following;
Musculoskeletal Problems: These are general problems that range from general aches and pain
to more serious problems like upper limb disorders, back and neck pain and discomfort, tension,
stress and headaches.
Repetitive stress injury (RSI), which occurs when muscle groups are forced through repetitive
actions often with high-impact loads or tens of thousands of repetitions under low-impact loads
(working at a computer keyboard)
Computer vision syndrome (CVS) refers to any eyestrain condition related to display screen
use in desktop computers, laptops, e-readers, smartphones, and handheld video games.
Symptoms include headaches, blurred vision, and dry and irritated eyes.
Carpal tunnel syndrome (CTS), in which pressure on the median nerve through the wrist‘s
bony structure, called a carpel tunnel, produces pain.
Symptoms include numbness, shooting pain, inability to grasp objects, and tingling.
Problems and Possible Remedies for Visual Display Unit (VDU) Users
The VDU or the screen is known to be the main equipment that creates a lot of health problems to its
users. Below are some problems and their possible remedies.
2. Safety Precautions
The following are guides to be respected when using your computer:
20
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Set up or connect your equipment according to the instructions provided by the supplier or
manufacturer. For example, always be sure that the computer is switched off and disconnected
from the main electrical supply once you have stopped working on.
Make sure that your working room has sufficient light.
Fit in your devices and CD-ROMs correctly because that which is wrongly fitted may vibrate and
get destroyed.
It is important to look away from the screen from time to time and focus your eyes on a distant
object to avoid eye strain.
Before you start working, do the following;
Adjust the position of the screen, the keyboard, the mouse and the documents you are
working with so as to sit comfortably.
Keep your upper body as relaxed as possible and don‘t over stretch your wrists and
fingers. As a general guide, your forearm should be roughly horizontal and your elbows
level with the keyboard or the mouse.
If your feet don‘t reach the floor when you are sitting in a good position, try to use a foot
rest.
Use a document holder when typing from a manuscript.
Make alternating work tasks. That means that after a short while on the computer leave it and do
other things.
Regularly stretch up to relax your body.
Avoid gripping your mouse too tightly (hold your mouse lightly and click gently).
Be familiar with keyboard short cuts for applications you regularly use to avoid over using the
mouse.
Your chair should:
Support the back,
Allow chair height to be adjusted from a sitting position,
Be 18 to 30 inches away from the screen when you are seated.
Your table or desk should:
Provide sufficient leg room and preferably be height adjustable,
Have enough room to support the computer equipment and space for documents,
Be at least 900mm deep,
Have rounded corners and edges.
To avoid eyestrain take the following precautions;
Exercise your eyes periodically focusing on objects at different distances,
Blink regularly,
Position the monitor to avoid glare,
Keep your monitor clean,
Service, repair or replace monitor that flicker.
Note: To ensure about electrical safety, do not be tempted to add too many extension cables to your existing
electrical sockets.
_________________________________________________________________
21
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
CHAPTER 8: DATABASES
Competences:
Identify Models of databases.
Use a database application to create a simple relational database.
Populate a simple database.
Create simple queries to demonstrate data integrity and consistency.
Introduction
Organizations work on vast amount of data and information on daily bases thus, there is need for data
and information to be organized logically. These data may not make meaning if not organized into an
appropriate structure. A database is application software for such a task and is one of the core/main parts of
most/all applications/software in use today.
A database is a structured collection of data in a computer system which allows for arranging, modifying,
and extracting information easily in different logical orders. It is a tool that stores data, and lets you create,
read, update, and delete the data in some manner. The management of these data can be computerized or not.
A computerized database is a database that stores and manages its data by the use of application
software called database management system (DBMS) in the computer.
A non-computerized computer is a database that files are grouped in folders or envelops and stored in
drawers or filing cabinets. Both types of database have advantages and disadvantages. An advantage for one
is probably a disadvantage to the others.
Note: Data are raw facts that have no meaning. It needs treatment (processing) to become useful
(information).
22
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
This table is made up of six fields (columns) i.e. serial number, registration number, surname, first name,
sex and class and four records (rows).
A table is the database object that contains the basic data or information to be stored about an entity
of the database. For example, the registration of students in a school form a database called student
table which is a database entity.
A field or (attribute) represents one related column of a table and is the smallest logical structure of
storage in a database. It holds one piece of information about an entity or a subject represented by the
table. For example, in the above table we have the following fields; registration no, surname,
firstname, sex, and class.
A record or tuple is a collection of multiple related fields that can be treated as a unit or a record is
a row of the table for a database which contains a collection of attributes related to an entity (such as
student or a person) of the database. For example, information from the field‘s registration no,
surname, firstname, sex, and class for a particular student form a record.
A query is the database tool that allows to retrieve information from one or more tables based on a
set of search conditions you define using the table fields. Queries are covered in more details later.
Forms are Access tools that users can create to make data entry in database tables easier. Entering
data directly into a table can be difficult if there is a lot of information to enter. Like an Excel
spreadsheet, an Access table is essentially a screen filled with blank rows where a user enters
records. Forms, however, provide users with an easy-to-read interface where they can enter table
data.
Reports: It is an effective tool that gives you way to analyse and present data using a specific
layout. The text can be formatted in an Access report, just like it can be in Word documents.
Key field or Primary Key: it is a field or a collection of fields in a database whose value can be
used to distinguish one record from another. E.g. in the table above, registration no. can be used as
the key field.
Foreign Key: a foreign key is a column or group of columns in a relational database table that
provides link between data in two tables. It acts as a cross-reference between tables because it
references the primary key of another table thereby establishing a link between them.
NOTE: a primary key is always distinguish from the other key by a (*) on it or is underlined.
Entity: it is a single data item; persons, things, places or events (a table‘s name).
NB: Typical data is logically organized as follows; characters, fields, records, files and database.
Characters are the most basic logical data elements.
File is a collection of related records. E.g. a table can be referred to as a file.
23
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
3. Database Applications
Databases are widely use because it forms an essential part of almost all
organizations/software‘s/enterprises today. Here are some representative applications: Banking,
Universities/schools, Business, Manufacturing, organizations, enterprises, government, hospitals, Facebook,
Google, Twitter, etc.
Remark:
A database file that consists of a single data table is called a flat-file database. Flat-file databases are
useful for certain single user or small group situations, especially for maintaining lists such as address list or
inventories. Data that is stored, managed, and manipulated in a spreadsheet is similar to a flat-file database.
Disadvantages of flat file database
Redundant data: that is repeated information in the table.
Errors on input: typographical errors occur each time is entered.
Problems with updating data
Problems with modifying data
5. Database models
A database model is a type of data model that determines the logical structure of a database. It
fundamentally determines in which manner data can be stored, organized and manipulate. The most popular
example of database model is the relational model which uses a table-based format. Other examples of
database models include: flat file model, hierarchical model, object-oriented model, network model, Entity-
relation model and multi-dimensional model.
24
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
An entity is a ―thing‖ or ―object‖ in the real world that is distinguishable from all other objects. For
example, each person in an enterprise is an entity. An entity has a set of properties or attributes, and the
value(s) for some set of properties may uniquely identify an entity.
A relationship is an association among several entities. For example, we can define a relationship
between the entity students to the entity teacher in a secondary school. Each student has one teacher but each
teacher has many students.
The ER diagram is used to represent database schema. The following are use in ER diagram:
A rectangle represents an entity set.
An ellipse represents an attribute.
A diamond represents a relationship.
Lines represent linking of attributes to entity sets and of entity sets to relationship sets.
In the ER diagram shown above the two entities are STUDENT and CLASS. Two simple attributes which are
associated with the STUDENT are Roll number and the name. The attributes associated with the entity
CLASS are Subject Name and Hall Number. The relationship between the two entities STUDENT and
CLASS is Attends.
Exercise:
25
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Even though a relationship may involve more than two entities, the most commonly encountered
relationships are binary, involving exactly two entities. Generally, such binary relationships are of three
types and called cardinality: one-to-one, one-to-many and many-to-many.
B. Relational Model
The relational model is a lower-level model. It uses a collection of tables to represent both data and the
relationships among the data. Its conceptual simplicity has led to its widespread adoption; today a vast
majority of database products are based on the relational model. Designers often formulate database schema
design by first modeling data at a high level, using the E-R model, and then translating it into the relational
model.
The software used in a relational database is called a relational database management system
(RDBMS). The relational model is based on the mathematical concept of a relation, which is physically
represented as a table.
Note: Referential integrity: It a property of a relational database that enforces valid relationships
between tables such that no foreign key can contain a value that does match a primary key in the
corresponding linked table.
i. Terminology
There are different set of terms used to designate the tables, the columns and rows of the relational
model. The following table summarized it.
A DBMS is a general-purpose software i.e. not application specific. A DBMS consists of:
A part for collection of interrelated and persistent data. This part of DBMS is referred to as
database (DB).
A set of application programs used to access, update, and managing data. This part constitutes the
management system (MS).
A. Features of a DBMS
The features of a DBMS are as follows:
Queries: to extract data in the database using language like the Structured Query Language
(SQL);
forms, reports; (see section 1 for definition)
Models define rules and standards for all data in the database
Data mining has to do with using software to search through data from many sources looking for
connections.
Examples of DBMS are: Oracle, Postgres SQL, Sybase, MySQL, Microsoft Access, SQL, DB2, Open
Office Base, etc.
7. Database languages
A particular language that has emerged from the development of the relational model is the Structured
Query Language (SQL). Over the last few years, SQL has become the standard relational database language.
Objectives of SQL
Ideally, a database language should allow a user to:
Create the database and relation structures,
Perform basic data management tasks, such as the insertion, modification, and deletion of data
from the relations,
Perform both simple and complex queries.
Data-Definition Language:
28
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
We specify a database schema by a set of definitions expressed by a special language called a Data-
Definition Language (DDL). DDL defines the database structure and controls access to the data.
Data-Manipulation Language:
A data-manipulation language (DML) is a language that enables users to access or manipulate data as
organized by the appropriate data model. Its functions are:
The selection or retrieval of information stored in or from a table;
The insertion of new information into a table;
The deletion of information from a table;
The updating or modification of information stored in a table;
EXERCISES
A database of students is to be set up with the following fields:
FamilyName, OtherName, StudentID, DateOfBirth, DateOfEntry, CurrentClass, CurrentSchoolYear,
EmailAddress.
Select a data type for each field.
Which fields should be validated and which fields should be verified?
Decide the validation rules for those fields which should be validated.
Which field is best for the primary key?
Choose a suitable format for the StudentID.
Build a database with at least 10 records. Include all your validation checks.
Run a query to print OtherNames, FamilyName, and EmailAddress in alphabetical order of family
name.
Run a query to select all the students of class four with their StudentID.
_________________________________________________________________
Introduction
A typical project starts with someone having an idea and documenting the idea on paper. Projects
usually go through a number of phase‘s i.e. well-defined beginning, intermediaries and an end. There are
classified according to size and duration whereby:
Medium projects have a small size and small time frame.
Small projects have duration of more than one month.
Large projects have duration of more than one year.
The duration of a project is determined by its complexity. A project starts when at least one of its
activities is ready to start. A project is completed when all of its activities have been completed. A project
should have some ‗deliverables‘ for ease of monitoring.
29
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Often program and project are used interchangeably, but nominally, a program is a larger concept than a
project. A Program is a set of related Projects. Example the space shuttle program consists of many flights
which are each separately managed projects. This chapter is focused on PROJECTS.
1. Definitions
A project is a planned process to achieve a specific objective through a well-defined set of activities,
budget and time frame.
Project Management (PM) is a combination of techniques, procedures, people, and systems focused on
the successful completion of a project. It is also a discipline that will support the planning, implementation,
tracking, and control of projects.
Project management program permits the user to identify tasks, task relationships, resources, and time
requirements of a project. The constraints of a PM are: Scope, Time and Budget. The forth constraint is
Quality which is the core of each and every project.
30
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Benefits of teamwork
Maximize strength of each member;
Increase in productivity and product quality and also decrease in the cost of production;
A balance work load as each member can help each other;
Can blame your teammate if the project goes bad;
Encouragement of skills, knowledge sharing and fast learning;
Education of group members on tolerance and understanding.
Disadvantages of teamwork
Never gets enough credit when the project goes well;
Not all members will have the same strengths and weaknesses;
Tasks/work not undertaken on time by some members can let the team down;
Conflicts in ideas can cause tensions and personality clashes can cause issues too;
Opposing views can cause arguments.
31
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Project maintenance is an ongoing process and it includes continuing support of end-users, correction of
errors, and updates of the software.
Initiating
Planning
Closing
a. PERT chart
The term PERT stands for Program Evaluation and Review Technique.
A PERT chart is a project management tool used to schedule, organize, and coordinate tasks within a
project. A PERT chart represents a graphic illustration of a project as a network diagram or flow chart
consisting of numbered nodes (either circles or rectangles) representing events or milestones in the project
linked by labeled vectors (directional lines) representing tasks in the project.
Project managers can use PERT charts to:
Set a realistic timetable for project completion.
33
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Make sure focus is maintained on the most critical tasks for the critical path – since the path leads
to the minimum time the project requires, any delays to these tasks will result in a delay to the
overall project.
Identify tasks that need to be shortened if the overall project time needs to be reduced.
Identify tasks that can be carried out simultaneously.
Identify slack time where certain tasks are not as time-critical to the overall deadline.
i. PERT Node
A PERT node is as follows and is use in drawing the PERT network diagram.
Critical task: a task that must be completed on schedule for the project to finish on time.
Path: a set of sequentially connected activities in a project.
Critical path: a critical path is a series of tasks that must be completed on time for a project to
finish on schedule. Each task on a critical path is a critical task.
34
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Lag: describes a delay in the link between a predecessor and a successor task. It tells the logical
relationship between the start and or finish of one activity and the start and or finish of a
following activity.
Lag time: it is the amount of time delay between the completion of one task and the start of its
successor task. A negative value against a lag is known as a lead.
Slack time: it is the amount of time an activity can be delayed from its early start without
delaying the project finish date. Also known as float time.
Floating task: a task that can be performed earlier or later in the schedule without affecting the
project duration.
Lead: a lead is observed when a task that should theoretically wait for its predecessor to finish
starts a little earlier.
Lead time: it the time that a successor is allowed to start before its predecessor goes to
completion.
Duration (D): it is the number of days (or hours) it will take to complete a task.
Early Finish date (EF): this is the earliest date that a task can be completed. The EF duration of
the last task(s) is the total duration of the project.
For any one task, EF = ES + Duration.
Early Start date (ES): is the earliest date on which a given task can start.
Effort: it is the number of labor units required to complete an activity or other project element.
Free Float or Slack Time (FF) or (ST): the amount of time an activity can be delayed without
delaying the ES date of any immediate successor activity. It can be calculated as follows:
FF = LS – ES or FF = LF - EF
Late Finish date (LF): is the last date a task can be completed without delaying the project.
Equals the EF of the last task(s).
Late Start date (LS): is the last date a task can be start without delaying the project. Calculated
as follows: LS = LF – Duration.
Dependency: a dependency between two tasks says that these two tasks are linked. The most
common kind of dependency is finish-to-start. This means that task A must be finished before
task B can start.
Fast tracking: it is performing more critical activities in parallel.
Risk: it is an event which has a probability of happening and whose effect may adversely impact
the project.
Forward pass: is a calculation performed on each task determining its early start date and early
finish date.
Backward pass: is a second calculation for each task on the project starting on the project finish
date and working backwards to the first task. It calculates the late finish date and late start date of
each task.
Total project duration: it is the length of time the whole project will take, all tasks start to
finish as calculated by the forward pass. It equals the length of the critical path.
Project finish date: is the number of days a project will finish.
Milestone: a significant event in the project usually the completion of a major component.
35
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Example 1:
The following table shows the expected duration of each task. The task dependencies are shown.
A Establish project 4 5 12 6
B Establish customer A 2 3 4 3
requirements
C Produce software B 6 8 22 10
specification
documents
E Write code C 3 4 5 4
F Developer testing E 2 4 6 4
G System testing D, F 2 3 4 3
H Write manuals C 5 7 15 8
36
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The network diagram is based on the tasks and their dependencies (predecessor tasks). Task A has no
predecessor, and therefore starts the project on the left. Task B has only task A as a predecessor, and is
therefore the next task. The diagram shows that tasks D, E and H (writing test plans, code and manuals) all
have task C (specification) as a predecessor, and can therefore be carried out simultaneously.
Identify the critical path: The critical path is determined by using the estimated times to work out the
earliest start (ES) and finish (EF) times (forward pass), and latest start (LS) and finish (LF) times (backward
pass), and identifying the tasks where ES and LS are equal.
Step1: Forward pass.
This is done by working from left to right across the chart. The ES of task A is week 0, and the EF is 6
since this is the ES plus the duration (estimated time). The earliest that task B can begin is week 6 (since
task A must be complete) so its ES is 6, and EF is 6 + 3 = 9. Note that task G has an ES of 27 because it is
dependent on both task D and task F being complete first, and the earliest that both tasks will be completed
is week 27.
37
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The critical path is identified by finding the nodes where ES = LS. These are nodes for which there is no
‗slack‘ or spare time for a task in the project. The slack is calculated as LF – EF or LS – ES, e.g. Task H has
6 weeks‘ slack, and could be scheduled to start sometime between week 19 and week 25 depending on
factors such as the resources available to a task on the critical path.
b. Gantt chart
A Gantt chart is a graphic display of a schedule that helps to plan, coordinate, and track specific tasks in
a project. It was developed in 1918 by H.L. Gantt. In a Gantt chart, activities are listed down the left side of
the chart, dates are shown across the top, and planned activity durations are shown on horizontal bars.
It is a tool which enables project managers organizes time, people, equipment, and money. Allows
managers to monitor the progress of a project and ensures the right people and equipment are in the right
place and the right time. It can be created using Spreadsheet.
The time relation of all tasks to each other (for example, tasks carried out simultaneously) is therefore
clearly apparent in a Gantt chart. Unlike PERT charts, GANTT charts do not show the critical path,
however, dependencies between tasks can be indicated by lines linking tasks.
1 Establish project - 2
5 Write code 3 2
38
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
6 Developer testing 5 2
7 System testing 4, 6 4
Task 1 has no predecessors, and can thus start on 12 June. The Gantt chart shows the task as a box
starting on 12 June and finishing on 13 June on the horizontal access. Task 2 requires Task 1 to be
completed, and the duration is three days, so the box covers the dates 14 to 16 June. The line from the finish
of Task 1 to the start of Task 2 indicates the dependency. Note that Tasks 4, 5 and 8 all require Task 3 to be
completed, and have no other dependencies, so these all start on the same date. The chart below show all
seven days of the week, but often, weekend days are excluded.
39
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
8. Report writing
Reports are documents which both give readers information and ask the reader to do something with
that information. Reports can be used:
To suggest new ideas and options;
To ask people to accept a point of view;
To influence decisions;
To ask people to make choices between alternative recommendations.
Therefore a well-structured and well written report can be a very influential document.
The Format of a Report
1- Problem analysis/specification/introduction.
2- Design (technical specification).
3- Implementation (how the project was carried out).
4- Testing (how did you verify to ensure that the project is working as specified).
5- Evaluation (what problems did you encounter? How did you solve them?)
_______________________________________________________________________________________
MODULE III: SOFWARE DEVELOPMENT, PROJECTS
CHAPTER 9: ALGORITHMS AND PROGRAMMING LANGUAGES
Lesson 1: Algorithms
Competences
Write out simple algorithms using: pseudo code, flow chart
Explain characteristics of algorithms.
Identify control structures in an algorithm
Select a suitable control structure in a given problem
Problem situation:
Divine wants to make a tea, but he doesn‘t know how to do it. You are used to do it and he is asking for
a hand.
1) What does he need to make a tea?
2) What are the necessary steps to follow to make a tea?
I. Algorithmic concepts
1. Definition of terms
An Algorithm is a finite sequence of well-defined and precise instructions that can be used to solve a
specific problem.
Algorithmic thinking is a way of getting to a solution through the clear definition of the steps needed.
Computational thinking is a set of problem-solving method that involves expressing problems and
their solutions in ways that a computer could also execute.
Logical thinking is the act of analyzing a problem using reasoning skills and coming up with a
meaningful conclusion.
Computational complexity: is the amount of resources required to run an algorithm. (Focus is given to
time and memory requirements). The time complexity of an algorithm indicates how fast the algorithm runs.
The space complexity indicates how much memory the algorithm needs.
40
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Example: A car travels 150km in 2h. How fast is the car moving?
Input: distance, time.
Processes: Ask for the distance and time, set the speed to: distance/time, display the speed.
Output: speed.
Methods usually employed when solving problems in Computer Science are Stepwise Refinement and
Top-Down Design.
Stepwise Refinement: this means replacing existing algorithmic steps/instructions with a new
version that fills in more details. When carrying out stepwise refinement, the complex problem is
broken down into a number of simpler steps which are simpler than the one required solving the
overall problem. Refinement of the steps continues in this manner until each step is sufficiently
detailed.
Top-Down Design: the goal of the top-down design is to divide a given problem into sub-
problems. A sub-problem in turn can be thought of as simply another problem and so it can be
divided into sub-problems which would be easier to solve than the original problem. The division
of the problem starts at the top level down that is why the process is called top-down design.
3. Characteristics of Algorithms
A good algorithm should have the following characteristics:
It must be explicit: i.e.be clear and obvious.
It must be precise or unambiguous: it must be specified exactly and accurately and there should
be no doubt about what to do next
It must be effective or executable: it must produce a result and there should be no impossible or
unknown steps in the algorithm
It must be finite or terminate: it must have a beginning and an end though there are some that
do not end.
Efficient: some algorithms may work correctly but be inefficient by taking more time and using
more resources (space) than required to solve the problem.
Must have an input and output
To satisfy these quality standards, one can put the following question at the time of the resolution of the
algorithm problem:
Which are the data on which the algorithm will work?
Which are the processes which it must execute to offer these services?
41
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Which are the services which it most produce (this include respond to users request or another
algorithm)?
3. Effectiveness of a solution
There are many different solutions to the same problem so in order to consider the effectiveness of a
given solution, the following questions may be asked:
Does the solution work for all sets of data?
Does the solution have any unnecessary processes that are never used?
Are any actions repeated more often than necessary?
Can the solution be simplified and still work as well?
1. Structured English
To represent algorithms in Structured English, we simply write down the steps to follow in solving a
problem in chronological order.
Examples:
An algorithm to add 2 numbers and to find An algorithm to make tea will be given as
the difference
1. Get two numbers a and b; 1. Put water into the coffee machine
2. Add tea to it
2. Add a and b; 3. Plug the machine to the current
3. Subtract b in a; 4. Wait for ten minutes
5. Stop machine
4. Display the sum; 6. Unplug it from current
7. Serve tea in a tea cup
5. Display the difference;
8. Add sugar
9. Drink
2. Flow charts
A flow chart is a graphical representation of an algorithm. It uses graphic symbols to describe the nature
and flow of steps in an algorithm. Each step in a flowchart contains information about what must be done,
and the arrows show the order in which the instructions must be executed.
Examples:
Begin Begin
end end
3. Pseudo code
A pseudo code is an outline of a computer program written in a mixture of a programming-like language
and English. Pseudo-codes help programmers write out the program in a simple clear language before
43
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
attempting to put it in a suitable programming language of their choice. Writing pseudo code is one of the
best ways to plan a computer program.
The three standards for writing good pseudo-code are:
Number each instruction or use indentation: this is to enforce the notion of an ordered sequence
in which instructions are carried out.
Each instruction should not be ambiguous but effectively computable.
Nothing should be left out.
The advantage of pseudo-code is that it allows the programmer to concentrate on how the program works
while ignoring the details of the language.
For example, here is a pseudo code outline of a program that reads two numbers and says which is greater:
Begin
Read (a, b);
If a is greater than b then;
Write (―a is greater than b‖);
If b is greater than a then;
Write (―b is greater than a‖);
End
44
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
To declare a variable, we use the keyword VAR followed by the name and the type of the variable.
The syntax is as follows: VAR name_of_the_variable: type
Example: declaration of variable A of type Integer
VAR A: Integer
A data type defines the domain in which an object gets its value and the kind of operations that can be
performed on the object. The basic data types are
Integer used to store positive, negative whole 1; 50; 234; 16578; -89
number and zero
Real used to store real numbers with decimal 12; 15.57; -64.234
points both positive and negative.
Character used to store a single character, digit or ‗d‘; ‗6‘; ‗#‘; ‗=‘
special character
Constant: it is an object whose value cannot be modified in the course of the algorithm or program. A
constant is given a value that remains the same all through the program.
To declare a constant, we use the keyword CONST followed by the name and the value. The syntax is as
follows: CONST name_of_constant = value
A Literal: is anything (numbers or text) that is fixed (set) by a programmer during the creation of the
program‘s code. It is usually written within double quotes. Examples ―Enter a number‖, ―The result is‖
are literals.
c. Basic Instructions
An instruction is a processing order to perform an action. The three basic instructions used in an
algorithm are input, output and assignment instructions.
An input instruction allows to read a value from the keyboard using the keyword “read ()”, “readln
()” or Get. The value read is saved in a variable of the same.
The syntax is: read(name_of_variable);
Example: read(a);
45
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Instruction x y z
x←2 / /
x←x+1 / /
y←1+x
z←x+y
y←z+x
46
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Case … of
Syntax: Case variable of Get day
Case day of
Case 1: Instruction 1
1: print ―today is Monday‖;
Case 2: Instruction 2 2:print ―today is Tuesday‖;
….
… 7:print ―Today is Sunday‖;
end
Case n: Instruction n
end
Explanation: the value of variable is evaluated, if it matches with case 1, instruction 1 is executed. If it
matches with case 2, instruction 2 is executed and so on. Case…of is a multiple selection structure. It is used
when an important number of choices are to be considered depending on the value of a variable.
47
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Get n
While Loop Syntax:
I←1 Initialization
While condition do While i <= n do
Print ← ―his is a loop‖;
Instruction(s)
i ← i + 1; Condition
Instructions
Explanation: The condition is evaluated, if it is true instruction(s) is/are executed. Instruction(s) is/are
executed as long as condition remains true. When the condition becomes false, the loop stops.
Condition
Explanation: The instruction or set of instructions is executed and the condition is evaluated. If it
evaluates to false, the instruction or set of instructions is executed again. If condition evaluates to true, the
program exits the loop.
Get n Initialization
For Loop Syntax: For i: = 1 to n do
For var ← low_limit to hi_limit do Print ―this is a for loop‖
Instruction(s); Condition
End For
End for Or Incrementation
/decrementation
Or Get n
For var: ← hi_limit downto low limit do For i: = n down to 1 do
Instruction(s) Instructions
Print ―this is a for loop‖
End for End For
Explanation: var (variable) is given a value low limit or hi limit depending on the loop, which is
automatically incremented or decremented (by 1) after any execution of the loop. The loop stops when
low limit becomes greater than hi_limit. In both cases, if hi_limit is less than low limit, the loop body is
not executed at all.
Remark: Some problems are recursive in nature. The solution to such problems involves the
repeated application of the solution to its own values until a certain condition is reached. Algorithms for
such problems are known as recursive algorithms.
A recursive algorithm is one that calls (invokes) itself during an execution. Examples are the Factorial
function, the sum function, and the Fibonacci function.
Recursion can be defined as the calling of a procedure by itself thereby creating a new copy of the
procedure.
48
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Exercises
1) Write an algorithm to calculate the area of a circle.
2) Write an algorithm to solve a linear equation.
3) Write an algorithm that reads a person‗s sex and writes good morning sir if it‘s male and good
morning madam if it‗s female.
4) Write an algorithm that solves a quadratic equation
____________________________________
Lesson 2: Programming
Competences:
Explain programming paradigms
Evaluate importance development tools: compilers, interpreters and assemblers.
Introduction
Programming or program development is the act of writing computer programs.
A computer program is a set of instructions written in a programming language that tells the computer
what to do in order to solve a problem. In other words, it is an algorithm expressed in a programming
language.
2. Programming Languages
A programming language is a set of words, symbols and rules for writing computer programs.
A programming language is determined by its syntax (rules guiding the formulations of the program
statement) and semantics (it describes the meaning of the program statement i.e. it is the vocabulary of the
language).
Two categories of programming languages exist: low-level languages and high-level languages.
49
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
3. Language Translators
To run a program on a computer, the program needs to be translated into the machine language of the
computer on which it will run.
A language translator is a computer program that translates program instructions from one language
into another without loss of original meaning. There are three types of language translators: assembler,
compiler, and interpreter.
a. Assembler
An assembler translates instructions from assembly language into machine language. This process is
called assembling.
50
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
b. Compiler
A compiler is a computer program that translates an entire block (i.e.at once) of instructions written in a
high-level language into machine language instructions before executing it.
The high-level language program is called source code and the generated machine language program is
called object code. Types of compiled languages are Pascal, C, C++, FORTRAN, JAVA, and Python.
Advantages of a Compiler
Fast in execution
The object/executable code produced by a compiler can be distributed or executed without having
the compiler present.
The object program can be used whenever required without the need of recompilation.
Disadvantages of a Compiler
Debugging a program is much harder. Therefore not so good at finding errors.
When an error is found, the whole program has to be re-compiled though compilation process is
so fast.
c. Interpreter
An interpreter is a computer program that translates and executes instructions written in a high-level
language into machine language instructions one line at a time. If a program performs a section code 1000
times, then the section is translated into machine code 1000 times since each line is interpreted and then
executed. Types of interpreters: BASIC, Lisp, Logo, etc.
Advantages of an Interpreter
Good at locating errors in programs since interpretation is done line by line.
Debugging is easier since the interpreter stops when it encounters an error.
If an error is corrected, there is no need to retranslate the whole program.
Disadvantages of an Interpreter
It is slow as interpretation is done line by line.
Translation has to be done every time the program is to be executed since no object code is
produced.
For the program to run, the interpreter must be present.
Debugging
An error in a computer program is known as a bug and debugging is the process of finding and
removing bugs. Syntax errors and semantic errors are bugs. A debugger is the software tool (or
person) used for this purpose.
a. Key Words
Any high-level language has its own set of predefined words which are used to write programs. Each of
these words has a specific meaning, and cannot be used for any other purpose within the programming
language IDE. These words are known as key words or reserved words.
A reserved word is a key word in a programming language that has a specific meaning and cannot be
used for any other purpose. E.g. If, Else, For, To and goto.
b. Operators
Operators are used to perform various operations on data. They may be arithmetic, relational or logical.
Arithmetic operators are +, -, *, %, ++ and -- and /. Relational operators include <, >, ==, <=, >= and !=.
Logic operators are NOT (!), AND (&&) and OR (||).
7. Programming paradigms
It is a fundamental style and methodology of computer programming. There are: imperative (procedural),
declarative, and object oriented Paradigms.
Imperative Paradigm: It is also known as procedural programming paradigm. It uses sequences of
instructions that are executed by the processor in the order the programmer designed. Imperative
programming manipulates variables and data structures/types stating how to obtain the results.
Examples: C, Pascal, FORTRAN, Ada, etc.
Declarative Paradigm: Made up of logic Paradigm and Functional Paradigm. Its control flow is
implicit i.e. the programmer states only what the result should look like not how to obtain it.
Logic paradigm is a programming process that consists of a set of facts and rules (axioms)
describing properties of a certain objects and theorems to be proved. E.g. Prolog, Mercury. Prolog
and Mercury are fifth generation language also called Natural Languages.
Functional programming paradigm: Here a program development is the construction of
mathematical functions. E.g. Lisp, Mathematical, etc.
Object Oriented Paradigm (OOP): Here software is viewed as a collection of units called objects
which receive messages each of which is capable of performing the actions that are immediately
related to it as well as requesting actions of other objects. Objects respond to messages by
performing operations called methods. Together, these objects interact to solve the problem. E.g.
design of graphical user interface using C++, Python, Perl, Java.
52
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
C is a very powerful all-purpose programming language mostly used in creating OSs and more
sophisticated programs.
C is one of the oldest programming languages and the most widely used, it was developed in the 70s, but
it is still very powerful. Learning C is a great way to introduce yourself to more complex languages as well,
and the knowledge you gain will be useful in almost every programming language and can help you get into
application development.
1. Why to use C?
C was initially used for system development work in particular the programs that make-up the operating
system. C was adopted as a system development language because it produces code that runs nearly as fast
as code written in assembly language. The modern version of C is Objective C & C++.
Some examples of the use of C might be: Operating Systems, Language Compilers, Assemblers, Text
Editors, Print Spoolers, Network Drivers, Modern Programs, Databases, Language Interpreters, and
Utilities.
3. Reserved/Key words in C
These are words that should not be used as an identifier to define variables or functions in a program.
53
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The #i n cl u d e<std i o.h > It is a preprocessor command which tells a C compiler to include
stdio.h file before going to actual compilation and also loads libraries that contain the functions
you need. In this example, st di o.h lets us use the pri nt f() and system( ) functions.
The i n t mai n () command tells the compiler that the program is running the function called
"main" and that it will return an integer when it is finished. All C programs run a "main" function.
The braces { } indicate that everything inside them is part of the function. In this case, they denote
that everything inside is a part of the "main" function.
/* …. */ : is comment and is ignored by the C compiler , to comment in C place / * at the start of the
comment and */ at the end.
54
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The p ri n tf () function displays the contents of the parentheses on the user's screen. The quotes
ensure that the string inside is printed literally. The \n sequence tells the compiler to move the
cursor to the next line.
The “ ; ” denotes the end of a line. Most lines of C code need to end with a semicolon.
The system (“pause”) or getch ar () command tells the compiler to wait for a keystroke input
before moving on. This is useful because many compilers will run the program and immediately
close the window. This keeps the program from finishing until a key is pressed.
The re tu rn () command indicates the end of the function.
Remark: Comments are part of the code that is not compiled but allows you to explain what is happening.
This is useful for reminding yourself what your code is for and for helping other developers who might be
looking at your code.
5. Using Variables
Variables allow you to store data either from computations in the program or from user input. Variables
need to be defined before you can use them and there are several types to choose from.
Some of the more common variables types in C programming include i n t , char , and fl oat . Each one
stores a different type of data.
Note: you can declare multiple variables on the same line as long as they are of the same type. Simply
separate the variable names with commas.
Like many lines in C, each variable declaration line, instruction line needs to end with a semicolon.
Variables must be declared at the beginning of each code block (The parts of your code that are enclosed
in {} brackets). If you try to declare a variable later in the block, the program will not function correctly.
Function Description
This function can be used to read keyboard input. Usage of this function generally
takes the form scanf("format", argument_list);, where format is a string of characters
that controls the input process. Some examples:
• scanf("%d", &x); /*read data into int variable x*/
scanf
• scanf("%f", &y); /*read data into float variable y*/
• scanf("%d%f", &x,&y); /*read data into integer variable x*/
/*and float variable y*/
• scanf("%c", &z); /*read data into character variable z*/
55
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Example 1
#include <stdio.h>
int main()
{
int x;
printf("Enter a number: ");
scanf("%d", &x);
printf("You entered %d", x);
system("PAUSE");
return 0;
}
The "% d " string tells scanf to look for integers in the user input.
The & before the variable x tells scanf where to find the variable in order to change it, and stores
the integer in the variable.
The final p ri n tf command display the inputted integer to the user.
Example 2:
1. /*this program computes the dimensional weight of a box*/
2. #include<stdio.h>
3. Int main (void)
4. {
5. Int height, length, width, volume;
6. Float weight;
7. Printf (―enter the length of box: ‖);
8. Scanf (―%d‖, &length);
9. Printf (―enter the width of box: ‖);
10. Scanf (―%d‖, &width);
11. Printf (―enter the height of box: ‖);
12. Scanf (―%d‖, &height);
13. Volume = length*width*height;
14. Weight = (volume+165)/166;
15. Printf (―volume (cubic inches) : %d\n‖, volume);
16. Printf (―dimensionalweight (pounds) : 2f\n‖, weight);
17. Return 0;
18. }
56
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
1 A comment describing what the program does and is ignored by the compiler.
3 The main function starts the execution of the program. The keyword ‗int‘ indicates
the return type is an integer. Also the keyword ‗void‘ indicates that the function takes
no arguments.
4, 18 The braces each indicate where the body of the program begins and ends
respectively. They can also be use to group statements.
5, 6 Define the type of data that each variable i.e. height, length, width, volume and
weight will hold. Here we have integers and float (decimal numbers)
7, 9, 11 Printf statement: it causes the message ‗enter length, width, and height of box‖ to be
displayed on the console screen.
8, 10, 12 Scanf statement: it reads input and stores it in the specified variable. %d indicate s
that the input is a decimal integer, %f; input is a floating point number, %s input is a
string. The ‗&‘specifies the location where the variable is stored.
13, 14 Computations
15, 16 Printf displays the values of the numeric expressions volume and weight as integers
and floating point numbers respectively. For the weight, ‗2f‘ specifies that the value
printed will have just 2 digits after the decimal point. The ‗\n‘ character tells printf to
move the cursor to the beginning of a new line.
17 Indicates that the main function terminates and the program returns the value ‗0‘ to
the O.S. when it terminates or returns a value to the user.
Operators Description
== Equality. The result is true if both operands are equal, and false otherwise
Not equal. The result is true if operands are not equal, and false if they are
!=
equal
Greater than. The result is true if the left operand is greater than the right
>
operand and false otherwise.
Less than. The result is true if the left operand is less than the right operand,
<
and false otherwise.
Greater than or equal to. The result is true if the left operand is greater than or
>=
equal to the right operand, and false otherwise.
Less than or equal to. The result is true if the left operand is less than or equal
<=
to the right operand, and false otherwise.
Logical operators:
These operators perform logical operations on their operands; the result is a true or false
Operators Descriptions
The AND operator.
&& In C, the result is true if both operands are non-zero, otherwise the result is false.
In Pascal, the result is true if both operands are true, otherwise the result is false.
The OR operator.
In C, the result is true if any of the two operands is non-zero, otherwise the result is
|| false.
In Pascal, the result is true if any of the two operands is true, otherwise the result is
false.
The NOT operator. Used to reverses the logical state of its operand. If a condition is
! true
then the NOT operator will make false
Operators Descriptions
Simple assignment operator. Assigns the value of the right hand side expression to the
left hand side operand Statements involving the assignment operator may look
= mathematically incorrect.
Examples: c = c + 5; (in C) or c := c + 5; (in Pascal) should be interpreted as follows:
Assign to variable c a value which is the same as the old value of c, plus 5.
These C operators perform an arithmetic operation, then assign the result to the left
+=,-=,*=, operator.
/=, %= Example, += (add AND assignment operator) adds right operand to the left operand
and assign the result to left operand. Hence, c += 5 is equivalent to c = c + 5;
58
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
You can use mathematical expressions to manipulate the data that you have stored in your variables. The
most important distinction to remember for mathematical expressions is that a single “=” sets the value of
the variable, while ―= =‖ compares the values on either side to see if they are equal.
x = 3 * 4; /* sets "x" to 3 * 4, or 12 */
x = x + 3; /* adds 3 to the original value of "x", and sets the new value as the variable */
x == 15; /* checks to see if "x" equals 15 */
x < 10; /* checks if the value of "x" is less than 10 */
59
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The program takes the input from the user and takes it through the IF statements. If the number satisfies
the first statement, then the first p ri nt f statement is returned. If it does not satisfy the first statement, it is
taken through each ELSE IF statement until it finds one that works. If it doesn't match any of them, it goes
through the ELSE statement at the end.
9. Loops
Loops are one of the most important aspects of programming, as they allow you to repeat blocks of code
until specific conditions are met. This can make repeating actions very easy to implement, and keeps you
from having to write new conditional statements each time you want something to happen.
Loops use what is known in C as Increment and Decrement. The unary operator ++, --, is used to
increment and decrement which acts upon single operand. Increment operator increases the value of variable
by one. Similarly, decrement operator decreases the value of the variable by one. These operators can only
be used with the variable but can‘t be used with expression ++(x+y+z) or constants ++6.
There are three main types of loops: FOR, WHILE, and DO...WHILE.
In the above program, y is set to 0, and the loop continues as long as the value of y is less than 15. Each
time the value of y is printed, 1 is added to the value of y and the loop is repeated. Once y = 15, the loop will
break.
Use a WHILE loop.
WHILE loops are more simple than FOR loops. They only have one condition, and the loop acts as long
as that condition is true. You do not need to initialize or update the variable, though you can do that in the
main body of the loop.
#include <stdio.h>
int main()
{
int y=0;
while (y <= 15){
60
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
printf( "%d\n", y );
y++;
}
getchar();
}
The y++ command adds 1 to the y variable each time the loop is executed. Once y hits 16 (remember,
this loop goes as long as y is less than or equal to 15), the loop breaks.
Use a DO...WHILE loop.
This loop is very useful for loops that you want to ensure run at least once. In FOR and WHILE loops,
the condition is checked at the beginning of the loop, meaning it could not pass and fail immediately.
DO...WHILE loops check conditions at the end of the loop, ensuring that the loop executes at least once.
#include <stdio.h>
int main()
{
int y;
y = 5;
do {
printf("This loop is running!\n");
} while ( y != 5 );
getchar();
}
This loop will display the message even though the condition is FALSE. The variable y is set to 5 and the
WHILE loop is set to run when y does not equal 5, so the loop terminates. The message was already printed
since the condition is not checked until the end.
1. HTML overview
HTML stands for Hypertext Markup Language and it is the most widely used language to write Web
Pages. It was created by Tim Berners-Lee a British scientist in late 1991. Hypertext refers to the way in
which Web pages (HTML documents) are linked together. Thus, the link available on a webpage is called
Hypertext. As its name suggests, HTML is a Markup Language which means you use HTML to simply
"mark-up" a text document with tags that tell a Web browser how to structure it to display. Originally,
HTML was developed with the intent of defining the structure of documents like headings, paragraphs, lists,
and so forth to facilitate the sharing of scientific information between researchers. Now, HTML is being
widely used to format web pages with the help of different tags available in HTML language.
61
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
To create a web page you need a text editor like notepad, notepad++, blocknote, Adobe Dreamweaver,
Brackets, CoffeeCup, Edit plus, etc. Save the code with extension .html or .htm and then run (compile)
the code using any of your favourite web browsers like Internet Explorer or Google Chrome, or Firefox
etc.
After running this code with Mozilla Firefox or any other browser, the output will look like this:
3. HTML Tags
It is a set of characters constituting a formatted command for a web page. As told earlier, HTML is a
markup language and makes use of various tags to format the content. These tags are enclosed within angle
braces <Tag Name>. Except few tags like <hr /> tag is an example of the empty element where you do not
need opening and closing tags, as there is nothing to go in between them. The <hr /> element has a space
between the characters hr and the forward slash. Most of the tags have their corresponding closing tags. For
example, <html> has its closing tag</html> and <body> tag has its closing tag </body> tag etc.
To learn HTML, you will need to study various tags and understand how they behave while
formatting a textual document. Learning HTML is simple as users have to learn the usage
of different tags in order to format the text or images to make a beautiful webpage.
World Wide Web Consortium (W3C) recommends using lowercase tags starting from HTML4.
Remark: The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the
HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:
<!DOCTYPE html>
5. HTML Elements
An HTML element is defined by a starting tag. If the element contains other content, it
ends with a closing tag, where the element name is preceded by a forward slash as shown below with few
tags:
63
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
but <p> This is paragraph</p> is a paragraph element. There are also Nested HTML Elements where it is
very much allowed to keep one HTML element inside another HTML element:
<!DOCTYPE html>
<html>
<head>
<title>Nested Elements Example</title>
</head>
<body>
<h1>This is <i>italic</i> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
</body>
</html>
7. HTML Attributes
We used them so far in their simplest form, but most of the HTML tags can also have attributes, which
are extra bits of information.
An attribute is used to define the characteristics of an HTML element and is placed inside the element's
opening tag. All attributes are made up of two parts: a name and a value:
The name is the property you want to set. For example, the paragraph <p> element in the
example carries an attribute whose name is align, which you can use to indicate the alignment of
paragraph on the page.
The value is what you want the value of the property to be set and always put within quotations.
The below example shows three possible values of align attribute: left, center and right.
Attribute names and attribute values are case-insensitive. However, the World Wide Web
Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4
recommendation.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Align Attribute Example</title>
</head>
<body>
<p align="left">This is left aligned</p>
<p align="center">This is center aligned</p>
<p align="right">This is right aligned</p>
</body>
</html>
64
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
8. Core Attributes
The four core attributes that can be used on the majority of HTML elements (although not all) are: Id,
Title, Class, and Style
These attribute which provide additional information about an element. Attributes are always assigned in
the opening tag and always contain a name and value pair. The value must be contained in double quotes.
<tag name=‖value‖> Content </tag>
Attribute Descriptions
Class Specifies one or more class names for an element (CSS)
Id Specified a unique id for an element
9. HTML Lines
The HTML horizontal rule can be used to divide content areas and uses the <hr> tag. Inserting the <hr>
tag will draw a horizontal line across your content area.
65
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Example
<a href=http://www.andar360.com> Andar360.com</a>
<a id=”top”>Top of the page</a>
<a href=”#top”>Go to the top of the page</a>
<a href=”home.html” target=”_parent”>Go to Home Page</a>
Target Attribute
66
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
There are five values for the target attribute. The target attribute specifies where to open the linked
document and is supported in all major browsers. As with all attributes the value must be contained in
quotes.
Value Description
Value Description
_Top Opens the linked document in the full body of the window
67
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
_________________________________________________________________
68
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
Communication is a process whereby information is enclosed in a package and is channelled and
imparted by a sender to a receiver via some medium. The receiver then decodes the message and gives the
sender a feedback. All forms of communication require a sender, a message, and an intended recipient.
Communication requires that all parties have an area of communicative commonality. There are auditory
means, such as speech, song, and tone of voice, and there are nonverbal means, such as body language,
sign language, paralanguage, touch, eye contact, through media, i.e., pictures, graphics and sound, and
writing. It should be noted here that communication is only said to have taken place when the recipient
understands the message or information sent.
In data communication the following basic terms are frequently used:
Data: a collection of facts in raw form that becomes information after processing.
Signal: an electric or electromagnetic encoding of data.
Signaling: propagation of signals across a communication channel.
Transmission: sending of data from one place to another by means of signals.
Five basic components in a communication system.
Data Source: creates data for transmission,
Transmitter: encodes data for transmission,
Communication channel: connecting medium between communicating devices,
Receiver: decodes transmitted data back to original,
Destination: the final destination of the transmission.
Example: John calls Peter on phone.
The data source is John, the transmitter is John‘s phone, the communication channel is the telephone cable
or microwave, the receiver is Peter‘s phone and the destination is Peter.
1. Communication Channels
A communication channel is a pathway over which information can be conveyed. It may be defined by a
wire that connects communicating devices, or by a radio, laser, or other radiated energy source that has no
obvious physical presence. Information sent through a communication channel has a source from which the
information originates, and a destination to which the information is delivered. Although information
originates from a single source, there may be more than one destination, depending upon how many receive
stations are linked to the channel and how much energy the transmitted signal possesses. Any
communication channel has a direction associated with it:
a. Simplex Mode
In simplex mode, signals are transmitted in only one direction. The flow of information is unidirectional
from transmitter to receiver always. Examples are radio broadcasting, television broadcasting, computer to
the printer connection and CPU to monitor communication.
69
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
While Analogue communications is the transfer of continuously varying information signal, analogue
communications is the transfer of discrete messages. The messages are either represented by a sequence of
pulses by means of a line code (baseband transmission), or by a limited set of continuously varying wave
forms (pass band transmission), using a digital modulation method.
70
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Infrared Transmissions
This is a type of technology that makes use of very high frequencies approaching that of visible light in
the electromagnetic spectrum to carry out close broadcast transmission in a close range. Infrared signals can
71
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
easily be blocked by opaque object objects and can equally receive interference from light, the reason why
they are mostly made use of in command alarm or door opening systems in super markets, office buildings
etc. Infrared transmissions are limited to short distances.
Microwave Transmission
Just like the infrared technology, the microwave technology also makes use of high frequencies but
involves both long and short distance communications especially that involving satellites. In this type of
communication, the emitter and the receiver must be within the line of sight of each other.
Radio waves
This is the old wireless technology that has often been used by the FM and AM radios.
The Bluetooth wireless transmission technology
This is the most recent of the wireless technologies. It operates on a 2.4GHz frequency band with a speed
of about 1 or 2 Mbps. With this technology, a single device can communicate continuously with several
other devices within a room such as printers, keyboards laptops mobile phones etc. All these devices have
in-built features that automatically adjust the signals for interference.
Two major hardware components used in the wireless communication technology are:
The wireless Access Point (WAP) or Access Point (AP)
This is a small box with antenna(s) used to broadcast radio waves, used to send and receive data
signals in both directions. Good broadcasting is recorded within a range (hotspot) of 10m to 16km
after which the signal grows weaker as you move from the AP or WAP. There exist some devices
that incorporate both the AP and a router e.g. Linksys, Cisco and 3COM.
Wireless adapters
These are devices that are very similar to the network interface cards and are often connected in
much the same way. There exist in many forms both internal and external to the computer.
Intranet
An intranet is a private computer network that uses Internet Protocol technologies to securely share any
part of an organization's information or network operating system within that organization. The term is used
in contrast to internet, a network between organizations and instead refers to a network within an
organization.
Extranet
An extranet is a private network that uses Internet protocols network connectivity. An extranet can be
viewed as part of a company's intranet that is extended to users outside the company usually via the Internet.
7. Network/communication protocols
The protocols in human communication are rules about appearance, speaking, listening and
understanding. These rules, also called protocols of conversation, represent different layers of
communication. They work together to help people communicate successfully. The need for protocols also
applies to computing systems.
The Internet Protocol (IP) and the Transmission Control Protocol (TCP) are the most important of these,
and the term Internet Protocol Suite, or TCP/IP suite, refers to a collection of its most used protocols. Most
of the communication protocols in use on the Internet are described in the Request for Comments (RFC)
documents of the Internet Engineering Task Force (IETF).
73
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
Computer network is a collection of computers and other related devices that are connected together so
they can communicate and share resources. The smallest network can be as simple as two computers linked
together. The resources shared include files, folders, printers, disk drives and anything else that exists on a
computer. Any computer or device on a network is called a node.
Networking is the term that describes the processes involved in designing, implementing, upgrading,
managing and otherwise working with networks and network technologies.
Continue developing these notes from your notes in form 3. Type and print.
_________________________________________________________________
_________________________________________________________________
74
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Introduction
Computers differ in size and shape such that one used in a hospital laboratory is different from that used
in an office and a computer that is used in weather forecasting is different from the two kind mentioned
above.
To facilitate the study and understanding of this machine, they are often divided into groups based on
certain criteria for example; Generation, Purpose, Size and Data representation.
1. Generation
Generation in computer terminology is a change in technology a computer was being used. Initially, the
generation term was used to distinguish between varying hardware technologies but nowadays, generation
includes both hardware and software which together make up an entire computer system. Each generation is
characterized by a medium technological development which radically changed the way computer resulting
in increasingly smaller, cheaper, more powerfully and more efficient machines and they include the 1st, 2nd,
3rd, 4th and 5th.
First Generation: The period of first generation: 1940-1956. Vacuum tube based. And used
batch Oss. Inputs were based on punched cards and paper tape while output was displayed on
print out.
Second Generation: The period of second generation: 1952-1964. Transistor based. Still
relayed on punched cards and print outs. In this generation assembly language and high level
programming language like FORTRAN, COBOL was used. They were Batch processing and
Multiprogramming Operating system used.
Third Generation: The period of third generation: 1964-1972. Integrated Circuit based. Users
interacted with computers using keyboards and monitors. An interface with operating system
allowed the device to run more than one program at a time with a central program monitoring
the memory.
Fourth Generation: The period of fourth generation: 1972-1990. Very Large Scale Integrated
circuits (VLSI) microprocessor based. In this generation Time sharing, Real time, Networks,
Distributed Operating System were used.
Fifth Generation: The period of fifth generation: 1990-onwards. Ultra Large Scale Integration
(ULSI) microprocessor based. This generation is based on parallel processing hardware and AI
(Artificial Intelligence) software.
75
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
a. Super computers
These are the largest, fastest and most expensive computers. A typical super computer deals with very
large quantities of data and can be used simultaneously by thousands of people who can be in different
offices or towns who have access to it by mean of devices called terminals. Its speed is measured in floating
points per second (FLOPS). These are mostly used where there is heavy demand for processing speed e.g.
weather forecasting, creation of military weapons, space exploration etc. and are mostly found in big
universities, research institutions, governmental agencies, and typically use operating systems such as
LINUX and UNICOS.
b. Mainframe computers
This is the second class of largest computers and is similar to super computers in many ways but is
generally smaller, cheaper and slower. They support more simultaneous processes than super computers
even though a typical super computer will perform a single operation faster than it. Just like super
computers, several terminals in different geographical locations can be connected to a mainframe thus
making it possible for hundreds of people to use the computer at the same time. They are mostly used in
banks, insurance companies and in the internet as servers. They usually have a speed measured in millions
of instructions per second (MIPS).
c. Midrange computers
They are designed to serve tens of people at a time each sitting on a terminal. Although they may be
accessed and used by the above number of users, these users are usually at proximity of the computers.
d. Microcomputers
These are the smallest, least expensive and slowest type of computers but are however the most
diversified, affordable and least expensive type of computers. They are designed to be used by one person
and are usually called personal computers. A typical microcomputer is fundamentally implemented with a
microprocessor, memory, storage, input and output units.
3. Base on purpose
Here they are grouped as special and general purpose computers:
Special purpose computers: Also called embedded computers, it is designed for a particular job
only.
General purpose computers: Also called jack-of-all trade, it is designed to solve multiple
problems/tasks.
_________________________________________________________________
76
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Discuss the ethical and moral obligations of the users and managers of computerized information
systems.
I. Computer Ethics
Introduction
Ethics refers to the principles of right and wrong that individuals acting as free moral agents, use to
make choices that guide their own behavior. It places a value on human acts according to whether they are
good or bad.
Note: moral ethics does not depend on the majority, what is good is good even if nobody is doing it and
what is wrong is wrong even if everyone is doing it.
Computer ethics refers to standards of good conduct applied within the use of computers. It defines
principles for judging computing acts whether they are good or bad.
77
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Within this document, the term ‗relevant authority‘ is used to identify the person or organization which has
authority over your activity as an individual. If you are a practicing professional, this is normally an employer
or client. If you are a student, this is normally an academic institution.
78
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Data must be processed in accordance with the right of the data subject.
Appropriate security measures must be taken against unauthorized access.
Worm
It is a self-replicating malicious program which uses a computer network to send copies of it to other
computers (nodes) on the network and it may do so without any user intervention. Unlike a virus, it does not
need to attach itself to an existing program. Worms cause harm to the network by consuming bandwidth
whereas viruses corrupt or modify files on a targeted computer.
Trojan horse
It is malware that appears to perform a desirable function for the user prior to run or install but instead
facilitates unauthorized access of the user's computer system. Once a Trojan horse has been installed on a
target computer system, a hacker may have access to the computer remotely and perform various operations,
limited by user privileges on the target computer system and the design of the Trojan horse.
Spyware
It is software that monitors a computer user‘s activity without their knowledge and reports it to a central
location. The purpose of spyware ranges from purportedly benign (enforcing copyrights, displaying targeted
advertisements) to very malicious (stealing passwords and credit card numbers).The most common way to
get spyware on your computer is to install it yourself when you are tricked into installing free software.
Logic bomb
Also known as slag code, is a piece of computer code that executes a malicious task such as clearing a
hard drive or deleting specific files when it is triggered by a specific event. It is secretly inserted into the
code of a computer's existing software, where it lies dormant until that event occurs. This event may be a
specific date and time or failure to input a command at a certain time.
Software Key loggers
It is software that record keystrokes entered by a user, usually to secretly monitor and/or maliciously use
this information. They can record instant messages, email, passwords and any other information you type at
any time using your keyboard. Software key loggers may also be embedded in spyware, allowing your
information to be transmitted to an unknown third party over the Internet.
Denial or Degradation of Service (DoS) Attack
81
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
It is an attack to a computer system that puts it out of action by overloading it with data in a way that the
system was never prepared to handle. A DoS attack makes the system unavailable to its intended users.
Social Engineering
It refers to a non-technical kind of intrusion that relies heavily on human interaction and often involves
tricking other people to break normal security procedures. A person using social engineering to break into a
computer network might try to gain the confidence of an authorized user and get them to reveal information
that compromises the network's security. Social engineers often rely on the natural helpfulness of people as
well as on their weaknesses.
Cyber stalking Cyber bullying
It is a crime in which the attacker harasses a victim using electronic communication, such as e-mail or
instant messaging (IM), or messages posted to a web site or a discussion group. Cyber stalking messages
differ from ordinary spam in that a cyber-stalker targets a specific victim with often threatening messages,
while the spammer targets a multitude of recipients with simply annoying messages.
Cyber terrorism
Cyber terrorism can be defined as an act of terrorism committed through the use of cyberspace or
computer resources. As such, a simple propaganda in the Internet, that there will be bomb attacks during the
holidays can be considered cyber terrorism.
Spamming
This is the act of sending unwanted bulk of e-mail for commercial purposes.
Other types of computer crime are: scamming, theft of computer equipment, pharming, spoofing, social
engineering and phreaking.
3. Computer Security
Computer security is the process of preventing and detecting the unauthorized use of computer systems
from accidental or intentional harm by unauthorized users. Prevention helps stop unauthorized users from
accessing any part of the computer system by controlling access to the system, while detection helps
determine whether or not someone attempted to break into the system, if they were successful, and what
they may have done. Computer security has three main goals, confidentiality, integrity and availability,
which can be conveniently summarized by the acronym "CIA":
Confidentiality ensures that information is not accessed by unauthorized persons.
Integrity ensures that information is not altered by unauthorized persons in a way that is not
detectable by authorized users.
Availability ensures that the system is running and reachable.
Different mechanisms are used to ensure the security of computer systems.
a. Authentication
Authentication is the process of determining if someone is who they declare to be. Three basic
authentication strategies are:
something the user knows (password)
82
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Passwords
When authentication is done through the use of a password, knowledge of the password is assumed to
guarantee that the user is authentic. Passwords can be guessed or "cracked" and so if you are using a
password to protect your system, the following guidelines will help make them more secure:
Keep your password secret.
Change your password regularly.
Make your password at least eight characters long.
Do not use proper words of phrases - these can be found using a dictionary cracker.
Use a mixture of upper and lower case letters and numbers.
They should be different for each system that is used.
The number of attempts to enter a correct password should be limited so as to frustrate intruders
or hackers.
Smart Card
A smart card is a small card that holds user authentication information. When the card is inserted into a
card reader, electrical fingers wipe against the card. The information in the card is read and used to
authenticate the person. Cards can be stolen and so are not as reliable as biometrics.
Biometric
Biometrics is the science and technology of measuring and analyzing biological data. In computer security,
biometrics refers to the use of measurable biological characteristics such as fingerprints, eye retinas, iris
patterns, facial patterns, voice patterns or hand measurements, to identify a person. It is the safest
authentication technique.
b. Encryption
Encryption is the process of transforming data or information using an algorithm into a form unreadable
by anyone except the intended recipient. The original message is known as plaintext, the algorithm is cipher
and the encrypted text is the cipher text. To read an encrypted data, one must have access to a secret key or
password that enables you to decrypt it. The original data is known as plain text, the algorithm is cipher and
the encrypted data is cipher text. The reverse process is referred to as decryption.
c. Firewall
A firewall is a computer program or a device designed to prevent unauthorized access to or from a
private network. Firewalls are implemented in either hardware or software form, or a combination of both.
They prevent unauthorized Internet users from accessing private networks connected to the Internet. All
messages entering or leaving the network must pass through the firewall which examines each message and
blocks those that do not meet the specified security criteria. Some Operating Systems like Windows XP, 7,
8, Mac OS X, and more have built-in firewalls.
d. Intrusion Detection
Intrusion detection is the art and science of sensing when a system or network is being used
inappropriately or without authorization. An intrusion-detection system (IDS) monitors system and network
resources and activities and, using information gathered from these sources, notifies the authorities when it
identifies a possible intrusion.
83
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
e. Digital Signatures
A digital signature is basically a way to ensure that an electronic document is authentic. Authentic means
that you know who created the document, and you know that it has not been altered in any way since that
person created it. A digital signature is a computed digest of the text that is encrypted and sent with the text
message. The recipient decrypts the signature and compares it with the received text. If they match, the
message is authenticated and proved intact from the sender.
Explain Economic reasons for using computers and the effects of their use across a range of
application areas.
Explain the social impacts of computers.
Introduction
In as much as the computer is a very vital tool for every daily use, it can also be a very harmful tool if
poorly used. For this reason, users must ensure that they follow health measures and apply safety
precautions as they use the computer.
84
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
The widespread use of computers has affected people and organizations in many ways. Information
Technology has completely broken distance and time barriers, transforming the world into a global village
that is a community whereby communication on a world scale has been reduce to communication on a
village scale. Information Technology which is the embodiment of computer technology, communication
technology, and digital technology has given rise to phenomena like information society, digital revolution,
digital economy, and information age.
Information society: it is a society in which the acquisition, manipulation, and distribution of
information plays a central role in most sectors of life (e.g. social, cultural, economic, and political).
Such a society is usually integrated by complex communication networks.
Digital revolution: it is the marking feature of the information age.
Digital economy is a term for all the economic processes, transactions, interactions, and activities
that are based on digital technologies mainly the computer. These activities could be carried with or
without the use of Internet connectivity.
Information age: it is the name given to the present era in which we live. This era began when
digital computers and related technologies were developed in the second-half of the 20th century.
These computers or computer-related technologies take up new roles in various forms. Some people say
these technologies have made life easier and more convenient. Others say they have made life more complex
and stressful. Some of the impacts of computers include:
1. Positive impacts
ICT has impacted the world positively in several ways. The following are some of the benefits of ICT to
mankind:
(1) Fostering of globalization: ICT has allowed different regions of the world not only to interact with one
another but also to be interdependent on one another. These regions share information quickly and
efficiently in many different areas, for example, governments, education, technology, commerce,
medicine, and culture.
(2) Cost effectiveness of businesses: the computerization of business processes has rendered the business
more cost effective.
(3) Faster and cheaper communication: with the help of ICT, communication has also become faster,
cheaper, and more efficient.
(4) Job creation: one of the greatest advantages of IT is the creation of new and interesting jobs. Database
administration, computer programmers, system analysts, hardware developers, software developers,
web designers, and computer technicians, etc. etc.
(5) Unlimited working hours: it is now possible with the help of ICT for companies all round the world to
open their doors all day making purchase from other parts of the world easier and more convenient.
(6) Faster and easier operation on data: a computer allows a user to manipulate data easily and quickly for
example downloading information from the Internet, sending text and images over the Internet.
(7) Broader market for sellers and buyers, faster and less-problematic bookings, advancement of science
and technology, improvement of security systems.
2. Negative impacts
(1) Unemployment and Reliability is not guaranteed i.e. insecurity like privacy concerns, phone call
interceptions, e-mail hacking, stealing of personal information, etc. etc. is the order of the day with IT.
(2) Dominant culture: ICT has contributed to some cultures dominating others. The United States for
example is a country whose culture is known to influence cultures in other countries. Languages too
85
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
have become overshadowed with English becoming the principal communication language for business
and many other things.
(3) Health problems: extended use of computers may cause finger and eyesight disorders such as
repetitive strain injury (RSI) and carpal tunnel syndrome (CTS). RSI refers to an injury to muscles and
tendons caused by continuous repetitive use of particular muscles especially by using a keyboard. CTS
refers to a painful disorder caused by compression of a nerve in the carpal tunnel; characterized by
discomfort and weakness in the hands and fingers and by sensations of burning or numbness. Other
examples of ICT-related health problems are: visual strain, headache etc.
(4) Lack of human abilities: computers are unable to reason, learn, or decide. They cannot understand and
don‘t have emotions. They cannot adapt to unexpected circumstances. Consequently, they are incapable
of doing some of the things that human beings would normally do.
(5) Addiction: games, chat rooms, search engines, shopping sites that can keep users occupied for hours
and days have cause some people to forgo their basic daily duties because of their strong commitment to
these exciting Internet services.
(6) Electronic waste (E-waste): computer and related devices usually generate e-waste. E-waste is the
collective name for all electronic devices that are no longer useful as originally indented. E.g.
computers, TV, DVD players, photocopiers are examples of e-waste. These wastes can be recycled. It is
the fastest growing segments of the world‘s waste stream.
(7) Digital divide: It is the gap between those with regular effective access to digital technologies and those
without i.e. the use of IT widens the gap between the developed (rich) countries and the developing
(poor) countries. Many developing countries do not have the expertise or the money to invest on IT and
these countries consequently tend to become poorer and poorer. Developed countries on the other hand
become richer and richer. Hence IT fosters digital divide.
_________________________________________________________________
Social networking can be defined as ―the relationship that exists between networks of peoples‖. Online
social networks give people the ability to communicate and share their interests with others over long
distances. However, social networking sites provide information for a group of people who share common
interests. Overall, the term ‗social media‘ is broader than ‗social networking sites.
________________________________________________________________
TYPES OF COMPUTING ENVIRONMENTS
Cloud computing: It is a collective use of software and hardware to deliver services over a network
especially the Internet. It works by giving users data and information on a cloud available to have
access to anywhere, anytime. Its categorized into cloud computing networks as follows; public, private,
community and hybrid networks and provides its services in three ways; infrastructure, platform and
software as a service.
Advantages:
Less cost.
Available 24/7 anywhere on any computer related device.
Flexible in capacity.
Automated updates on software.
High security and easily managed.
Disadvantages
Lack of personnel‘s
Difficult to fix what you can‘t see.
Lack of options.
Time sharing environment: This type of computing allows multiple users to share the system
simultaneously. Each user is provided a time slice and the processor switches rapidly among the users
according to it.
Client server environment: Here the client requests a resource and the server provides that resource.
A server may serve multiple clients at the same time while a client is in contact with only one server.
Personal computing environment: Here there is a single computer system where all the processing is
done.
Distributed computing environment: It contains multiple nodes that are physically separate but
linked together using the network. All the nodes in this system communicate with each other and
handle processes in tandem. Each of these nodes contains a small part of the distributed OS.
Cluster computing environment: It is similar to parallel computing as they both have multiple
CPU‘s. however, a major difference is that clustered systems are created by two or more individual
computer systems merge together which then work parallel to each other.
_________________________________________________________________
87
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
1. Typeface: The type face or font allows different styles to be used in a document.
2. Cut, Copy & Paste: The cut facility allow text to be cut off from a document. This could be
discarded or pasted back in the document at a different point. Copying allows a copy of the text
to be pasted into other parts of the document. The cut, copy and paste facilities also apply to
graphics which have been placed in the document.
3. Word-wrap: This means you that when typing you do not have to press enter at the end of each
line to start a new line as the computer automatically starts a new line when one is needed.
Pressing the enter key is used to start new paragraphs.
4. Find and Replace: Find allows you to search a document for all occurrences of word or phrase.
Replace allows the occurrences found to be replaced with another word or phrase. For example,
a secretary could use find and replace to change Mr. Smith with Miss Jones so that a letter can
be used again but sent to a different person.
5. Line spacing: Line spacing is used to change the amount of space between lines of text. Normal
text is single line space. This can be altered to 1.5 times or double or a number of points
6. Spell Checker: This uses a built-in dictionary to check all the text in the document.
88
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
7. Alignment: It is use to position the text on the page. We the left alignment, center alignment,
right alignment and justified text.
It is applicable in areas such as student ‗s records (report cards), charts and graphs, accounting,
budgeting, forecast, reports, etc. One of its great ability is that it can change figures and words in the cell
without the user having to do anything once a formula is introduced automatically.
Vocabulary: Our study focuses on the type of spreadsheet called Microsoft Excel.
1. An Excel file is also called a Workbook.
- Default title is Book1 but can be renamed to the name of your choice.
2. Ribbon broken into Tabs (Home, Insert, Page Layout, formulas, data, review, view, and the helper
―tell me what you want‖).
Tabs are broken into groups (Clipboard, Font, Alignment)
3. Name box (left) and formula bar (right) : Name box shows address of current cell; Formula bar shows
contents of current cell.
89
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
90
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
A mixed reference refers absolutely to either the column or row and relatively to the other. The
mixed reference A$1 always refers to row 1, and $A1 always refers to column A. You can
reference cells in other worksheets within the workbook.
Merge cells: This option merges the cells across the selected rows and columns and maintains default
alignment for the data type of the first cell of the merged cells.
To merge selected cells ➜ On the Home tab, in the Alignment group, display the Merge & Center list,
and then click Merge Cells to merge the entire selection, maintaining the horizontal alignment of the data
type in the first cell.
Working with multiple sheets
By default, a new workbook includes only one worksheet. You can add blank worksheets to the
workbook or copy or move worksheets from another workbook.
To insert a new worksheet
➜ Click the New sheet button at the right end of the worksheet tab section.
➜ On the Home tab, in the Cells group, click the Insert arrow, and then click Insert Sheet. To rename a
worksheet.
● Right-click the worksheet tab and then click Rename.
● Enter the new worksheet name and then press Enter.
Excel allows you to build formulas and functions that reference data stored on different worksheets
within the same workbook. So you can be on worksheet3 and refer back to a cell worksheet1.when
referring to a cell on a different worksheet, you type the name of the worksheet followed by an
exclamation sign (!) and then the column letter and the row number. If you are on worksheet2 in cell
D9 and want to refer back to cell C4 on worksheet1, the reference would look like this: D9
=worksheet1!C4.
If you are on a worksheet named March, and you want to refer back to cell C7 on a sheet name January,
the reference would look like this: =January!C7. If you want to make that an absolute reference, it
would look like this: =January!$C$7.
Excel also allows you to reference data stored in a different workbook i.e. a different Excel file. A cell
reference to a different excel workbook (file) would look like this: [workbook name]worksheet name
cell name, e.g. =[workbook1]worksheet1!N10. If its absolute then it would look like this:
=[workbook1]worksheet1!$N$10
Functions
91
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Spreadsheets usually include some built-in formulas called functions which are used for performing
predefined operations using the operations keyword. E.g. =SUM(D2:D15) is a function with the
keyword “sum” and this =D2+D3+D4+D5 is a formula.
Different calculations: The following are some of the many other functions for performing mathematical
calculations on spreadsheet.
- Copy a formula: to copy in a spreadsheet is just like in MS Word, click on the start cell and drag until
you reach the desired cell, then right click and chose copy.
The following are mathematical functions (sum, product, average, division (keyword is quotient),
subtraction (uses only a formula). Other advanced functions.
Exponents: D4^B2,
Square root : =SQRT(D4),
Minimum : =MIN(D2:D10),
Maximum : =MAX(D2:D10),
ROUND() to round a set a values to a specified number of decimal places,
TODAY () to show the current date,
Rank: =RANK(D2,D$2:D$10,O or 1). 0 is decreasing order and 1 is increasing,
COUNT: =COUNT(D2:D10) returns the number of cells that contents numeric value,
Count-if: =COUNTIF(D2:D10, ―condition‖),
The SUM-IF: =SUMIF(D2:D10, ―condition‖),
IF: =IF(logic test, ―condition if true‖, ―condition if false‖),
Nested if: it is the use of more than one IF function in a function e.g. =if (logic test, ―condition‖, if
(logic test, ―condition‖, if (logic test, ―condition‖, if (logic test, ―condition‖)))). Mostly used to give
grades to students‗ scores like A grade, B grade, C grade etc.
Concatenation: the function concatenate is used to relate up to 255 chain of text in a single chain. The
elements to be related can be text, numbers, and cell reference of cells or a combination of all. For
example if in the worksheet the surname of a person is in cell A1 and the name is in cell B1, these two
elements can be combined in one value in another cell with the help of this function.
Syntax: =concatenate (text1, text2, text3, …) OR concatenate (A1, B1, C1, ..) Which relates
the texts or contents of the cells without a space.
=concatenate(A1, “ ”,B1). Relates the contents of the cells with a space i.e. a space between the
contents of A1 and that of B1. NB: the next argument is a space.
Remark: you can equally use the ampersand or character ―&‖ like the operator to replace the
concatenation function with a formula. E.g. =A1 & B1 which is equivalent to the function
=CONCATENATION(A1, “&” ,B1).
92
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
COUNTA: =COUNTA(D2 :D10) Returns the number of cells that contain any content (are not
empty).
COUNTBLANK: =COUNTBLANK(D2 :D10) Returns the number of empty cells.
To hide selected rows or columns.
1. On the Home tab, in the Cells group, display the Format list.
2. In the Visibility section of the Format list, point to Hide & Unhide, and then click Hide Rows to hide
the selected row(s) or Hide Columns to hide the selected column(s).
To find hidden rows or columns in a worksheet
Open the Go To Special dialog box, click Visible cells only, and then click OK. In the highlighted
content, cells adjacent to hidden cells have a thin white border.
To unhide rows or columns.
1. Select the columns or rows on both sides of the hidden column(s) or row(s).
2. Right-click the selection, and then click Unhide.
Or
1. Select the rows or columns on both sides of the hidden rows or columns.
2. On the Home tab, in the Cells group, display the Format list.
3. In the Visibility section of the Format list, point to Hide & Unhide, and then click Unhide Rows to
display the hidden row(s) or Unhide Columns to display the hidden column(s).
To hide a worksheet
➜ Right-click the worksheet tab, and then click Hide. To display a hidden worksheet
1. Right-click any visible worksheet tab, and then click Unhide.
2. In the Unhide dialog box, select the worksheet you want to display, and then click OK.
Error Types: Certain types of errors happen in excel because of one of the following reasons.
Type When It Happens
#DIV/0! When you divide by ZERO
#N/A! When a formula or a function inside a formula cannot find the referenced data
#NAME? When the text in a formula is not recognized.
#NULL! When a space was used instead of a comma in formulas that reference multiple ranges.
A comma is necessary to separate range references
#NUM! When a formula has numeric data
#REF! When a reference is invalid
#VALUE! When the wrong type of operand or function argument is used
SBA POJECTS
1. THEMATIC AREA: DATA COLLECTION AND MANAGEMENT
Title: Organization of Data
Question: Collect and organize data on specifications of computers in an environment. (This might not
have a folder)
_______________________________________________________________________________________
2. WORD PROCESSING
Title: Production of a document
Computer Network
Many years ago, communication was very difficult. In our traditional societies, there was the use
of drums, whistles, xylophones, flutes etc. in communication. With the
advent (coming) of computer a network, communication has been
facilitated through media such as internet, phones, TV, radio.
The term computer network may sound very familiar because it is now
mostly used in institutions and in schools. The purpose of computer
network was to link separate computers together to aid communication.
In a broad scale, computer network is a collection of multiple computers, printers, scanners etc.
Networking has make life very easy for people in their professions and in the society.
There are several types of computer networks. Computer networks can be characterized by their
size, as well as by their purpose. We have the following types:
PAN (Personal Area Network)
Based on sized LAN (Local Area Network)
MAN (Metropolitan Area Network)
WAN (Wide Area Network)
SAN (Storage Area Network)
Based on purpose EPN (Enterprise Private Network
VPN (Virtual Private Network)
Types of physical network topologies include :
Network Architecture :
1) Peer-to-Peer network: Each computer independently stores its own software and
information but can access the information on the other computers without a server
intermediary.
2) Client/server network: This is a network in which one or more computers act as
servers and provide services to the other computers which are called clients.
94
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
1. Type the text given in Figure 1 using a word processor and save it as Task Word SBA. You are not
required to draw the border around the text.
2. Insert the graphics as shown on the same place on the text. (The graphics are found in folder provided
by the teacher).
3. Set all the margins to 1.27 centimeters.
4. Set the page size to ―A4‖ and the orientation to ―Portrait‖.
5. Set all the text to font type ―Times New Roman‖ and the font size to 12 points.
6. Set the text line spacing to ―1.5‖.
7. Text should be justified.
8. Set font size of heading to 16 points and center the heading.
9. Insert a page header with the following text: ―GBHS Dschang FORM 3‖
10. Insert a page number as footer and type the following text: ―Source: https:Itgeeks.com/OL/Notes‖
11. Set the page background color to ―Aqua‖
12. Print your work.
______________________________________________________________________________________
3. SPREADSHEET
Title: Market statistics
a) In cell E3, a formula to compute the Total Profit. Then copy this formula to compute the other
Total. Profits up to Row 11.
[N.B. Total Profit is Profit per Item multiplied by Quantity Sold].
b) The Amount Ordered (Per Item) is shown in cell B1. Using absolute referencing give a formula
to compute the Quantity left in cell F3. Then copy this formula to compute the other Quantity
left up to Row 11.
[N.B. Quantity left is Amount Order (Per Item) Minus Quantity sold].
3) Give the IF statement that should be used in cell G3 to display the Stock level okay or Order more
stock message with respect to quantity left.
[N.B. Quantity left greater than or equal to 50 equals Stock level okay and Order more stock
otherwise].
4) In cell H3, enter the formula to order the item in descending order based on the total profit. Then copy
the formula up to cell H11
5) Copy the corresponding formula inserted in cell G3 to the corresponding cells, up to Row 11.
6) Write the formula in cell E12, to calculate the Total profit.
7) Write the formula in cell E13, to determine the highest profit.
8) Write the formula in cell E14, to count the number of item with quantity left less than 100.
Save your work as Task Spreadscheet SBA.
_______________________________________________________________________________________
4. WEB AUTHORING
Title: Inserting an image on a particular side on a web page.
Task:
1. <!DOCTYPE html>
2. <html lang="en">
3.
4. <head>
5. <title>Cameroon-Region</title>
<link rel="stylesheet" href="mystyle.css">
6.
</head>
7.
8. <body>
9. <div>
10. <img src="cmr-flag.png" alt="cmr-flag" height="100px" width="200px" align="center"/>
11. <h1> Cameroon </h1>
12. <i>Peace-Work-Fatherland</i>
13. </div>
14. <p><b>Cameroon</b>, officially the <b>The Republic of Cameroon, </b> is a country in
15. the West-central Africa. It is bordered by Nigeria to the west and North; Chaf to the northeast;
16. the Central African republic to the east; and Equatorial Guinea, Gabon and the Republic of
17. congo to the south.</p>
18. <p>The Country has 10 regions with their headquarters as follows:</p>
19. <table border="1">
20. <tr>
<th>Region</th>
21. <th>Headquarters</th>
22. </tr>
23. <tr>
24. <td>Adamawa</td>
24. <td>Ngaoundere</td>
26. </tr>
27. <tr>
96
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
28. <td>Center</td>
29. <td>Yaounde</td>
30. </tr>
31. <tr>
32. <td>East</td>
<td>Bertua</td>
33. </tr>
34. <tr>
35. <td>Far North</td>
36. <td>Maroua</td>
37. </tr>
38. <tr>
39. <td>Littoral</td>
40. <td>Douala</td>
41. </tr>
42. <tr>
43. <td>North</td>
<td>Garoua</td>
44.
</tr>
45. <tr>
46. <td>Northwest</td>
47. <td>Bamenda</td>
48. </tr>
49. <tr>
50. <td>South</td>
51. <td>Ebolowa</td>
52. </tr>
53. <tr>
54. <td>Southwest</td>
<td>Buea</td>
55.
</tr>
56. <tr>
57. <td>West</td>
58. <td>Bafoussam</td>
59. </tr>
60. </table>
61. </body>
62.
63. </html>
64.
65.
66.
67.
Type the HTML code given below in a text editor like notepad or block note to create a web page. After
viewing the output, report on it.
Save the file as Task WEB SBA.html
Look for the image Cameroon.png and insert.
______________________________________________________________________________________
5. PROGRAMMING
Title: Using the WHILE loop.
Task:
The Figure below shows a program written in C.
97
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
#include <stdio.h>
int main() {
int i, j, number, max;
printf("Enter a number: ");
scanf("%d", &number);
max = 10;
i = 1;
while (i <= number) {
for (j = 1; j <= max; j++) {
printf("%d x %d = %d\n", j, i, i*j);
}
printf("\n");
i++;
}
system("PAUSE");
return 0;
}
7. COMPUTER MAINTENANCE
Title: Software Installation
Question: Give the detail steps on how to install Window‘s Operating System from a USB key.
______________________________________________________________________________________
98
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
8. DATABASE
Title: Annual Sponsored Car Wash
Task: Part of the database to record information about the cars involved in the school‘s annual sponsored car
wash is shown below.
CarRegNumber CarMake CarModel TeacherName CleaningInside? AmountPaid CarWashDate
CT03 OEN Citroen CT3 Mrs Jane N $4.00 05/09/2021
FR14 ODF Ford Fiesta Mr John N $4.00 05/09/2021
WX07 GIF Vauxhall Astra Miss Jacewitz Y $4.50 05/09/2021
PG17 HGF Peugeot 308 Miss Brook N $4.00 05/10/2021
B4 BMW BMW M5 Mr Thomas Y $4.50 05/10/2021
NA64 OLP Nissan Juke Mr Styles N $4.00 05/10/2021
HI18 PPN Hyundai Santa Fe Mr Willian Y $4.50 05/11/2021
FT15 MIS Fiat 500 Miss Price Y $4.50 05/11/2021
9. COMPUTER NETWORKS
Title: Installing a computer network
Task: propose materials for installing and configuring a network in computer laboratory of your
school.
_______________________________________________________________________________________
99
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
100
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
EXPLANATORY NOTES
1) Web Authoring 2) Programming
The report should state the title of the mini The report should state the title of the mini
project, outline the tools used (editor and project, outline the tools used (language, IDE), the
browser), the tags used and their purpose, the instructions (input, output, control structures, …)
output design, the sample code, the steps used to used and their purpose, the output design, the
run the HTML code, the resulting output, sample code, the steps used to run the code, the
difficulties encountered, proposed solutions and resulting output, difficulties encountered,
other suggestions. proposed solutions and other suggestions.
An example structure of report in this section An example structure of report in this section
could be: could be:
Introduction: Candidates can discuss the purpose Introduction: Candidates can discuss the purpose
of the project, tools used, the main tags used (no of the project, tools used.
need to discuss standard tags like <HTML>, Design: Candidates can give the algorithm used
<title>,<body>,…), … (pseudocode or flowchart). For example the
Design: Candidates can give a sketch of the teacher can explain the project to students and ask
expected output. For example the teacher can them to draw the flowchart or write down the
explain the project to students and ask them to pseudocode, results of dry running, etc
sketch how the output would look like. Implementation: Candidates are expected present
Implementation: Candidates are expected to the source code (screen captures, written,), outline
present the source code (screen captures, written, the steps used in implementation (launch an IDE,
…), outline the steps used in implementation type code, save with the appropriate extension,...)
(launch editor, type code, save as HTML and present the output (screen captures, sketch,
document,...) and present the output (screen …).
captures, written, …). Testing: Candidates are expected to outline
Testing: Candidates are expected to outline strategies used in ensuring that their results match
strategies used in ensuring that their results match the expected output. Examples of strategies are:
the expected output. Examples of strategies are: Meeting the teacher to validate, comparing their
Meeting the teacher to validate, comparing their output with the initial design, testing with a set of
output with the initial design, values, ….
Evaluation/Conclusion: Candidates are expected Evaluation/Conclusion: Candidates are expected
to outline the problems encountered and how they to outline the problems encountered and how they
solved them, propose new methods of solving the solved them, propose new methods of solving the
same/similar problems, ... same/similar problems, ...
NOTE: This report may not exceed four pages. NB: This report may not exceed four pages.
101
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
102
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
103
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
105
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
INSTRUCTIONS TO CANDIDATES
Read the following instructions carefully before you start answering the question in this paper. Make
sure you have a soft HB pencil and an eraser for this examination.
1. USE A SOFT HB PENCIL THROUGHOUT THE EXAMINATION.
2. DO NOT OPEN THIS BOOKLET UNTIL YOU ARE TOLD TO DO SO.
Before the examination begins:
3. Check that this question booklet is headed “Ordinary Level -0795 Computer Science 1 ”.
4. Fill in the information required in the spaces above.
5. Fill in the information required in the spaces provided on the answer sheet using your HB pencil:
Candidate Name, Exam Session, Subject code and Candidate Identification Number.
Take care that you do not crease or fold the answer sheet or make any marks on it other than
those asked for in these instructions.
106
© GBHS Dschang 2021-2022
FORM 5
COMPUTER SCIENCE 2021-2022
107
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
16. A communication mode where data is transmitted 24. A Company network that allows only controlled
in one direction at a time is referred to as access from the outside and for specific purposes
A Simplex is called
B Duplex A Internet
C Half duplex B Intranet
D Half Simplex C Extranet
_____________________________________________ D Firewall
17. A collection of rules for the transmission of ___________________________________________
signals across networks is referred to as: 25. A logic gate whose functionality is the reverse of
A Topologies an OR gate is:
B Protocol A OR
C Hypertext B XOR
D Procedure C NOR
___________________________________________ D AND
___________________________________________
18. Input, processing, output and storage are
26. How many combinations of input values in a
collectively referred to as the:
two- input OR gate result in an output of 1?
A System unit cycle
A 3
B System operation cycle
B 1
C Communication link cycle
C 4
D Information processing cycle
D 8
___________________________________________
___________________________________________
19. Which of the following is NOT a database?
27. The binary equivalent of the decimal 133 is
A An address book
A 10000101
B A telephone directory
B 11000101
C A class list of form 5 students
C 10011001
D A list of 3 names.
D 11100101
___________________________________________ ___________________________________________
20. Which of the following means the same thing 28. In a flow chart, the symbol below represents:
as a row of data in a relation or table in a
database is?
A Tuple A Decision
B Attribute B A process
C Field C An output
D File D A stop
___________________________________________ ___________________________________________
21. What name is given to a column in a relation or 29. A printer whose printing mechanism involves
table in a database? pressing the characters against an inked ribbon
A Tuple on to a paper is:
B Attribute A Non-impact printer
C Entity B Impact printer
D File C Inkjet printer
___________________________________________ D Laser Printer
22. The use of the computers to create, store, revise
and produce text is known as: ___________________________________________
A Tele processing 30. ______ is a transmission mode in which data is
B Voice processing transmitted one bit at a time.
C Word processing A Parallel transmission
D Data processing B Serial transmission
___________________________________________ C Duplex transmission
23. A device capable of converting analog signal to D Half duplex transmission
digital signal and vice versa: ___________________________________________
A Multiplexers
B Demultiplexers
C Modem
D Coaxial cable
108
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
31. Which of the following network topologies 37. What construct is used in line 3.3?
uses a token? A Looping
A Mesh topology B Selection
B Bus topology C Sequence
C Star topology D Branch
D Ring topology __________________________________________
_________________________________________ 38. What value of y is printed when x is 4?
32. A network hardware device that connects two A 4
dissimilar networks is a : B 6
A Modem C 8
B Hub D 10
C Router __________________________________________
D Bridge 39. The input to a compiler is known as:
_________________________________________ A Source code
33. Computers in offices in the school B Object code
administrative block are connected so they can C Instruction code
share resources. D Program code
What type of network is most likely used? __________________________________________
A PAN 40. A communication medium in which messages
B WAN are transmitted as light pulses.
C LAN A Coaxial cable
D MAN B Twisted pair
__________________________________________ C Optic fibre
34. A hard disk in divided into tracks which are D System bus
further divided into: _________________________________________
A Clusters 41. _______ enables a wireless network to be
B Sectors connected to a wired network
C Heads A Hub
D Sub tracks B Switch
__________________________________________ C Access point
35. The performance of a computer system is D Network interface card
affected by all except: ________________________________________
A The clock speed 42. A barcode reader is an example of
B The RAM size _______input technology:
C The Hard disk size A OCR
D its power rating B OMR
____________________________________________ C MICR
Question 36 to 38 are based on the following algorithm: D Biometric
_______________________________________
1. Start 43. Uploading and downloading data to or from a
2. Input x remote computer is done using?
3. If (x mod 2 = 0) then A File transfer protocol
3.1 set y to x B Inter relay chat
3.2 set counter to 1 C Download manager.
3.3 while counter <= 3 do D Data transmission
set y to y+2
_______________________________________
Increment counter by 1
Endwhile 44. A technique of developing a miniature of
3.4 print y system with all functional components is
Else called:
3.5 print x A Systems Development life cycle
Endif B Stepwise refinement
4. Stop C Modeling
36. In what form has the algorithm been represented? D Prototyping
A Flowchart _________________________________________
B Pseudo code
C Source code
D Machine code
____________________________________________
109
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
45. In a PERT chart, tasks are represented using: 48. On typing a document, instead of typing 456
A Nodes the typist types 457. What king of error is this?
B Numbers A Transposition error
C Letter B Range check error
D Arrows. C Data type error
________________________________________ D Transcription error
46. A task that must be completed before another ____________________________________________
task can begin is called a: 49. Digital signals are stepwise and discrete while
A Dummy task analog signals are:
B Milestone task A Square and continuous
C Predecessor task B Stepwise and synchronous
D Critical task C Smooth and continuous
______________________________________ D Discrete and continuous
47. Which of these software is suitable for storing, ____________________________________________
retrieving and manipulating very large 50. In computer programming, what is a semantic
quantities of data? error?
A Spreadsheet A An error that occurs in the execution
B Database Management system of a program
C Decision Support System B A compilation mistake.
D General Purpose software C A mistake due to use of the wrong
______________________________________ instruction
D A mistake due to an instruction not having
the right form
____________________________________________
STOP
110
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Two Hours
Answer any FIVE questions
All questions carry 20 marks each. For your guidance, the approximate mark for each part of question is indicated
in the brackets
You are reminded of the necessity for good English and orderly presentation in your answers.
In calculations, you are advised to show the steps in your working, giving your answer at each stage.
111
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
X A
P
Y
R
B Q
Figure 1
112
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
(i) State the names of the logic gates labeled A, B and C. (3 marks)
(ii) Based on Figure 1, copy and complete the truth table in Figure 2.
X Y P Q R
0 0
0 1
1 0
1 1
Figure 2
(3 marks)
(iii) Write the logic equations for outputs P, Q and R in terms of X and Y. (3 marks)
______________________________________________________________________________________________
4. (a) A team of system developers has identified six tasks described in the table below:
Task No. Task Description Task Constraints Duration
(in days)
A System specification None 3
B Try software Starts after system specification 2
C Customize Test software Starts after software trial 4
D Purchase of Test hardware Starts after system specification 3
E Install software Starts after Hardware Testing 2
F Train staff Starts after software customization 1
Table 2
Days
Tasks 1 2 3 4 5 6 7 8 9 10 11
A
B
C
D
E
F
(iii) Define the terms lag time and critical path as used in project development. (2 marks)
(iv) State the critical path of the project above and hence determine the project duration. (2 marks)
(b) A school‘s computer resource center has stand-alone computers. The school has row decided to
connect the computers into a local network and to the internet.
(i) State what you understand by the network terms ISP and protocol. (2 marks)
(ii) Give the name of a protocol that
- governs the movement of data across the internet.
- is used to access pages on a web server. (2 marks)
(iii) Briefly explain the following database concepts :
- Primary key
- Field
- File
- Query
(4 marks)
113
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
(b) Showing all steps in solving the following number representation problems.
(i) Convert the hexadecimal number 2C into a binary number. (2 marks)
(ii) Convert the octal number 67 into hexadecimal. (3 marks)
(iii) Perform the binary addition 10112 + 11012 (3 marks)
(c) (i)
State what you understand by backup and give one characteristic of a backup storage device
(ii)
Briefly explain the term portability in relation to:
- Storage devices
- Software (2 marks)
___________________________________________________________________________________________
6. (a) (i) With the aid of diagrams, distinguish between serial and parallel data transmission. (5 marks)
(ii) Briefly describe the following modes of transmission giving an example in each case where they are used :
Simplex, half duplex, full duplex. (6 marks)
(b) (i) Name and briefly explain the function of the three main parts of the CPU. (6 marks)
(ii) State three main stages of the machine cycle. (3 marks)
__________________________________________________________________________________________
7. (a) (i) State the main technological feature that distinguished each of the following computer classifications:
- 1st generation
- 2nd generation
- 3rd generation
- 4th generation (4 marks)
(c) (i) State two advantages and two disadvantages of using electronic mail as a means of communication.
(4 marks)
(ii) State a difference between intranet and extranet. (2 marks)
114
© GBHS Dschang 2021
FORM 5
COMPUTER SCIENCE 2021-2022
For your guidance, the approximate mark for each part of question is indicated in the brackets
You are reminded of the necessity for good English and orderly presentation in your answers.
In calculations, you are advised to show the steps in your working, giving your answer at each stage.
SCORE
Marked by: ………………………………………..................................
115
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Do all tasks (Task 1, Task 2 and Task 3) specified in this question paper.
TASK 1 (20 marks)
Examine the text below and answer the questions that follow.
The spread and adoption of information and communication technonlogies (ICT‘s) throughout the
country was phenomenal in the early 2000‘s and Bangoh District was not left behind. More people than
ever are today using the following ICTS :
Radio
Smart phones
Television, etc.
However, only relatively few people have reliable access to the internet because of the high costs. Even
with this limitation, mobile phone technology is revolutionizing the technology landscape and today, is
by far the fastest growing ICT in the country.
Smart Telecoms was the first mobile provider in with a fair coverage in /bangoh. New Way Telecoms
and Big Brains Communications followed later, and all three are currently doing well in terms of
coverage and stability.
Formerly, TV signals were only possible via satellite. But today many antennas have been raised
around the community and TV signals are available both terrestrially and by satellite. Even cable TV
operators are doing good business.
The table below indicates the level of usage of ICT tools in Bangoh District.
1. Launch a word processor. Set the page orientation to portrait, and the page size to A4. Type the given
passage.
You are not required to place a border around the passage. (8 marks)
2. Format the heading of the passage as follows: (4 marks)
a. Font size: 18
b. Font name: Arial
c. Alignment: Centre
d. Case: Upper case
3. Format the rest of the text as follows: (4 marks)
a. Font size: 13
b. Line spacing: 1.5
c. Alignment: Full justification
d. Font name: Times New Roman
4. Format the table as follows: (2 marks)
116
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
5. Use bullets to itemsize the list of ICT tools in the passage. (2 marks)
6. Save your work as Task 1
7. Print Task 1.
______________________________________________________________________________________
The worksheet below shows the prices of various items in local supermarkets. Study it and answer the questions
that follow.
A B C D E F G
2 Supermarkets
3 Lowcost PicknPay GreenShop Rainbow
4 Milk 1400 1200 1250 1150
Items
___________________________________________________________________________________________
6. Type the label ―Average‖ in cell G3. Then insert a formula to calculate the average cost of milk in Cell G4
Copy the formula to the cells in the range G5:G7. (2 marks)
7. Write in the space below, the formula in cell G7 after the copy procedure above is done. (1 mark)
__________________________________________________________________________________________
8. Select the range B3:G7, and format the cells in the range to have single borders. (2 marks)
9. Create a column chart using the entries in the range B3:F6, with prices on vertical axis and
supermakets in the horizontal axis. For each supermarket, a separate vertical bar shoul be draw for
each food item. (4 marks)
10. Save your work as Task 2
11. Print Task 2.
117
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Examples
C Pascal
7 / 3= 2 7 div 3 = 2
7%3=1 7 mod 3 = 1
The C and Pascal programs below perform the same task using modular arithmetic. Select any one of them and
answer the questions that follow.
C Program
#include <stdio.h>
int main (void) {
int i, m , km, num ;
i=1;
while (i <= 3 ) {
printf ( "i = %d\n" , i) ;
printf ("Enter number of metres : ") ;
scanf("%d", &num) ;
km = num / 1000 ;
m = num % 1000 ;
printf ( "%d m is equivalent to %dkm and %dm\n\n", num, km, m) ;
i = i+1 ;
}
char c = getchar( ) ;
}
Pascal program
Program Numbers ;
var i, m , km, num : integer ;
BEGIN
i := 1 ;
while (i <= 3 ) do
begin
writeln ( ‗i = " , i) ;
write (‗Enter number of metres : ‗) ;
readln (num) ;
km := num div 1000 ;
m := num mod 1000 ;
writeln ( num, ‗m is equivalent to ‘, km, ‗km and ‘, m, ‗m‘) ;
writeln ;
i : = i+1 ;
end ;
118
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
1. Launch either a C or Pascal program development environment, and key in the corresponding programs, compile
the program. If any errors, keep correcting and compiling until all the errors are corrected. Save as Task 3.
(2 marks)
2. Run the program and provide 25, 300, and 4500 when prompted for a number, pressing the <Enter> key after
each number is entered. Write the output you observe. (3 marks)
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
3. State what the program is designed to do. (3 marks)
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
4. The keyword ―while‖, which is used in the program is the program is an example of which programming construct?
Explain how the stated programming construct works. (2 marks)
____________________________________________________________________________________________
Programming construct :
____________________________________________________________________________________________
____________________________________________________________________________________________
Explantation :
___________________________________________________________________________________________
5. Save your work as Task 2.
6. Print your work.
119
© GBHS Dschang
FORM 5
COMPUTER SCIENCE GCE 2020 PAPER 1
17. A device that selects the best path for a data packet 24. Sending a file from your computer to a
from one network to another is: server is referred to as:
A switch. A downloading.
B bridge. B reading.
C router. C writing.
D hub. D uploading.
______________________________________ ___________________________________________
18. The abbreviation ASCII stands for: 25. ________ is a technology that can be used to
A American Standard Commission for locate an elephant remotely in a forest.
Information Interchange. A Geographic Information System
B American Standard Code for Information B Location Information System
Interchange. C Transmitter
C American Storage Code for Information D Geographic Positioning system
Interchange. ___________________________________________
D American Storage Code for Internal 26. Communication on cell phone is an example of
Interchange. ______ communication.
_______________________________________ A multiplex
19. Which one of the following features can be B simplex
used in a biometric system? C half duplex
A Height. D full duplex
B Fingerprint ___________________________________________
C Blood pressure. 27. The binary code for ASCII characterbis,
D Weight. 01100010. What is the binary code for ASCII
________________________________________ character d?
20. The set of rules that govern the transmission of A 01101101.
data across a network is called: B 01101010.
A topology. C 01101100.
B protocol. D 01100100.
C controller. ___________________________________________
D transceiver. 28. In a typical Client-Server network:
_________________________________________ A the server computer initiates all
21. The attribute of software stating that it does not communication.
waste resources when running is referred to as: B the client computer makes request for
A portability resources.
B reliability C the server computer makes request for
C efficiency. resources.
D usability D the client computer provides needed
_________________________________________ resources.
22. Convert 50millioseconds to seconds _______ ___________________________________________
29. The abbreviation FTP stands for:
A . A File Transfer Protection.
B File Transfer Protocol.
B . C File Transmission protection.
C 20. D File Transferable Protocol.
D 200. ___________________________________________
_________________________________________ 30. One of the functions of an operating system
23. Software is referred to as free and open source if in a computer is to manage processes. The term
it has: process refers to a:
A No commercial license and cannot be A program stored in the hard disk.
altered . B program loaded in main memory.
B A commercial license and can be altered C program executing in the CPU.
C No commercial license and can be D compiled program ready for running.
altered ___________________________________________
D A commercial license and cannot be
altered.
____________________________________________
121
© GBHS Dschang 2021-2022
FORM 5
COMPUTER SCIENCE GCE 2020 PAPER 1
31. The HTML open and close tags <ul> --- </ul> 38. In system implementation, parallel conversion
are used to generate: means:
A Numbered list. A running the new system alongside the
B Bulleted list. old system.
C Underlined text. B running some parts of the new system
D Unified list of numbers. alongside the old system.
_________________________________________ C replacing parts of the old system with parts
32. The abbreviation USB stands for: of the new system.
A Unit Storage Bus. D running the new system while the old
B Universal Standard Bus lone is shut down.
C Unified storage Bus. ___________________________________________
D Universal Serial Bus. 39. When an email message is sent from John to
_________________________________________ Mary, copies of the message are found in:
33. A system designed to track daily sales and A John‘s sent folder and Mary‘s inbox
purchases of a company is a(n) _____system. folder.
A transaction processing B John‘s sent folder and his inbox to Mary
B management information on a server.
C decision support C Mary‘s sent folder and John‘s inbox
D Executive information folder.
_________________________________________ D a folder‘s inbox folder and Mary sent
34. Which of the following is true about user folder on a server.
name and passwords in an information ____________________________________________
system? 40. The file extension .pdf stands for:
A Users can have the same user name, but A Printable document format.
their passwords must be different. B Popular document format.
B Users can have the same password, but C Portable document format.
their user names must be different. D Picture document format.
C Users are able to change their user _________________________________________
names and still have access to their 41. Flash memory is an example of a(n) ______
account. storage device.
D When users change their passwords, they A Optical
must also change their user names. B solid state
_________________________________________ C chip
35. Which one of the following is NOT a D magnetic
component of an information system? ________________________________________
A User. 42. Disk compression software is a type of:
B Data. A application software.
C Computer table. B server software.
D Computer hardware C utility software.
____________________________________________ D device driver software.
36. ______ is a programming paradigm that _______________________________________
specifies a problem to be solved but does not 43. Which of the following is NOT an example
specify how to solve it. of a storage devices
A Object-oriented A Flash memory
B Declarative B ROM chip
C Procedural C Hard disk
D Imperative D CPU.
____________________________________________ _______________________________________
37. ____ is usually described as a knowledge- 44. Software that enables an operating system to
based system communicate effectively with a given
A Control system peripheral device is known as:
B Monitoring system A Firewall.
C Expert system B Driver.
D Management information system C Bespoke.
__________________________________________ D Widget.
_________________________________________
122
© GBHS Dschang 2021-2022
FORM 5
COMPUTER SCIENCE GCE 2020 PAPER 1
45. _____system enables people who are geographically 48. Communication between a hand held remote
dispersed to have an online meeting that looks like a controller and a television set is an example
real life situation. of_____communication.
A Electronic Marketing A radio wave
B Videoconferencing B bluetooth
C Multimedia Message Service C microwave
D Teleworking D infared
________________________________________ ____________________________________________
46. In project management, lag time means a 49. Convert 2 seconds to microseconds
delay between: A 2000 Microseconds.
A a predecessor and a successor task B 2000 000 Microseconds.
B two predecessor tasks. C 0.002 Microseconds.
C two successor tasks. D 0.000002 Microseconds.
D two dummy tasks. ____________________________________________
______________________________________ 50. Ergonomics is concerned about:
47. _____ is a class of computers that is most A the economies of writing and displaying
suitable for weaponry and weather characters.
forecasting. B the design of pictures and word art
A Minicomputer C the design and placement of equipment in
B Microcomputer a computer workplace.
C Supercomputer D speed and accuracy of a computer user.
D Laptop computer ___________________________________________
______________________________________
123
© GBHS Dschang 2021-2022
FORM 5
COMPUTER SCIENCE 2021-2022
(d) (i) Name any four components of a Data Transmission System. (4 marks)
(ii) Briefly describe the role of any two of the components listed above. (2 marks)
______________________________________________________________________________________________
4. (a) Study the line of codes written in HTML below and answer the question that follow:
1. <html>
2. <head>
3. <title> Computer Science </title> </head>
4. <body>
5. <marquee><font size = ―16‖ color = ―red‖><q><u> THANK YOU
</u></q></font></marquee>
6. <br>
7. <hr size = 16 width ―50%‖ align = ―center‖ color = ―blue‖>
8. <ol type = ―I‖ start = ―3‖>
9. <li> English Language </li>
10. <li> Computer Science </li>
11. <li> Arithmetic </li>
12. </ol>
13. </body>
14. </html>
124
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
(i) State the role of the HTML code in relation to the webpage (2 marks)
(ii) Give the general name of software commonly used to interpret codes written in HTML. (1 mark)
6. (a) (i) What do you understand by the term social media? (2 marks)
(ii) Briefly explain one positive and one negative impact of social media in the Cameroon Education sector.
(4 marks)
(iii) Give two examples of social media platforms. (2 marks)
(b) Briefly explain two ways by which
(i) a computer can be affected by a virus
(ii) a computer can be protected against viruses
(iii) a computer system that may malfunction when infected by a virus
(6 marks)
(c) Determine the logic expression that corresponds to the output P, R and Q, in terms of A and B, on the logic circuit
in Figure 1:
A P
B R
Q
Figure 1
(6 marks)
______________________________________________________________________________________________
125
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
8. (a) You are requested by a Principal to make recommendations for types and specifications of computers for
the school computer laboratory
(i) Name three characteristics of system unit you will recommend and say how these
are important for proper functioning of the library. (6 marks)
(ii) Name one characteristic of the monitor you will recommend and say how this is important
for the laboratory. (2 marks)
(b) A student gets up a 5:30 AM and performs the following activities shown in Table 2 within the indicated
duration, in order to get to school.
Table 2
No. Activity Duration
In Minutes
1. Facial clean-up 10
2. Heat water for shower 15
3. Prepare breakfast 10
4. Take a shower 15
5. Clean shoes 5
6. Dress up 15
7. Take breakfast 10
8. Walk to school 15
Assuming that activities 2 and 3 can start at the same time, as well as activities 5 and 6,
(i) Draw a Gantt chart for the above activities. (6 marks)
(ii) What do you understand by the terms:
- Critical path
- Slack time (4 marks)
(iii) Determine the critical path for these activities. (2 marks)
126
© GBHS Dschang
FORM 5
COMPUTER SCIENCE 2021-2022
Once upon a time, there lived a very cunning and mischievous fox. He used to speak to
other animals sweetly and gain their trust, before playing tricks on them. One day the fox met a
stork. He befriended the stork and acted like a very good friend. Soon, he invited the stork to
have a feast with him.
The stork happily accepted the invitation.
The day of the feast came, and the stork went to the fox‘s house. To her surprise and
disappointment, the fox said that he could not make a big feast as promised, and just offered
some soup. When he brought the soup out of the kitchen, the stork saw that it was in a shallow
bowl ! The poor stork could not have any soup with its long bill, but the fox easily licked the
soup from the plate …
The day arrived and the fox reached the stork‘s place. After exchanging pleasantries, the
stork served souup for both of them, in a narrow jar with a long neck. She was able to have the
soup very easily with her long bill, but the fox obviously could not. After finishing hers, the stork
asked the fox if he was enjoying the soup. The fox remembered the feast he himself had given
the stork, and felt very ashamed. He stammered, "I …I‘d better leave now. I have a tummy ache."
Figure 1
1. State the name(s) of the word processor(s) installed in your PC.
______________________________________________________________________________ (1 mark)
2. Launch a word processor program from your PC and type the text of Figure 1.
Justify the three paragraphs. (10 marks)
3. For the title, Bold, Center, underline, and apply a font size of 16. (1 mark)
5. Select the body text and apply a serif font of size 12. (2 marks)
6. Insert the image called ‗foxandstork‘ (found on the desktop) at the left of the first paragraph
and wrap text to its light. (2 marks)
8. Insert a footer with the text ‗One bad turn begets another‘ at bottom left. (1 mark)
9. Save your work as Task 1 in your working directory.
10. Print copy of task 1.
127
© GBHS Dschang
FORM
COMPUTER SCIENCE 2021-2022
An excerpt of a worksheet in Figure 2 shows mock examination results of 10 students in Form 5. All marks on 20
Figure 2
1. Create a workbook called Task 2 and enter the worksheet data exactly as provided. (5 marks)
3. Add the following three column headers to the right of column I: SubSat, Avge and Rank. (1 mark)
4. For the first student Njie Fabian, use the suitable spreadsheet functions (or formulas) to calculate:
a) number of subjects sat, (2 marks)
b) average (correct to 2 decimal places ) and (2 marks)
c) rank (2 marks)
d) Hence, calculate similar values for the other students. (2 marks)
5. Save your work as Task 2 in your working directory.
6. Print a copy of Task 2.
128
© GBHS Dschang
FORM
COMPUTER SCIENCE 2021-2022
The C and Pascal programs below perform the same task. Select any one of them and answer the questions that follow
C Program
#include <stdio.h>
int main (void) {
int num ;
printf ( "Enter a number : ") ;
scanf("%d", &num) ;
while (num < 5 ) {
printf ( "%d " , num) ;
num = num+1 ;
}
getchar( ) ;
}
Pascal program
program Numbers ;
var num : integer ;
BEGIN
write (‗Enter a number: ‗) ;
readln (num) ;
while num < 5 do
begin
write( num, ‗ ‘) ;
num := num + 1 ;
end ;
readln ;
1. Launch either a C or Pascal program development environment, and key in the corresponding programs, compile
the program. If any errors, keep correcting and compiling until all the errors are corrected.
(2 marks)
2. Run the program and enter -2 when prompted for a number. Write the output you observe in the space below.
Write NONE if there is no output. (1 mark)
____________________________________________________________________________________________
____________________________________________________________________________________________
3. Run the program again but this time, enter 10 when prompted for a number. Write the output you observe in the
space below. Write NONE if there is no output. (1 mark)
____________________________________________________________________________________________
____________________________________________________________________________________________
129
© GBHS Dschang
FORM
COMPUTER SCIENCE 2021-2022
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
130
© GBHS Dschang
FORM