Sei sulla pagina 1di 212

Computer Science

For Rwandan Schools

Senior 4
Teacher's Book

Owoyesigyire Davis

Goeffrey Chemwa

Stephen Mburu
Published by

Longhorn Publishers (Rwanda) Ltd


166 KG 13 off KG 11 Avenue
P.O. Box 5910
Kigali, Rwanda

Longhorn Publishers Ltd


Funzi Road, Industrial Area
P.O. Box 18033-00500
Nairobi, Kenya

Longhorn Publishers (U) Ltd


Kanjokya Street, Plot 74
Kamwokya
P.O. Box 24745
Kampala, Uganda

Longhorn Publishers (T) Ltd


New Bagamoyo Road/Garden Road
Mikocheni B, Plot No. MKC/MCB/81
P.O. Box 1237
Dar es Salaam, Tanzania

© O. Davis, S. Mburu, G. Chemwa, 2016

All rights reserved. No part of this publication may be reproduced, stored


in a retrieval system or transmitted in any form or by any means, electronic,
mechanical, photocopying, recording or otherwise without the prior written
permission of the Copyright owner.

First published 2016

ISBN 978 9997 74 490 6

Printed by Printed by Printwell Ltd.,


Road “A” off Enterprise Road, Industrial Area,
P. O. Box 5216 - 00506,
Nairobi, Kenya.
Contents
Introduction................................................................................................................................. 1
Basic information................................................................................................................... 1
Pedagogial approaches...................................................................................................... 14
Planning for teaching.......................................................................................................... 22
Assessment............................................................................................................................. 27
Content Map.......................................................................................................................... 31
Unit 1: Computer Fundamental......................................................................................... 48
Unit 2: Computer Architecture, Assembling and
disassembling Computer................................................................................. 57
Unit 3: Safe and Ethical Use of Computers.......................................................... 71

Unit 4: Computer Software Installation................................................................. 79

Unit 5: Number Systems................................................................................................ 86


Unit 6: Boolean Algebra and Logic Gates............................................................ 101
Unit 7: Introduction to Computer Algorithm................................................... 110
Unit 8: Control Structures and Arrays................................................................. 121
Unit 9: Introduction to Computer Programming............................................ 131
Unit 10: Introduction to C++ Programming...................................................... 140
Unit 11: Operators and Expressions C++ Programming............................. 151
Unit 12: Control Statements in C++..................................................................... 159
Unit 13: Functions in C++ Programming.............................................................. 168
Unit 14: Arrays in C++ Programming.................................................................... 177
Unit 15: Introduction to Operating Systems.....................................................184
Unit 16: HTML–Based WEB Development........................................................ 193
Unit 17: Cascading Style Sheets................................................................................203

iii
iv
INTRODUCTION

Section 1 Basic information Bloom’s taxonomy and they lead to


deep rather than surface learning.
1.1 Organisation of the book
– Attitudes and values: This captures
This teacher’s guide is organised into
appropriate attitudes and values that
two main sections. Part 1 is the general
relate to the unit.
introduction section detailing pedagogical
• Links to other subjects: It is
issues. Part 2 is the main topics area. It
important for learners to gain an
gives the details of the expected learning
understanding of the interconnections
units as organised in the learner’s book.
between different subjects so that
The main elements of Part 2 are:
learning in each subject is reinforced
• Topic Area page - detailing the
across the curriculum. This platform
various Sub-topic Areas and the
does exactly that. It prepares the
units covered under the topic area.
teacher to pass this information to the
• Unit heading – this is accompanied
learners so that they are aware!
by some text in the Student’s Book to
motivate the learners. Also, the total• Assessment Criteria: This is meant
number of periods per unit is given. to evaluate whether learners have
• Key Unit Competence: This is the succeeded in achieving the Key Unit
competence, which will be achieved Competence(s) intended. This section
once students have met all the learning will help the teacher in assessing
objectives in the unit. whether the unit objectives have been
• Outline of main sections in the unit met.
– is a quick summary of the subtopics• Background information: This is
covered under the unit. the introduction part of the unit. It
• Learning Objectives: The content aims at giving insights to the teacher
in this area is broken down into three on the subject matter.
categories of learning objectives, that• Additional information for the
is, knowledge and understanding;
teacher: This section gives more
skills; attitudes and values.
information than what the syllabus
– Knowledge and understanding: As recommends for purposes of preparing
in the existing curriculum, knowledge the teacher to answer tough questions
and understanding is very important. from learners.
– Skills: It is through the skills that• Learning Activities: These are
students apply their learning and given per lesson and have these sub-
engage in higher order thinking. These sections:
skills relate to the upper levels of

1
– Lesson titles objectives as follows:
– Specific objectives of the lesson – Type I: Learning Objectives
– Materials and learning resources relating to Knowledge and
– Teaching methodology Understanding. These are
– Suggested teaching/learning associated with Lower Order
approach Thinking Skills or LOTS.
– Generic competencies covered – Type II and Type III: These Learning
– Cross-cutting issues covered Objectives relate to acquisition
– Special needs and multi-ability of skills, Attitudes and Values.
learning They are associated with
– Formative assessment Higher Order Thinking Skills or
– Extended exercises/activities HOTS.
for fast learners and remedial – These Learning Objectives are
(reinforcement) exercises/ actually considered to be the
activities for slow learners. ones targeted by the present
– Answers to self-evaluation reviewed syllabus.
exercises
• Content area which indicates the
These are repeated across all periods scope of coverage of what a teacher
until the end of the unit followed by should teach and learner should
the answers or tips on the test your learn in line with stated objectives,
competence questions at the end of skills and attitude.
every unit. • Suggested teaching and learning
1.2 The Structure of the syllabus activities that are expected to
engage learners in an interactive
Computer science is a competence
learning process as much as possible
based syllabus for combinations subject
(learner-centered and participatory
is taught and learned at Advanced Level.
approach).
The syllabus is structured in Topic
• Link to other subjects, assessment
Areas, and then further broken down
criteria and materials (or resources)
into Units. The units have the following
that are expected to be used in
elements:
teaching and learning process.
• Number of Periods required to
cover each topic. The Computer Science syllabus for
Senior 4 has 17 units. These units have
• Key Unit Competency whose
been covered by the following units in
achievement is pursued by all
the student's book:
teaching and learning activities
undertaken by both the teacher and 1. Computer Fundamentals
the learners. The Key Competency 2. Computer Architecture and Assembly
is broken into three types of learning

2
3. Safe and ethical use of computers. the national curriculum in Rwandan
4. Computer Software Installation education system. As part of the changes
in the curriculum, Computer Science
5. Number Systems
syllabus was reviewed to ensure that the
6. Boolean Algebra and Logic Gates syllabus is responsive to the needs of the
7. Introduction to Computer Algorithm learner with a shift from knowledge-based
8. Control structures and one learning to competence-based learning.
dimension array Another reason for curriculum review
was inclusion of the computer science
9. Introduction to Computer
component leading to the new subject
Programming
named “Computer Science Competence
10. Introduction to C++ programming Based Syllabus.”
11. Operators and Expression in C++
Apart from being integrative, the new
12. Control Statements in C++ syllabus guides the interaction between
13. Function in C++ Programming the teacher and the learner in the
14. Arrays in C++ Programming learning process. It further puts greater
emphasis on skills a learner should
15. Introduction to Operating Systems
acquire during each unit of learning. As a
16. HTML-Based Web Development competency-based syllabus, it elaborates
17. Cascading Style Sheet on the competence-based aspects of
1.3
Background Information on knowledge, skills and attitudes and
the new curriculum values in computer science.
The goal of computer science is to The competence based curriculum
develop a competence-based society
is in line with various government
that fits in the globalization process
policies and aspirations as stipulated in
characterised by knowledge economy
and competition. Competence-based various policy documents including The
learning refers to systems of instruction, Education Sector Strategic Plan 2013
assessment, grading, and academic and Vision 2020 that emphasis quality
reporting that are based on students education and put a lot of emphasis
demonstrating that they have acquired on science, technology and innovation;
and learned the prerequisite knowledge, Poverty Reduction Strategy (EDPRSII)
skills and attitudes as they progress and the draft ICT Policy in Education
through their education. 2014 that stresses the need to avail ICT
This is the motivation behind paradigm to all learners. The need to address
shift from knowledge-based to all these aspirations necessitated a
competence-based curriculum that comprehensive review of the Lower
resulted to comprehensive review of Secondary Curriculum

3
1.4 Rationale of teaching and i) Literacy
learning Computer Science • Reading a variety of texts
Computer science is a powerful subject accurately and quickly.
of modern life which has changed every • Expressing ideas, messages and
aspect to the human society. With events through writing legible
computer science, different computing texts in good hand-writing with
devices have been developed and they correctly spelt words.
are helping in daily life. It is important • Communicating ideas effectively
to highlight inventions of computers, through speaking using correct
embedded systems, telephony for phonetics of words.
communication, and automation of • Listening carefully for
different human activities through understanding and seeking
different applications facilities, usage of clarification when necessary
computing technologies in medicines, ii) Numeracy
education, finance, socio-economic, • Computing and converting
military, security, spatial sciences, and
numbers in the four base
weather forecast.
systems: decimal, binary, octal
In Rwandan society Computing and hexadecimal.
technologies drive the country • Using algorithms and computer
development through communication,
programs to manipulate
corporate growth, economic
numbers, symbols, quantities,
development, financial transaction, job
computer memory, and other
creation, foster the value of investments,
computing tasks.
living standards, patterns of work and
leisure. • Using computer programs
to solve problems related
to everyday activities like
l1.5 Types of Competences and commercial and financial
their acquisition management.
The national policy documents, based on • Interpreting basic statistical
the national aspirations, identify ‘Basic data using programs, tables,
Competences’ alongside the ‘Generic diagrams and charts.
Competences’ that will develop higher
b) Generic competences
order thinking skills.
Generic competences must be
a) Basic competences
emphasized and reflected in the teaching
Basic competences are addressed in
and learning of computer science. The
the broad subject competences and in
national policy documents, based on
objectives include:
the national aspirations, identify ‘Basic

4
Competences’ alongside the ‘Generic not being teachers of language, will
Competences’ that will develop higher ensure the proper use of the language
order thinking skills. Basic Competencies of instruction by learners which will
are addressed in the stated broad subject help them to communicate clearly and
competences and in the objectives confidently. It will also assist learners
highlighted on year basis and in each of the to convey ideas effectively through
units of learning. speaking and writing and by using the
The selection of types of learning activities correct language structure and relevant
must focus on what competencies the vocabulary.
learners are able to demonstrate throughout 5. Cooperation, inter personal
and at the end of the learning process. Basic management and life skills: This will
competencies must be emphasised during help the learner to cooperate with
teaching and learning process. others as a team in whatever task are
They are briefly described below and assigned and to practice positive ethical
teachers must ensure that learners moral values and respect for the rights,
are engaged in tasks that help them to feelings and views of others. Learners
acquire the competences. will also perform practical activities
related to environmental conservation
1. Critical thinking and problem and protection. These skills will also
solving skills: The acquisition of assist learners to advocate for personal,
these skills will help learners think family and community health, hygiene
imaginatively and broadly to evaluate and and nutrition and respond creatively to
find solutions to problems encountered the variety of challenges encountered in
in all situations. life.
2. Creativity and innovation: The 6. Lifelong learning: The acquisition
acquisition of these skills will help learners of this skill will help learners to update
take initiative and use imagination beyond their knowledge and skills with minimum
the knowledge provided to generate external support and to cope with the
new ideas and construct new concepts. evolution of knowledge advances for
3. Research skills: This will help both personal fulfillment and in areas that
learners find answers to questions based need improvement and development.
on existing information and concepts and 1.6 Computer Science and
to explain phenomena based on findings developing competences
from information gathered.
Computer Science contributes to a
4. Communication in official learner’s development of critical thinking,
languages: Teachers, irrespective of research and problem solving, creativity

5
and innovation, communication and making generalizations out of limited
cooperation skills. This will be achieved information. They should be open-
by conceptualising, analysing, synthesising, minded and able to distinguish between
evaluating, manipulating and applying propaganda and truth.
various programming techniques, database
Some of the Computer Science attitudes
management and networking to appropriate
that learners should develop include:
contexts of real life
• Practical approach – to problem
Through computer science, learners will solving. Learners should seek answers
identify problems and conduct analysis by
to their questions and problems by
considering relevant functional, practical,
carrying out investigations wherever
human and socioeconomic factors. They
possible.
will also draw up specifications for the
• Responsibility – A learner should
computer-based solutions to problems
be responsible enough to effect
from a range of suitable resources.
tasks apportioned and take good
Computer science will also contribute care of apparatus during and after
to promotion of self-reliance of an investigation.
Rwandan through provision of necessary • Cooperation – Learners will
knowledge, skills, attitude and values. often be working in groups while
Furthermore, computing solutions will carrying out investigations and need
enhance nation's integrity; peace and therefore to cooperate with all
respect of others which are key values other members of the group.
for development of the country. • Curiosity – Learners should have
a curious attitude as they observe
1.6 Important Attitudes in things and events around them. This
Computer Science is the first step towards solving a
problem.
1.6.1 Attitude in learners
• Self-confidence – Learners
There are certain useful attitudes, which
should have the will to attempt to
the teacher should help to develop in the
solve a problem. The feeling of self-
learners as they carry out investigations
confidence can be strengthened in
in computer science. Computer science
young learners if they experience
as a problem solving discipline is expected
many small successes that win
to make an impact on a learner’s general
approval and encouragement from
behaviour.
the teacher. The problems which
The nature of computer science method learners attempt to solve should
demands learners to be honest with not be so difficult that they lead to
themselves as they record results and frustration.
make unbiased conclusions. They should • Honesty – As they make
also be aware of the danger involved in observations, record, analyse results

6
and draw conclusions. • Develop life skills, practical and
• Patience – Learners should entrepreneurial skills
be patient for the results of an • Apply computational thinking, logical
experiment which may take time to and algorithmic precision in problem
manifest. solving and creativity.
1.6.2 Attitude in teachers • Do maintenance of computer hardware
• Engage students in variety of learning and perform installation/uninstallation
activities of software
• Apply appropriate teaching and • Use computer ergonomically to avoid
assessment methods health related risk
• Adjust instructions to the level of
• Respect ethical issues related to piracy,
the learner
software licensing, copyright, individual
• Creativity and innovation privacy
• Makes connections/relations with
• Apply the stages of the software
other subjects
development life cycle (i.e., problem
• Show a high level of knowledge of
definition, analysis, design, testing,
the content
implementation, maintenance)
• Develop effective discipline skills
manage adequately the classroom • Identify errors in a program and apply
principles of debugging
• Good communicator
• Guide and counsellor • Analyze cultural, legal, and ethical issues
• Passion for children teaching and and responsibilities of digital citizens,
learning. organizations, and government entities
(e.g. privacy issues related to internet
use, data protection).
1.7 Broad Computer Science
• Analyze issues related to malicious
Competence s
software, social engineering, and
Broad competences that must be security awareness.
emphasized and reflected in the teaching
• Design small web-based, desktop and
and learning process are highlighted
mobile applications
below:
• Design, install, maintain and administer
• Use computational competences to
a database
contribute significantly to GDP growth
by improving government services, • Install and administer Windows and
business efficiency and productivity for Linux kernel-based operating systems
long term and sustainable economic • Maintain common technological tools
competitiveness.
• Design, maintain and administer

7
computer networks statements in C++ program
• Create and capture images, audio, • Explain the Evolution, role, types and
videos; edit them using appropriate function of the Operating System
software • Build standards compliant web pages
• Show the following skills in his/her using XHTML and CSS
everyday life: communication, research,
practical problem solving, observation,
creativity and innovative skills. 1.9 Cross-cutting issues to be
infused during learning
These are emerging issues which need to
1.8 Key competences at the
be incorporated in the learning process.
end of Secondary 4
Each of the cross-cutting issues has its
• Explain the computer system, evolution, own important programme of learning
role, architecture and classification reflecting key national priorities. This
• Identify different numbers base systems learning is integrated into the syllabuses
and perform conversion between them of subjects across the curriculum rather
than each issue having a dedicated
• Identify different logic gates, theorems
timetable slot of its own. As a result of
of Boolean algebra and evaluate Boolean
this integration, the learning activities
expressions
in the units of subjects across the
• Utilize the laws of Boolean algebra on curriculum incorporate all the learning
Boolean expressions and raw a simple associated with the cross-cutting issues.
logic circuit using logic gates The eight cross-cutting issues are:
• Integrate safety guidelines, ergonomics
a) Peace and Values Education
and ethical issues to have a good
working environment The need for Peace and Values Education
in the curriculum is obvious. Peace is
• Dissemble and assemble computer, do
clearly critical for society to flourish and
minor maintenance
for every individual to focus on personal
• Identify different computer ports and achievement and their contribution to the
connectors success of the nation. Values education
• Derive a suitable algorithm for a forms a key element of the strategy for
computational problem using variables, ensuring young people recognise the
expressions, reading and writing importance of contributing to society,
functions, and loops working for peace and harmony and
being committed to avoiding conflict.
• Describe programming paradigms
• Transform an algorithm in C ++ and b) Financial Education
apply functions, arrays and control Financial education makes a strong

8
contribution to the wider aims of circumstances leading to the genocide
education. It makes learning relevant and the remarkable story of recovery and
to real life situations. It aims at a re-establishing national unity. Genocide
comprehensive financial education Studies helps learners to comprehend
program as a precondition for achieving the role of every individual in ensuring
financial inclusion target and improves nothing of the sort ever happens again.
the financial capability of Rwandans. The intent of a cross-cutting curriculum
Financial education has a key role of not around the topic of genocide is to
only improving knowledge of personal fight against genocide, genocide denial,
but also transforming this knowledge and genocide ideology; and to equip
into action. It provides the tools for students with a more fundamental and
sound money management practices on comprehensive understanding of the
earnings, spending, saving, borrowing genocide, thereby preventing further
and investing. Financial education enables human rights violations in the future
people to take appropriate financial and enabling Rwanda’s population of
services both formal and informal that young people to more competently and
are available to them and encourages thoughtfully enter the workforce. So, it
financial behaviours that enhance their needs to be emphasized.
overall economic well-being.
e) Environment and sustainability
c) Standardisation Culture
The growing awareness of the impact
Standardisation Culture develops of the human race on the environment
learners’ understanding of the has led to recognition of the need to
importance of standards as a pillar ensure our young people understand
of economic development and in the the importance of sustainability as they
practices, activities and lifestyle of the grow up and become responsible for the
citizens. It is intended that the adoption world around them. One of the rising
of standardization culture should have threats to the environment is the poor
an impact upon health improvement, management of e-waste. Leaners need
economic growth, industrialization, skills and attitudes that will enable them
trade and general welfare of the people. in their everyday life to conserve the
While education is the foundation and environment and adress climate change
issue and to have a sustainable livelihood.
strength of our nation, standards are one
of the key pillars of sustainable economic f) Gender education
development. There is a strong moral imperative
d) Genocide Studies to afford every individual their basic
human rights. Gender inequality results
Genocide Studies provides young
in women and girls being treated less
people with an understanding of the

9
favourably than men. A strongly negative supports a rights- based approach in
impact of unequal treatment, which which values such as respect, acceptance
affects the nation as a whole, is the fact tolerance, equality, empathy and
that it results in women being held back reciprocity are inextricably linked to
and their talents and abilities not being universally agreed human rights. A clear
fully realised. With a good understanding message concerning these dangers and
of the principles of Gender Equality, it how they can be avoided, from right
is intended that future generations will
across the curriculum,is the best way
ensure that the potential of the whole
to ensure that young people understand
population is realised.
the risks and know how to stay healthy.
g) Comprehensive sexuality education
h) Inclusive Education
(HIV/AIDS, STI, Family planning,
Gender equality and reproductive Inclusive education involves ensuring
health) all learners are engaged in education
Comprehensive sexuality education, and that they are welcomed by other
which is age appropriate, gender sensitive students so that everyone can achieve
and life skills based can provide young his/her potential. Inclusive practice
people with the knowledge and skills embraces every individual regardless of
to make informed decisions about their gender or ability including those with
sexuality and life style. Preparing children learning difficulties and disabilities. The
and young people for the transition to almost focus of inclusive curriculum is
adulthood has been one of humanity’s on ensuring participation in education
greatest challenges with human sexuality of learners with different learning styles
and relationships at its core. Few young and other difficulties. To be successful,
people receive adequate preparations
it entails a range of issues including
for their sexual lives. This leaves them
teacher’s positive attitudes, adapting
potentially vulnerable to coercion, abuse
the learning resources, differentiation
and exploitation. Unintended pregnancy
of teaching and learning methods and
and sexually transmitted infections
(STIs) including HIV/AIDS. Many young working together. Overall, the benefits
people approach adulthood faced with of an inclusive curriculum extend to all
conflicting and confusing messages learners.
about sexuality and gender. This is often 1.7
Special needs education and
exacerbated by embarrassment, silence, inclusivity
disapproval and open discussion of sexual
All Rwandans have the right to access
matters by adults(parents, teachers) at
education regardless of their different
very time when it is most needed. needs. The underpinnings of this
Comprehensive sexuality education provision would naturally hold that all

10
citizens benefit from the same menu of supervision and assistance. The following
educational programs. The possibility of are some suggestions on how to support
this assumption is the focus of special special needs children in your class.
needs education. The critical issue is (a) Learners with physical
that we have persons/ learners who are difficulties
totally different in their ways of living
In this group of learners, the affected
and learning as opposed to the majority.
areas are normally some body parts,
The difference can either be emotional, especially the limbs. There may be
physical, sensory and intellectual learning partial or total loss of use of the limbs.
challenges traditionally known as mental In case the legs are affected, the learners
retardation. These learners equally will need assistance during activities that
have the right to benefit from the free involve movement. This could be during
and compulsory basic education in the a nature walk and other activities that
nearby ordinary/mainstream schools. learners have to stand for some reason.
Therefore, the schools’ role is to enrol The teacher should organize for the
them and also set strategies to provide learner’s ease of movement around.
relevant education to them. The teacher The learner should also be given time to
therefore is requested to consider catch up with the others.
each learner’s needs during teaching
In case the hands are affected, the
and learning process. Assessment
learners should be given more time to
strategies and conditions should also
finish their work. In both cases, the
be standardised to the needs of these
learners should not be pressurized to do
learners. Also, ensure that you include
things that can cause injury or ridicule.
learners with special educational needs in
(b) Learners with visual difficulties
classroom activities as much as possible.
These learners normally have problems
The special needs children can fall in any
with their eyesight. They should sit in a
of the following common categories:
position where they are able to see the
• Physical difficulties chalkboard without straining
• Visual difficulties
Note: The learner could be longsighted
• Hearing difficulties
or short sighted.
• Mental difficulties
The material to be observed should
• Genocide traumatized learners
be brought closer to the learner and a
The teacher should identify such cases magnifying lens used where necessary.
and help facilitate the affected learners The teacher should use large diagrams,
learning. For example, learner’s with charts and labels. In some cases, the
visual and hearing difficulties should learners can be allowed to touch and
sit near the teacher’s table for easy feel whatever they are looking at. Other
learners can assist by reading aloud. The

11
lighting system in the classroom can also should be reinforced promptly. This
be improved. encourages and motivates them.
The teacher should read aloud most The teacher and the rest of the class
of the things he/she writes on the should never ridicule learners with any
chalkboard. of the difficulties. Note that generally,
(c) Learners with hearing difficulties people with any kind of disability can
The affected part in this case is the ear. be very sensitive to any kind of negative
The learner should have hearing aids. comments or criticism.
The teacher should use as many visual Remind them that ‘Disability is not
aids as possible. They should also project inability’.
their voice and always talk while facing The teacher should avoid giving privileges
the learners. Use of gestures and signs where the learners do not deserve
while talking helps the learner figure out them. Treat them fairly but not with
what the teacher is saying as well. undue favours. In extreme cases it can
(d) Learners with speech difficulties be recommended for the learners to join
A common example in a normal class is a special school.
the stammerer. They always speak with (f) Genocide traumatised learners
a lot of difficulties. The teacher should
be patient with them and encourage Studies have shown that learners from
such learners to express themselves in families that were affected by genocide
their own way. Such learners should be suffer post-traumatic stress disorder
given more written exercises. (PTSD). As such, they need to be treated
(e) Learners with mental difficulties as a special case. As a teacher, you need
to be careful when dealing with such
The teacher should try to identify the
learners. Also, the teacher needs to be in
nature and level of the mental difficulty.
control especially when the topic under
Learners with mental difficulties should
then be given special assistance and discussion touches on genocide issues.
attention at an individual level. They can Any language that may elicit emotional
be given special tests or assessments. In reactions from learners either by fellow
general, all the learners with difficulties learners or by the teacher him or herself
should be avoided.

12
2.1: Methods of teaching questions that lead learners to the
There are a variety of methods through desired outcome
which a teacher can help the pupils to Sometimes learners are given a problem
learn. These include : to solve and then left to work in an
(a) Lecture method open-ended manner until they find out
(b) Discovery or practical activity for themselves.
(c) Group, class or pair discussion This is one of the most suitable methods
(d) Project method of delivering a competence-based
(e) Educational visit/ field trips curriculum.
(f) Teacher demonstration (c) Group or class discussion or
The choice of a teaching method is pair work
influenced by: In this method, the teacher and learners
• The skills, attitudes and knowledge interact through question and answer
to be learned. sessions most of the time. The teacher
• Learning and teaching aids available carefully selects his questions so that
• The academic ability of the the learners are prompted to think and
learners in the class. express their ideas freely, but along
• The classroom environment a desired line of thought. Discussion
• The teacher’s personal preference method should take learners from
known to unknown in a logical sequence;
• The requirements of the Computer
and works well with small groups of
Science syllabus
learners. The disadvantage of this
(a) Lecture method method is that some learners maybe shy
This is the traditional way of teaching or afraid to air their opinions freely in
whereby the teacher explains something front of the teacher or their peers. This
while the learners listen. After the makes them passive participants while
teacher has finished, the learners may the more confident learners dominate
ask questions. However, in delivering a the discussions. However, the method
competence-based curriculum, is highly enhances learners interpersonal and
discouraged. communication skills.

(b) Guided Discovery d) Project method


In this technique, the teacher encourages In this method, the teacher organizes and
learners to find out answers to problems guides a group of learners or the whole
by themselves. The teacher does this by: class to undertake a comprehensive
• Giving learners specific tasks to do study of something in real life over a
• Giving learners materials to work with period of time such as a week or several
• Asking structured or guided weeks.

13
Section 2: Pedagogical approaches

Learners using the project method of classroom setting. It also allows them
studying encounter real‑life problems to learn practically through first-hand
which cannot be realistically brought experience. In such visits, learners are
into a normal classroom situation. A likely to be highly motivated and the
project captures learners’ enthusiasm, teacher should exploit this in ensuring
stimulates their initiative and encourages effective learning. However, educational
independent enquiry. The teacher, using visits are time‑consuming and require
the project method, must ensure that a lot of prior preparation for them to
the learners understand the problem to succeed. They can also be expensive to
be solved and then provides them with undertake especially when learners have
the necessary materials and guidance to to travel far from the school.
enable them carry out the study. The (f) Demonstration lessons
teacher can use the project method In a demonstration, the teacher shows
for topics, which cannot be adequately the learners the procedure to be followed
studied during the normal time-tabled when performing a particular task. The
school periods. learners gather around the teacher
Disadvantages where each learner can observe what the
If a project is not closely supervised, teacher is doing. It is necessary to involve
learners easily get distracted and the learners in a demonstration by:
therefore lose track of the main • Asking a few learners to assist you in
objective of their study. Studying by the setting up the apparatus.
project method does not work well with • Asking them to make observations
learners who have little or no initiative. and ask questions where it
• Asking them questions as you
(e) Educational visits /excursions
progress with the demonstration.
This is a lesson conducted outside
This will help to prevent the demonstration
the school compound during which a
from becoming too teacher-centred.
teacher and the learners visit a place
relevant to their topic of study. A When is a demonstration necessary?
suitable educational visit for and A teacher may have to use a demonstration,
Computer Science learning is a visit to for example when:
an software development form firm. • The experiment/procedure is too
Such visits enable learners to knowledge advanced for learners to perform.
and skills that cannot be acquired in a • The task/ procedure is dangerous

14
• The apparatus and materials involved experiences accordingly.
are delicate for learners to handle. A teacher’s role is to organise the
• Apparatus and equipment are learners in the classroom or computer
inadequate. laboratory and to engage them in the use
Importance of practical work in of these learning through participatory
the learning Computer Science and interactive methods This ensures
concepts that the learning is personalised, active,
participative and cooperative.
Most of Computer Science concepts are
are learned through practical hands on The teacher will design and introduce
activities and interaction with IT tools the tasks to the class to perform or for
and devices. For example learning how immediate discussion. The role of the
to work with application soft wares and teacher will be to guide the learners in
programming. Therefore, the learners constructing their own knowledge, skills
should be involved in practical activities and attitudes. Learners are taught how
as much as possible. Remember the old to use the computer and other IT tools
Chinese proverb that says: used in different technologies.
• What I hear I forget The teacher must select and develop
• When I see I remember appropriate materials like teaching
• When I do I understand models, digital content, and simulators
for the learners to use in their work.
In practical lessons, the teacher first
2.2 Teacher's role in teaching and demonstrates the handling of the
learning of Computer Science computer and other IT tools followed
The change to a competence-based by learners embarking on the task with
curriculum is about transforming hands on manipulation.
learning, and ensuring that learning The teacher must devise remedial
is deep, enjoyable and habit-forming. strategies in and outside the classroom/
Teachers must shift from the traditional computer laboratory to ensure low
method of instruction and play the role achievers and those with learning
of a facilitator. They must let learners difficulties keep pace with the rest in
experience the content through the acquiring the required competencies.
use of available resources in order to
The following are some ways through
value each learner's individual needs and
which the teacher may facilitate learning
expectations.
during lesson execution:
The teacher must identify the needs of
• Encouraging and accepting student
learners, the nature of the learning to be
autonomy and initiative;
done, and the means to shape learning
• Allowing student responses to drive

15
lessons, shift instructional strategies, in a way that encourages learners to
and alter content; construct knowledge either individually
• Encouraging students to engage in or in groups in an active way. Learners
dialogue, both with the teacher and should work on one competence at a
one another; time in the form of concrete units with
• Motivating learners to make them specific learning outcomes broken down
ready for learning. into knowledge, skills and attitudes.
• Coordinating learners’ activities so For active participation in competence
that the desired objectives can be based learning,of Computer Science
achieved. concepts, the learners should given a
• Appreciating, evaluating and chance to:
correcting the students’ responses • Interact with IT equipment in order
before sharing their own to acquire hands on experience
understandings of those concepts; • Raise questions about what is
• Engaging students in experiences that observed, suggest solutions to those
pose contradictions to their initial questions and carry out investigations
to verify the appropriateness of the
hypotheses and then encouraging
solutions.
discussion;
• Apply the acquired knowledge and
• Nurturing students’ natural curiosity.
skills to solve real life problems.
• Assessing learners’ activities and
• Working corroboratively with
suggest solutions to their problems. others, communicating their own
• Assisting learners to consolidate ideas and considering others’ ideas;
their activities by summarising the Take part in planning investigations
key points learnt. with appropriate controls to answer
specific questions;
• Engaging in lively public discussions
2.3 Learner’s role in learning in defense of their work and
Computer Science explanations;
The activities of the learner are suggested
in each learning unit and reflect the 2.4 Grouping learners for learning
appropriate level of engagement of the
Most Computer Science activities are
learner in the learning process. The
carried out in groups During such
teaching and learning processes should be
activities, the teacher should guide the
tailored towards creating a learner friendly
learners to in arranging their desk in
environment based on their capabilities,
order to sit together in groups
needs, experience and interests.
In certain activities, the teacher may
The learning activities should be organised
wish to carry out a demonstration. In
16
this case, the learners should be sitting However, groups should on average have
or standing in a semi‑circle, or arranged between four to seven learners. You can
around an empty shape of letter “U” also resort to pair work depending on
such that each learner can see what the nature of the content being taught at
the teacher is doing clearly and without the time.
obstruction or pushing.
The following are some criteria used
2.4 Teaching Resources
when grouping learners:
The successful implementation of this
(a) Similar ability grouping.
computer science syllabus require
(b) Mixed ability grouping. learners to have computers which
(c) Similar interests grouping. are standard equipment for this
(d) Grouping based on gender. subject. Alongside computers, other
The most suitable criteria is the Mixed computing tools and application
ability grouping that. software have been identified and
it is indicated in the syllabus where
Grouping learners has several advantages
they will be needed.
such as:
Various resources for the
(a) Learners can learn from one another.
implementation of competence-
(b) Materials that were inadequate for
based computer science are the
individual work can now easily be
following:
shared.
(c) A teacher can easily attend to the • Computer laboratory:
The allocation should be one
needs and problems of a small group.
computer for one student. It
(d) Cooperation among learners can
is recommended to school to
easily be developed.
explore available technologies in
(e) Many learners accept correction the market to minimise cost of
from the teacher more readily and lab equipment.
without feeling humiliated when
they are in a small group rather than • Peripheral devices: printer,
the whole class. scanner, digital camera,
headphone, microphone and
(f) Learners’ creativity, responsibility
speakers.
and leadership skills can easily be
developed. • Telephony systems:
Smartphone during Android
There is no fixed number of learners
operating systems lessons
that a group must have. This is dictated
by such factors as the task to be done, • Projectors: Presentation is the
the materials, characteristics of learners key element of competence based
in your class, size and the space available.

17
curriculum where students work. research, producing notes and
Teaching materials will be mostly presentation. , spreadsheets
displayed using a projector for and presentation software.
computer science content. • Visual Studio for Visual Basic
• Laptop per teacher: Teachers and C++ programming. Tou
needs to prepare learning and may also use Turbo C++ or
teaching materials and organise open source compiler
content so as to use the • Database platform: Licensed
classroom time effectively. One copy of Access and MySQL
laptop per teacher is required. database management
• Internet connectivity. systems (DBMS). Consider
• Internet connectivity: Wired using XAMMP for MySQL.
or wireless internet connection • Netbeans or Eclispse IDE
in School for research • Browsers: Chrome, Mozilla
• Network devices: Switch, Firefox, Epiphanie and
router, wireless access point, Opera.
server, Cat6 cables, networking • Boson Network simulator,
toolkit and cabling duct. Cisco packer tracer
• Software: In most cases skills simulator.
expected from this competence • Adobe Photoshop image
based curriculum do not rely on editor, GoldWare Sound
any version of operating system Editor Windows Movie
or any version of application Maker/Corel Video Studio,
software. However, the latest Macromedia Flash, and
version of most software at the Adobe Creative Suite.
time of implementation will be
used. 2.5 Human resource
• Operating system: Licensed The effective implementation
copy of the Windows of this curriculum requires a
Operating System. Linux may joint collaboration of educators
be used if all applications at all levels. Given the material
reflected in the syllabus are requirements, teachers are expected
supported. to accomplish their noble role as
stated above. School head teachers
• ERD commander and paragon
and directors of studies are required
recovery software.
to follow-up and assess the teaching
• Microsoft Office (Word, and learning of computer science.
Excel and PowerPoint for These combined efforts will ensure

18
bright future careers and lives for and learning process.
learners as well as the contemporary • Link computer science with other
development of the country. subjects and real life situations.
In a special way, computer science • Have good mastery of computer
teacher at advanced level should have science content and devotion to
a firm understanding of computer be a lifelong learner.
science concepts at the level he/
she teaches. He/she should be • Have good classroom
qualified in Information technology/ management skills.
Computer Science or related fields
with Education and have firm ethical
2.7 Classroom as a learning
conduct. The teacher should possess
environment
qualities of a good facilitator,
organiser, problem solver, listener A classroom refers to the place where
and adviser. He/she is required learning takes place. Students learn from
to have skills and competency of everything that happens around them,
guidance and counseling. such as the things that they hear, see,
touch, taste, smell and play with. It is
2.6 Skills required for computer
therefore important for the teacher to
science teacher
make his classroom an attractive and
The teacher of computer should have stimulating environment. This can be
the following skills, values and qualities: done by:
• Inspire children and community • Carefully arranging the furniture and
the devotion of learning and desks
using computers. • Putting up learning and teaching
• Engage learners in variety of aids on the walls. Examples are wall
learning activities. charts or pictures or photographs.
• Use multiple teaching and • Securing the storage area
assessment methods. Classroom organisation
• Adjust instruction to the level of A well‑organised classroom is an asset
the learners. to good teaching and learning.
• Use creativity and innovation Tthe teacher should consider the
in the teaching. Be a good following factors when organising the
communicator and organiser. classroom for Computer Science lesson:
• Be a facilitator and a counselor. (a) Furniture should be well arranged
• Manifest passion and impartial so as to allow free movement of
learners and the teacher.
love for children in the teaching

19
(b) The number of learners should be challenges to see the chalkboard and
properly matched to the available instructional materials
resources. (f) In a computer room, all safely
(c) Learners should be reasonably procedures should be displayed on a
spread out so that they do not wall chart, and safety be considered
interfere with one another’s in the design and organisation of the
activities. room.
(d) The series of lessons or activities Some tasks where safety measures
going on for a number of days or should be strictly observed include:
weeks such as individual or group • Cabling ICT devices and connecting
work or whole class. them to the power supply
(e) There should be adequate light • When performing diagnostic tasks
in the classroom to enable all inside the system unit,
learners including those with visual

20
Section 3: Planning for teaching

The two most important documents Date - the day when the lesson will
in planning to teach are the schemes be taught.
of work and the lesson plan. Sub-topic - a subset of the topic
3.1 Schemes of work which is a smaller component of the
unit e.g. under the topic plants, one
A scheme of work is a collection of
could have ‘parts of a plant’ as a sub-
related topics and subtopics drawn
topic.
from the syllabus and organized
into periods week by week for Objective - what pupils are
every term. It is also a forecast or expected to achieve at the end of
plan that shows details under these the lesson.
subheadings: Learning resources - any materials
• Week that will be used by the pupil and the
• Key unit competency teacher for learning and teaching.
• Period References - books or other
• Learning objectives materials that will be consulted or
• Learning resources and reference used in the teaching process. Books
materials that pupils will use should also be
• Teaching methods and techniques shown here; indicating the actual
• Observations/self evaluation pages.
• Comments from school director Observations/self evaluation -
(DOS) this should be a brief report on the
In addition, the schemes of work progress of the lesson planned in
shows the day when a specific lesson the scheme of work. Such reports
will be taught and how long it is could include: ‘taught as planned’.
intended to take. Not taught due to abrupt visit by
Country Director of Education.’
Week - refers to the week in the
‘Children did not follow the lesson,
term e.g. 1, 2, 3, etc.
it will be repeated on... (Specific
Key unit competency - Gives the date).
competence learners are expected
Comments from director of
to achieve at the end of the unit.
school – space left for comments
Lesson - refers to the lesson being by the school director.
taught in that week e.g. lesson 1,2,3
and 4, etc. This shows which is a
single and which is a double lesson.

21
Sample Scheme of work
Academic year: 2016 Term: 1 School: King of Peace Academy
Subject: Computer Science Teacher’s name: Davis Owoyesigyire Class: Senior 4

Week Key Unit Lessons Learning Resources & Teaching Observations/


Competencies objectives References methods & self-evaluation
techniques (include
dates of
assessment)
Week 1 Explain Lesson 1: Learners should Student’s book, Group work I did not cover
(2-5 Feb) characteristics Definition of a be able define a computer, projector, activities, research, computer
and evolution of computer and computer and white board, printer, question and answer, characteristics on
computer science. computer science.

22
computers and internet, video clips and practical activities, 2nd Feb being the
detect the impact of Computer pictures showing type of field excursions, first day of the
computer in society characteristics. Learners should computers. demonstration, and term.
be able to state observation.
Lesson 2: characteristics of Strategy: Lesson
Classification computers.
of computers to be covered
according to size Learners should able during free time
and processing to classify computers on 9th Feb.
power according to physical
size and processing Classification of
Lesson 3: power
Classification computers size
of computers Learners should and processing
according to data be able to classify power covered
type computers according satisfactorily.
to data type
Comments
from
Director of
School
3.2 Lesson plan as well as any books that the pupils
A lesson plan is a detailed outline will use during the lesson.
of how the teacher intends to carry 8. Introduction
out a specific lesson. This is the start of the lesson. The
Important sub-headings of a teacher should motivate the pupils
Lesson Plan by creating learning situations that
interest pupils e.g. posing a problem,
1. Administrative details
telling an amusing but relevant story
Date………… Subject………. or episode, showing an object or
Class…………. picture that arouse their interest.
The introduction should link what
Time…………. Roll……….......
the pupils have already learnt with
2. Topic area
what they are going to learn.
Broad area that is to be studied,
taken from the syllabus. 9. Presentation/lesson
3. Sub-topic area development
A smaller topic of the topic about This should mainly include the
which a lesson will be taught. activities that pupils and the teacher
will perform in order to achieve
4. Key unit competence
the stated objectives; as well as the
This is/are the competence(s) that
questions that pupils will answer as
the learner is expected to achieve at
they do the various activities.
the end of the unit.
It is convenient to distinguish
5. Learning Objectives
between the pupils’ and teacher’s
These represent what the teacher
activities under two columns.
anticipates pupils to achieve by the
10. S u m m a r y / c o n c l u s i o n :
end of the lesson. Objectives should
(Consolidation)
be clear and specific. They should
also be stated in behavioural terms, This is the step in which the lesson
that is, in a way that the outcome activities are tied up or consolidated
can be seen, displayed or measured. to emphazise the main points,
In one should distinguish between summarize the lessons or make
knowledge, skill and attitude conclusions. The summary should
objectives. correspond to the objectives stated
for that lesson.
6. Learning/teaching resources
11. Comments/self-evaluation:
Any materials and apparatus that
the pupils and the teacher will use Teacher should write remarks
during the lesson. on whether the objectives were
achieved or not and what he or
7. References
she intends to do to improve on
Any resources consulted or used by
the weak points noted during the
the teacher to prepare the lesson
lesson.
23
Sample Lesson Plan

School Name: King of Peace Academy


Teacher’s name: Davis Owoyesigyire

Term Date Subject Class Unit Lesson Duration Class


No No size

Computer
I 4/02/ 2016 S4 1 1 of 6 40 minutes
Science 35
Type of special needs to be catered for in this Special Cases in class:
lesson and the number of learners in each Visually challenged No: 1: not blind but
category required to sit in front
Hearing challenged No: none
Physically challenged No: 1 to be assisted
where mobility is required
Topic area: Computer System and Maintenance

Unit title
Computer Fundamentals

Key Unit Explain characteristics and evolution of computers and detect the impact of
Competence: computer in society
Title of lesson
Classification of Computers According to Size and Processing Power

Instructional Through group discussions the learner, should be able to classify computers
Objectives according to physical size and processing power
Classroom
Inside the classroom or laboratory.
setup
Learning Pupils’ textbooks, charts on various computer classes, pictures of super,
Materials mainframe, mini and micro-computers.

References
Pupils’ textbooks, Teacher’s guide, any other reference book or websites on
classification of computers according to physical size and processing power.

Description of teaching and learning activity


Through activity in groups or pairs, research from
the internet on types of computers according to size
and processing power. The learners should also be
Timing for each able to identify characteristics of supercomputers, Competences and
step mainframe, minicomputers and micro computers. This cross-cutting issues
will help learners appreciate importance of each type of to be addressed
computer and its use.

Teacher activities Learner activities

24
Groups to do
Guiding learners to:
research on types
• Form groups and carry
of computers
out activity 1.4 on page Cooperative learning will be
Introduction as required by
3 in student’s book. enhanced achieved as the
(5min) activity 1.4.
• Guiding learners to learners work in groups
Each student to
perform activities 1.5 to
participate in
1.8 from page 4-6
group discussions
As the facilitator: during the
lesson:
Learner to carry
• Teacher takes control Inclusivity in education -
out activities 1.5
and request specific Learner who is visually
to 1.8 pairwise or
group leaders to challenged is given a chance
in groups.
present their findings to to sit in front of the class.
entire class
The group
• Moderates the
leader to makes Critical thinking
Development discussion that comes
presentation to This will be practiced as
(30min) up
the class learners distinguish types of
• Explains various types
computers according to size,
of computers according
Learners to their characteristics and uses.
to size and processing
identify each type
power
of computer from Cooperative learning will be
• Uses the pictures and
pictures and video enhanced achieved as the
video clip show type of
clips provided by learners work in groups
computers not available
the teacher.
in the school

Learners states
Teacher summarizes the
four type of
lesson by:
computers
• Classifying computers Listening skills will be
according to size.
according to size and enhanced as learners take
processing final notes.
Conclusion Learners carry
• Giving assignment
(3min) out research Communication skills will be
exercise on
on uses of of enhanced as learners answer
characteristics and uses
supercomputers questions in the assignment.
of supercomputers,
mainframes,
mainframes,
minicomputers
minicomputers or PCs..
and PCs.
Evaluating the success of the
lesson by asking learners Asking and Communication skills will be
Evaluation
to quickly identify types of responding to enhanced as learners answer
(2min)
computers according to questions oral questions.
physical size.

25
Section 4: Assessment and record keeping
Assessment is the process of evaluating the learner. The teacher may use one or
the teaching and learning processes a combination of the following teaching
through collecting and interpreting methods:
evidence of individual learner’s progress • Question and answer
in learning and to make a judgment about a • Practical activities
learner’s achievements measured against
• Observation
defined standards. Assessment is an
• Projects
integral part of the teaching and learning
processes. In the new competence-based (a) Question and answer
curriculum assessment must also be This method involves asking learners
competence-based; whereby a learner questions during the teaching/learning
is given a task and asked to do it by sessions where the learners are
applying what he/she learned. The two required to respond orally or in writing.
types of assessment that are employed in Depending on the topic, the questions
the new curriculum are formative and may be short answer type questions,
summative assessment. structured type questions, filling blanks,
multiple choice questions, true-false
questions and matching items.
4.1 Formative and continuous
assessment (b Practical activities
Formative or continuous assessment This teaching method requires the
involves formal and informal methods learner to perform a task or solve a
used by schools to check whether problem practically. The teacher then
learning is taking place. When a teacher assesses the finished work by looking
is planning his/her lesson, he/she should at the materials used, procedures
establish the criteria for performance followed, whether it works or not or
and behavior changes at the beginning of whether it is finished. He or she then
a unit. Then at the of end of every unit, awards marks accordingly.
the teacher should ensure that all the
(c) Observation
learners have mastered the stated key
unit competencies basing on the criteria This method involves the teacher
stated, before going to the next unit. The observing learners as they perform
teacher will assess how well each learner a task such as programming to assess
masters both the subject matter and the acquisition of skills and attitude change.
generic competencies described in the The teacher checks the learner's ability
syllabus and from this. The teacher will to measure, classify, communicate
get a picture of the all-round progress of findings, etc. He or she also assesses
the learner’s curiosity, patience, team
26
and co-operation spirit among others. integrative aspect whereby a student
must be able to show mastery of all
(d) Projects
competencies.
This involve giving individual learners or
group of learners a comprehensive task It can be internal/school-based or
that they do undertake a comprehensive external in the form of district and
in real life that they will do over a period national examinations. School-based
of time. The time allowed for the project summative assessment should take place
may span over days, weeks or months once at the end of each term and once at
after which they present a report. In the end of the year.
carrying out a project, let learners Before developing a question paper, a
begin from planning stage (come up plan or specification of what is to be
with a schedule of events), execute the tested or examined must be produced
plan, analyse the results and look back to show the units or topics to be tested
( reflect on the challenges encountered on, the number of questions in each level
during the project and come up with of Bloom’s taxonomy, and the marks
solutions to those challenges (problem- allocation for each question.
solving skills).
In a competency based curriculum,
A teacher can use one or several of these questions from the higher levels of
assessment methods depending on the Bloom’s taxonomy should be given
subtopic being studied or the purpose more weight than those from the
for which assessment is required. knowledge and comprehension level.
Before developing a question paper, the
4.2. Summative assessment
item writer must ensure that the test
When assessment is used to record or examination questions are tailored
judgment of the competence or the towards competency based assessment
performance of the learner, it serves by doing the following:
a summative purpose. Summative
assessment provides a picture of a Identify topic areas to be tested on from
learner’s competence or progress at the subject syllabus.
any specific moment. The main purpose Outline subject matter content to be
of summative assessment is to evaluate considered as the basis for the test.
whether learning objectives have been
Identify learning outcomes to be
achieved. It is also used for the ranking
measured by the test.
or grading of learners, for deciding on
progression, for selection into the next Prepare a table of specifications.
level of education, and for certification. Ensure that the verbs used in the
This assessment should have an formulation of questions do not only
require memorisation or recall answers

27
but test the broad competencies as important documents in keeping records
stated in the syllabus. of assessments and teaching is the
4.3 Structure and format of the portfolio,
examination A Portfolio is a folder (or binder or
I.2.2 Structure and format of examination even a digital collection) containing the
student’s work as well as the evaluation of
In computer science, two types of papers
are to be examined: theory paper and the student’s strengths and weaknesses
practical paper. in tasks given.

• Theory paper tests knowledge, A Portfolio reflect not only the work
skills and attitudes. The areas produced, but is also a record of the
to be examined for competence activities undertaken over time as part
include Computer systems and of teaching and learning process. The
maintenance, data structures and portfolio output (formative assessment)
algorithms, programming, databases, will be considered only as enough for
networking, computer graphics and three years of Advanced level. Besides, it
multimedia. will serve as a verification tool for each
• For programming, database and learner that he/she attended the whole
networking, students are supposed learning before he/she undergoes the
to develop a project using specified summative assessment for the subject.
criteria
Whatever procedures are used in
• The practical paper that consists formative assessment, generate data in
of question on transforming an form of competences and record them
algorithm into a computer program in each student's portfolio. This is useful
using C/C++, Visual Basic and java; in monitoring learning progress of each
database questions and networking.
learner for purposes of remedial actions,
• The content distribution table alternative instructional strategy,
provided in the syllabus will assist in feedback/advice to learner and parents.
making choice of the content to be
assessed because not all topics and
subtopics can be assessed. 4.5. Reporting to parents
The wider range of learning in the
4.4 Record Keeping new curriculum means that it is
necessary to think again about how
Record keeping is the routine of
to share a learners’ progress with
managing student's performance and
their parents.
teaching progress. One of the most

28
A single mark is not sufficient to convey expectations very well, for each of
different expectations of learning knowledge/understanding, skills and
that are in the learning objectives. competencies in a subject will convey
The most helpful reporting is to more meaning than a single mark.
share what learners are doing well, For school based assessments, these
and where they need to improve. A scores do not need to be added up.
simple scale of meeting/not meting

29
30
s
UNIT 1 UNIT 2 UNIT 3 UNIT 4 UNIT 5 UNIT 6
Computer Computer Safe and ethical Computer Number Systems Boolean
Fundamentals Architecture and use of computers Software Algebra and
Assembly Installation Logic Gates

Number of
16 18 12 16 18 18
periods

Introduction This unit covers the This topic covers the This topic covers the This topic covers the This topic covers the This topic covers
following key topics: following key topics: following key topics: following key topics: following key topics: the following key
• Definition of • Computer system. • Ergonomics • Computer • Fundamentals of topics:
computer science • Peripheral devices. and structures software number systems • Introduction.
• Characteristics of • System unit (case) furniture. • Disk preparation • Number base • Logic gates and
computer types. • Safely against • Booting order systems circuits.
• Classification of • Ports and climate change. • Installing drivers • Converting • Introduction to
computers connectors. • Protection against • System decimal to base-n website design.

31
• Role of • Assembling physical damage. requirements system • Boolean
computers in the computers. • Protecting the • Disk management • Converting binary algebra.
society • Cleaning and environment. • Installing OS to base-n system • Animation
• Historical disposing of • Computer ethics. • Installing • Conversion from using Adobe
evolution of computer application octal to decimal Flash.
computers components. software. • Conversion from
hexadecimal to
decimal
• Conversion from
decimal fraction to
binary
• Conversion from
binary fraction to
decimal
• Conversion from
negative decimal to
binary
• Binary arithmetic
Classroom • Whole class • Whole class • Whole class • Whole class • Whole class • Whole class
Organisation sessions sessions sessions sessions sessions sessions
• Group work – • Group work – • Group work – • Group work – • Group work – • Group work –
activities activities activities activities activities activities
• Practicals

Equipment • Student text • Student text book • A computer • Computer • Computer • Student text
Required book • Projector running Windows • Fire extinguisher • Projector book
• Projector • Computer OS • Dismantled • Scientific • Projector
• Computer • Internet • Student text book computer calculators • Computer
• Internet connectivity • Projector components running word
connectivity • Library • Internet • Cleaning brushes, processor
• School and Public • CD/DVD connectivity soft towels • Internet
library • Video Player • Projector connectivity
• CD/DVD • Dismantled • Screw drivers • School and
• Video Player computer • Vacuum cleaners Public library
• Blower

32
• Student text
book

Activities Group work:- Group work:- Group work:- Group work on: -
Group work: - Group work:- a) General safety a) Classification of a) Fundamentals of a) Logic gate
a) Definition a) Computer system guideline. - 3.1 computers – 4.2, number systems – structure - 6.2
of computer – 2.1 b) Environmental b) software 5.1 b) Truth tables -
and computer b) .System unit – 2.3 issues – 3.2 installation – 4.4 - b) Number base 6.5, 6.6
science- 1.1,1.2 c) Definition of ports c) Computer ethics – 4.7 systems – 5.3, 5.4
b) Characteristics of and connectors – 3.9 – 3.6 Individual work:--
computers-1.3 2.5 – 14 a) Introduction-
(c) Classification of d) Internal computer 5.1
computers-1.4 components – 2.13 b) Logic cricuit
(d) Uses of computers 1.5 - 14 6.12
(e) Types of computers e) Assembling d) Fire safety Pair work:- Individual work:- c) Truth tables 6.3,
according to funtion, computers: guidelines – 3.3 a) Classification of a) Number base 6.12, 6.14
-1.9 data type – 1.10 components – e) Safety against computers – 4.1, systems – 5.2, 5.3, d) Bolean algebra–
(f) Role of computers 2.15 – 2.26 climate change – b) Number base 6.7
in the society – 1.11 Pair work:- 3.5 b) software conversions -5.4 to
(g) Historical evolution a) Peripheral devices f) Electrical safety – liceniung – 4.3 5.12 Pairl work
of Computers – 1.12 – 2.2 3.4 - 3.5 c) Disk mangement c) Binary arithmetic – a) Truth tables 6.9
to 1.16 b) Ports and – 4.5, 4.6 5.12 to 5.20
Assignment: - connectors – 2.4 b) Bolean algebra
On types of c) Cleaning and 6.9
computers. disposal of
Individual work:- computer
components – 2.17
- 2.29

33
Competences • Critical thinking • Critical thinking • Hands on skills • Numeracy • Problem solving
Practiced • Communication • Communication of cleaning the • Critical thinking • Learning
skills • Research and computer; using • Cooperation through doing
• Research and problem solving fire extinguisher. • Interpersonal • Cooperation
problem solving • Cooperation and • Problem solving: management and
• Cooperation and interpersonal troubleshooting • Science and interpersonal
interpersonal management technology management
management life • Life skills • Creativity and life skills
skills Innovation
• Co-operation

Language • Mastery of terms • Mastery of • Use of correct • Mastery of • Mastery of


Practice used to describe the names of terms in describing names of varoius Master of names of logic terms
computer various parts of a saftety measures categoeries of various numeration
computer ethical and software. system • Proper
unethical use of . Terms describing communication
computers the tasks of logic facts
performed

34
during softaware
installatioi
Vocabulary • Understanding • Knowing the • Learning names of • Names of • Understanding • Mastery
Acquisition computer names of various various features on various tools and number systems of various
fundamentals devices the desktop resources concepts Boolean algebra
terminologies terms

Numeracy • Conversion of • Working out


number systems. Boolean algebra
• Boolean algebra truth tables.
• Binary arithmetic • Solving
expressions.

Study Skills • Ability to search • Be able to classify • Identify each • Learning by doing: • Research skills • Computational
for information a device as input, device provided all the practical to find out skills
on the internet. output, storage or or in pictures and activities in this reasons why • Research skills
• Ability to processing. give its name & unit expose certain practical
summarise main function. the learner to implementations
important tasks.
• Explain how each • Research skills: are preferred e.g. • Research:
points from a device functions accessing the why prefer a CO2 skill in analysing analog searching for
discussion. e.g. a 3D printer or internet to find fire extinguisher to a and digital technologie information on
• Writing skills. an LCD monitor out more about water/powder based? the web and
• learning by doing etc. various tasks Help.
• Connect peripheral • Analysis skills: • Numeracy:
devices to the demonstrate skill working out
computer – match in analysing which truth tables.
cable to port storage device to • Creative:
correctly use when. designing digital
• Identify various circuits.
ports on the
system unit.
• Classify computers
• Elucidate the
history of
computers

35
Revision • Provision of • Provision of • Provision of • Provision of • Provision of • Provision of
both practical both practical both practical both practical revision exercises both practical
and theoretical and theoretical and theoretical and theoretical and theoretical
exercises exercises exercises exercises exercises

Assessments • A formative • Assess ability of • Formative • Assess the ability • A formative • A formative
assessment of the learner to assessment of the of the learner assessment of assessment of
competencies in classify various following:- ability to identify competencies in competencies
each of the core devices as input, to identify input/ various desktop each of the core in performing
areas covered by storage, output or output/storage/ features and areas covered by the tasks in the
this unit. processing their functions by this unit. student book.
name.
• Assess ability processing devices • Formative • The learner • Assess ability to • Assess ability
to classify and explain how evaluation of the should be able perform different work out
computers they function. practical skills of to individually do number systems truth tables
• Assess knowledge • Formative the student to: the practical tasks conversions and simplify
of computer assessment of o delete/restore files in this unit - - - • Assess ability to Boolean
evolution students ability to o customise start even in situations perform binary expressions.
according to identify ports and menu where the there arithmetic
generation connect devices. o set time/date is group work –
• Cleaning the o create shortcuts the teacher must
computer o start and close concentrate on
• Assembling the programs the individual.
computer o Use accessories
• Assess ability to
identify and use
various removable
storage devices for
particular contexts
• Ability to

36
customise features
using control panel
• Student to be Student must be
Learning • Concise • Student classify • Student should able to define able to:
Outcomes definition of a devices as input/ be able to start/ computer • Concise definition • dentify logic
computer processing/output/ shut down software. of a bit, nibble, byte operators,
• Concise storage without fail the computer • Student to and word Truth tables
definition of • Student to using correct be able to • Conversion of and evaluate
computer science demonstrate procedures differentiate number from one Boolean
• List skill to attach • Student to observe between system system to another expression
characteristics of peripheral devices safety guidelines and application • Use ones and twos using Boolean
a computer to the system unit strictly software. complements laws.
• List using the right • Student to • Set the booting • Perform binary • Describe the
order in order
characteristics of cable and port demonstrate addition, use of logic
to install the OS
various classes of • Student to know understanding of from disk. subtraction, gates and apply
computers devices meant computer room • Perform multiplication and Boolean laws
• Demonstrate to cater for ergonomics administrative division on logic gates.
understanding in challenged users functions like
classifying scandisk
computers • Student to • student to • Student to be • Apply laws of
according to assemble the demonstrate able to install the Boolean algebra
physical size and computer from knowledge of good OS on a blank on Boolean
power. scratch. furniture computer – after expressions.
• Demonstrate • Student to identify • Student to know partitioning and • Draw graphical
understanding internal computer how to take care formatting the representation
in classifying components of special needs hard disk. of different
computers • Student to clean people. • Install application logic gates and
according to the computer • Student to know software construct and
function. correctly using the how to operate a • Install drivers evaluate a logic
• Demonstrate right detergents fire extinguisher circuit.
understanding and equipment. • Student to
in classifying observe fire safety
computers procedures
according to data • Student to protect
type. computers and
• State roles of components
computers in the from electrostatic
society damage

37
• Elucidate • Protect computers
historical from power
development of fluctuations
computers. • Protect the
environment
from e-Waste
contamination
• Student to adhere
to ethics: genuine
software; avoid
counterfeits.
UNIT 7 UNIT 9 UNIT 10 UNIT 12
UNIT 8 UNIT 11
Introduction Introduction Introduction Control
Control Structures Operators and
to Computer to Computer to C++ Statements in
and Arrays Expressions in C++
Algorithm Programming Programming C++
Number of
24 12 6 12 12 16
periods

Introduction This unit covers the This unit covers the This unit covers the This unit covers the This unit covers the This unit covers the
following key topics: following key topics: following topics:- following key topics: following key topics: following key
• Fundamentals of • Control structures • Computer • Evolution of C++ • Expressions and topics:
algorithms • Sequence control programming • Syntax of C++ operators • Review of
• Program structure concepts program • Classification of C++ control
development process • Selection control • History of • Compiling and operators structures
• Formulating structures programming executing C++ • Overall operator • Selection
algorithms • Iteration control languages program precedence statements in
• Memory concepts: structures • Computer • Input and • Classification of C++ C++
variables and • Break and continue programming Output streams expressions • Looping
constants statements paradigms • Variables and statements in

38
• Operators and • Goto statements data type C++
Expressions • Exit statement • Constants • Jump
• Modular • One dimensional • Output statements
Programming array formatting

Classroom • Whole class sessions • Whole class • Whole class • Whole class • Whole class sessions • Whole class
Organisation • Group work sessions sessions sessions • Group work sessions
activities • Group work • Group work • Group work activities • Group work
activities activities activities • Programming activities
• Programming exercises • Programming
exercises exercises

Equipment • Projector • Projector • Projector • Projector • Projector • Projector


Required • Computer • Computer • Computer • Computer • Computer • Computer
• Network • Network • Network • C++ compiler • C++ compiler • C++ compiler
connection connection connection • Internet • Internet connection • Internet
• Digital material • Digital material • Digital material connection • Digital material connection
• Digital material • Digital material
Activities Group work: - Group work:- Group work:- Group work:- Group work:- Group work:-
a) Fundamentals of (a) Sequence n control a) Computer (a) Syntax of C++ (a) Classification of C++ a) Review of
Algorithms- 7.1 structures - 8.1 programming program-10.1 operators–11.1 and control
b) Formulating (b) Selection control concepts –9.1 and (b) input/out put 11.2, structures –12.1
algorithms-7.10 structures - 8.4 9.2, streams - 10.2 (b) Relational operators b) Looping
c) Operators and (c) Finite and infinite b) History of (c) Variables and - 11.5 statements in
expressions–7.9 loop - 8.8 programming data type-10.6 C++ 12.7
(c) Break and continue languages–9.3 Individual work:- Individual work:-
Individual work – 8.9 a) Computer Individual work:- (a) Types of C++ a) Selection
(a) Fundamentals of Individual work:- programming a) Variables and operators-11.3, statements in
Algorithms- 7.2 - 7.6 a) Selection control paradigms–9.6 and data type-10..4 11.4,11.6 and 11.7, C++ -12.2 -
structures – 8.2, to 9.7 and 10.5 12.6,
(b) Operators and 8.3 Individual work:- (b) Constants-10.8 (c) Classification of C++ b) Exit statements
expressions–7..7 - b) Iteration control a) Computer (c) Output expressions - 11..8 – 12.8
7..8 structures- 8.5 - programming formatting-10.11
8.6 paradigms–9.4 and
c) One dimensional 9.7
array–8.10 to 8.11,

39
Competences • Numeracy • Numeracy • Numeracy • Numeracy • Numeracy
Practiced • Critical thinking • Critical thinking • Critical thinking • Critical thinking • Critical thinking • Numeracy
• Critical thinking
• Cooperation • Cooperation • Cooperation • Cooperation • Cooperation
• Cooperation
• Interpersonal • Interpersonal • Interpersonal • Interpersonal • Interpersonal • Interpersonal
management management management management management management
• Creativity and • Creativity and • Creativity and • Creativity and • Creativity and • Creativity and
innovation innovation innovation innovation innovation innovation
• Science and • Science and • Science and • Science and • Science and • Science and
technology technology technology technology technology technology

Language • Syntax and semantics • Syntax and • Syntax and • Syntax and • Syntax and semantics • Syntax and
Practice of natural languages semantics of semantics of semantics of of C++ operators semantics of
• Syntax and semantics control structures programming C and C++ and expressions C++ control
of algorithms • Syntax and languages programming statements
semantics arrays • Natural languages language
• Mastery of • Mastery of • Mastery of C++
Vocabulary • Mastery of concepts concepts relating programming programming • Mastery of C++ • Mastery of
Acquisition relating to computer to control concepts concepts operators and C++ control
algorithms structures and • Logic reasoning expression statements
arrays

Numeracy • Computing • Computing • Mathematical • Mathematical • Mathematical • Mathematical


mathematical mathematical expressions expressions expressions expressions
expressions. expressions. • Mathematical • Mathematical • Boolean expressions • Boolean
• Computing memory • Computing functions functions expressions
size memory size • Polish notation • Calculation of
• Boolean evaluation • Boolean evaluation • Logic expressions memory size

• Analytical skills:
Study Skills • Analytical skills: • Analytical skills: • Analytical • Analytical skills: • Analytical skills: analyze boolean
formulate algorithms algorithms with skills: analyze analyze C++ categorize operator expressions
• Synthesis: provide control structures mathematical arithmetic and expression • Synthesis:
solutions to • Synthesis: solutions functions and logic and boolean expressions solutions to
computation to algorithmic expressions expressions • Synthesis: solutions control logic
problems structures • Synthesis: solutions • Synthesis: to binary and • Computational

40
• Computational • Computational to programming solutions to C++ unary expressions skills
skills: workout skills: workout problems programming problems • Translate
mathematical mathematical • Computational problems • Bitwise operations conditional
expressions expressions skills • Computational • Logic comparisons logic in
algorithms into
• Research skills: • Research skills: • Research skills: skills: workout • Research skills:
C++ control
Search for content Search for content Search for mathematical Search for C++ statements
on internet on internet programming expressions in operators on • Research skills:
material on C++ internet Search for
internet • Research skills: C++ control
Search for C++ statements on
tutorials on internet
internet

Revision • Provision of activities • Provision of • Provision of • Provision • Provision of practical • Provision


and theoretical activities and activities and of practical activities and of practical
revision theoretical revision theoretical revision activities and theoretical revision activities and
theoretical theoretical
revision revision
Assessments • Formative • Formative • Formative • Formative • Formative • Formative
assessment of assessment of assessment of assessment of assessment of assessment
definition of definition of definition of definition C++ definition of of definition
algorithms control structures programming concepts operators and of control
• Assess ability to use • Assess ability to • Assess knowledge • Assess ability to expressions statements
different algorithm define arrays on evolution of differentiate C++ • Assess ability to expressions
design tools • Assess ability programming • Assess ability to identify and use • Assess ability
• Assess ability to to use different languages write, compile different operators to identify and
interpret algorithms. selection • Assess knowledge and run C++ • Assess ability to rank use selection
• Assess ability constructs of programming programs operators by order statements
formulate algorithms • Assess ability paradigms • Assess ability to of precedence Assess • Assess ability to
to use iteration identify and use ability to identify and identify and use
constructs. C++ iostream use different C++ selection
• Assess ability objects and expressions • Assess ability
represent one functions to identify and
dimensional arrays • Assess ability to use C++ jump
declare variables statements like
and constants break, continue
using appropriate and goto.
data type

41
• Assess skills in
formatting C++
program output

• Definition
Learning • Definition of • Definition of • Definition • Definition of • Defining operators of control
Outcomes algorithms control structures of computer C++ concepts and expressions statements
• Design of algorithm • Design algorithms programming • Knowledge • Ability to Categorise • Knowledge of
• Interpretation of with control concepts of how C++ operators how conditional
algorithm structures languages have logic is
evolved evaluated
• Problem solving • Interpret • Knowledge of • Master the • Ability to Categorise • Classification
using algorithms algorithms with how computer syntax of C++ expressions of control
• Ability to convert control structures languages have programs • Formulating statements
an algorithm to a • Problem solving evolved • Creating, unary and binary Ability to
computer program using control • Definition and compiling and expression use selection
• Memory structures categorization executing C++ • Demonstrating use constructs
management • Ability to design of computer programs of operators • Ability to
• Modular design of 1D arrays programming • Manipulate input • Manipulate decimal use looping
computer programs. • Memory paradigms and output numbers and bits constructs
management with • Demonstration of streams • Arrange operators • Ability to
arrays each programming • Manage memory by precedence use jump
paradigm with variables, statements
• Embrace good data types and
programming constants
practice • Format numeric
• Paradigm shift to and non-numeric
object oriented output
programming

42
UNIT 13 UNIT 14 UNIT 15 UNIT 16 UNIT 17
Functions in C++ Arrays in C++ Introduction to HTML-Based Web Cascading Style
Programming Programming Operating System Development Sheet

Number of
14 12 18 20 8
periods

Introduction This unit covers the This topic covers the This topic covers the This topic covers the This topic covers the
following key topics: following key topics: following key topics: following key topics: following key topics:
• Fundamentals of • Review of arrays • Definition of OS • Fundamentals of world • Definition of CSS
C++ Functions • Creating one • Functions of OS wide web • HTML styling and
• Types of functions dimensional array • Characteristics of • Hypertext Markup disadvantages
• Creating user-defined • Accessing array elements OS Language (HTML) • Comparison between
functions • Array of characters • Components of OS • Introduction to XHTML HTML and CSS
• Recursive functions • Reading and displaying • Common OS • Creating web pages tyling
strings • Smartphone OS • Enhancing we pages • CSS syntax
• Creating multi- • History of OS • Creating forms • Adding CSS to web
dimensional arrays • Types of OS • Introduction to HTML5 pages

43
• MS-DOS • Migrating from • CSS Styles
HTML4 to HTML5 • Creating CSS pages
from scratch
Classroom • Whole class sessions • Whole class sessions • Whole class • Whole class sessions • Whole class
Organisation • Group work • Group work activities sessions • Group work activities sessions
activities • Group work • Group work
activities activities
• Practicals • Practicals

Equipment • Projector • Projector • Student text book • Computer • Computer running


Required • Computer • Computer • Projector • Projector web server and
• C++ compiler • C++ compiler • Computer • Java Netbeans IDE text editors
• Internet connection • Internet connection • Internet • HTML and CSS editor • Browsers
• Digital material • Digital material connectivity • Internet • Student text book
• Library • whiteboard
• CD/DVD • projector
• Video Player • internet connection
Activities
Group work on: - Group work on: Group work:- Group work:- Group work:-
a) Library functions- - (a) initialising arrays and a) Definition of OS – a) Fundamentals of world (a) CSS float property
13.1 strings- 14.2, 14.4 and 15.1 wide web – 16.1 – 17.11
(b) User defined 14.5 b) Characteristics of b) Hypertext markup Pair work:-
functions - 13.2 O/S – 15.3 language – 16.2 a) CSS syntax – 17.2
Individual work:- (c) Smartphone OS – c) Hyperlinks and tables -
Individual work:- a) Declaration of arrays – 15.7 16.11 and 16.12 Individual work:-
a) Functions declaration 14.1 Android – 15.8 d) Introduction to HTML5 a) Definition of CSS –
in C++ – 13.3 ab)7 b) Reading and writing Apple OS – 15.9 – 16.15 abd 16.17 17.1
b) Function return type array elements l array – Windows Phone – e) Migrating from HTML4 b) Fonts-and margins
and argument - 14..3 15.10 to HTML5 - 16.16 17.5, 17.6 and 17.7
13.4 Pald OS – 15.11 (c) Hiding elements
(c) Parameter passing - History – 15.12 Individual work:- 17.9
13.5 a) Hypertext markup (d) Background - 17.10
(d) Recursive functions - Pair work:- language – 16.3, 16.4
13.6 and 13.7 (a) Component of OS- b) Creating web pages – Practical hand on:-
15.2, and 15.4 16.5, 16.6 (a) Creating CSS page
Individual:- d) Creating Forms – 16.13 from scratch – 17.2,

44
(a) Types of OS – 15.13 and 16.14 17.4
and 15.4 (b) CSS coding
MS-DOD – 15.5 strategies- 17.3
UNIX-15.6
Linux – 15.7
Mac OS -15.8
Competences
Practiced • Numeracy • Numeracy • Problem solving • Critical thinking • Critical thinking
• Critical thinking • Critical thinking • Learning through • Cooperation • Creativity and
• Cooperation • Cooperation doing • Interpersonal innovation
• Interpersonal • Interpersonal management • Cooperation and
management management • Creativity and innovation interpersonal
• Creativity and • Creativity and innovation management
innovation • Science and technology • Communication
• Science and research and
technology problem solving
• Practical skills CSS
programming
Language • Syntax and semantics • Syntax and semantics of • Syntax and semantics • Software
Practice of C++ functions C++ arrays of HTML4, XHTML and programming and
HTML5 use
• Discussion in
groups

Vocabulary • Mastery of C++ • Mastery of C++ • Understanding • Mastery of HTML4, • Understanding of


Acquisition concepts relating to concepts relating to of various XHTML and HTML5 CSS and HTML
functions arrays operating systems doctype specifications
terminologies
• Mathematical • Determining table size
Numeracy • Mathematical expressions • Determine image size • Specifying colours
expressions • Boolean expressions in hexadecimal
• Boolean expressions • Computing memory
size
Study Skills • Analytical skills: classify
• Analytical skills: • Analytical skills: analyze • Learn through according to HTML • Explain CSS related

45
analyse functions arrays practise doctype terms appropriately
• Synthesis: create user • Synthesis: create and • Research: searching • Illustrate HTML doc • Program CSS pages
defined functions manipulate 1D arrays for information on structure
• Computational skills • Create and manipulate the web and Help • Synthesis: create
• Breakdown a large strings • typing commands at and render HTML
program into • Use C++ string libraries the DOS prompt documents
functions • Create and manipulate • Create and render
XHTML docs
• Demonstrate 2D arrays • Identify differences in
parameter passing HTML, XHTML and
• Research skills: HTML5
Search for C++ • Create HTML lists, tables
control statements and forms
on internet • Insert graphics into
HTML documents
• Work with hyperlinks
• Create and render
HTML5 documents
• Use new HTML5 input
elements and their
attributes
• Provision of practical • Provision of practical and Provision of practical • Provision of practical and • Provision of
Revision activities and theoretical revision and theoretical theoretical revision practical and
theoretical revision revision theoretical revision
• Formative • Formative assessment of • A formative • Formative assessment of • Demo
Assessments assessment of definition of arrays assessment of ability ability to create HTML understanding of
definition of • Assess ability to create to describe OS documents. the advantages of
functions and manipulate 1D array functions. • Assess ability to use CSS over HTML
• Assess ability to use • Assess ability to create • Assess ability XHTML 1.0 formatting of
library functions array of characters to differentiate • Assess student websites.
• Assess ability to • Assess ability to create between computer understanding of HTML5 • Knowledge of
create user-defined and manipulate multi- and smart phone syntax CSS selector and
functions dimensional arrays. OS sysntax for rule
• Assess ability • Assess student creation.
to create and understanding of • Ability to work
manipulate recursive main characteristics with inline, internal
functions. of OS amd external CSS.
• Student must be • Formative
able to describe assessment task
smart phone OS about accurate use
• Assess student of CSS

46
on knowledge of • Ability to create
history of O/S completely
• Assess student functioning CSS
on demonstrated pages.
knowledge of types
of OS
• Assess student on
ability to use MS-
DOS commands
• Ability to define • Ability to define arrays Student must be able to: • Appreciate evolution of Differentiate html
Learning functions • Ability to create and • set page to portrait internet, web and HTML styling and CSS
Outcomes • Ability to use library manipulate 1D array / landscape • Ability to differentiate styling.
functions • Ability to determine size • Track changes, HTML, XHTML an • Identify the correct
• Knowledge of of an array accept or reject HTML use of a given
parameter passing • Ability to determine changes • Ability to create web selector, how to set
• insert page, column pages using HTML
• Ability to create dimension of an array a selector and how
breaks • Ability to determine
functions • capability to define appropriate HTML to name different
and use a style doctype elements to match
one CSS selector.
• Ability to create HTML Differentiate priorities
• Ability to determine • Ability to create and • ability to work with lists, tables and forms of styles in a
function return type manipulate strings nested lists array web page namely
• Ability to create • Ability to create multi- • Insert borders and • Ability add hyperlinks external CSS,
recursive functions dimensional arrays footers. and images to a web internal CSS and
• insert page numbers page inline CSS.
• work with drop cap • Manage a smooth • Identify basic
transition from HTML4 properties for
to HTML5 different selectors.
• Create online
styles

47
Unit 1 Computer Fundamentals

Student's Book page 1 – 15. ( 16 Periods)

Key unit competence


By the end of this unit, the learner should be able to explain characteristics and
evolution of computers and detect the impact of computers in society.

Learning objectives Attitudes and values


Appreciate the evolution and the
Knowledge and understanding
importance of a computer in:-
1. State and explain characteristics
Education
of a computers and classify them
according to their size, processing Business
power, their functions and data to Governance
be processed. Health
Communication
2. Identify the impact of computer in
society. Entertainment

3. Explain the evolution of computer. Generic competences


addressed in this unit
Skills Problem solving: By doing the learning
1. Detect the impact of computer in activities in this unit the student learns
society. how to apply technology to solve
2. Classify computers according to problems.
their size, processing power ,their
Interpersonal management: Working in
functions and data to be processed
groups helps nature this skill.
3. Differentiate different computer
generations, technology used in Working together also enhances a sense
each generation. of respect for each other regardless
of socio-cultural differences hence

48
supports interpersonal respect and Background information
promotes national unity.
Some of the content in this unit was
Communication: presentations in class introduced in S1. The teacher is therefore
made after group work will develop this encouraged to prod the student to
skill very well. participate fully in the class discussions
Links to other subjects and to research more about the various
Physics or electronics related to technologies concepts presented here.
used in electronic computers: vacuum tubes, Suggested teaching/ learning
transistors, integrated circuits. activities
Cross cutting issues addressed in To effectively deliver this content in this
this unit unit, the teacher is expected to use group
Inclusive Education: This is a teaching discussions, research, demonstration
methodology that ensures all students and assessment methods beyond those
are supported to learn regardless of provided in the student’s book.
their backgrounds and abilities. It is
the responsibility of the teacher to use Definition of a computer
inclusive approach by integrating parents, and computer science
community, and educators in his/her
teaching methods. As a computer science (1 period)
teacher, make use of available teaching
This topic provides concise definitions
accessibility tools and to help students
of the terms computer and computer
with disabilities participate in classroom
science.
and other aspects of school life.
Information to the teacher
Assessment criteria
The definitions provided in the student's
Students can explain the role and evolution
book are generic obtained from
of computers, type, classification of
internet sources such as Oxford online
computer.
dictionary. It is important to divide the
Suggested teaching class into groups and guide them how
methodology to research on reliable sites to get
alternative definitions of the two terms.
Guided discovery
To reinforce understanding of basic
Research
concepts, let the groups attempt activity
Question and answer 1.1 on page 1 of the student's book.
Discussion

49
Preparation student's book are not exhaustive. It
would be a good idea to divide the
Carry with you pictures of various
class into groups and guide them how
computers and peripheral devices.
to research on other characteristics of
Materials: computer, whiteboard,
computers. To reinforce understanding
projector, student book and internet.
of basic concepts, let the groups attempt
Teaching guidelines 1.1 activity 1.3 on page 2 of the student's
• When dealing with this topic, book.
impress on the students the fact that Materials: computer, wall chart,
the computing machine was first projector and internet.
born through inquisitive minds who
Preparation
wanted to invent through research
and innovation. This should create a Carry a chart to class that lists the various
link between computer science and characteristics of computers.
computer. Teaching guidelines 1.2
• Give the students a chance to • Guide the students to do Activity
present in class the definition of a 1.3 on page 2 by suggesting relevant
computer and computer science. websites that have the characteristics
• Let the student do learning activities of computers.
1.2 and 1.3 on page 2 of the student's • Allow a brief brainstorming session
book. for the students to discuss the
• Cover the relevant content on characteristics that they find out.
characteristics of computers • You can now cover the content in this
after giving students a chance to section. Use the wall chart and the
mention common characteristics of material in the student book to make
computers that they know. it interesting.

Characteristics of computers Classification of computers

(1 period) (6 periods)
This topic explains some of the This topic is is based classifies computers
characteristics of computers in terms according to size and processing power,
of speed, accuracy, versatility, diligence, function and type of data processed.
reliability and memory. Information to teacher
Information to the teacher In this section is divided into three subsec-
tions that classifies computers according
The characteristics provided in the
to size and power, function and type of

50
data they process. It is important to note findings from group discussions.
that this classification is not concrete. This
classification is merely based on the sylla- Types of computers according
bus hence should not be considered as the to function
standard method of classifying computers.
By the end of this section, the learner
Guide the students on researching other
should be able to classify types of
methods used to classify computers. For
computers according to function they
example, they may find out that computers
perform.
may also be classified general purpose and
special purpose. Materials A computer connected to
the internet, projector, video clip.
Types of computers according Preparation
to size and power Look for a video of robots at work.
Also, a mobile phone is a special purpose
By the end of this section, the learner should computer – for communication..
be able to classify types of computers Teaching guidelines 1.3
according to size and processing power.  Using practical examples or
Materials: student text book, wall charts, illustrations, guide the students in
whiteboard, projector, movie, computer identifying three types of computers
connected to internet. according to function they perform.
These are servers, workstations and
Preparation embedded computers. This would
Carry the pictures of supercomputers help them carry out activity 1.9 on
(both of old and current), mainframes, page 8 in the student's book.
minicomputers and personal computers.  In To help the students identify
the three types of computers, you
Teaching guidelines 1.2 may be required to organize for a
 Using practical examples or fieldwork visit to an organization
illustrations, guide the students in or industry where servers,
identifying various types of computers workstations and embedded
according to size and processing computers are accessible.
power. This would help them carry
out activities 1.4 to 1.8 from page 3 to Types of computer according
6 in the student's book.
to data type
 In most of these activities, you may
divide the class into groups and give By the end of this section, the learner
each student a chance to present should be able to classify computers
according to data type.

51
Materials a computer connected to the health institutions, higher institutions of
internet, student text book, whiteboard, learning and government offices. This
projector. not only motivates the students liking of
the subject but also form a strong career
Preparation
foundation motivates a student education.
Carry a chart to class that classifies
computers according to the type of data Materials a computer connected to the
they process. internet, student text book, whiteboard,
projector, video.
Teaching guidelines 1.4
 Start by mentioning various types Teaching guidelines 1.5
of data that exist in the world today  This topic requires a lot of group
e.g. temperature, pressure, speed work discussions. Divide the
etc. Yet we need computers to class into groups and assign them
capture and process this data. application areas to research on.
 You can now introduce the Let each group identify actual places
concepts of analog, digital and such as airports, supermarkets,
hybrid computers. Be careful to give government offices and hospitals.
real life examples e.g. how come at  Let students present their finding
the petrol station the pump displays work in class. After that, you can
the volume of fuel sold (analog data) cover the content in this section.
using digital displays.
 Apart from areas discussed in the
Evaluate the learners understanding book, let each group identify other
of the concepts presented by using a computer application areas through
question and answer session. research and discussions.
 Before closing the topic, evaluate
Role of computers in the students understanding of the
society concepts presented by carrying
(3 periods) out activity 1.11 on page 11 of the
student's book.
By the end of this section, the learner
should be able to appreciate the role of
computers in the society. History of Computers
Information to teacher
This topic is intended to motivate the (5 periods)
students in appreciating importance of By the end of this section, the learner
computers and other ICT devices in all should be able to elucidate the historical
sectors of our society. It would be good to evolution of computers.
deliver this topic by organizing field visits
to the industry, business organizations,

52
Information to teacher 2. (a) Mainframe: smaller than
This topic discusses different computer supercomputer with slightly
generations, technology used in each less processing power. Used
generation. Given that the technologies as central computer or server
discussed are concepts from physics or on large networks that require
electronics, it would be good idea to centralised data processing.
organize for physics practical sessions Minicomputer smaller than
to demonstrate how vacuum tube, mainframe. Used by smaller
transistors and integrated circuits works. organisations as central server/
If possible, you can also organize for a also used for specialised
visit to computer garage or museum applications e.g. the autopilot on
where some of these computers are in aeroplanes.
display. (b) Analog computer processes
continuous data (analog data);
Materials a computer connected to the
Digital computer processes
internet, student text book, whiteboard,
discrete data.
projector, video.
(c) Server provides services to other
Teaching guidelines 1.6 computers on the network;
 To effectively deliver this topic, Workstation used by the user,
start by forming group discussion has limited processing power
with responsibility of researching on and requests services from the
evolution of electronic computers. server.
Let the students also perform
activities 1.12 - 1.16 from page 12 to Guideline to Activities
15 in the student book. Activity 1.1: Definition and parts
Evaluate the learners understanding of a computer (page 1)
of the concepts presented by using a
This activity requires the students to
question and answer session.
use a search engine to get appropriate
definitions. For using Google we got the
Answers for Unit 1 following definitions from online oxford
dictionary:
Assessment Test 1 (page 9)
1. It does not get tired - It can be Computer–An electronic device which
programmed to perform a task is capable of receiving information (data)
repetitively - It does not have the in a particular form and of performing
human body weaknesses - Once a sequence of operations in accordance
programmed it follows instructions with a predetermined but variable set
exactly without fail of procedural instructions (program)
to produce a result in the form of

53
information or signals. Activity 1.3: Characteristics of a
Computer (page 2)
Computer science-The study of the
principles and use of computers. This is an exploratory activity that
requires students to brainstorm some
This activity requires the student to
of the characteristics of a computer that
identify and define the parts labeled as
are later discussed on pages 2 and 3.
follows:
Activity 1.4: Classification of
a: System unit – houses the CPU, fixed
computer (page 3)
storage devices and other electronic
components This is an exploratory activity that
requires students to brainstorm some
b: Monitor or display unit used as visual
of the characteristics of a computer that
display of data or information from the
are later discussed on pages 2 and 3.
computer
Learners are expected to identify other
c: Mouse - pointing devices used for
factors that may be used to classify
controlling cursor on the screen
computers such as functions, shape,
d: keyboard – input device used for speed, cost, type of use.
entering data and instruction

Activity 1.5: Uses of


Activity 1.2: Computer Science supercomputers (page 4)
(page 2)
The learners are required to identify
Both questions in this activity requires application areas of supercomputer
the learners to explore the domains of such as Pleiades in high-fidelity physical
study offered in most Computer Science simulations, study of spacecraft and
and Information technology programs aerodynamic forces and the detonation
especially at the university level. This of nuclear weapons.
includes Information systems, Artificial
Intelligence, Distributed Systems, data
communication and networks, security, Activity 1.6: Mainframe computers
database systems, human computer (page 4)
interaction, vision and graphics, The learners are required to identify
numerical analysis, programming, application areas of mainframe computers
software engineering, health informatics, such as System Z. For example, ATM,
bioinformatics and computational airline ticketing, credit card verification
theories may be accessing mainframe computers
to provide efficient transactions.

54
Activity 1.7: Distinction between Activity 1.10: Classification of
mainframe and minicomputers Computers (page 9)
(page 5)
The two questions in this activity are
Learners are expected to draw exploratory because they requires the
comparisons between mainframe and learners to research on the internet the
mini computers in terms of physical size, three types of computers according to
speed, cost, and uses. the type of data they process. It is from
Activity 1.8: Types and uses of
the research outcome that they are able
Microcomputers (page 6)
to give advantages and disadvantages
of each type in terms of power
This activity requires the learners to walk consumption, size, cost, simplicity of
around the school or its environments design, and processing power.
to identify various PCs that are in use
such as desktop PCs, laptops, tablets
and even smart phones. Activity 1.11: Role of Computers in
Society (page 11)
Learners should be able to conceptualize
the development of computers in terms This activity requires the learners to
of microprocessors that came into being match the computer application areas
in the 4th generation. marked 1,2…8 with applications on
This activity requires the learners to the right marked A,B..H on the right
identify the two types of computers as follows: 1 => H; 2=>G; 3 none;
namely: laptop PC and tablet. 4=>D; 5=>B; 6=E; 7=F; 8=A. Note that
stock control may also be assigned to
supermarket but there is no match to
Activity 1.9: Classification of the Bank on the left.
Computers (page 8) This is an open activity that requires
This activity requires the learners to learners to brainstorm on impact use
walk around the school environment and of computers and other ICT devices
identify various types of computers. In in promoting peace and reconciliation,
most cases, they may come across the environmental protection and life skills
school servers, workstations in offices, in Rwanda.
tablets and possible embedded computers. This is a fieldwork activity that requires
This activity requires the learner to the teacher to organize for field
give advantages and disadvantage excursion for learners to appreciate
supercomputers and microcomputers use of computers various sectors. It
in terms of processing speed, multi- important to let the students visit
user access, cost, portability, scalability, institutions of higher learning, research
efficiency and reliability. centres, hospitals, police stations,

55
banks and government offices where from the student book more examples
computers are used to automate various of fifth generation computers.
tasks.
Activity 1.12: First Generation Activity 1.16: Computer
Computers (page 12) Generations (page 15)
This activity requires learners to research This activity requires the learners to
on the internet or explains from the match computer generations 1,2, 3 and
student book reasons the 1st generation 4 with technologies used on the right
computers were large, consumed a lot marked A,B, C and D on the right as
of power and emitted lots of heat. One follows: 1 => B; 2=>C; 3 =>D; 4=>A.
of the expected reactions is that vacuum
tubes mostly rely on thermionic emission This activity require the student to
of electrons from a hot filament or a explore beyond what is provided in the
cathode heated by the filament hence student book to trace the development
need for excess heat emission. of electronic computers starting with
the first generation to the present and
Activity 1.13: Second Generation future generation commonly regarded as
Computers (page 13) the fifth generation.
This activity requires the learners to 1. First generation computers were
research on the internet or explain large in size, consumed a lot of
from the student book more examples power, and produced a lot of heat.
of second generation computers apart 2. The diagram should depict first
from IBM’s 1401 and 7070, UNIVAC generation (vacuum tubes)-->
1107, ATLAS LEO Mark III and Honeywell second generation (transistor)-->
H200. third generation (ICs)--> Fourth
Activity 1.14: Third Generation generation(microprocessor) -->fifth
Computers (page 13) generation(Artificial intelligence)
3. Form of intelligence exhibited by
This activity requires learners to
machines or software to mimic
research on the internet or explains
human or animal behaviour.
from the student book more examples
of third generation computers apart 4. VLIC contributed to development
from IBM 360 and ICL 19000 series. of the microprocessor
5. Artificial intelligence - Graphical
Activity 1.15: Fifth Generation
User Interfaces -Small physical size
Computers (page 14)
but large processing power Easy
This activity requires learners to programming
research on the internet or explains

56
Computer System and Maintenance

Computer Maintenance

Computer Architecture and Assembly


Unit 2

Student's Book page 16 – 53. ( 18 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
1. Identify computer components and their functions(input, output, processing
and storage)
2. Assemble and disassemble a computer, do minor maintenance

Learning objectives 4. Identify elements inside computer


cases.
Knowledge and understanding
1. Identify computer system, components Attitudes and values
and function of each component. 1. the evolution and the importance of
a computer in:-
2. Identify computer peripherals ,
2. Appreciate the guideline of attaching
ports and connectors.
and disconnecting each component
3. Differentiate types and purpose of of a desktop computer properly.
computer case.
Generic competences
4. Identify different components inside addressed in this unit
computer case and their functions.
Problem solving: by doing the learning
Skills activities in this unit the student learns
1. Attach and de- attach computer how to apply technology to solve
peripherals. problems.
2. Clean internal and external computer Interpersonal management: working in
components and protect the groups helps nature this skill.
environment from contamination.
Working together also enhances a sense
3. Compare different computer case
of respect for each other regardless of
form factors.

57
socio-cultural differences hence supports Suggested teaching/
interpersonal respect and promotes learning activities
national unity. To effectively deliver this content in
Communication: presentations in class this unit, the teacher is expected to use
made after group work will develop this group discussions, research, practical
skill very well. demonstration and assessment
methods beyond those provided in the
Links to other subjects: Physics
student’s book.
(Electronics)
Cross cutting issues addressed in Computer system
this unit
• Inclusive Education: through group
(1 period)
work, the needs of challenged students
can be addressed more easily. By the end of this topic, the learner
should be able to identify and explain
• Peace, gender and values education
the four components of a computer
• Financial education
system. These are hardware, software,
Assessment criteria data and user.
Students can identify the internal
components of a computer and properly Information to the teacher
fix them on right place. They can diagnose Before, you introduce this topic, you
the cause of problem associated with each need to define the term system. Let
component. the students appreciate the important
of a system such as the human body,
Suggested teaching school and political systems. It is
methodology important to mention that, in some
• Guided discovery
references, a computer system is
• Research
considered as comprising of three
• Question and answer
• Discussion components: hardware, software
and liveware. Make sure you
Background information disambiguate differences that may be
Instead of using live computers to teach raised by the students out of research
this unit, consider getting scrap (computers from other references such as internet.
that are no longer in use) to allow students
In reference to Fig. 2.1 on page 17,
the freedom to freely disassemble and
divide the class into groups and guide
assemble without fear. After they have
each group through activity 2.1 on the
known how to do it, they can now work
same page 17 of the Student's book.
with one or two live specimen provided.

58
Materials: computer, whiteboard, projector, ware and user in data processing.
student book.
Materials: Whiteboard, student text-
Preparation
book, protractor, computer connected
Be ready to compare other systems found
to the internet.
in the world with the computer system.

Additional information teacher Teaching guidelines


• Guide the students to do learning
• To effectively deliver this topic, it
activity 2.1 on page 17.
is advisable to divide the class into
Teaching guidelines 2.1 groups. Let each group use Fig 2.2
• Ask the students to give some
on page 18 to identify the functional
characteristics of systems emphasizing
elements of a computer.
on how many parts work together to
achieve a whole. • The finding from each group should
• You may as well draw the student’s
be presented to class for clarifica-
attention to Fig. 2.1 on page 17 of the
tion on key concepts and configura-
student’s book and use it to justify why
a computer is regarded as a system tion of a typical microcomputer.
when in use.
• You can now cover the content in this
Computer Hardware:
section.
Peripheral devices

Computer functions
(1 period)
By the of this topic, the student should
(1Period) be able to identify computer peripherals
devices in the computer lab.
By the of this topic, the student should be able
to describe the four functions of a computer Information to teacher
system: input, process, output and storage. This topic requires practical approach
to introduce the students to various
devices connected to the computer's
Information to the teacher
system unit. Let the students attempt
This topic introduces the students to the to classify peripheral devices in the lab
four basic functions of a computer. These into input, output and storage devices.
are input, processing, output and storage. Materials: student text book, wall
When introducing this topic, you need to charts, whiteboard, projector, movie,
demonstrate how a computer processes computer connected to internet,
data to information. Let the students ap- sample peripheral devices.
preciate the important of hardware, soft-
59
Preparation Preparation
Download images or video clip showing This is best taught when students are
external hardware components of a in computer lab.
computer also referred to as peripheral
Teaching guidelines 2.3
devices. Let each student also identify the
 Demystify the system unit for the
components physically in the computer lab
learners. Let them know it as the
or around the school environment.
home of the motherboard and
Teaching guidelines 2.2 processor.
 Draw the attention of the learner to  Also, show the class the ports on
Figure 2.3 on page 19 in the student the motherboard.
book. Let them do activity 2.2 on
pages 18 and19 to demonstrate Ports and connectors
understanding of the concepts covered
in this section.
 It is advisable to cover the content in
(4 periods)
this section after this activity is done By the end of this section, the learner
satisfactorily by all the students. should be able to identify different
ports and connections on the system
unit.
Computer Hardware:
System unit Materials: a computer system unit,
various peripheral devices, connector
(1 period) cables.

By the end of this section, the learner Teaching guidelines 2.4


should be able to describe the system unit  For all this section (it may take
and its importance. more than one periods) start by
asking the students to do activities
Information to teacher
2.4 on page 20 before covering the
This topic requires practical approach content and activities from pages
to introduce the students to explain the 21 to 26.
importance of the system unit found
 Evaluate the learners understanding
in most desktop computers. Let the
of the concepts presented by using
students identify the two form factors
group discussions, activities and
(types) of system unit that comes with
question and answer methods.
desktop computers namely tower type
Let each student demonstrate
and desktop system unit.
understanding of ports and
Materials: A computer connected to the connectors required to connect
internet, projector, video clip. peripheral devices to a computer.

60
Internal computer  Open the system unit case and let the
Components learners observe the motherboard
and identify various components
attached on it.
(2 periods)
 Help the learners identify the CPU
By the end of this section, the learner on the motherboard. Through a
should be able to identify internal class discussion and with the help of
computer components. a diagram of the functional elements
Information to teacher of the CPU (page 30) and activity
This topic introduces the students to 2.15 (page 31), help the learners to
the various components housed inside understand the role of the Control
the system unit of a typical desktop Unit and ALU.
computer. Due to the sensitivity of most  Ask the learners to do Activity
of these components, it is advisable to 2.16 (page 32) and guide them to
sensitize the students on the effect differentiate between permanent
of electrostatic discharge. During (long-term) memory and short term
demonstration intended to practically memory concepts as in relation to
identify the, let the students observe computer memory. Guide them
caution when handling the components. through activity 2.17 on page 32 and
Let the students appreciate the help them to understand the role
important of UPS in protecting these of primary memories (i.e. ROM and
delicate components. RAM) in a computer.
 By guiding learners through activities
Materials: a computer connected to the 2.18, 2.19, and 2.21 on pages 34-37,
internet, student text book, whiteboard, help the learners understand the
projector, video, manufacturers manual. roles of special memories i.e. cache,
buffers and registers.
Teaching guidelines 2.4
 Guide the student through activity  By guiding learners through
2.13 on page 27 before covering the activities 2.21, 2.22 and 2.23 on
content in this section. pages 36-38 help the learners
identify and appreciate the features,
 Open the system unit for the
working and look for various
student to be able to see the internal
secondary memory devices including
components.
optical storage media and solid state
 Through a class discussion and
storage media.
practical demonstrations, guide the
 Carefully open a hard disk drive
learners to understand the role of
and guide the learners observe and
the power supply unit and how it is
understand its features and their
connected to the system unit.
functioning including disk plates,
61
spindle and read/write head. Guide practically mount internal components
them to understand the role of like processor, memory or adapter
HDD in a computer. card, students should observe care in
 Guide the learners to identify and order to avoid damaging the socket or
understand the role of various disk connectors.
drives in a computer and laptop. Materials: components of a
These drives include hard disk drive, disassembled computer, manufacturers
DVD/CD drive and USB drive. manual.
 Demonstrate to the students how
they can use the manufacturer's Teaching guidelines 2.5
manual to identify components and  Guide the student through activities
configure them. 2.25 to 2.35 from page 42 - 48.
 At each stage make sure that the
Evaluate the learners understanding
correct safety precautions are taken
of the concepts presented by asking
by the student to protect themselves
relevant questions.
and the computer components.
There is need to evaluate the
Assembling computers
learners understanding and skills by
giving each student an opportunity
(3 periods) to demonstrate how to fix a device
By the end of this section, the learner inside the system unit.
should be able to assemble computers
when provided with various components. Disassembling Desktop
computers
Information to teacher
This topic requires practical approach (3 periods)
to take the students through step-by- By the end of this section, the learner
step process of assembling a desktop should be able to disassemble a desktop
computer. Due to the sensitivity of most computer into separate internal and
of internal components, it is advisable to external components.
sensitize the students to observe safety
precautions to protect themselves and Information to teacher
computer components from possible This topic requires practical approach
risks. remind them to always discharge to take the students through the
static electricity that may have build reverse process of dissembling a desktop
on their body before carrying out the computer. Due to the sensitivity of most
task of assembling a computer. During of internal components, it is advisable to
practical demonstration intended to sensitize the students to observe safety
precautions to protect themselves and

62
computer components from possible from handling chemicals and electrical
risks. Remind them to always discharge devices, sensitize the students to observe
static electricity that may have build on safety precautions to protect themselves
their body before dismantling a computer. from health risk or damage to hardware
During practical demonstration intended components.
to practically detach internal components Materials: brushes, blower, vacuum
like processor, memory or adapter card, cleaner, soft towel, non-water based
students should observe care in order to detergent
avoid short circuit that may harm them
or damage the components. Teaching guidelines 6.4
 To test the student's understanding
Materials: desktop computer repair
of the concepts and skills gained,
toolkit, manufacturer's manual.
guide them through activity 2.37 on
Teaching guidelines 2.5 page 51 to activity 2.39 on page 52.
 Guide the student through the  At each stage make sure the
process of dismantling a desktop students follow safety guidelines to
computer as demonstrated on pages protect themselves and computer
48 and 49 of the student's book. components.
 At each stage make sure that the  Evaluate each student's
correct safety precautions are taken understanding of key concepts
by the student to protect themselves and competence in performing
and the computer components. preventive skills on computers and
peripheral devices.
Cleaning and disposal of
computer components Answers for Unit 2
Assessment exercise 2.1 (page 41)
(2 periods) 1. (a) AC- stands for alternating
By the end of this section, the learner current. This power keeps on
should be able to clean computer changing direction. DC:- stands
components. for direct current. It moves in
one direction only.
Information to teacher (b) Bluetooth:- a radio frequency
This topic requires practical approach signal used to set up hotspots
to take the students through preventive within a radius of 300 m. It can
maintenance of computer components. penetrate walls. Infrared: sets
You may be required to demonstrate to up connectivity over a short
the learners how to use tools such as distance. Bounces of surfaces
vacuum blower, solvents and computer and requires line of sight to
repair tools. Due to risks that may arise function.

63
(c) Firewire is a faster more (b) AT is a very old standard that
superior USB technology was created by IBM for their own
(d) Five pin DIN: udes D-shaped computers. ATX was developed
ports with five pins to send by Intel to address some of the
receive data; P/S2 for mouse and shortcoming of the AT standard
keyboard connections uses six that makes it unsuitable for the
pin circular port and connector. varied demands of personal
2. (i) USB (ii) Firewire (iii) COM port computing.
3. Smaller size, longer distance AT boards were much bigger
connectivity; less cumbersome; compared to ATX boards.
cheaper. This results in some drives
4. You should have a computer with overlapping the boards inside
two VGA ports; Or one VGA port the case which meant that in
and a HDMI port so that you can order to replace the board, you
connect one device to the VGA and would need to take everything
the other to the HDMI. Alternatively out. This is very inconvenient
if the computer does not have two for personal computers, thus
ports, you need to buy a VGA the ATX boards were made
adapter that matches the ports on narrower by almost 4 inches to
your devices. After you connect the ensure that there is no overlap.
devices: (c) PGA - Pin Grid Array is used in
(i) Click the Start button, choose Pentium 3 computers; SECC -
Settings, and click the System Single Edge Contact Cartridge
icon. used in Pentium 2 computers.
(ii) When the System page appears, (d) AMR (Audio Modem Riser),
click the words Advanced CNR (Communications and
Display Settings in the screen's Network Riser) and ACR
bottom-right corner. (Advanced Communications
Riser) are slots that you can find
Assessment exercise 2.2 (page 50) on your motherboard that have
1. (a) Integrated Drive Electronics the same goal: to install HSP
(EIDE) and Serial Advanced (Host Signal Processing) devices
Technology Attachment to your PC. These devices can
(SATA) are both interfaces for be modems, sound cards and
connecting the hard disk to network cards.
the motherboard but SATA is
2. For quick working with minimum
more recent and it supports hot
effort; To avoid spoiling the place or
swapping technology.
component you are trying to repair.

64
3. - extended extractor; - antistatic Assessment exercise 2.3(page 53)
wrist member; - Torx screw; driver 1. A UPS to protect his/ her electronics.
- multimeter 2. - worn out feeder wheels; - low
4. -Industry Standard Architecture quality paper or paper; - Creased
(ISA), Extended ISA (EISA), paper
Peripheral; Component Interconnect 3. - Misaligned / dirty print heads; - Lack
(PCI); Accelerated Graphics Ports of appropriate print driver; - lack of
(AGP); Video Electronics Standards print toner / low quality cartridge or
Association (VESA); Audio Modem toner.
Riser (AMR); and Communication 4. Toner drum; or cartridges paper
Network Riser (CNR). tray; feeder rollers.
6. Check the fuse. Also check whether 5. To reduce wear an tare due to
the power cable running from the friction; to reduce crashing of
power supply is plugged onto the sensitive devices like the hard disk.
motherboard port or slot. 6. CD/DVD: use the cleaner CD and
7. (i) Identify the manufacturer of the solvent; Keyboard: use blower,
BIOS chip. special brushes and vacuum cleaner;
(ii) Back up the CMOS Settings and Monitor: use blower, smooth
restart the computer using a absorbent cloth.
combination of CTRL + ALT +
Guideline to Activities
DELETE keys.
(iii) Enter the CMOS settings Activity 2.1: Computer
program using the specified key Components (page 17)
or combination of keys, and then This activity requires learners to
write down the settings. identify and explain function of the
(iv) Backup the old BIOS in case four components of a computer system
the upgrade results to system namely: hardware, software (programs),
failure. user and data.
(v) Insert the manufacturer’s BIOS Activity 2.2: Peripheral Devices
utility disk. The disk contains (page 18)
a program that automatically
This activity requires learners to
flashes the BIOS.
physically identify various input, output
(vi) Restart the computer. If
and storage devices attached to a
successfully done, the BIOS
computer. This may include keyboard,
retains the new firmware.
mouse, joystick, speakers, microphones,
printer, scanner, external storage media
and webcam discussed later in the
section.

65
Activity 2.3: System Unit the de facto port that has replaces all
(page 20) the other serial and parallel ports. The
The three question of this activity activity also requires the teacher to
requires learners to identify and gain assist the learners to physically identify
understanding on systems unit, form and practically connect devices to USB
factor (tower and desktop) and design ports.
issues (office space vs. elegance) of the Activity 2.7: PS/2 Port and
system units that are typical to desktop Connector (page 23)
computers. This activity requires the learners to
Activity 2.4: Ports and Connector identify PS/2 port using colour code
(page 20) or symbols on older types of desktop
This activity requires the teacher to assist computers. Given that the ports
the learners physically identify various have been replaced by USB ports on
ports at the back of the systems unit. modern PCs, the teacher may use other
This is intended to assist the students fill alternatives such as YouTube because it
the port labeled A to E as follows: A=> may not be practically possible to identify
PS/2 ports; B=>serial port; C =>Firewire and connect devices to PS/2 ports.
port; D=>USB ports; E=>parallel port; Activity 2.8: VGA Port and
F=>audio jacks/port. Connector (page 23)
Activity 2.5: Serial Connector This activity requires the learners to
(page 21) identify a VGA port at the back of the PC
The three question of this activity and give the count of pins as 15. Given
requires learners to identify whether the that the VGA has been replaced by HDMI
computers in the school environment in some devices especially on laptops, the
have serial port. Most of the modern teacher may physically demonstrate how
PCs have phased out the port in favour to connect a projector or monitor to the
of USB, HDMI and Firewire port hence port or use alternatives such as YouTube
the student may not physical find it
Activity 2.9: Audio Port and
on laptops and most desktop PCs.
Connector (page 24)
The teacher should assist the student
appreciate reasons the port has been This activity requires the learners to
phased out. sound (out) and microphone port using
Activity 2.6: USB Port and colour codes or symbols on system
Connector (page 22) unit or laptop. The teacher should also
assist the learners on how to connect
This activity requires the learners to
headphones, microphone or external
appreciate the popularity of USB as
speakers to the appropriate sound ports.

66
Activity 2.10: Network Interface system unit casing. This procedure
(page 24) should be handled with care to avoid
To draw a clear distinction between a electric shock or damage to internal
network adapter and onboard modem, components.
the teacher should assist the student Activities 2.14 to 2.24 power
to distinguish between the RJ45 and supply unit, CPU and computer
RJ11 ports. You may also demonstrate memory. (pages 30-39)
practically how they differ in terms of • These are largely general knowledge
data transmission and placement on the activities that are meant to help the
motherboard. learners understand the functions
Activity 2.11: HDMI Port and of various internal computer
Connector (page 25) components with the help of their
real life knowledge.
This activity requires the learners to
• For such activities, give the learner
physically identify HDMI port on devices
very clear instructions so that they
such as laptops, desktop computers and
acquire the intended knowledge.
other multimedia devices such as TVs and
Ensure you relate the results of
projector. Because HMDI and USB port
activities with the functions of the
almost resembles each other, it would be
respective part of computer under
good to demonstrate the difference in terms
discussion.
of connector and number of pins on the
port. Let the students practically connect • For the activities that require
HDMI-enabled devices to a computer. observation, avail the components
and guide the learners to clearly
Activity 2.12: Connecting identify the features.
Peripheral Devices (page 26)
Activity 2.25: Assembling a
This is a practical activity that requires Computer (page 42)
the learners to identify SCSI port on
This is a practical activity that requires
devices such old models of desktop
computers or from alternative sources. the learners to identify various tools
The learners are also expected to such as extended extractor, antistatic
demonstrate how to connect peripheral wrist member, screw drivers and
devices to appropriate ports. Ethernet crimping tools in a computer
repair toolbox.
Activity 2.13: Internal Computer
Components (page 27) Activity 2.26: Mounting a Hard
Disk (page 43)
This is a practical activity that requires
the guidance of the teacher or qualified This is a practical activity that requires
lab technician to assist the learners the guidance of the teacher or qualified
disassemble a computer and open the lab technician to assist the learners
67
mount SATA or IDE hard disk drive in technician to assist the learners identify
the system unit. This procedure should and replace CMOS battery mounted on
be handled with care to avoid electric a motherboard. This procedure should
shock or damaging the hard disk drive. be handled with care to avoid electric
shock or damaging the motherboard.
Activity 2.27: Installing Optical
Drives (page 43) Activity 2.31: BIOS Upgrade
(page 46)
This is a practical activity that requires the
guidance of the teacher or qualified lab This is a practical activity that requires
the guidance of the teacher or qualified
technician to assist the learners mount
lab technician to assist the learners to
SATA or IDE optical drive (CD/DVD) in
backup and upgrade BIOS firmware.
the system unit. This procedure should
Because BIOS comes with manufacturer’s
be handled with care to avoid electric
instructions, BIOS software-based
shock or damaging the optical drive. upgrade is a delicate procedure that
Activity 2.28: Mounting a should be handled with care to avoid
motherboard (page 44) crashing the firmware.
This is a practical activity that requires Activity 2.32: Adapter Card
the guidance of the teacher or qualified (page 46)
lab technician to assist the learners This is a practical activity that requires
mount a motherboard in the system unit. the guidance of the teacher or qualified
This procedure should be handled with lab technician to assist the learners
care to avoid electric shock or damaging identify functions of network interface
the motherboard. card shown in Fig. 2.34 demonstrate
Activity 2.29: Installing a how to mount it on the motherboard.
Computer Memory (page 45) This procedure should be handled with
This is a practical activity that requires care to avoid electric shock or damaging
the guidance of the teacher or qualified the adapter card.
lab technician to assist the learners Activity 2.33: Installing a
mount a motherboard in the system Microprocessor (page 47)
unit. This procedure should be handled This is a practical activity that requires
with care to avoid damaging the RAM the guidance of the teacher or qualified
modules or the motherboard. lab technician to assist the learners
Activity 2.30: CMOS Battery mount an Intel or AMD processor on the
Replacement (page 45) motherboard. This procedure should be
This is a practical activity that requires the handled with care to avoid electric shock
guidance of the teacher or qualified lab or damaging the microprocessor contact
or the socket on the motherboard.

68
Activity 2.34: Laptop Battery Activity 2.37: Cleaning Computer
Replacement (page 48) Devices (page 51)
Unlike desktop computers that receive This is a practical activity that requires
direct power from mains outlet, laptops the guidance of the teacher or qualified
have a rechargeable battery that makes lab technician to assist the learners
them. It is important to give students a perform basic maintenance services
practical demo on how to replace laptop using solvents to clean computer
battery. In case there is no laptops that accessories. Students should be
can be used to accomplish this activity, introduced to various cleaning solvents
the teacher may use alternative sources and their effect to their health and
such as YouTube or multimedia content environment.
to simulate the activity. Activity 2.38: Blowing Dust and
Activity 2.35: Laptop Memory Debris (page 51)
Upgrade (page 48) This is a practical activity that requires the
Like desktop computers, you can replace guidance of the teacher or qualified lab
or upgrade RAM of a notebook PC. It technician to assist the learners perform
is important to give students a practical basic maintenance services using hand-
demo on how to replace laptop battery. held vacuum cleaners and dust blowers.
In case there is no laptops that can be Students should be advised on how to
used to accomplish this activity, the protect themselves from effect of dust
teacher may use alternative sources such and debris from the computer.
as YouTube or multimedia content to Activity 2.39: Safety Precautions
simulate the activity. (page 52)
Activity 2.36: Assembling a This is activity is intended to nurture
Desktop Computer (page 50) patriotism in the process of how the
This is a practical activity that tests ability government programme of cleaning and
of the learners in assembling desktop beautification of the country relate to
computers. In a guided practical session, e-waste. Let the students participate in
let each student demonstrate how to cleaning exercise especially in disposal of
assemble a computer from scratch. electronic wastes in the school and the
This includes mounting motherboard, surrounding environment.
processor, memory modules and storage
drives.

69
Unit Test 2 (page 53) 9. Check the analog cable/ digital cable
1. USB: Universal Serial Bus; SCSI: that connects the CDROM player
Small Computer System Interface to the motherboard whether it is
3. USB; GGA; HDMI properly plugged in; Check whether
4. CRT: uses electron gun technology. the speakers are connected
Advantage: 1. Cheaper to produce; correctly to the jack ports; Check
LCD: uses liquid crystal display whether the speakers are powered
technology; Advantages: 1. does not on.
flicker; 2. angular view remains the 10. It keeps the computer working
same; 3. High resolution pictures at optimum level and prevents
and text; 4. Consumes less power. unnecessary breakdowns caused
5. Powerful processor - duo core by dirt and water. You can do the
2Ghz and above; Large RAM 1 GB following preventive maintenance:
and above; Large hard drive 100GB (i) Use blower to blow out dust
and above;; Multimedia speakers. (ii) Wipe the computer clean with
a soft absorbent piece of cloth
and non-water based cleaner
liquid.

70
Computer System and Maintenance

Computer Maintenance

Unit 3 Safe and Ethical Use of Computers

Student's Book page 54 – 61. (12 Periods)

Key unit competence


By the end of this unit, the learner should be able to integrate safety guidelines,
ergonomics and ethical issues to have a good working environment.

Learning objectives Attitudes and values


Knowledge and understanding 1. Show the concern about to work
1. Identify safety procedures at working in safe environment to protect
place environment and procedures computer against physical damage.
to protect the environment from 2. Identify ergonomic issues and
contamination. health related risk due to improper
2. Identify procedure to protect use of computer.
equipment from physical damage Generic competences
3. Identify Ergonomic Concept and addressed in this unit
associated Health Problem.
Problem solving: by doing the learning
4. Identify Ethical Issues, Software activities in this unit the student learns
Licensing, Anti-piracy, Forms of how to apply technology to solve
software license agreement (open problems.
source, proprietary, freeware and
shareware) Interpersonal management: working in
groups helps nature this skill.
Skills
Working together also enhances
1. Integrate general computer use
a sense of respect for each other
safety procedures.
regardless of socio-cultural differences
2. Able to protect equipment from
hence supports interpersonal respect
physical damage.
and promotes national unity.

71
Communication: presentations in class Suggested teaching/
made after group work will develop this learning activities
skill very well. To nurture safe and ethical use of
Links to other subjects computers, the teacher is expected
to use group discussions, illustrations,
Physics (Electronics)
question and answer method,
Cross cutting issues addressed in assessment questions beyond those
this unit provided in the student’s book.
• Inclusive Education: through group work,
the needs of challenged students can be General Safety Guidelines
addressed more easily.
(2 periods)
• Peace, gender and values education
• Financial education. By the end of this topic, the learner
should be able to identify and follow laid
Assessment criteria down rules that govern use of computers
Can apply safety guidelines during computer in the workplace and show concern to
use and repair, keeping health precautions, protection of the environment.
respecting legal and ethical issues.
Information to the teacher
Suggested teaching This topic is aimed at sensitizing the
methodology students on risks associated with use
• Guided discovery of computers and other ICT devices.
• Research Though the student's book outlines
• Question and answer general guidelines that need to put
• Discussion in place, it is the responsibility of the
Background information school or the computer teacher to
formulate specific procedures that
This unit prepares the learner to acquire
must be followed when handling
basic computer safety and safe e-Waste
computers and computer accessories.
disposal skills and knowledge.
These include safety procedures in
Materials needed the computer labs, workplace, as
Computers, Projector, UPS, Repair tool well as procedures to protect the
kit, Example of Some Commercial and environment from e-waste
Open-Source Software, Some samples You may also guide the students in
of Ergonomics equipment like mouse, exploring other safety guidelines from
keyboard, screen, chair. the Internet to add on those provided
in the student's book.

72
Materials: Computers, Projector, Information to teacher
UPS, Repair tool kit, Example of Some This topic is aimed at sensitizing the
Commercial and Open-Source Software, students on risks associated with
Some samples of ergonomics equipment like poor use of computers and other
mouse, keyboard, screen and chair. ICT equipment. It is important to
demonstrate to the students good
Preparation sitting posture and guide ergonomic
The activities in this section are open considerations when acquiring
discussion that requires discussion and accessories such as keyboard,
brainstorming. Encourage the students to mouse, computer monitor and other
form discussion groups to to perform each equipment.
of the task in the activities. Apart from the content provided in
Teaching guidelines 3.1 the student's book, you may for group
• This topic requires exposure to discussions to research on principles
good ergonomics design, standard
factors guidelines and procedure to be
furniture and sitting posture.
followed by students in the computer
lab. Therefore, the teacher is required Do not forget the need to consider
to use real life examples when give users with physical challenges and or
discussing health related problems any other challenges and the need to
take care of them.
while the learners find cause and
solutions.
• It is advisable to refer the documents Materials: student text book, wall
such those provided by REMA and charts, whiteboard, projector, movie,
WHO when formulating safety computer connected to internet.
guidelines and procedures. Let the
Preparation
students appreciate each of the
Download images or videos showing
guidelines and procedures before
various ergonomic features of a good
undertaking activity 3.1 on page 55 of
computer room.
the student's book.
Teaching guidelines 3.2
 Let the learner study the picture
Ergonomic Furniture and
showing a smoke detector. Do
Equipment
you have such in your computer
(2 periods) room?
 Cover the content in this section
By the end of this topic, the learner should be
able to define ergonomic concept and identify specifically mentioning what the
health problems that are caused by poorly first reaction of a person should
designed equipment. be in case the smoke detector
gives a warning of a fire breaks out
73
in the computer room. Teaching guidelines 3.3
 Finally, emphasise the need for a fire  Guide the student in carrying out
assembly point. Visit the fire assembly learning activity 3.3 on page 58 in
point. In case such a point does not the student's book.
exist in the school, the teacher to  Let the learner study the picture
work hand in hand with the school showing a smoke detector. Do
administration for the class to have an you have such in your computer
outdoor activity one of the days to go room?
and map out a location in the school  Cover the content in this section
that can be used as a fire assembly specifically mentioning what the
point. first reaction of a person should
 be in case the smoke detector
Fire safety guidelines gives a warning of a fire breaks out
in the computer room.
(2 periods)  Finally, emphasise the need for a
By the end of this section, the learner should fire assembly point. Visit the fire
be able to demonstrate understanding in assembly point. In case such a
fire safety guidelines. point does not exist in the school,
the teacher to work hand in hand
Information to teacher with the school administration
This topic is aimed at sensitizing the students for the class to have an outdoor
on risks associated with fire outbreak in activity one of the days to go and
the school or computer lab. It is important map out a location in the school
to demonstrate to the students how to that can be used as fire assembly
use a various types of fire extinguishers. point.
The computer teacher may also organize
for the fire response and assembly drills to
Climatic and Weather
let the students appreciate importance of Change
fire extinguishers and smoke detectors.
Materials: A computer connected to (2 periods)
the internet, projector, video clip, fire
By the end of this section, the student
extinguisher.
should be able to identify procedure
Preparation to protect equipment from climatic
This is best taught when students are in the conditions.
lab, and later in the field to demonstrate Information to teacher
use of the fire extinguisher to out a small
In this topic, you are required to
teacher controlled flame.

74
sensitize the students on climatic and Information to teacher
weather changes that affect computers In this topic, the teacher should use
and computer accessories. Let the practical examples to guide the students
students form research group to in identifying problems arise in their
discusses some of the possible causes school computer lab which can cause
of overheating, high humidity and low physical damage. In each case, assist the
humidity on devices. This will help them individual students or groups to provide
appreciate need to use dehumidifiers solutions to identified problems.
and thermoregulators in some seasons
Materials: triboelectric objects,
or parts of the country.
website with content on electrostatic
Materials: website with content on discharge, projector, student book.
climate and weather patterns in Rwanda,
maps, projector, student book. Teaching guidelines 3.5
 Let the learner practice on
Teaching guidelines 3.4 electrostatic discharge by
 Let the learner study maps and performing an experiment in class
pictures showing climatic conditions or physics lab. This will help them
such as humidity and temperatures answer questions in activity 3.4 on
in various parts of Rwanda. page 59 of the student's book.
 Cover the content in this subsection  Let the student Students identify
by relating demonstrating effect problems that may arise from
of weather changes on computer physical damage in the computer
components. For example, it is lab. It is from their feedback that
advisable to demonstrate how the you can suggest solutions to the
high humidity causes corrosion of problems
metallic parts of hardware devices.  At the end of the period, evaluate
 At the end of the period, evaluate the learners understanding and
the learners understanding and skills by asking relevant formative
skills by asking relevant formative questions.
questions.
Ethical Issues
Physical Damage
(2 periods)
(2 period)
By the end of this section, the learner
Before the end of this section, the learner should be able to adhere to identify
should be able to identify procedure to ethical Issues, software licensing, anti-
protect equipment from physical damage. piracy, and forms of software license
agreement.

75
Information to teacher to identify factors such as poor
In this topic, the teacher should use sitting posture, prolonged use of
guide the students in a brainstorming computers, ventilation, poor display
session to identify ethical challenges that unit and electric shock.
result from use of computers. In groups, 2. Learners are expected to identify
let the students discuss on types of possible health risks such as
software license agreement (proprietary, electrocution or electric shock.
freeware, shareware, and open source). 3. Drinks by drop on computer
It is from such discussions that the accessories causing short circuit
learner can identify ethical issues relating or damage to electrical parts while
to software such as piracy. solid food substances may cause
clog moving parts or keys on the
Materials: policy documents on
keyboard
computer ethics, projector, student
book and internet. 4. This activity requires the learner
to identify health risks caused by
Teaching guidelines 3.6 electromagnetic and radio waves
 Let the learner identify ethical relating to vision and hearing.
challenges arising from use of
computers and mobile devices. This
Activity 3.2: Computers and
will help them answer questions
Environmental Protection
in activity 3.6 on page 61 in the
(page 57)
student's book.
 Let the students list some software 1. This activity requires the learner to
and classify them under open define the term e-waste (electronic
waster) and how identify whether
source, commercial (proprietary),
the government has laws or policy
freeware and shareware. Note that
that govern disposal of such e-waste.
more on forms of software licenses
is covered in the next unit. 2. This activity requires the learner
to use Internet to download the
 At the end of the period, evaluate
e-waste policy guideline from REMA
the learners understanding and skills
website.
by asking relevant questions.
3. This activity requires the learner
appreciate the role of REMA in
Answers for Unit 3 environmental protection, especially
implementation of laws and policies
Guideline to Activities
that govern waste disposal.
Activity 3.1: Safe Use of Computers
4. This activity requires the learner
(page 55)
to use their creativity, problem
1. This activity requires the learner solving and innovative approaches

76
to demonstrate how e-waste can be that may or damage to computers
converted to commercial products. that result from poor power
Activity 3.3: Fire Safety Guidelines
connection.
(page 58) 2. This activity requires learner to
This is activity is intended to help the appreciate the importance of UPS in
students understand and appreciate the regulating power from mains supply.
The UPS also serves as a backup in
importance of installing fire water-based
case of power outage hence allowing
and non-water based fire extinguishers.
the user to shut down the computer
Let the students participate in sample
using normal procedure.
fire-fighting drills in that may be organized
by the school from time to time. 3. This activity requires the learner
to identify factors to be considered
when acquiring UPS such as discharge
Activity 3.4: Electrostatic Discharge rate, power rating, cost and size.
(page 59)
1. This activity requires the teacher Activity 3.6: Ethical Issues
to demonstrate how electrostatic (page 61)
charges build up by conducting basic This activity requires the learner to
experiments using triboelectric objects.
appreciate the impact of ICT on ethics,
2. This activity requires the learners to privacy and intellectual property. Let the
repeat the experiment of charging student explore of various on various
and discharging triboelectric objects policy that safeguard or regulate effects
to experience the effect of static of ICT on the three issues.
electricity.
3. This is activity is intended to help the
students appreciate the importance Unit Test 3 (page 61)
of discharging static electricity that 1. UPS, Backup generator
may have unknowingly that may 2. To avoid accidents like too much
damage electronic components stumbling on each other or
such as silicon chips. suffocation;
3. Switch off power from main switch
Activity 3.5: Power Protection or circuit breaker; Use non-water
Devices (page 60) non-powder based extinguisher to
put out the fire.
1. This activity requires the learner
to practically connect a UPS to the 4. The food / drink may pour into
mains outlet and the computer. sensitive computer parts causing
This procedure should be handled clogging or rusting.
with care to avoid electric shock

77
5. The fine powder may go into moving 8. Keyboard: a good layout to ensure
parts to cause friction hence wear easy finger reach from home keys
and tear; may cause crashing of to others; Furniture: good standard
HDD furniture that is comfortable and
6. UPS smoothens the spikes, provide helps the user to maintain a straight
power during brownout or blackout; back; Adjustable displays: to help
Surge protectors only sieve out the user adjust for best posture and eye
spikes and has no backup power level.
when there is a brownout or 11. Open source, proprietary
blackout. (commercial), freeware and
7. CVS: flickering monitor; Monitor shareware.
too bright or shinny reflections on
the screen.

78
Computer Maintenance

Unit 4 Computer Software Installation

Student's Book page 62 – 84. (16 Periods)

Key unit competence


By the end of this unit, the learner should be able to:-
• Install Operating System and other Application software
• Use disk management tools.

Learning objectives Generic competences


Knowledge and understanding addressed in this unit
1. Explain and differentiate types of Problem solving: by doing the learning
computer software. activities in this unit the student learns
2. Identify form of software license how to apply technology to solve
agreement. problems.
3. Identify system required to install Interpersonal management: working in
any software. groups helps nature this skill.
Skills Working together also enhances a sense
1. Able to create partitions on hard of respect for each other regardless
disk and formatting a disk. of socio-cultural differences hence
2. Use disk management tools to supports interpersonal respect and
manage a disk. promotes national unity.
3. Install some of system and application Communication: presentations in class
software. made after group work will develop this
Attitudes and values skill very well.

Be aware of how to install a software Links to other subjects: The syllabus


and how to manage a disk. does not explicitly document
subject related to this unit.

79
However, the content of this unit
indirectly links to Mathematics, Classification of Computer
Economics and Legal studies. Software
Cross cutting issues addressed in
this unit (1 period)
• Inclusive Education: through group By the end of this topic, the learner
work, the needs of challenged should be able to explain and differentiate
students can be addressed easily. types of computer software.
• Peace, gender and values education
Information to teacher
• Financial education
Before you introduce this topic, it is
Assessment criteria important that you research on different
Students can install and troubleshoot a ways of classifying software. This because,
software. the of method used to classify types of
computer software may differ depending
Suggested teaching on context and the reference used. For
methodology this reason, we have discussed types of
• Guided discovery
software by generally classifying them
• Research
according to purpose and acquisition.
• Question and answer
• Discussion : Computer, Internet connectivity,
software installation media.
Background information
This unit prepares the learner to acquire
Preparation
basic computer safety and safe e-Waste Make sure you have required hardware
disposal skills and knowledge. and resources. In case you don’t have
licensed copies of proprietary software
Materials needed
you may demonstrate practical skills
Computers, Projector, repair tool using Open-Source software. You
kit, Software, External Hard Disk, can also request the school to pay for
Network connection, Flash Disk, subsidized licensed software for students
Windows Genuine installation DVD,
Any Application software for installation
Teaching guidelines 4.1
• To effectively nurture knowledge,
Suggested teaching/ learning skills and attitude required in this
activities topic,you may also introduce the
To effectively deliver this topic, the students to basic skills in using system
teacher is expected to use demonstration, and application software.
research, group discussions and other • Take the students through a group
assessment methods. session to distinguish between

80
system software and application discussions to confirm students
software. This will help them in mastery of concepts taught during
carrying out activity 4.2 on page 65 the period.
of the student's book.

Software License Disk preparation

(1 period)
(2 periods)
Information to teacher By the end of this section, the learner
The content of this topic is similar to the should be able to prepare a disk for
one covered in the previous unit on forms software installation.
of software license agreement. Through
group discussions, let the students review Information to teacher
on forms of software license (proprietary, This topic is aimed at introducing the
freeware, shareware, and open source). students to two important but sensitive
It is from such discussions that they can disk preparation procedures. These are
appreciate ethical considerations before disk partitioning and formatting. Due
proceeding to the section on software to sensitivity of the two processes, we
installations. recommend that the teacher carefully
monitors the students as they carry out
Materials: computer, Internet connectivity,
the task to avoid loss of data or programs.
software installation media and user guides.
It is advisable to use external storage
Preparation media or computers which do not hold
This topic can be confusing to the learner. sensitive information.
make sure the learners distinguished In regard to file systems, it is important to
the four types of software licences base divide the class into groups to research
on EULA. For example open-source on different file systems supported by
license may not be freeware but may be Windows, Linux and MacOS operating
shareware. systems.
Teaching guidelines 4.2 : A working computer which has no
 Using examples, let the students operating system.
identify the four types (forms)
of software licensing using. It is Preparation
important to emphasize on the ethical This period should be very interesting to
use of each of the four categories in the learners and should be covered in a
line with EULA. practical environment e.g. computer lab.
Take the student through Activity
Teaching guidelines 4.3
4.3 on page 66. Also use group
• To effectively deliver skills in disk

81
management demonstrate how to to carry out activities 4.6 on page
partition and format. 69.
• Measure the students competence by  Use question and answer method
assessing their response to exercises to confirm whether the student
activities 4.5 on page 68. has mastered the objective of this
topic.
Disk Management
Installing Operating System
(1 period)
By the end of this section, the learner should (4 periods)
be able to carry out disk management By the end of this section, the learner
routine in Microsoft Windows or any should be able to install the operating
other operating system. system.
Information to teacher Information to teacher
This topic is aimed at building on disk Before you demonstrate how to install
preparation covered earlier. Therefore, the operating systems, its is important
this topic requires practical approach to divide students into groups with each
to demonstrate how to carry out disk group having a computer and copy of the
management procedures such as cleanup, operating system to be installed. Ensure
scanning, running system file checker that each group has gone through the
(sfc), disk defragmentation, disk documentation that comes with the OS
compression, backup, and changing to identify minimum or recommended
the boot sequence. system requirements. Let the students
To avoid loss of data or programs, sensitize practice how to change boot sequence
the students on safe disk management settings before installing an operating
procedures and closely monitor practical system.
sessions.
Teaching guidelines 4.5
: student text book, data projector, video  Guide the learner to follow the
clip or pictures showing disk management steps as detailed in the students
progress. text book in order to successfully
Teaching guidelines 4.4 install an operating system.
 Guide the student to go through the  Although the student book
instructions in the student book to specifically refers to installation
demonstrate each disk management of Windows 10, this is only for
routines. demonstration purpose. You are
 The students should also form groups required to demonstrate how to

82
install any other type of operating
Installing Application Software
system including latest versions of
Windows, Linux and Android.
 After installation, let the students (1 periods)
go through activity 4.7 on page 80. By the end of this section, the learner
should be able to application software
Installing Device Drivers such as Microsoft Office 2013 on a
typical desktop computer.
(1 periods) Information to teacher
By the end of this section, the learner Although the student's book discusses
should be able to install device drivers. how to install Office 2013, you are
Information to teacher required to demonstrate how to install
any type of application software. This
Once the students have successfully
may be done after installation of an
installed the operating system,
operating system not necessarily after
demonstrate how to install and configure
device drivers installation. Once the
device drivers using plug-and- play and
students have successfully installed an
manual installation. Sensitize the students
application software, demonstrate how
on the need to read the manufacturer's
to launch and use them to perform
manual to identify the right drivers to
specific tasks. Sensitize the students on
avoid corrupting an operating system.
ethical consideration to avoid installation
: computer, hardware device, drivers,
of freeware or shareware that comes with
manufacturer’s manual and internet and
malware and spyware that are harmful to
student book.
a computer. It is advisable to first install
Teaching guidelines 4.6 an antivirus or internet security software
 Guide the student to go through the before installing any application software:
step-by-step process of installing
device drivers. We highly recommend
Teaching guidelines 4.7
 Guide the student to go through
that you first demonstrate how to
the step-by-step process of
install drivers through plug-and-play
installing an application software.
and manually..
We recommend that you first
 To evaluate each student's
demonstrate how to install an App
competence, give them a supervised
before the students install licensed
practical exercise and assess it by
Apps in groups.
asking relevant questions.
 To evaluate each student's
competence, give them a supervised
practical exercise and assess it by
asking relevant questions.

83
Answers for Unit 4 such as download, buying from vendors
Assessment Exercise 4.1 (page 80) or developing their own software.
1. Open source refers to software
whose source code is availed to Activity 4.3: Software License
users while proprietary software (page 66)
whose source code is hidden from
users This activity requires the learner to
practically identify system and application
2. This procedure requires use of Disk
software installed on computers within
management utility. Right click This
the school or computer lab. The second
PC, then Manage to access the utility
part is meant to help the learner
3. Check the manufacture's manual on
appreciate copyright and intellectual
minimum or recommended memory
property rights needed to be protected
capacity; processor type, processor
in an end-user license agreement.
speed and hard disk size.
4. Piracy is illegal. Hence installing Activity 4.4: Software Installation
genuine software is an ethical Requirements (page 67)
requirements against piracy and This activity requires the learner
intellectual property theft. to research from internet system
requirements for Microsoft office,
Guideline to Activities antivirus and Linux software.

Activity 4.1: Classification of Activity 4.5: Disk Management


Computer Software (page 62) (page 68)

This activity requires the learner to This activity requires the learner practically
research on the internet or before going demonstrate various ways of accessing
through the classification provided in the Disk management utility in Windows 10.
student book. It is important to make For example, if This PC icon is available
the students understand that there are on the desktop, the user can display disk
various ways of classifying software management window as follows:
as they might discover as they explore 1. Right click This PC icon,
various internet sources.
2. Click on Manage to display Computer
Activity 4.2: Classification of management window
Software (page 65)
3. Click Disk management under
This is an exploratory activity that storage
requires the learner to research on
4. Right click the drive you wish to
various means of acquiring software
manage on the right pane

84
Activity 4.6: Disk Cleanup (page 69) browsers, games and productivity
This activity requires the learner software on Windows 10.
practically perform disk cleanup Unit Test 4 (page 84)
procedure by following the steps 1. The help manual is important
provided in the student book or using in identifying the hardware
cleanup in the search box to display Disk specifications required in order to
Cleanup utility on the startup menu. install the new software.
- It helps you to know the procedures
Activity 4.7: Software Installation
to follow in order to install the new
(page 80)
software.
1. This activity takes care of installation 2. Make sure you have the
of earlier or later versions of manufacturers disk or you download
Microsoft Windows. It is important the relevant file.
to demonstrate how to install Linux - Read manufacturers manual.
on top of Windows or as a stand- - Double click the Setup.exe file
alone operating systems in a different and install the software as per
partition instructions.
2. This activity lets the learner customize - In case special configurations are
Windows 10 user look and feel such needed, configure the software
as the background theme, and icons as per the requirements.
displayed on the desktop. This is 3. - The use needs
achieved by right clicking an empty - The operating system
space on the desktop then clicking environment
Personalize from the shortcut menu - The hardware requirements
Activity 4.8: Device Drivers
needed to run the software
Installation (page 82) 4. Memory requirements; Processor
speed; Hard disk size;
This activity requires the students to
5. It helps prove that you rightfully own
install device drivers for common devices
the software and it is genuine.
like printers scanners.

Activity 4.8: Device Drivers


Installation (page 84)
This activity tests the student's skills
on installation of new Apps such as

85
Computer System and Maintenance

Computer Arithmetic

Unit 5 Number Systems

Student's Book page 92 – 117. (18 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
1. Compute numbers in different base systems
2. Perform arithmetic operations on binary numbers

Learning objectives Generic competences


Knowledge and understanding addressed in this unit
Differentiate number base systems. Numeracy: This unit highly emphasizes
Explain the conversion and use of on computing accuracy in four number
arithmetic operations in different systems. This include manipulating
base systems. binary, decimal, octal and hexadecimal
numbers using arithmetic operators.
Skills Critical thinking: In most of the activities,
Convert a given positive number from the student is challenged to apply
one base to another. critical thinking to solve computational
Convert fractional numbers. problems.
Convert a given negative decimal number
Interpersonal management: In every
to binary base.
learning activity that requires group-
Apply arithmetic operations.
work or pair work in this unit, the student
gets a chance to apply interpersonal and
Attitudes and values
leadership skill.
Appreciate numbers base conversion
and the use of arithmetic operators Co-operation: In every learning activity
in binary base systems. that requires group work or pair work
as covered in the student book unit 2,
the student gets a chance to nature skill

86
such as cooperation, collaboration and addressed the issue of environmental
communication. (green energy) and sustainability of
Science and technology: This unit digital technologies.
exposes the learners to the inner 3. Financial Education: This is indirectly
working of modern digital devices using implied in activity on benefits of
binary logic. The learner is expected to digital technology that has resulted
transfer these skills to Boolean logic and to cost-effective devices that are
digital electronics. cheaper to make, buy, and maintain.
Furthermore, digital devices save on
Creativity and Innovation: This unit
power cost because they consume
is critical to creativity and innovation
less energy.
because the computations used helps
the student explore various solutions to Assessment criteria
presented challenges. In this unit, the students are required
Critical thinking: Throughout this topic, to correctly perform conversion and
we have emphasized on critical thinking arithmetic operations in different
in learning activities and assessment numbers systems. Beside activities
exercises. and exercises provided in the student
book, the teacher should use various
Links to other subjects assessment methods and tools to
This unit is highly linked to mathematics test whether the learner has acquired
and physics: In mathematics, the unit is necessary knowledge, skills and attitude
closely linked to arithmetic, and Boolean in numerical computations.
algebra. Understanding of digital
Suggested teaching
electronics in physics is instrumental.
methodology
Cross cutting issues addressed in Guided discovery
this unit Research
Though this unit is largely mathematical, Question and answer
we have tried to use the following cross Discussion
cutting issues: Background information
1. Gender: In line with principles of The number systems unit introduces
gender equality, we have balance the learner to various concepts and
use of male and female across the manipulation of the numbers; with more
unit. Where such reference is not emphasis on binary numbers. Apart
required, we have used neutral from appreciating various number base
phrases. systems, we make effort to connect such
2. Environment and sustainability: In numbers to real world of mathematics
first section of the unit, we have and physics. This will help the learners

87
develop a strong foundation required in number base systems.
not only in computer science but also in
Preparation
engineering and digital electronics.
Be prepared to handle weak students who
Suggested teaching/learning have poor background in mathematics
activities or physics. You may need to give such
The teacher is expected to use student to more specialized attention
demonstrations, research, question and using practical exercises.
answer method, group discussions and
Teaching guidelines 5.1
oral in delivery of this unit content.
 Organize the class into pairs or
Fundamentals of number groups. Sensitize them on the
systems importance of working in groups
and why each group should have a
(2 periods)
group leader. Also ensure that each
This section introduces the learners to
group has a secretary to record and
basic concepts associated with number
report the group’s findings.
systems. These include bit, nibble,
byte, word, and magnitude (weight-by-  Ask the groups to study and write
position). a brief report for Activity 5.1 on
page 84 that tests the student prior
Information to the teacher knowledge on decimal number
Fundamental concepts is meant to system. Let the group leader give
provide overview on origin of natural each member an opportunity to give
numbers before handling binary number a description as the secretary notes
systems used to represent data in digital down the key points.
computers. Note that this unit may be  The groups should present their
relatively to some students because it findings in a class discussion through
borrows a lot from mathematics and their secretaries.
physics. To address this challenge, first  Provide a precise summary from
introduce the learners to basic arithmetic their presentation in order to help
using decimal number system. You can the learners to understand the
then introduce the other number systems importance the ASCII code and
gradually through demonstration using binary logic digital electronics.
examples from the student book or any
other relevant source. Additional information
teacher
Materials: Students book; website tutorial
After introducing the learner to
sites and other reference materials. You
fundamental concepts, encourage them
can also use wall charts depicting various

88
to research how a computer represents student to more specialized attention
data in electronic circuits, optical disks, using practical exercises.
magnetic disks and solid state storage
Teaching guidelines 5.2
devices.
 Capture the attention of the class
Number Base Systems by making them carry our learning
activities in the student's book. You
may demonstrate how to convert
(4 periods) number from one system to another
This unit on number systems is using videos.
systematically introduced in the student  Through class exercises, make
book starting with decimal number sure each students participants
system followed by binary, octal and in converting decimal numbers to
finally hexadecimal base systems. binary, octal and hexadecimal forms.
Information to teacher  After introducing the students to
the class activities, direct them to
You need to first introduce the students
the review exercise in then student
to decimal number system because
book to try out acquired knowledge
this is the system they familiar with in
and skills.
mathematics. It is important to use
practical examples to explain how the Converting Decimal to other
magnitude (weight) a number can be Base systems
determined using absolute value, weight-
by position (place value), and its base. It is (2 periods)
important to help the learner understand Information to the teacher
that the base of octal and hexadecimal This unit equips the learner with
number system are in powers of two i.e. knowledge, skills and attitude required
octal is 23 while hexadecimal is 24. This to convert decimal numbers to binary,
explains why the two number systems octal and hexadecimal forms.
are considered as shorthand for large Having introduced the learners to the
binary numbers. four number systems, let them try to
Materials: Scientific calculator, internet convert decimal numbers to other
sites, charts illustrating number systems, base systems. It is from their response
that you demonstrate how to perform
and projector.
decimal to binary, octal and hexadecimal
Preparation conversions.
Be prepared to handle weak students who Materials: Student book, calculator, web
have poor background in mathematics tutorial, and charts showing summary of
or physics. You may need to give such binary to other number conversions.

89
Preparation Information to the teacher
This section has a lot of calculations Having introduced the learner to the four
required. Let the students prepare number systems, through discover or
well to make sure that they perform research let them try to convert binary
conversions correctly. Sensitize them on numbers to other base systems. It is from
the need to have electronic calculators their response that you demonstrate
to simplify some computations. how to perform binary to decimal, octal
and hexadecimal conversions.
Teaching guidelines 5.3
 Through demonstration, take the Materials: Student book, calculator, web
student through examples and tutorial, and charts showing summary of
activities and in the student book binary to other number conversions.
to help them understand how to Preparation
convert a binary number into other
This section has a lot of computations
number systems
required. Let the students prepare well
 Let the learners work on activities
to make sure that they perform correct
5.4 to 5.7 from page 91 to 93 of the
binary manipulations. Sensitize them on
student’s book.
the need to have electronic calculators
 If you are not satisfied with the to simplify some computations.
student’s answers, it would be
important to organize for remedial Teaching guidelines 5.4
sessions to help the weak students.  Through demonstration, take
Then evaluate each learner’s the student through activities in
understanding of the concepts the student book to help them
presented before proceeding to the understand how to convert a binary
next unit. number into other number systems.
 Let the learners work on activities
Converting Binary to other 5.8 and 5.9 on pages 94 and 96
Base systems respectively.
 If you are not satisfied with the
(2 periods) student’s answers, it would be
This unit equips the learner with important to organize for practice
knowledge, skills and attitude required to through remedial sessions to help
convert binary numbers to their decimal, the weak students. Then evaluate
octal and hexadecimal equivalent. each learner’s understanding of
the concepts presented before
proceeding to the next unit.

90
 If you are not satisfied with the
Octal to Decimal student’s answers, it would be
Conversion important to organize for practice
through remedial sessions to help
(1 period)
the weak students. Then evaluate
This unit equips the learner with each learner’s understanding of
knowledge, skills and attitude required the concepts presented before
to convert octal numbers to decimal proceeding to the next unit.
form.
Octal to Hexadecimal
Information to the teacher
Conversion
Through discover or research let the
learner try to convert octal numbers (1 period)
to decimal base system. It is from their
This unit equips the learner with
response that you demonstrate how to
knowledge, skills and attitude required
convert octal to decimal numbers.
to convert octal numbers to their
Materials: Student book, calculator, web hexadecimal.
tutorial, and charts showing summary of
binary to other number conversions.
Information to the teacher
It is important to note that conversion
Preparation from octal to hexadecimal is a can easily
This section has a lot of computations be performed indirectly. Demonstrate
required. Let the students prepare to the learners how to convert an octal
well to make sure that they perform number by first converting it to decimal
correct octal to decimal computations. or binary form. After the demo, let the
Sensitize them on the need to have learner try to convert octal numbers to
electronic calculators to simplify some hexadecimal base system. .
computations.
Materials: Student book, calculator, web
Teaching guidelines 5.5 tutorial, and charts showing summary of
 Through demonstration, take the binary to other number conversions.
student through examples and
Preparation
activities in the student book to help
This section has a lot of computations
them understand how to convert a
required. Let the students prepare well
binary number into other number
to make sure that they perform correct
systems
octal to hexadecimal computations.
 Individually or in groups, let the
learners work on exercises 5.5 on Teaching guidelines 5.6
page 97 of the student’s book.  Through demonstration, take the
student through examples and

91
activities in the student book to help Sensitize them on the need to have
them understand how to convert a electronic calculators to simplify some
binary number into other number computations.
systems
Teaching guidelines 5.7
 Provide interactive assessment
 Through demonstration, take the
exercise and let the learners work
student through examples and
on octal to hexadecimal conversion.
activities in the student book to help
 If you are not satisfied with the them understand how to convert a
student’s answers, organize for binary number into other number
remedial sessions to help the weak systems
students. It is important that you
 Individually or in groups, let the
evaluate competence of each learner
learners work on assessment
before proceeding to the next unit.
exercise 5.6 on page 99 in the
Hexadecimal to decimal student’s book.
Conversion  If you are not satisfied with the
student’s answers, it would be
(1 period) important to organize for practice
This unit equips the learner with through remedial sessions to help
knowledge, skills and attitude required the weak students. Then evaluate
to convert hexadecimal numbers to each learner’s understanding of
their decimal equivalent. the concepts presented before
proceeding to the next unit.
Information to the teacher
Decimal fraction to Binary
Since the students have developed skills
Conversion
in converting octal number to decimal,
let the students use the same approach
to convert hexadecimal numbers to (1 period)
decimal form. This section gives learners detailed
account on how to convert floating point
Materials: Student book, calculator, web
(fractional) decimal number to binary
tutorial, and charts showing summary of
form.
binary to other number conversions.
Information to the teacher
Preparation
Before you introduce this unit, use
This section has a lot of computations
mathematics background of representing
required. Let the students prepare well
a real number in standard form. It is
to make sure that they perform correct
from this knowledge that you introduce
hexadecimal to decimal computations.

92
the concept of floating point as used in
computing. This will help the learner
Binary fraction to decimal
appreciate how computers represent a
Conversion
real number using integer and floating
point (fractional) parts. (1 period)
It is important for the learner to convert
Materials: Student book, calculator, web
binary fractions to decimal. forms.
tutorial, and charts showing summary of
binary to other number conversions. Information to the teacher
Preparation This section demonstrates to the learner
how to convert floating point binary
This section has a lot of computations
numbers to to decimal form.
required. Let the students prepare
well to make sure that they correctly Materials: Student book, calculator, web
convert decimal fraction to binary form. tutorial, and charts showing summary of
Sensitize them on the need to have binary to other number conversions.
electronic calculators to simplify some
Preparation
computations.
This section has a lot of computations
Teaching guidelines 5.8 required. Let the students prepare
 Through demonstration, take the well to make sure that they correctly
student through examples and convert decimal fraction to binary form.
activities in the student book to help Sensitize them on the need to have
them understand how to convert a electronic calculators to simplify some
binary number into other number computations.
systems
Teaching guidelines 5.9
 Individually or in groups, let the
 Through demonstration, take the
learners work on activity 5.10 on
student through examples and
page 101 of the student’s book.
activities in the student book to help
 If you are not satisfied with the
them understand how to convert a
student’s answers, it would be
binary number into other number
important to organize for practice
systems
through remedial sessions to help
 Individually or in groups, let the
the weak students. Then evaluate
learners work on activity 5.11 and
each learner’s understanding of
assessment exercise 5.7 on page 102
the concepts presented before
in the student’s book.
proceeding to the next unit.
 If you are not satisfied with the
student’s answers, it would be
important to organize for practice
through remedial sessions to help

93
the weak students. Then evaluate Teaching guidelines 5.10
each learner’s understanding of  Through demonstration, take the
the concepts presented before student through examples and
proceeding to the next unit. activities in the student book to help
them understand how to convert a
Negative Decimal to binary number into other number
Binary Conversion systems
 Individually or in groups, let the
(1 period) learners work on activities 5.12
This section demonstrates how to and 5.13 (pages 102 and 103) in the
convert negative decimal numbers to student’s book.
binary using ones and twos complement.  If you are not satisfied with the
It is important that the teacher introduces student’s answers, it would be
this section using simple examples. important to organize for practice
Information to teacher through remedial sessions to help
the weak students. Then evaluate
When introducing ones and twos
each learner’s understanding of
complements let the students
the concepts presented before
understand that the term complement is
proceeding to the next unit.
also applicable in other number systems.
For example, you can demonstrate how Arithmetic Operations on
to complement in decimal numbers. It is Binary Numbers
after this that you can demonstrate how
to convert negative integers to binary (2 periods)
using ones and twos complement.
This section demonstrates to the learner
Materials: Student book, calculator, how to perform arithmetic operations
web tutorial, and charts showing on binary numbers. It is important that
summary of binary to other number the teacher introduces this topic using
conversions. simple operations.
Preparation Information to teacher
This section has a lot of computations Like in mathematics, this section
required. Let the students prepare well demonstrates how to perform binary
to make sure that they correctly convert addition, subtraction, division and
fractional decimal numbers to binary multiplication. But before you cover
form. Sensitize them on the need to have this topic, let the students first perform
electronic calculators to simplify some the four basic arithmetic operations,
computations. i.e. addition, subtraction, division and
multiplication. In each case, use examples

94
to draw similarities between binary and used to represent a data
decimal arithmetic operation. c) A nibble is a 4-bit hexadecimal
Materials: Student book, calculator, digit which is usually half a byte.
web tutorial, and charts showing 2. A byte consists of 8 bytes while nib-
summary of binary to other number ble is a grouping of 4 bits
conversions.
3. Digital electronic devices that utilise
Preparation binary system such as digital cameras,
This section has a lot of computations TVs and media players are dominat-
required. Let the students prepare well ing the electronic market.
to make sure that they correctly convert 4. Analog signal is represented using
fractional decimal numbers to binary continuous sinusoid wave while digi-
form. Sensitize them on the need to have tal signal is represented using square
electronic calculators to simplify some wave.
computations.

Teaching guidelines 5.11 Assessment Exercise 5.2 (page 94)


 Through demonstration, take the (a) 510 (b) 1510 (c) 139010
student through examples and (d) 19110 (e) 8910 (f) 45510
activities in the student book to help
them understand how to convert a
binary number into other number Assessment Exercise 5.3 (page 95)
systems (a) 2448 (b) 2478 (c) 1628
 Let the learners work on activities (d) 5658 (e) 222 8 (f) 3370 8
5.14 to 5.20 from page 104-109. (g) 14138 (h) 13318 (i) 63478
 Then evaluate each learner’s (j) 466538
understanding of the concepts
presented before proceeding to the
Assessment Exercise 5.4 (page 97)
next unit.
(a) 10100100 (b) 10100111
(c) 10100010 (d) 101110101
Answers for Unit 5 (e) 10010010 (f) 11011111000
Assessment Exercise 5.1 (page 87) (g) 1100001011 (h) 1011011001
1. Definition of terms (i) 110011100111
a) Bit (Binary digit) refers to the (j) 100110110101011
two basic units digits 0 and 1 Assessment Exercise 5.5 (page 97)
used to represent data
1. The student should use group of
b) A byte is a group of eight bits four bits for every hexadecimal digit

95
to get the following: 4. 10012 5. 110101 6. 11111
(a) 1010010100 7. 10 8. 1010010

(b) 1001000111 9. 11000110 10. 10001
(c) 111011111101

(d) 100100000111
(e) 101110101101 Assessment Exercise 5.10 (page 110)
(f) 1100101111011111 1. 111110012
(g) 101100001011100 2. (a) 11100001 (b) 11100100
(h) 1010101111001101 (c) 1111011
(i) 1010101110000111010 3. (a) 111 (b) 100002 (c) 1
(j) 11001100010001000111001111 (d) 1100102

2. The student should group the Guideline to Activities


number to four bits from right to left
Activity 5.1: Magnitude of numbers
to get 1E37.
(page 87)
The leaner is expected to define 485 in
Assessment Exercise 5.6 (page 99) terms of base value as a decimal number.
(a) 6310 (b) 5210 (c) 6610 Each digit has absolute value regardless
(d) 64010 (e) 51210 (f) 1231 of its position. The place value makes
(g) 8310 (h) 51110 (i) 22910 4 on the left have more weight than 8
(j) 11810 and 5 because it is under place value of
hundreds.

Assessment Exercise 5.7 (page 102)


Activity 5.2: Types of number
(a) 0.5937510 (b) 0.12510 (c) 0.6562510
systems (page 88)
(d) 3.37510 (e) 5.937510 (f) 4.7510
The leaner is expected to understand
the four number systems already
Assessment Exercise 5.8 (page 105) provided in the student book from page
1. 10001 2. 11101 3. 11001 87-89. These are binary, decimal, octal
4. 110011 5. 1011001 6. 10010 and hexadecimal systems.
7. 1001010 8. 1010011
9. 10111110 10. 1000000
Activity 5.3: Octal and hexadecimal
11.1101101 12. 10100110
number systems (page 89)
This activity requires the learner to
Assessment Exercise 5.9 (page 106) research on the Internet reasons for use
1. 1111 2. 001 3. 10100 of octal and hexadecimal systems. Some

96
of the reasons include shortening long (a) 999 = 143 (b) 1875 = 3523
strings of binary numbers, simplifying (c) 5210 = 12132 (d) 505 = 771
programming, and processor and (e) 1810 = 3422 (f) 3185 = 6161
memory optimization. (g) 1000 = 1750 (h) 750 = 1356

Activity 5.4: Converting decimals


Activity 5.7: Decimal to
to binary form (page 91)
hexadecimal conversions (page 93)
This activity requires the learner to The first activity requires the learner to
convert a decimal number. use division-by-base method to obtain
247 to binary form i.e 11110112 . the following hexadecimal numbers:

Activity 5.5: Decimal to binary (a) 107 = 6B (b) 9850 = 267A


conversion (page 92) (c) 5207 = 1457 (d) 7500 = 1D4C
1. The first activity requires the learner (e) 7075= 1BA3
to use place value method to obtain the
following binary numbers:
Activity 5.8: Binary to decimal
(i) 145 = 10010001
conversions (page 94)
(ii) 1280 = 10100000000 The first activity requires the learner to
(iii) 5204 = 1010001010100 convert binary numbers to obtain the
(iv) 8000 = 1111101000000 following decimal numbers:

2. The first activity requires the learner 1. 100100 = 36


to use both division by base and place 2. 1011110 = 94
value method to obtain the following
3. 11111111 = 255
binary numbers:
a) 10 = 1010 b) 512 = 1000000000
Activity 5.9: Binary to hexadecimal
c) 43 = 101011 d) 143 = 10001111
conversion (page 96)
e) 365 = 101101101 f) 954 = 1110111010
The first activity requires the learner to
convert binary numbers to obtain the
following hexadecimal numbers:
Activity 5.6: Decimal to octal
conversion (page 93) 1. 10111100110 = DE6
The first activity requires the learner to 2. 111011011 = 1DB
use division-by-base method to obtain 3 110111 = 37
the following octal numbers:
4. 0101110 = 2E

97
Activity 5.10 Decimal fraction to (c) 10101101 =01010010 =>82
binary conversion (page 101)
(d) 1011111 =0100000 =>32
1. The first activity requires the learner
to convert a real number with deci- (e) 1011001 = 0100110 =>38
mal points to obtain the following bi- (f) 11100111 =00011000 =>24
nary numbers:
Activity 5.13: One’s and two’s
43.5625 = 101011.1001 compliment (page 103)
2. The first activity requires the learner 1. The first activity requires the learner
to convert the following real number to demonstrate how to represent
to obtain the following binary num- decimal number like 945 using nine’s
bers: complement. The second bullet is
(a) 0.625 = 0.101 conversion of 11010010 two’s com-
(b) 0.450 = 0.01110011… plement gives 00101101+1 = 101110

(c) 2.500 = 101.1 2. The first activity requires the learner


to convert negative decimal numbers
(d) 5.1625 = 101. 001010011…
to the following binary equivalence
(e) 7.1875 = 111. 0011 using at least 8-bit twos complement:
(f) 0.350 = 0.010110011.. (a) -20 => 11101100
(b) -55 =11001001
Activity 5.11: Binary fraction to (c) -108 =10010100
decimal conversion (page 102)
(d) -586 =0110110110
The first activity requires the learner to
convert the following a binary number
with floating point to obtain the following Activity 5.14: Binary addition
decimal number: (page 104)
11.11011 = 3.84375 This activity requires the learner to
understand the procedure of adding two
binary numbers to obtain
Activity 5.12: Ones complement
100011.
(page 102)
The first activity requires the learner to
convert the following a binary number to Activity 5.15: Binary addition (page
obtain the following ones complement: 104)
(a) 1101001 = 0010110 =>22 This activity requires the learner to
understand the procedure of adding
(b) 1111010 = 0000101 =>5
three binary numbers to obtain 101000.

98
Activity 5.16: Binary subtraction multiplication of binary numbers to
(page 106) obtain the following:
This activity requires the learner to (a) 101101 x 110 = 100001110
understand the procedure for direct
(b) 101101 x 111 = 100111011
subtraction of binary numbers to obtain
the following: (c) 1011.01 x 110.1 = 1001001.001
(a) 10011 – 1100 =111 Activity 5.20: Binary division (page
(b) 10110 – 1011 = 1011 109)
This activity requires the learner to
(c) 101 – 100 = 1
understand the procedure for direct
(d) 10111 – 1111 = 1000 division of binary numbers to obtain the
following:

Activity 5.17: Subtraction using (a) 1011 ÷ 11 = 11 rem 10


one’s compliments (page 107) (b) 10011 ÷ 101 = 11 rem 100
This activity requires the learner to (c) 1111 ÷ 11=101
understand the procedure for converting
(d) 11 ÷ 11=1
-13 to binary form, i.e. 1110010.

Unit Test 5 (page 110)


Activity 5.15: Subtraction using
1. (a) Octal number system is a base 8
two’s complement (page 107)
system while the decimal number
This activity requires the learner to
system is a base 10 system.
convert the decimal numbers to binary
(b) Binary number system is a base 2
form before calculating the differences
system while hexadecimal number
using twos complement to obtain:
system is base 16 system.
(a) 11111– 10001= 1110 2. (a) 4610 (b) 4310 (c) 610
(b) 11011– 101 = 10110
(c) 1111111– 110010= 1001101 3. (a) 1100010101 (b) 1000111010
(c) 101010 (d) 11110
(d) 10001– 100011= 11101110

Activity 5.19: Binary Multiplication 4. (a) 10101 (b) 101 (c) 11100
(page 108) (d) 1111 (e) 1010
This activity requires the learner to 5. (a) 11002 (b) 0112
understand the procedure for direct (c) 11100 2 (d) 11010002
(e) 100010000012

99
6. Decimal One's Two's 8. (a) 0.562510 (b) 5.7510
(a) –75 0110100 0110101 (c) 3.62510 (d) 0.12510
9. (a) 0.010110 (b) 10.1
(b) – 80 0101111 0110000
(c) 1000001.00112 (d) 10001.0012
(c) –100 0011011 0011100

7. (a) 111002 (b) 1110012

100
Computer System and Maintenance

Computer Arithmetic

Unit 6 Boolean Algebra and Logic Gates

Student's Book page 101 – 131. (18 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
1. Identify different logic gates, theorems of Boolean algebra and evaluate Boolean
expressions.
2. Utilize laws of Boolean algebra on Boolean expressions and draw a simple logic
circuit using logic gates.

Learning objectives • Appreciate logic gates and laws


Knowledge and understanding applied on logic circuit
• Identify logic operators, Truth tables Generic competences
and evaluate Boolean expression addressed in this unit
using Boolean laws. Problem solving: by doing the learning
• Describe the use of logic gates and activities in this unit the student learns
apply Boolean laws on logic gates. how to apply technology to solve
problems.
Skills
• Apply laws of Boolean algebra on Interpersonal management: working in
Boolean expressions. groups helps nature this skill.
• Draw graphical representation of Working together also enhances a sense
different logic gates and construct of respect for each other regardless
and evaluate a logic circuit. of socio-cultural differences hence
supports interpersonal respect and
Attitudes and values
promotes national unity.
• Appreciate the logical reasoning
while using Boolean operators and Links to other subjects
laws applied on Boolean numbers Mathematics (Logic)

101
Assessment criteria just the way a logic gate switches ON or
Students utilize laws of Boolean algebra OFF based on the inputs.
on Boolean expressions, draw logic Materials: whiteboard, projector, student
circuit from given expression, derive text book.
correct expression from given circuit.
Preparation
Suggested teaching 1. Carry with you pictures of the logic
methodology
gates on a wall chart to class.
• Guided discovery
• Research 2. If you can get a bread board for
• Question and answer constructing simple LED circuits
• Discussion the it would be better when
• Role play demonstrating.

Background information Additional information teacher


This is one of the most enjoyable and • Although this topic is difficult, try to
easiest units in computer science yet simplify it as much as possible.
students find it very difficult if proper Teaching guidelines 6.1
introduction and step by step instruction • Start by asking one student to
is not given. Introduce this section with switch the light ON and OFF at the
the simple concept of a light switch and
switch. Impress on the students the
that of a 1 and a 0, ON and OFF.
simplicity of the two state process
Suggested teaching/ learning - - the ON can be interpreted as a 1
activities while the OFF as a 0.
• Impress on the students the
Circuits and Logic gates importance of this simple method of
instruction representation.
(2 period)
• Now request the student to do
Information to the teacher learning activity 6.1 on page 111.
Come up with easy IF conditions that • Now cover the content in this
lead to a certain action being taken or section. For each circuit represented
not. For example: by Figure 6.1 - 6.4 on page 112 let
1. If it rains then pick your umbrella or the student clearly understand the
2. If you want to buy land, you must logic of using switches to control
have enough money and a willing how the bulb comes on and goes
seller. off. Remember this will enable them
In so doing the student will quickly learn understand logic gates in the future
to associate conditions to outcomes, periods.

102
Cover the content in this section.
Logic gates
Truth tables
(3 periods)
Information to teacher (2 periods)
Materials: student text book, wall Information to teacher
charts, whiteboard, projector, movie,
Materials: student text book, wall
computer connected to internet, circuit
charts, whiteboard, projector, movie,
bread board.
computer connected to internet.
Preparation Preparation
Download a movie which shows how
Download a movie which shows how
logic gates work. Alternatively identify
logic gates work. Alternatively identify
a good website which has the relevant
a good website which has the relevant
information that the students can access
information that the students can access
and do research.
and do research.
Teaching guidelines 6.2 Teaching guidelines 6.2
 Request the students to study Table
 Request the students to compare
6.1 on page 114 as an activity. Let
the statements concerning each
them do research on the internet
logic gate in Table 6.1 to its relevant
too concerning each and every basic
truth table in Figure 6.5.
logic gate.
 After that, create simple two gate
 Step by step with the learner,
circuits and develop truth tables for
give real life examples using logic
each together with the students in
statement that reinforce the logic
class. This will make each student to
for each gate e.g. The following
understand the interaction between
statements may be suitable for the
different gates.
gates suggested below:
 Guide the students to do learning
1. NOT: Ask the student to say the
activity 6.2 on page 115. This will not
opposite of certain actions e.g.
only help them to reason and apply
Stand ---> sit; Shout ----Whisper;
their knowledge about the gates
Laugh ---> Cry, Start ---> Finish etc.
but will expose them to real world
2. OR: To qualify you need to have an
application of the logic gates i.e. let
identity card or a passport;
them know that the ICs they see on
3. AND: In order to withdraw money
the motherboard for example have
from the bank you need your
internal structures like the ones
identity card and to sign with the
right signature
103
depicted in Figure 6.6. light switch. Draw a parallel between
 Prompt the student to do learning the analogy of a light switch and a
activity 6.3 on page 116. Go round NOT gate i.e. When the input is a 1
the output is a 0, just like when you
the class checking that each student
close the switch the light comes ON
is able to understand how the truth and when you open it the light goes
Table 6.2 was finally derived. This OFF. This two seem to be behaving
one on one session with the student opposite to each other i.e. I expect
will create an inclusive learning if the input is one, I should get the
environment where you can help output as a 1 so that the light can
each student individually. come ON.
 Conclude the period by giving the  Guide the student to do learning
activity 6.5 on page 118 then they will
students homework to do learning
understand that it needs two NOT
activity 6.4 on their own on page
gates in series with one another to
117.
create a digital light switch.
Solving problems using  Guide the students to do learning
logic gates activity 6.6 on page 118. Go round
the groups to see the progress
of each group and give relevant
(2 periods)
guidance where need be.
By the end of this section, the learner  Come up with more scenarios for
should be able to solve simple problems the student to do more practice.
using logic gates.
Boolean algebra
Materials: A computer connected to
the internet, projector, .
(2 periods)
Preparation By the end of this section, the learner
Nearly every problem that requires should be able to solve simplify and work
control of a process which has inputs out truth tables for Boolean algebra
and outputs can be solved by designing expressions.
relevant digital circuits. The aim of this
Materials: a computer connected
section is to introduce the student
to the internet, student text book,
to problem solving, creativity and
whiteboard, projector.
automation when reasoning about how
digital circuits can be used to control of Teaching guidelines 6.4
solve real world problems.  Start by showing a link between
boolean algebra and digital logic
Teaching guidelines 6.3 gates i.e. for both we reason in terms
 Again start this period with the of 0s and 1s and we can construct
simplest control in a circuit - - - a truth tables.
104
 Go through the laws of boolean  Guide the student to do Activity 6.9
algebra and let each student listen on page 127.
and make relevant notes.
Product of Sums
 Guide the student to do learning
Guide the student to understand what
activities 6.7 and 6.8 on page 123 to
POS is all about. Using Figure 6.14 as
125. This will enable the students
a reference point, guide the learner to
to develop confidence in boolean
verify all possible inputs and outputs of
algebra.
this arrangement.
 Teach the students one golden rule:
 Guide the learner to do Activity
two boolean algebra expressions
6.10 on page 128.
are equivalent if their truth tables
 Take the students through Activity
give the same output.
6.11 on page 129 so as to solidify the
Evaluate the learners understanding of the concepts learned.
concepts presented by going round the  After this, give them Activity 6.12
class inspecting each of the work done. on page 130 to gauge the level of
their understanding. Appraise their
progress in class and then guide the
Sum of Product (SOP) and entire class through the steps of
Product of Sum (POS) solving the challenge.
SOP and POS are two sides of the same
point ; Repeat the concept of the AND NAND and NOR AS Universal
operation and how it can be seen as the Gates
product of binary values while the OR
Guide the student through activity 6.12
operation can be viewed as the binary SUM.
on page 130. Using relevant examples,
Sum of product justify why NAND and NOR gates are
 Remind the student that in binary universal gates i.e. using this gates we
a 1 has a complement of a 0 and can create a combination that can solve
vice vasa. Use the A and A notation any existing need or problem. Use the
to represent a number and its examples previously covered in the book
complement. to demonstrate this concept too.
 Remind the student about the two
input AND. Now guide the student Answers
to understand that even when the Assessment exercise 6.1 (page 120)
inputs are more than two, the same 1. A logic gate is an electronic circuit
laws hold i.e. all the inputs have to that has some idealized or physical
be 1 in order to get a 1 output. device implementing a Boolean
function; that is, it performs a logical

105
operation on one or more logical 1 0 1 0 1 0 0
inputs, and produces a single logical 1 1 1 1 1 1 0
output Alternatively the inputs can be
2. A truth table is a mathematical sixteen as follows if we decide
table used in boolean algebra or that all the four input ABCD will
propositional logic to compute the follow a four bit input order:
outcome of all possible combinations A B C D E F Q
of input values i.e. it can be used to 0 0 0 0 0 0 1
tell whether an expression is valid 0 0 0 1 0 0 1
for all legitimate input values.
0 0 1 0 0 0 1
3. 1
0 0 1 1 0 0 1
4. A Q
0 1 0 0 1 0 0
0 1
0 1 0 1 1 1 0
1 0
0 1 1 0 1 0 0
5. 1
0 1 1 1 1 1 0
6. A B Q
1 0 0 0 1 0 0
0 0 0
1 0 0 1 1 1 0
0 1 1
1 0 1 0 1 0 0
1 0 1
1 0 1 1 1 1 0
1 1 1
1 1 0 0 1 0 0
7. A NOR gate is an OR gate that has
1 1 0 1 1 0 0
a NOT gate connected on its output
1 1 1 0 1 0 0
therefore it inverts the OR gate
1 1 1 1 1 1 0
output.
9. (ii) A B C D E Q
8. NAND gate is an AND gate that has
a NOT gate connected to its output 0 0 0 1 0 1
hence it inverts the output of the AND. 0 0 1 1 0 1
9. (i) We can decide to feed each 0 1 0 1 0 1
gate with its own set of inputs 0 1 1 1 1 0
separate from the other i.e. AB 1 0 0 0 0 1
then CD as in when we input 00 1 0 1 0 0 1
at AB we do the same at CD. In 1 1 0 0 0 1
so doing the output would be as 1 1 1 0 1 1
follows: 12. Based on the facts provided we can
A B C D E F Q deduce that the logic circuit has
0 0 0 0 0 0 1 three inputs A, B and C and a single
0 1 0 1 1 0 0 output Q. From what we have been

106
told: ii. When Open the voltage in the
A B C Q circuit is low hence bulb is Off.
0 0 0 1 (alarm raised) iii. When closed, the voltage in the
1 1 0 1(alarm raised) circuit is high hence the bulb is On.
If the circuit has three inputs we iv. Other possible two state
immediately deduce that one is a representations in the universe e.g.
NOT gate. Also the output Q is On/Off; High/Low; Hot/Cold and
from a gate that has two inputs. We finally 1/0.
therefore draw as follows: Activity 6.2: ICs and their
A internal logic gate structure
Y D (pg. 115)
B Z Q
This activity enables the learner to
E
NOT conceptualise how the simple logic
C
gates are integrated together to form
Every time C=0; then E=1 and Q=1 integrated circuits. This activity will open
Regardless of whether A=B=1 Or the eyes of the learner to the fact that all
A=B=0. We deduce as follows: the electronic components that have ICs
(i) If Y is an AND gate then Z is and are actually built using individual logic
OR gate to satisfy the conditions given in gates one after another. Make sure that
the question. the learner appreciates the following:
i. That each IC has a special number
(ii) If Y is an OR gate then Z can only
which can be referenced on a
be an OR gate too in order to satisfy the
website or IC design book to find
conditions given in the question.
out how the gates are arranged
Guidelines to Activities within it. Let them touch and feel
the ICs you have brought to class.
Activity 6.1: Switching a touch ii. Where possible, carry a bread board
ON/OFF (pg. 111) (for connecting ICs ) to class, a bulb
This activity enables the learner to and some dry cells in a holder and
conceptualise the two state nature of connecting wires so that you can
digital logic. Apart from a light torch you demonstrate using the ICs how the
can also use a light switch in the room bulb comes on when you have the
to demonstrate the concept. Make proper connections on the bread
sure that the learner appreciates the board. This will help the students to
following: further understand table 6.1 on page
i. The switch has two states Open / 114 and the truth tables of Figure 6.5
Closed. on page 115.

107
iii. That given Figure 6.6 on page 115, step by step analysis as presented in the
you can know the output of each learning activity.
gate in the IC by biasing the inputs Activity 6.7– 6.8: Boolean algebra
appropriately. example (pg. 123 - 125)
Activity 6.3: Examples of coming
The best way of approaching this is to
up with truth tables (pg. 116)
make sure that the student understands
Make sure to guide the student step by the notations e.g. if A = 1 then Ā= 0;
step through this activity after initially that (.) stands for AND operation and
giving them a challenge to read and (+) stands for OR operation etc.
understand it. Before guiding them
Activity 6.9: Verifying the logic
through, pose a question asking whether
circuit in Figure 6.13 (pg. 127)
any of the students is willing to explain
to the others what they have read and This activity moves the student one step
understood. higher in their understanding of logic
gate combinations, truth tables and their
Activity 6.4: Examples of logic
related Boolean algebra.
gate identification from given
truth table (pg. 117) Activity 6.10: Verifying the logic
circuit in Figure 6.14 (pg. 128)
Follow the same steps as in 6.3 above
although this time let the learners form This activity moves the student one step
pairs and go through the provided higher in their understanding of logic
example first. gate combinations, truth tables and their
related Boolean algebra.
Activity 6.5: Examples of using
a logic gate to construct a light Activity 6.11: Verifying the logic
switch (pg. 118) circuit in Figure 6.14 (pg. 129)

This as an application activity meant to This activity moves the student one step
help the student develop problem solving higher in their understanding of logic
skills. Allow the student to go through gate combinations, truth tables and their
this activity individually or in pairs as you related Boolean algebra in terms of SOP
wish. and POS.

Activity 6.6: Solving real life Activity 6.12: POS logic circuit
problems (pg. 118-120) (pg. 130)

This builds on 6.5 to help the student This activity moves the student one step
apply the knowledge in logic gates to higher in their understanding of logic
solve real life problems. Help the student gate combinations, truth tables and their
to understand that however challenging related Boolean algebra in terms of POS.
a problem is, it can be solved through

108
Activity 6.13: NAND and NOR 5. False. A minterm is an AND operation
gates (pg. 130) of variables. The one given is a maxterm.
This activity moves the student one 6. False. A maxterm is an OR of variables.
step higher in their understanding of This is a minterm.
logic gate combinations, truth tables and 7. (i) Already simplified.
their related Boolean algebra in terms
of NAND and NOR gate combinations X Y Z X.Y Y.Z F
as universal gates that can be used to 0 0 0 0 0 0
design any logic circuit needed to solve 0 0 1 0 0 0
any solvable problem. 0 1 0 0 0 0
Unit Test 6 (page 131) 0 1 1 0 1 1
1. Yes. According to the identity law, 1 0 0 0 0 0
X+X = X. Hence both statements can 1 0 1 0 0 0
be written as: X + YZ. 1 1 0 1 0 1
2. NAND and NOR gates. using 1 1 1 1 1 1
them, any possible logic circuit can be (ii) F(X,Y) = (X+Y) + Y•(X+Y)
constructed.
F = (X+Y) + Y (using redundance law)
3. SOP: all ANDed variables are ORed
F=X+Y+Y
to get the required outputs; POS: all
ORed variables are ANDed to get the F = X + Y (using identity law)
final output. X Y X+Y Y•(X+Y) F
4. (a)SOP circuit. It will consist of two 0 0 0 0 0
AND gates each having an output feeding
into an OR gate. 0 1 1 1 1

(b) 1 0 1 0 1
1 1 1 1 1
A
B
C Notice X+Y is equal to F in the truth
table

109
Data Structure and Algorithm

Algorithms

Unit 7 Introduction to Computer Algorithm

Student's Book page 132–147 ( 24 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
• Identify appropriate steps to solve a problem.
• Identify an appropriate algorithm from a given problem.
• Represent graphically algorithm using flowchart.

Learning objectives Skills


• Trace an algorithm and predict
Knowledge and understanding
output from a given input.
• Identify and explain the role,
• Represent graphically the logic for a
characteristics and structure of
computer problem using flowchart.
computer algorithm.
• Able to use variable, constant
• Identify flowchart symbols and their and reading writing functions in
meaning. computer algorithm.
• Distinguish between variable and • Able to evaluate an expression.
constant.
Attitudes and values
• Differentiate data types used in
• Show concern in understanding
computer algorithm and identify steps to resolve computer problem
memory size for each data type. using algorithm
• Identify how data is stored in
computer memory. Generic competences
• Manipulate expressions in algorithm
addressed in this unit
writing. Numeracy: This unit highly emphasizes
• Use reading and writing functions in on computing accuracy in four number
algorithm. systems. This include manipulating
binary, decimal, octal and hexadecimal

110
numbers using arithmetic operators Cross cutting issues addressed in
Critical thinking: in most of the activities, this unit
the student is challenged to apply Though this unit is largely mathematical,
critical thinking to solve computational we have tried to use the following cross
problems. cutting issues:
Interpersonal management: In every 1. Gender: In line with principles of
learning activity that requires group- gender equality, we have balance
work or pair work in this unit, the student use of male and female across the
gets a chance to apply interpersonal and unit. Where such reference is not
leadership skill. required, we have used neutral
phrases.
Co-operation: In every learning activity
2. Standardization culture: In activity
that requires group work or pair work
7.1 on page 135, we have addressed
as covered in the student book unit 2,
the issue of equitable access to
the student gets a chance to nature skill
education and food.
such as co-operation, collaboration and
3. Financial Education: This is implied
communication.
in various activities such as Activity
Science and technology: This unit 7.1 on page 135, 7.2 on page 136, 7.3
exposes the learners to the inner on page 138 and 7.10 on page 146
working of modern digital devices using in which the student is expected to
binary logic. The learner is expected to track loans and investments in the
transfer these skills to Boolean logic and banking sector.
digital electronics.
Assessment criteria
Creativity and Innovation: This unit
In this unit, the students are required to
is critical to creativity and innovation correctly derive the solution logic for
because the computations used helps a computational problem, represent it
the student explore various solutions to using flowchart, write algorithm, utilize
presented challenges. variables and expressions in an algorithm.
Critical thinking: Throughout this topic, Beside activities and exercises provided
we have emphasized on critical thinking in the student book, the teacher should
use various assessment methods and
in learning activities and assessment
tools to test whether the learner has
exercises.
acquired necessary knowledge, skills and
Links to other subjects attitude in problem solving.
This unit is highly linked to mathematics. Suggested teaching
This is because the learner is expected methodology
to apply mathematics skills in learned • Guided discovery
arithmetic, and algebra. • Research
111
• Question and answer learner to basic principles of problem
• Discussion solving and design of algorithm. The
• Role play teacher should use real life and practical
examples such as recipe to explain how
Background information
a computer follows sets of instructions
The most crucial stage in programming
to solve a computational problem. Make
is algorithm design because it is at this
the learner appreciate that design,
stage that cost on maintenance can be
implementation and deployment of
minimised. Therefore, this unit is meant
computer programs require creativity
to introduce the students to basic
and problem solving skills acquired in
principles of problem solving and design of
related subjects like mathematics.
algorithm. To test algorithms illustrated
it student’s book, we recommend use of Materials: Computer, projector,
trace tables and programming languages website tutorial sites and other reference
such as Pascal or C++. This is why we materials. You can also use wall charts
have deliberately avoided use of any depicting concept of a computer
programming language to implement algorithm using real life example like
the worked algorithms to leave it open recipe.
for teachers and student to make their Preparation
choice.
Be prepared to handle weak students
Suggested teaching/learning who have poor background in
activities mathematics because algorithm design
The teacher is expected to use requires creativity, critical thinking and
demonstrations, question and answer problem solving skills. You may need to
method, group discussions and practical give such student to more specialized
programming to nature problem solving attention using practical demonstrations
skills, creativity and innovativeness. and exercises.
Teaching guidelines 7.1
Algorithm Concept  Organize the class into pairs or
This section introduces the learner groups. Sensitize them on the
to basic concepts associated with importance of working in groups
algorithms. These include origin of the and why each group should have a
term algorithm, its definition, role and group leader. Also ensure that each
characteristics. Later we demonstrate group has a secretary to record and
how to express algorithms using natural report the group’s findings.
language, pseudocode and flowchart.  Ask the groups to carry out Activity
Information to the teacher 7.1 on page 135 in the Student’s
This chapter is meant to introduce the book. Let the group leader give each
member an opportunity to give a

112
description as the secretary notes comparisons between flowchart and
down the key points. pseudocode. We encourage the teacher
 The groups should present their to use brainstorming sessions to guide
algorithm in a class discussion students in identify advantages and
through their secretaries. disadvantages of other each algorithm
 Provide a precise summary from design tool discussed in the student’s
their presentation in order to book.
help the learners understand that Materials: Computer, projector, chart
algorithm is raw program that showing sample algorithm, tutorial sites
represents logical steps of solving a and other reference materials.
real life problem.
Preparation
Additional information teacher
Prior to introducing the topic, ensure
Having introduced the learner to
that you have dry run your algorithm
fundamental concepts, encourage them
to research principles of good algorithm using trace table to avoid logic errors.
design. Let the students also compare You may also you create a sample
notes on how such algorithms may be programs to demonstrate output of the
converted into a real computer program algorithm designs.
using programming languages.
Teaching guidelines 7.3
Design of Algorithms  Through demonstration, take the
student through examples and
(2 periods)
activities and in the student book
This unit equips the learner with to help them understand how to
knowledge, skills and attitude required to convert a real life problem into an
convert binary numbers to their decimal, algorithm.
octal and hexadecimal equivalent.
 Individually or in groups, let the
Information to the teacher learners work on exercises 7.2 on
In this topic, we have briefly discussed page 136, and 7.3 on page 138 of the
common tools used to formulate an student's book.
algorithm. Using simple examples,  If you are not satisfied with the
the teacher should demonstrate how student’s answers, it would be
to design an algorithm using natural important to organize for practice
languages, pseudocode and flowcharts, through remedial sessions to help
It is important to emphasize on standard the weak students. Then evaluate
symbols, keywords and convention used each learner’s understanding of
in each of the design tools. As a class the concepts presented before
or group activity, let the students draw proceeding to the next unit.

113
activities in the student book to
Variables
help them understand how to use
variables in algorithms.
(1 period)
 Individually or in groups, let the
This unit introduces the learner to
learners work on activity 7.4 on
variables as memory management
concept in programming context. page 141 in the student’s book.
This requires students to have prior  If you are not satisfied with the
knowledge of computer architecture student’s answers, it would be
introduced earlier in unit two. important to organize for practice
through remedial sessions to help
Information to the teacher
the weak students. Then evaluate
In the syllabus, this unit comes earlier
each learner’s understanding of
than introduction to programming but
the concepts presented before
we strongly feel that the teacher should
proceeding to the next unit.
introduce the students to programming
languages such as Pascal, C and C++. Constants
This will help them be able to identify
variables, constants, data types. This (1 period)
approach also simplifies delivery of this
This unit introduces the learner to
topic that requires students to identify
constants as used in programming
variables, data types and memory size
context. This requires students to
required by various data types.
have prior knowledge of computer
Materials: Computer, projector, chart architecture introduced earlier in unit
showing how computer memory is two.
dived into cells, tutorial sites and other
reference materials.
Information to the teacher
Although this unit comes earlier than
Preparation introduction to programming, we
This section has a lot of computations strongly feel that the teacher should
required. Let the students prepare introduce the students to basic concepts
well to make sure that they perform of programming languages such as Pascal,
correct octal to decimal computations. C and C++. This will help them be able
Sensitize them on the need to have to familiarize them with constants. This
electronic calculators to simplify some approach will also simplify delivery of
computations. this topic that requires students to use
constants such as pi, tax rate and speed
Teaching guidelines 7.4
of light.
 Through demonstration, take the
student through examples and

114
Materials: Computer, projector, chart Information to the teacher
showing how to represent constants, Given that this topic does not require
tutorial sites and other reference prior knowledge on any programming
materials. language, the teacher may be required
Preparation to make reference to how the
operators apply in mathematics or
This section has a lot of computations
using sample expressions in spreadsheet
required. Let the students prepare
program. However, we find to difficult
well to make sure that they represent
to entirely discuss the entire topic
constants in algorithms.
without demonstrating the same in a
Teaching guidelines 7.5 programming environment. For this
 Through demonstration, take the reason, we encourage the teacher to
student through examples and use a language such as C++ to help the
activities in the student book to students understand how to create
help them understand how to use expressions using the four categories of
constants operators and expressions.
 Individually or in groups, let the Materials: Computer, projector, chart
students work on activity 7.5 and 7.6 showing how computer memory is
on pages 142 and 143 in the student’s dived into cells, tutorial sites and other
book. reference materials.
 If you are not satisfied with the Preparation
student’s answers, it would be This section has a lot of mathematical
important to organize for practice expressions. Let the students prepare
through remedial sessions to help well to make sure that they write correct
the weak students. Then evaluate expressions. Before the period, prepare
each learner’s understanding of sample spreadsheet show sample
the concepts presented before expression in each type operator.
proceeding to the next unit.
Teaching guidelines 7.6
 Through demonstration, take
Operators and Expressions
the student through examples
(1 period) and activities 7.7 to 7.9 from page
143 to 144 in the student book.
Although there is no reference to
Let the students demonstrate
specific language, this topic introduces
understanding of operators
the learner to mathematical operators
and operator precedence using
and expressions. These include
mathematical expressions
assignment, arithmetic, relational and
logical operators and expressions.  Individually or in groups, let the

115
learners work on activities in the computations.
student’s book.
Teaching guidelines 7.7
 If you are not satisfied with the
 Through demonstration, take the
student’s answers, it would be
student through examples and
important to organize for practice
activities in the student book to help
through remedial sessions to help
them understand how to use read
the weak students. Then evaluate
and write functions.
each learner’s understanding of
 Individually or in groups, let the
the concepts presented before
learners work on activity 7.10 on
proceeding to the next unit.
page 146 in the student’s book.
 If you are not satisfied with the
Read and Write Functions student’s answers, it would be
important to organize for practice
(2 periods) through remedial sessions to help
This unit introduces the learners to the weak students. Then evaluate
concepts of read and write functions, each learner’s understanding of
used in pseudocode design, the concepts presented before
proceeding to the next unit.
Information to the teacher
In this topic, we dwell on the concept Answers for unit 7
of top-down approach in which a Assessment Exercise 7.1 (page 138)
large program is broken down into
1. A flowchart is a graphical
subprogram called functions, modules,
representation of an algorithm while
subprograms or procedures. Give the
a pseudocode is a set of structured
student a practical activity to find out
statements. For advantages and
terms used to implement read and write
disadvantages, the student are
functions.
advised to explore beyond content
Materials: Student book, calculator, provided in the student's book. She
web tutorial, and charts showing may use natural language, flowcharts
summary of read and write functions. or pseudocode.
Preparation 2. Standard symbols used in flowchart
This section has a lot of computations design are rounded rectangle (start/
required. Let the students prepare stop), diamond (decision), rectangle
well to make sure that they correctly (process), arrow (flow) and circle
convert decimal fraction to binary form. (off-line connector).
Sensitize them on the need to have 3. Decision symbol indicates that a
electronic calculators to simplify some condition has to be evaluated for an

116
alternative action to be performed write is used to display output on
while a connector indicates the standard console like computer
continuation of a flowchart to monitor.
another section or page.
4. Problem to calculate cost of
4. In simple programs that do not depositing 200,000 after n years.
require conditional logic; if the
program is large and modular; when BEGIN
communicating functionality of a PRINT Enter deposit
READ deposit
system with non-programmers.
PRINT Enter interest rate
5. The following are advantages of using
READ rate;
flowcharts over pseudocode: Amount = deposit x (1.03)n
PRINT Amount
• Flowcharts are better way of
END.
communicating the system logic
• With a flowchart, problem can be
analysed in a more effective way. Guideline to Activities
• Graphical representation of Activity 7.1: Natural Language
design serves as good program Algorithm (page 135)
documentation 1. This activity requires the learner to
• Flowchart makes it easier to debug outline the step-by-step procedure
and maintain a program for waking up and preparing for class
6. The registration process may be using natural language such as English
represented using natural language or Kinyarwanda.
or pseudcode to get member details.
2. This activity requires the learner to
Assessment Exercise 7.2 (page 147) outline the step-by-step procedure
1. Pseudocode for equation: y = ax2 + for preparing Ibiza or bugali using
bx + c: natural language such as English or
2. Algorithm for comparing x, y and z Kinyarwanda.
to return the lease: 3. This activity requires the learner to
BEGIN outline the step-by-step procedure
PRINT Enter Values for a,b and c
for a program that may be used
READ a, b, c;
PRINT Enter Value for x to calculate gross salary, net and
READ x deductions using natural language
y = ax2 + bx + c such as English or Kinyarwanda such
PRINT (x, y) coordinate as outlined below:
END.
Prompt for basic salary, house allowance
3. The read function is used to get commuter allowance and overtime
user input from keyboard while Calculate gloss salary

117
Calculate 15% PAYE and 2.5% medical are y, m and x while in the second
cover deductions expression, the variables are a, b and
Calculate net salary by deducting the x where a and b are coefficients of x.
PAYE and medical cover amounts 2. This activity requires the learner to
Display the gross salary, net pay and identify input variables => L and w,
deductions and output variable, i.e. Area and
perimeter.

Activity 7.2: Expressing Algorithm


using pseudocode (page 136) Activity 7.5: Definition of constants
(page 142)
This activity requires the learner to
create a pseudocode for calculating The learner is expected to identify c as
cumulative principal amount each year the constant in the first expressions.
for five years using the formula:
A = P x ( 1+rate/100)t Activity 7.6: Declaring constants
(page 143)

Activity 7.3: Expressing algorithm This activity is a self-guided activity


using flowcharts (page 138) that requires the learner to use search
engine to search for relevant content on
constants in C++.
1. This activity requires the learner
to clearly differentiate between
the pseudocode as structured Activity 7.7: Operators and
statements that resemble program expressions (page 143)
code and flowchart that uses This activity requires the learner to
graphical symbols. master the precedence rule in order to
2. This activity requires the learner outline the correct order of evaluating
to draw a flowchart for calculating the mathematical expression. In this
cumulative principal amount each case, the leaners need to note that
year for five years using the formula the evaluation starts with division and
in the process box: multiplication from followed by addition
and subtraction
A = P x( 1+8/100)t

Activity 7.8: Logical operators


Activity 7.4: Declaring variables
(page 144)
(page 141)
This activity requires the learner to
1. In the first expressions, the variables

118
appreciate importance of using logical BEGIN
operators to form complex conditional WRITE “Enter values for a, b, x and c”
logic as follows:
READ a, b, x, c
IF (alarm-sounds AND time> 18:00
Root1 = (-b + SQRT(b2- 4 x a x c)) / (2 x a)
AND day != holiday OR isweekend)
THEN Root2 = (-b + SQRT(b2- 4 x a x c)) / (2 x a)

Call the police. WRITE Root1, Root2

END

Activity 7.9: Bitwise operators


(page 144) 1. This activity requires the learner
1. This activity requires the learner to to write a read and write function
differentiate between logic operator in an algorithm that calculates loan
and bitwise operators in terms of repayment amount in four years’
values they operate. Logic operators time.
work on decimal numbers while BEGIN
bitwise operators work on binary
SET rate = 0.12
numbers bit-by-bit starting from lets
to right. WRITE “Enter loan amount and
repayment period”
2. The answers to the bitwise
operations on the table are: 1 and 1 READ loan, years
=>1; 1 and 0 =>0; 0 and 0 =>0; 1 or Amount= P x ( 1+rate)t
1 =>1; 1 or 0 =>1; 0 or 0 =>0.
WRITE amount

END
Activity 7.10: Read and write
functions (page 146) Unit Test 7 (page 147)
1. This activity requires the learner 1. Definition of terms
to use read and write function in
a) precedence rule -established rule
an algorithm that calculates roots
that assigns priority of each op-
of a quadratic equation. Below is a
erator used in an expression
sample pseudocode:
b) Variables - identifier that repre-
sents data values that changes
2. Flowchart for and displaying the
estimated consumption in km/litre.

119
Start Start

init-odo, curr-odo day =1

celc
fuel0, fuel1

day = day + 1
odo=curr-odo =init-odo
litres= fuel1-fuel0
cel= 32+cel *9/5
avg_temp = cel/day
fuel-eff= odo/litres
yes
day<=7?

Print fuel-eff no
cel, avg_temp
Stop
Stop

3. Flowchart for computing sum 5. Flowchart to calculate principal


and average of five numbers: . amount paid after 7 years
Start
Start

P =2000, year =0
n =1 rate = 20%

Number years(t)

n=n+1 P = A + Interest

sum= sum + n A = P x (1+rate)t


Avg = sum/n

yes yes
n<=5? t < 7?

no no
Sum, Avg cel, avg_temp

Stop Stop

4. Flowchart for reading temperature in


celsius and converting to fahrenheit:

120
Data Structures and Algorithms

Algorithms

Unit 8 Control Structures and One Dimensions Arrays

Student's Book page 148 – 170. (12 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
• Derive logic in algorithm which include control statements.
• Handle one dimensional array in algorithm.

Learning objectives Critical thinking: In most of the activities,


the student is challenged to apply
Knowledge and understanding
critical thinking to solve computational
• Identify and explain control statement
problems.
in algorithm
• Explain the use of one dimension Interpersonal management: In every
array data structure in algorithm. learning activity that requires group-
work or pair work in this unit, the student
Skills gets a chance to apply interpersonal and
• Able to use control statements in leadership skill.
algorithm.
Co-operation: In every learning activity
• Able to use one dimension array
that requires pairs or group work, the
data structure in algorithm.
student gets a chance to nature skill
Attitudes and values such as co-operation, collaboration and
• Appreciate use of control statements communication.
in writing an algorithm.
Science and technology: This unit
Generic competences exposes the learners to the inner
addressed in this unit working of computer programs. The
Numeracy: This unit highly emphasizes learner is expected to transfer these
on computing accuracy in computer skills to programming in C++.
programming.

121
Creativity and Innovation: This unit conditional statements, looping control
is critical to creativity and innovation structure and one dimensional arrays
because the computations used helps are required in solving a problem. Apart
the student explore various solutions to from activities and exercises provided
presented challenges. in the student book, the teacher should
Critical thinking: Throughout this topic, use other assessment methods and tools
we have emphasized on critical thinking to test whether the learner has acquired
in learning activities and assessment necessary knowledge, skills and attitude
exercises. in solving problems that require use of
control structures and one dimensional
Links to other subjects array.
Most of the concepts in this unit are
Suggested teaching
linked to mathematics. This is because
methodology
the learner is expected to apply
• Research
mathematics skills in designing control
• Question and answer
structures.
• Discussion
Cross cutting issues addressed in Background information
this unit
This unit builds on computer algorithms
Though this unit is largely mathematical, to equip the learner with knowledge
we have tried to use the following cross and skills on how to design algorithms
cutting issues: using condition logic implemented
1. Gender: In line with principles of using selection and looping control
gender equality, we have balance structures. To test the logic of each
use of male and female across the control structure illustrated in the
unit. Where such reference is not student’s book, we recommend use of
required, we have used neutral trace tables and programming languages.
phrases. Similar to approach used in the previous
2. Standardization culture: In activity unit, we make no reference to specific
7.12, we have addressed the issue programming language.
of equitable access to healthcare
through electronic means. Suggested teaching/learning
activities
3. Financial Education: This is indirectly
implied in activity 8.6 that keeps The teacher is expected to use
determines discount rate of an item. demonstrations, question and answer
method, group discussions and problem
Assessment criteria solving exercises that involve use of
The students should be able to control structures and algorithms.
reasonably derive logic where

122
logic into other number systems
Conditional Logic  Individually or in groups, let
the learners work practice on
(2 periods) formulating conditional logic from
This topic provides a more detailed real life cases.
discussion on conditional logic starting  It would be important to organize
with simple conditional logic then for remedial sessions to help the
progressing to complex. weak students. Then evaluate
each learner’s understanding of
Information to the teacher
the concepts presented before
The teacher should demonstrate how proceeding to the next unit.
to incorporate conditional logic in
design of flowchart and pesudocode. Control Structures
Let the learner research on internet
or relevant resource material on (2 periods)
how different programming languages This section contains an overview
implement conditional logic. As a class of three control structures namely;
or group activity, let the students sequence, selection and repetition
draw comparisons between simple and supported by most programming
compound statements. We encourage languages. The section also serves as a
the teacher to use brainstorming footprint to sections that demonstrate
sessions to guide . use of conditional logic in selection and
Materials: Computer, projector, chart looping structures.
showing sample conditional logic, tutorial
Information to the teacher
sites and other reference materials.
To widen the learner’s understanding of
Preparation various selection and iteration concepts,
Prior to introducing the topic, ensure we suggest that the teacher provide more
that you have dry run your algorithm activities and exercises to complement
using trace table to avoid logic errors. what is been provided at the end of every
You may also you create a sample unit. Where necessary, illustrations or
programs to demonstrate output of the practical demonstration should be used
algorithms. to help the learners understand difficult
concepts. Your approach should make
Teaching guidelines 8.1
the learner appreciate that; design,
 Through demonstration, take the
implementation and deployment of
student through examples and
most computer programs require use
activities and in the student book
of this combination of the three control
to help them understand how to
structures.
represent a compound conditional
123
Materials: Computer, projector, are instrumental in day-to-day’s
digital materials. You may also use wall problem solving.
charts depicting concept of selection and
iteration. Sequence control structure
Preparation (1 period)
Be prepared to handle weak students Because sequence is the most natural
who have poor background in way a computer executes a program,
mathematics because algorithm design this topic gives a brief overview of
requires creativity, critical thinking and sequence control structure using a
problem solving skills. You may need to pseudocode and a flowchart. Note that
give such student to more specialized in the student’s book, no more emphasis
attention using practical demonstrations is given to sequence because the main
and exercises. focus in this topic is on selection and
Teaching guidelines 8.2 looping controls.
 Organize the class into pairs or Information to teacher
groups. Sensitize them on the
Though this topic is not explicitly stated
importance of working in groups
in the content section of the syllabus,
and why each group should have a
it is important to expose the learner
group leader. Also ensure that each
group has a secretary to record and to the three control structures used
report the group’s findings. in structured programming. However,
 Ask the groups to carry out the the teacher should not give more on
activities related to the content sequence control because the main focus
during the period. Let the group is selection and looping controls.
leader give each member an Materials: Computer, projector, digital
opportunity to give description materials. You may also use wall charts
and solution to the problem as depicting how a computer executes
the secretary notes down the key selection statements.
points. Preparation
 The groups should present their
Prior to introducing the topic, ensure
solution to the problem in a class
that you have a computer programming
discussion through their secretaries.
language installed in the lab. Make sure
 Provide a precise summary from
you create and test sample programs
their presentation in order to
that demonstrate implementation of
help the learners understand that
selection and control structures sequence control structure.

124
Teaching guidelines 8.3 discussed.
 Capture the attention of the class Materials: Computer, projector, chart
by making them carry learning showing sample algorithm, tutorial sites
Activities 8.1 on page 150. and other reference materials.
 Through class exercises, make Preparation
sure each students participants in Prior to introducing the topic, ensure
converting a real life problem or that you have dry run your algorithm
routine to an algorithm. using trace table to avoid logic errors.
 After introducing the students to You may also you create a sample
the class activities, direct them programs to demonstrate output of the
algorithms.
to the previous unit in which all
the examples and activities are Teaching guidelines 8.4
implemented using sequence control  Through demonstration, take the
structure. student through examples and
activities and in the student book
Selection control structure to help the learners demonstrate
use of the four selection control
(2 periods) structures in algorithm design.
This topic provides a more detailed  Individually or in groups, let the
discussion of selection control structure learners work on activities 8.2 to
starting with IF conditional logic then 8.4 from page 153 to 157 in the
progressing to switch selection. student’s book.
 If you are not satisfied with the
Information to the teacher
student’s answers, it would be
The teacher should demonstrate how to
important to organize for practice
incorporate selection control structure
through remedial sessions to help
in design of flowchart, pesudocode and
the weak students. Then evaluate
decision table. Let the learner research
each learner’s understanding of
on internet or relevant resource material
the concepts presented before
on how different programming languages
proceeding to the next unit.
implement selection control structures.
As a class or group activity, let the
students draw comparisons between Looping Control Structure
nested selection and switch statements.
We encourage the teacher to use (4 periods)
brainstorming sessions to guide students This topic provides a more detailed
in identifying situations that demand use discussion of looping control structure
of the four selection control structures

125
starting with the FOR looping control 8.9 (pages 159-165) in the student’s
structure. book.
The teacher should demonstrate how  If you are not satisfied with the
to incorporate looping control structure student’s answers, it would be
in design of flowchart, pesudocode and important to organize for practice
decision table. Let the learner research through remedial sessions to help
on internet or relevant resource material the weak students. Then evaluate
on how different programming languages each learner’s understanding of
implement loop constructs. As a class the concepts presented before
or group activity, let the students draw proceeding to the next unit.
comparisons between while and do.. One dimensional arrays
while statements. We also encourage the
teacher to use brainstorming sessions to
(3 periods)
guide students in identifying situations
that demand use of the three looping This topic briefly introduces the learner
control structures. to one of the simplest complex data
structures known as one-dimensional
Materials: Computer, projector, chart array also known as linear list.
showing how iteration is implemented in
structured programming languages. Information to the teacher
Because this is the first time the learner
Preparation
is being introduced to complex data
This section has a lot of computations structure, use simple real life examples
required. Let the students prepare to explain how arrays store data in the
well to make sure that they perform memory. Because we find it to difficult to
correct octal to decimal computations. entirely discuss arrays without practical
Sensitize them on the need to have demonstration, we encourage the
electronic calculators to simplify some teacher to use a language such as Pascal
computations. to help the students clearly understand
Teaching guidelines 8.5 array concepts such as subscript,
 Through demonstration, take the elements declaration, and initialization.
student through examples and From our teaching experience, students
activities in the student book to find topic on arrays and other complex
help the learners demonstrate data types more challenging. This is why
understanding and use of the the teach should use practical examples
four looping control structures in such as chessboard to represent a two-
algorithm design. dimensional array also known as table or
 Individually or in groups, let the matrix
learners work on activities 8.5 to

126
Materials: Computer, projector, 2. Importance of the following control
chessboard, and chart showing how structures
arrays are stored in computer memory.
• If .. is used to execute statements
Preparation under true block if the Boolean
This section has a lot of mathematical return true
expressions. Let the students prepare • Nested if - used to test multiple
well to make sure that they write correct options e.g. in assigning grades
expressions. Before the period, prepare
• Switch case - used when this an
sample spreadsheet show sample
alternative to nested if used to test
expression in each type operator.
multiple conditions under case
Teaching guidelines 8.6 3. Three types looping control
 Through demonstration, take the structures are while, repeat..until
student through examples and and for loop.
activities in the student book to help
them understand how to represent 4. Algorithm for comparing x, y and z:
one-dimensional array in algorithm BEGIN
PRINT Enter x, y and z
design. READ x, y, z;
 Individually or in groups, let the IF x< y Then
IF x<z = Then;
learners work on activities 8.10 and least = x
8.11 on page 167 and 169 respectively. ELSE
least = z
 If you are not satisfied with the ELSE
IF y<z Then
student’s answers, it would be
least = y
important to organize for practice ELSE
through remedial sessions to help least = z
ENDIF
the weak students. Then evaluate PRINT least
each learner’s understanding of END.

the concepts presented before
proceeding to the next unit. 5. Selection control structure are if,
if..else, nested if and switch ..case
selection
Answers to Assessment Exercise 6. This requires nested if with the
Assessment Exercise 8.1 (page 166) outer testing the gender an the
1. Selection branches to an alternative inner nested if calculating tax payable
action if while iteration repeats based on gross monthly income.
existing statement for a finite number
of times

127
Assessment Exercise 8.2 (page 169)
BEGIN
1. The following is an array of 25 buses: PRINT Enter length of rectangle
• Scores : array[0..24] of integer; READ length;
PRINT Enter width of rectangle
2. Customer array READ width;
Customer : array[0..24] of integer area = length x width
Scores: Array [10] = { 64, 25, 69, 67, perimeter = 2x(length+width)
PRINT area, perimeter
80 85}
END.
(b)
BEGIN
2. The flowchart represents sequence
SET Scores=Array[10]of Integer
control structure because the
SET Initial_value=0, last_value = 9 statements from input to output
FOR Index=Initial_value TO last_ follows a sequential flow.
value DO
READ Scores[Index]; Activity 8.2: If ... else selection
Index = Index + 1 (page 153)
LOOP 1. This activity requires the learner
FOR Index=Initial TO limit DO to draw a flowchart that takes
READ Scores[Index]; two numbers as input and displays
Index:= Index + 1 the larger of the two as shown in
END FOR flowchart segment of Fig.8.1 below:
END. Read X, Y

3. Algorithm to convert a number


true
from one base system another. This X>Y
require use of integer division
false Larger is X
4. The array has only 5 but populated
Larger is Y
by 7 elements.
2. This activity requires the learner to
use a trace table to determine the
Guideline to Activities value of z as follows:
Activity 8.1 Sequential control
(a) If x= 20 and y=10, the
Fig.decision
8.1
structure (page 150)
returns true hence z=z+50 is executed
1. This activity requires the learner hence output 150.
to draw a flowchart or write
(b) If x= 19 and y=20, the decision
pseudocode that takes length and
returns false hence the output is 100.
width, then calculates area and
perimeter as shown by the following
pseudocode:
128
Activity 8.3: Nested If selection SET count = 0
(page 155) WHILE count <20 DO
This activity requires the learner to study BEEP alarm
the conditional logic used to compare
the three numbers and represent the Count = count+1
logic in as demonstrated by assessment END WHILE
exercise 8.4 question 4.
Activity 8.7: Repeat until loop
Activity 8.4: Switch/case (page 162)
selection (page 157)
This activity test the learner’s ability to
This activity requires the learner to draw replace for loop with a repeat until logic
a flowchart that takes two numbers as construct shown in pseudocode segment
input and displays grades based on score below:
obtained. The logic of this problem is
SET count = 0
similar to that demonstrated by Fig. 8.10
on page 156 of the student's book. REPEAT

Activity 8.5: For loop (page 159) PRINT “Enter student mark”

This activity requires the learner to use READ mark


for loop in an algorithm as shown in the total = total + mark
following segment of a pseudocode:
count = count + 1
FOR count = 0 TO 10 DO
UNTIL count >= 10
PRINT “Enter student mark”
Average = total/count
READ mark
Activity 8.8: Finite and infinite
total = total+mark loop (page 163)
END FOR This activity test the learner’s problem
Average = total/count solving ability from the case study
provided and be able to determine input,
Activity 8.6: While loop (page 160)
processing and output specifications
This activity test the learner’s ability before designing the algorithm.
to use of the while looping control in
Activity 8.9: Break and continue
a practical scenario. To control the
(page 165)
electric alarm, the following pseudocode
may be used to implement the beeping 1. This activity tests the learner’s ability
mechanism: to use the continue statements
in algorithm that tests whether a
number is prime. Refer the learners
online resources that would guide

129
the learner on determining whether a) While: pretests a condition to
a number is prime or not. repeatedly execute statements in
2. This activity tests the learner’s ability the loop zero or more times
to use either break and continue b) For: similar to while but mostly
statements in algorithm that tests used on in case the number of
whether a number is prime. Refer repetitions is known before
the learners to the student's book b) Repeat...until: a post-test a loop
on page 163 for demonstration on that repeatedly executes state-
how to use break and continue. ments in the loop at least.
Activity 8.10: One dimensional 3. The loop is infinite of condition for
array (page 167) terminating the loop is never met.
This activity test the learner’s ability to 4. One dimensional is a list while a
represent and declare one-dimensional matrix is a two-dimension array.
arrays:
5. The following are factors to consider:
1. a) Array name=>customer; data
type =>integer; elements => 6 • The name of the array - decide
on suitable array name that
b) Array name=>temperature; data
indicates several elements are to
type =>real; elements => 6
be stored e.g. scores.
2. Below is a sample declaration for
• Data type of contents should be
each of the two arrays:
of the same type - floating point,
customer: Array[6] of integer integer, characters, strings.
temperature: Array[6] of real • Know the size of the array
Activity 8.11: Array of integers beforehand -the size of an
(page 169) array determines the maximum
number of values that an array
3. This activity tests learner’s problem will hold.
solving ability in a practical scenario
• This problem test whether a
and represent responses as array
student has gained competence
of integer that may be declared as
in using array variable.
follows:
Unit Test 8 (page 170)
1. Switch case - used almost the same
as nested of when this an alternative
to nested if used to test multiple
2. Importance of while, for and repeat..
until:

130
PROGRAMMING

Procedural programming

Unit 9 Introduction to Computer Programming

Student's Book page 171 – 181. (6 Periods)

Key unit competence

By the end of this unit, the learner should be able to explain programming paradigms.

Learning objectives Generic competences


Knowledge and understanding addressed in this unit
• Classify different programming Critical thinking: In most of the activities,
language generations. the student is challenged to apply
• Outline different programming critical thinking to solve computational
language paradigms. problems.
• Point out features of good Interpersonal management: In every
programming languages. learning activity that requires group-
work or pair work in this unit, the student
Skills
gets a chance to apply interpersonal and
• Differentiate levels and characteristics
leadership skill.
of programming language.
• Classify programming languages Co-operation: In every learning activity
according to their generations. that requires pairs or group work, the
• Explain features of programming student gets a chance to nature skill
language paradigm. such as co-operation, collaboration and
• Outline characteristics of good communication.
programming language. Science and technology: This unit
exposes the learners to the inner
Attitudes and values
working of computer programs. The
• Understand different perspectives
learner is expected to transfer these
of programming techniques
skills to programming in C++.

131
Creativity and Innovation: This unit Assessment criteria
is critical to creativity and innovation The students should be able to
because the computations used helps understand different computer languages
the student explore various solutions to and programming paradigms. Apart from
presented challenges. activities and exercises provided in the
Critical thinking: Throughout this topic, student book, use other assessment
we have emphasized on critical thinking techniques and tools to test whether the
in learning activities and assessment learner has acquired basic knowledge,
exercises. skills basic in programming.

Links to other subjects Suggested teaching


Some of the concepts in this unit are methodology
linked to mathematics. This is because the • Guided discovery
learner is expected to apply knowledge • Research
and skills learned in number systems to • Question and answer
understand how a computer program is • Discussion
translated to binary code. • Role play

Cross cutting issues addressed in Background information


this unit Like mathematics, programming may
Though this unit is largely mathematical, be interesting to some students while
we have tried to use the following cross others may find it challenging depending
cutting issues: on the mode and timing of content
delivery. According to our judgement on
1. Gender: In line with principles of
sequencing of content, we strongly feel
gender equality, we have balance
that this topic seems to come late after
use of male and female across the
introducing other technical concepts like
unit. Where such reference is not
control structures, arrays and algorithm.
required, we have used neutral
Furthermore, it is not possible to discuss
phrases.
about data types and their type without
2. Standardization culture: In activity
reference to programming languages
9.1, we have brought in local
Therefore, we suggest that the topic
East African languages such as
be taught before introduction to high-
Kinyarwanda and Kiswahili against
level programming concepts covered in
foreign languages like Chinese,
unit 7 and 8. This will help in providing
English and French.
practical demonstration where students
3. Financial Education: This is indirectly find it difficult to grasp concepts such as
implied in assessment exercise 9.1 variable declaration and initialization.
on page 171 where we have attached
value to local and foreign languages.

132
Suggested teaching/ learning Materials: Computer, projector, digital
activities materials. You may also use wall charts
To introduce programming languages depicting how a program is compiled
and paradigms, the teacher is expected from source code to object code.
to use demonstrations, question and Preparation
answer method, group discussions Be prepared to handle weak students
and practical activities beyond those who have poor background in
provided in the student’s book. mathematics because programming
requires creativity, critical thinking and
Computer Programming
problem solving skills. You may need to
Concepts
give a weak learner to more specialized
(1 period) attention using demonstrations and
This gives an overview of basic practical exercises.
programming concepts starting with the
Teaching guidelines 9.1
term computer program to compilers and
 Organize the class into pairs or
interpreters. The section also serves as
groups. Sensitize them on the
a footprint to sections that demonstrate
use of create source code and translate importance of working in groups
it into an executable program logic. and why each group should have a
group leader. Also ensure that each
Information to the teacher group has a secretary to record and
There are fundamental concepts terms report the group’s findings.
used in programming that should be  Ask the groups to carry out Activity
clearly defined at this stage. For instance,
9.1 and 9.2 on pages 171 and 173
understand the difference between a
respectively. Let the group leader
source code and object code; software
accord each member an opportunity
and program; as well as compiler and
to give description and solution to
interpreter. Using brainstorming and
group works techniques let the students the problem as the secretary notes
have a clear understanding of how a down the key points.
program is compiled from source code to  The groups should present their
get an executable file with .exe extension solution to the problem in a class
in Windows operating system. It is also discussion through their secretaries.
important to use real life example to  Provide a precise summary from
demonstrate how linking between the their presentation in order to help
linker combine compiled source code the learners appreciate the role of
with library functions. programming solving in day-to-day’s
problems.

133
by making them carry our learning
History of programming Activity 9.3 on page 174 of the
Languages student's book.
 Through class exercises, make
(1 period) sure each students participants in
This topic gives an overview of how converting a real life problem or
computer programming languages have routine to an algorithm.
evolved over since the time of first  After introducing the students to
generation computers. Note that in the the class activities, refer them to
student’s book, more emphasis is given reliable online resources to explore
to high-level programming languages that on history of programming languages
are easy to learn and use. .

Information to teacher
High-level programming
To effectively deliver this topic, we languages
suggest that you first let the students
explore the historical perspective (2 periods)
associated with electronic computers
This topic provides a more detailed
and how they were programmed. This
discussion of high-level languages
will help the students appreciate how
classified into third, fourth and fifth
far technology has influence our modern
generation languages.
life in which mobile phone are better off
that the first generation computers. Information to the teacher
Materials: Computer, projector, digital Let the learner research on internet
content, internet connectivity. You or relevant resource material on
may also use wall charts to show how generations of computer language that
programming languages have evolved. marked departure from hardware
oriented low-level languages. Where
Preparation applicable, it is important to demonstrate
Prior to introducing the topic, ensure and guide students practically on how
that you have a computer programming to write a simple program like “hello
language installed in the lab. Make sure world” using one of the languages in
you create and test sample programs each category. This helps in exposing
that demonstrate implementation syntax the learner to various programming
of high-level programming languages. environments which you may require to
in the subsequent units.
Materials: Computer, projector, chart
Teaching guidelines 9.2
showing classifications of high-level
 Capture the attention of the class
languages.
134
Preparation that classifies procedural as functional,
Prior to introducing the topic, ensure we have corrected the anomaly by
placing procedural paradigm as form of
that you have sample program to easily
imperative programming. The teacher
distinguish high-level languages.
should clear the air on the differences
Teaching guidelines 9.3 between functions as used in languages
 Through demonstration, take the such as C and C++ with function
student through examples and paradigm. Furthermore, the student
exercises let the students carry out should be made aware that more than
research on how challenges of first one paradigm may be supported by a
and second generation languages programming language. Let the student
influences evolution of high-level also distinguish between concepts like
languages. procedural against object oriented
 Provide the learner with activities programming languages in terms of
that will help them understand paradigm they support.
syntax of programming languages
installed on computers in the lab. Materials: Computer, projector, digital
 If you are not satisfied with the content chart showing summary of
student’s answers, it would be programming paradigm.
important to organize for practice
Preparation
through remedial sessions to help
the weak students. Then evaluate This section has a lot of computations
each learner’s understanding of required. Let the students prepare
the concepts presented before well to make sure that they perform
proceeding to the next unit. correct octal to decimal computations.
Sensitize them on the need to have
electronic calculators to simplify some
Computer programming computations.
paradigms
Teaching guidelines 9.4
(4 periods)  Through demonstration, take the
student through examples and
This topic provides serves as an
activities in the student book to help
introduction to four main programming
them appreciate why the current
paradigm.
paradigm shift is toward object-
Information to the teacher oriented programming.
The teacher should use practical  Individually or in groups, let the
examples to demonstrate differences learners work on activities 9.4 on
in the four programming paradigm. page 178 to 9.6 on page 180.
Note that contrary to the syllabus  If you are not satisfied with the

135
student’s answers, it would be Answers for Unit 9
important to organize for practice
Assessment Exercise 9.1 (page
through remedial sessions to help
173)
the weak students. Then evaluate
each learner’s understanding of 1. Definition of terms:
the concepts presented before (a) Programming is the writing of
proceeding to the next unit. computer programs
(b) Source program refers to a pro-
Features of good gram that is not yet translated
programming language (c) object code refers to the program
code that is in machine readable
(1 period) form
This topic highlights some of the features 2. A compiler translates the entire source
of a good programming language. program into machine readable form
while an interpreter translates the
Information to teacher
source program to machine language
To effectively deliver this topic, we
line-by-line.
suggest that you first let the students
explore from reliable sources features 3. Software refers to program and its
of a good language. This will help the associated documentation while
students appreciate factors that influence program is a set of instructions
choice of a programming language in without documentation.
development of versatile Apps used on Assessment Exercise 9.2 (page 175)
computers and mobile devices.
1. Binary code are 0's and 1's,
Materials: Computer, projector, mnemonics are abbreviations and
internet. You may also use wall charts assemble converts a low-level
that summarizes features of a good assembly program to machine form.
programming languages.
2. First generation languages used
Teaching guidelines 9.5 machine code while second generation
 Through class discussion, take languages used mnemonics.
the student through some of the 3. Plugboard having switches for "on"
desirable features of a programming and "off" were used to electronically
language discussed in the student's program a computer.
book on page 179 and 180.
4. Advantages and disadvantages of low
 Individually or in groups, let the
level languages:
learners work on activity 9.7 and
exercise 9.4 on page 181.

136
Advantages programming tools for integrat-
ing programs with databases,
• Program written using low level
report generators and (GUI) ap-
languages requires small amount
plications
of memory space.
2. Evolution of programming languages:
• The processor executes them
faster because they require (a) First generation – machine
minimal or no translation. languages.
(b) Second generation – assembly
• Low level languages are stable
languages.
and hardly crash or break down
(c) Third generation – Pascal, C,
once written.
COBOL, BASIC, FOTRAN, Ada.
Disadvantages (d) Fourth generation – Visual Basic,
• Low level languages are difficult Delphi Pascal,Visual COBOL etc.
and cumbersome to use and (e) Fifth generation languages –
learn. PROLOG, Mercury, LISP, etc.
3. Advantages and disadvantages of high-
• They require highly trained
level languages:
experts both to develop and
maintain. Advantages
• Checking for errors (debugging) • High level languages are portable
low level programs is difficult and i.e. they are transferable from
time consuming. one computer to another.
• Low level programs are machine • High level languages are user
dependent hence not portable. friendly and easy to use and
learn.
5. Symbols on electric kettle:
• High level languages are more
(a) Sands for bits 1 and 0
flexible, hence they enhance the
(b) Computers only understand ma- creativity of the programmer
chine language hence every in- and increase productivity in the
struction must be converted to workplace.
0's and 1's. • A program in high level languages
Assessment Exercise 9.3 (page 176) is easier to debug.
1. Computer generations
(a) Third generation make it possible Disadvantages
to break down a program into
components known as proce- • Their nature encourages use of
dures or modules many instructions in a word or
statement hence the complexity
(b) Fourth generation have advanced

137
of these instructions cause Activity 9.2: Computer programming
slower program processing. (page 173)

• They have to be interpreted or This activity requires the learners to


compiled to binary form before brainstorm in groups the relationship
the computer can execute them. between mathematics and computer
science, especially programming. The
• They require large computer
teacher should moderate the discussion
memory to run.
in order to get the most appropriate
4. Students are expected to identify responses from the groups. For example,
languages such as Pascal, FORTRAN, some of the responses may be:
COBOL , ALGOL, C, and Ada.
• Many of the functions and operators
Assessment Exercise 9.4 (page 181) in all programing languages require
1. In OOP data and procedures are some knowledge in mathematics.
combined to form objects while • Computer sciences heavily rely on
logic program uses rules and facts to algorithms, which in turn heavily
produce desired output. relies on mathematics.
2. Dictates choice of language to be • Formal methods is mathematically
used in terms of readability, write- based technique for specification,
ability and resource utilization. verification and development of
3. F# supports functional programming software
paradigm. Let the learners appreciate the fact
4. To be able to advice on choosing the that a beginner in programming may
most appropriate language that can not need mathematics, but as he/she
be used to implement an algorithm: advances through the level of difficulty,
mathematics becomes important tool in
problem solving.
Guideline to Activities
Activity 9.3: Second generation
Activity 9.1: Computer programming programming languages (page 174)
concepts(page 171)
This activity requires the learners to
This activity requires the learner to use brainstorm in groups on assembly
background knowledge in linguistics languages used on second generation
to differentiate syntax from semantic. computers for example IBM7094 that
Syntax refers to set of rules that govern was programmed using Lisp, FORTRAN
the structure of sentences in a given and COBOL programming languages.
language while semantic is the meaning
attached to words or sentence.

138
Activity 9.4: Programming paradigms to provide clear classification of
(page 178) paradigms especially OOP and
procedure-oriented paradigms.
This activity requires the learners to
understand and explore further on 2. The second part of this activity
programming paradigms discussed in requires the learner to master some
the student book. One downloadable basic concepts of OOP such as classes,
reference book that give thorough inheritance and polymorphism (many
discussion of programming paradigms is forms). Let the learners distinguish
“Concepts of Programming Languages, between procedure-oriented and
10th edition”. The book is written by OOP programming paradigms.
Robert Sebesta and published by Pearson Activity 9.7: Qualities of a good
Education, Inc. program (page 181)
Activity 9.5: Logic programming This activity requires the learners to
(page 179) understand and explore further on
This activity requires the learners to qualities of good programming language
understand and explore further on discussed in the student book on page
logic programming paradigms discussed 179 and 180.
in the student book from page 176 to
179. More on Logic programming can is
Unit Test 9 (page 181)
available in chapter 16 of “Concepts of
Programming Languages, 10th edition”. 1. Program is set of instructions while
software includes documentation.
2. Effort to improve simplicity, efficiency
Activity 9.6: OOP Paradigm
and resource utilization.
(page 180)
3. Smalltalk, Java, C++, Delphi pascal,
1. This is an analytical problem that
Objective C, and C#.
requires the learners to understand
that OOP is not a distinct paradigm 4. In procedural programming, a
because it builds on imperative and program is broken down into
functional programming. To avoid procedures while in OOP, procedures
confusion or ambiguity, there need and data are encapsulated into an
to be correction on the syllabus object.

139
PROGRAMMING

Procedural Programming

Unit 10 Introduction to C++ Programming

Student's Book page 182 – 201. (12 Periods)

Key unit competence


By the end of this unit, the learner should be able to write and execute a given
algorithm using C++ Programming language.

Learning objectives • Write a sample C++ program and


run it
Knowledge and understanding
• Describe the evolution of C++ Attitudes and values
language. • Derive algorithm for a given problem
• Familiarize with C++ compiler and implement the solution logic
environment. into C++ programming language.
• Identify steps followed to write a • Read and interpret a simple C++
C++ program. program containing input/output
• Identify the use of input/output stream, variables and constants, and
streams in C++ program. provide the intended results.
• Differentiate different data types Generic competences
used in C++ program. addressed in this unit
• Differentiate variable and constant in Critical thinking: In most of the activities,
C++ program. the student is challenged to apply
• Recall steps to execute a program. critical thinking to solve computational
Skills problems.
• Apply the syntax of C++ language Interpersonal management: In every
while writing a C++ program. learning activity that requires group-
• Use cin and cout streams. work or pair work in this unit, the student
• Utilize variables and constants in gets a chance to apply interpersonal and
C++ program. leadership skill.

140
Co-operation: In every learning activity foreign languages like Chinese,
that requires pairs or group work, the English and French.
student gets a chance to nature skill 3. Financial Education: This is indirectly
such as co-operation, collaboration and implied in question number 12 of
communication. the Unit Test in which the student
Science and technology: This unit is expected to compute Malaika's
exposes the learners to the inner loan repayments to a commercial
working of computer programs. The banking.
learner is expected to transfer these Assessment criteria
skills to programming in C++. The learner should be able convert
Creativity and Innovation: This unit a given algorithm into C++ program
is critical to creativity and innovation and execute the program. Apart from
because the computations used helps activities and exercises provided in the
the student explore various solutions to student book, use other assessment
presented challenges. techniques and tools to assess whether
the learner has acquired knowledge and
Links to other subjects
skills C++ programming.
Most of the concepts in this unit are
linked to mathematics. This is because the Suggested teaching
learner is expected to apply knowledge methodology
and skills learned in mathematics like • Research
calculating area of a rectangle to write • Question and answer
C++ programs. • Discussion

Cross cutting issues addressed in Background information


this unit At this level, the learner is expected
Though this unit is largely mathematical, to be familiar with C++ programming
we have tried to use the following cross languages introduced in the previous
cutting issues: units. Having mastered basic concepts,
the learner may be introduced to C++
1. Gender: In line with principles of
environments using a simple example
gender equality, we have balance
such as “Hello World” program.
use of male and female across the
Though in our demonstration we have
unit. Where such reference is not
used DevC++ IDE, assist the learner in
required, we have used neutral
choosing their affordable C++ Integrated
phrases.
Development Environment (IDEs).
2. Standardization culture: In activity
9.1, we have brought in local Suggested teaching/learning
east African languages such as activities
Kinyarwanda and Kiswahili against

141
To introduce C++ programming language, Teaching guidelines 10.1
it is important to provide demonstrations  Organize the class into pairs or
and practical exercises to augment those groups. Sensitize them on the
provided in the student's book. importance of working in groups
and why each group should have a
Evolution and Features of C++
group leader. Also ensure that each
group has a secretary to record and
(1 periods) report the group’s findings.
This topic gives an overview of how  Ask the groups to carry out
C++ evolved from "C with classes" to assessment exercise 10.1 on page
standard C++. The section also serves as 184 in the student's book. Let the
footprint to sections that demonstrate group leader give each member
how to write C++ programs. an opportunity to give description
and solution to the problem as
Information to the teacher the secretary notes down the key
To effectively deliver this topic, we points.
suggest that students undertake activity  The groups should present their
10.1 in the student book. It is from this solution to the problem in a class
background information that you can discussion through their secretaries.
organize for brainstorming sessions to  Provide a precise summary from
help students have a clear understanding their presentation in order to
of C++ syntax. It is also important to use help the learners appreciate the
demonstration differentiate the syntax role of C++ language as a system
of the two languages in terms of input, programming tool.
processing and output functions.
Syntax of C++ Program
Materials: Computer, projector, C++
compiler, digital materials, internet
(2 periods)
connection. You may also use wall charts
depicting how evolution of C++. This topic introduces the learner to C++
syntax using globally accepted convention
Preparation of “Hello world”. Note that in the
Be prepared to handle weak students student’s book, use of namespace instead
who have poor background in of deprecated header file <iostream.h>
mathematics because programming or scope resolution operator.
requires creativity, critical thinking and
Information to teacher
problem solving skills. You may need to
give a weak learner to more specialized To effectively deliver this topic, we
attention using demonstrations and suggest that you first demonstrate
practical exercises.

142
to the learner how to write, compile
Compiling and Executing
and execute hello world program. It is
C++ Program
after this that you can give them more
practical exercises for them to appreciate
sensitivity of the compiler even on very
(2 periods)
minor syntax errors like punctuation or This topic provides step-by-step
use of uppercase on keywords. procedure for writing, compiling and
executing C++ programs.
Materials: Computer, projector, C++
compiler, digital materials, internet Information to the teacher
connection. Given that the learner may have no prior
knowledge on how compiler works,
Preparation
we suggest that you use simulation or
Prior to introducing the topic, ensure
video to illustrate how C++ compiler
that you have a computer programming
performs the preprocess-compile-link-
language installed in the lab. Make sure
build process. Let the students also
you create and test sample programs
realize that the process can also be seen
that demonstrate implementation syntax
on the status bar of most compilers.
of high-level programming languages.
Materials: Computer, projector, C++
Teaching guidelines 10.2 compiler, digital materials, internet.
 Capture the attention of the class
by making them carry out learning Preparation
Activity 10.1 on page 187. Prior to introducing the topic, ensure
 Through class exercises, make that you have sample program to easily
sure each students participants in distinguish high-level languages.
converting a real life problem or Teaching guidelines 10.3
routine to an algorithm.  Through practical exercises, give the
 After introducing the students to students more challenging activities
the class activities, direct them to augment activity 10.1 on page 187
to the previous unit in which all of the student’s book.
the examples and activities are  If you are not satisfied with the
implemented using sequence control student’s answers, it would be
structure. important to organize for practice
through remedial sessions to help
the weak students. Then evaluate
each learner’s understanding of
the concepts presented before
proceeding to the next unit.

143
student through examples and
Input and Output Streams
activities in the student book to help
them understand how to manipulate
(2 periods) inputstreams and output screams
This topic describes and demonstrate using C++ cin and cout objects
how C++ takes user input from keyboard  Individually or in groups, let the
though send the output to the console learners work on program examples
using the standard iostream.. provided in the student's book on
Information to the teacher page. Refer the students to activity
10.2 on page 189 in the student’s
The teacher should use practical
book.
examples to demonstrate differences
 If you are not satisfied with the
between various iostream object
student’s answers, it would be
and their member functions. Most
important to organize for practice
beginners confuse between the insertion through remedial sessions to help
operation and the extraction operator the weak students. Then evaluate
>>. Therefore, it is important that you each learner’s understanding of
give the learner more practical exercises the concepts presented before
to help differentiate the two operators. proceeding to the next unit.
Since he student should be made aware
that more than one paradigm may be
Variables and Data types
supported by a programming language.
Given that C++ is object oriented, let the
(2 periods)
student also understand the concepts
This topic serves as an introduction
relating to object-oriented: class, object,
to memory allocation in programming
function and member function.
context using variables.
Materials: Computer, projector, C++
compiler, digital materials, internet Information to the teacher
connection. To deliver this topic, we suggest that
teacher make use of teaching aids such
Preparation
as wall simulation or wall chart let the
Prior to introducing the topic, ensure
learner visualize how memory allocation
that you have a computer programming
is determined C++ compiler depending
language installed in the lab. Make sure
on data type. This is important because
you create and test sample programs
the student will appreciate why C++ is
that demonstrate use of iostream.
a system programming language used
Teaching guidelines 10.4 to develop operating systems. This
 Through demonstration, take the

144
approach is also very important because
Constants
students can use address of operator
(&) to display size of memory assigned
(2 periods)
to variables according to declared data
type. This topic serves as an introduction
to memory allocation in programming
Materials: Computer, projector, C++ context, but in this case to data that
compiler, digital materials, internet does not change.
connection.
Information to the teacher
Preparation
To deliver this topic, we suggest
Prior to introducing the topic, ensure that teacher provokes the learner to
that you have a computer programming explain the how constants are used
language installed in the lab. Make sure in mathematics and physics. This is
you create and test sample programs important because the student will
that demonstrate use of variables. appreciate how the C++ treats constant
Teaching guidelines 10.5 the same we understand it in the related
 Through demonstration, take the mathematics. It is from this activity you
student through examples and can use sample program to show that
activities in the student book to help constant do not change during program
them demonstrate skills in declaring execution,
and initializing variables using data Materials: Computer, projector, C++
types supported by C++. compiler, digital materials, internet
 Individually or in groups, let the connection.
learners work on activities 10.3 to
Preparation
10.7 (page 190-196) in the student’s
book. Prior to introducing the topic, ensure
 If you are not satisfied with the that you have a computer programming
student’s answers, it would be language installed in the lab. Make sure
important to organize for practice you create and test sample programs
through remedial sessions to help that demonstrate use of constants.
the weak students. Then evaluate Teaching guidelines 10.6
each learner’s understanding of  Through demonstration, take the
the concepts presented before student through examples and
proceeding to the next unit. activities in the student book to help
them understand how to convert a
binary number into other number
systems.

145
 Individually or in groups, let the required. Let the students prepare
learners work on activities 10.8 on well to make sure that they perform
page 197 in the student’s book. correct octal to decimal computations.
Sensitize them on the need to have
If you are not satisfied with the student’s
electronic calculators to simplify some
answers, it would be important to
computations.
organize for practice through remedial
sessions to help the weak students. Then Teaching guidelines 10.7
evaluate each learner’s understanding  Through demonstration, take the
of the concepts presented before student through examples and
proceeding to the next unit. activities in the student book to help
them format numeric and character/
Output Formatting string output.
 Individually or in groups, let the
(1 periods) learners work on activity 10.9 on
This topic introduces the student to page 201.
output formatting in C++ using library  If you are not satisfied with the
iostream and library manipulation student’s answers, it would be
functions. important to organize for practice
through remedial sessions to help
Information to the teacher the weak students. Then evaluate
The teacher should use practical each learner’s understanding of
examples to demonstrate how C++ uses the concepts presented before
iostream functions and the <iomanip> proceeding to the next unit.
library function to format numbers,
characters and strings. The teacher
should clear the air on the differences
Answers for Unit 10
between iostream formatting functions Assessment Exercise 10.1 (page 184)
and those accessed via iomanip interface. 1. Distinctions between C and C++ in
Give the student more practical exercise tsyntax, semantics, data types and
that also make use of escape sequence programming paradigms are provided
characters used to format literal strings in the student book on page 170-171.
and output.
2. C++ is largely a superset of C
Materials: Computer, projector, C++ because whatever you can do in C,
compiler, digital materials, internet you can do in C++ but not everything
connection. you do in C++ can be done in C.
Preparation 3. In 1980, Bjarne Stroustrup
This section has a lot of computations incorporated Smalltalk features into

146
C with classes. Later 1984, C with Assessment Exercise 10.3 (page 196)
classes was enhanced and renamed 1. char cities[30] ={"Kigali"}.
C++.
2. C++ program for computing
4. Because it supports imperative, hypotenude
OOP, and functional programming. #include <iostream>
Assessment Exercise 10.2 (page 187) #include <cmath>
1. Preprocessor and Linker int area, perimeter; //global variables
using namespace std;
(a) Preprocessor directives prepares
int main() {
the source code for compila-
int a, b;//local variables
tion by removing comments, and
double hypo;
white spaces
cout<< "Enter side A: ";
(b) Linker combines the object code
cin>>a;
compiled from your source code
cout<< "Enter side B : ";
with the code for the imported
cin>>b;
functions to produce an execut-
//calculate the area and preimeter
able file
hypo = sqrt((a*a) + (b*b));
2. Preprocess, compile, and link process //display hypotenuse
is well depicted in the student book cout<< "Hypotenuse is " << hypo<<
on page 174. endl;
3. C++ IDEs include GNU C++, Dev return 0;
C++, Microsoft Visual C++, CodeLite, }
NetBeans and Eclipse.. Assessment Exercise 10.4 (page 201)
4. Error in header file iostreams instead 1. Fixed format specifies maximum
of iostream, no main () function, number of digits to displayed while
illegal use of indirection operators. scientific specifier displays a number
5. Program that displays Rwanda is a in exponential form .
beautiful country: 2. Requires use of setw() and
#include <iostream> setprecision() as follows:
using namespace std;
• setprecision(2)<<fixed<<1234.56789;
int main(){
cout<<"Rwanda is Beautiful • setprecision(3)<<scientif
Country"; ic<<1234.56789
return 0; 3. Newline, backspace, audio, and tabs.
}

147
Guideline to Activities Activity 10.3: Variables (page 190)
Activity 10.1: Compiling and This is an analytical problem solving
executing C++ program (page 187) challenge that requires the learners
This activity requires the learners to to compare human mental retention
use skills gained in writing Hello World capacity and that of computer memory.
program to write a program similar to
the one shown below:
Activity 10.4: Rules of naming
#include <iostream>
variables (page 192)
using namespace std;
int main() {
This activity requires the learners to
understand and explore further on
cout<<"Programming in C++ is Fun"<<endl;
reserved words provided on page 190
return 0;
and 184 of the student’s book.
}

Activity 10.2: Input streams and


Activity 10.5: Data types (page 193)
output streams (page 189)
This activity requires the learners to
This activity requires the learners to
appreciate the importance of declaring
translate the pseudocode given on page
and using the correct data type to avoid
189 to a C++ program similar to the one
runtime error. Memory overflow means
shown below:
that the number entered cannot be
accommodated in the declared memory
#include <iostream> size. For example, you cannot enter
using namespace std; a double that requires 8 bytes into a
int main() { variable declared as char that reserves
int x, y, z, result; // declare 4 variables only 1 byte.
cout << "Please enter variable x:";// input
message
cin >> x; // read x from keyboard Activity 10.6: Declaration of
cout << "Please enter variable y:"; variables (page 194)
cin >> y; // read y from keyboard 1. This activity tests learner’s problem
cout << "Please enter variable z:"; solving ability to identify and replace
cin >> z; // read z from keyboard declaration of product with long or
result = x+2*(y-z); double to avoid memory overflow.
cout << "The result is:" << result << endl;
2. The second activity requires the
return 0;
learner to convert the algorithm on
} mental sums to a program shown
below:

148
#include <iostream> //assignment statements
using namespace std; area = 4 * PI * r * r;
int main () { volume = (4/3) * PI * r * r * r;
int sum,diff;
Activity 10.9: Formatted output
int x=5, y=2;
(page 201)
x = x+1;
sum = x+y;
This activity requires the learners to
create a program that calculates Body
diff = sum-4;
Mass Index (BMI) and display formatted
cout<<"Sum is:"<<sum<<endl;
body mass index (BMI). Below is a sample
cout<<"Difference is:"<<diff<<endl;
program the students are expected to
return 0;
provide:
} #include <iostream>
#include <iomanip>
using namespace std;
Activity 10.7: Initialization of
int main() {
variables (page 196)
double bmi, weight, height; // declare 4
1. This activity requires the learners variables
to use array of characters discussed cout << "Please enter weight in kgs:";// input
message
later in unit 14 to declare and use
strings. cin >> weight; // read x from keyboard
cout << "Please enter height in metres:";
2. This activity test the learner’s ability
cin >> height; // read y from keyboard
to transfer knowledge learnt in
bmi = weight/(height*height);
mathematics to write a the program
cout<<setprecision(3)<<fixed<<bmi;
that calculates hypotenuse using the
cout << "Your BMI is:" << bmi<< endl;
following expression:
return 0;
hypo = sqrt ((a*a) +(b*b)) }

Unit Test 10 (page 201)


Activity 10.8: Declaration of 1. Reserved words have a special
constants (page 198) meaning in a language and can only
This activity requires the learners to be used for intended purpose.
declare pi as constant in a program 2. C++ supports both procedural
that calculates area and volume of a programming and object-oriented.
sphere using the following declaration as
assignment statements: 3. In 1980, Bjarne Stroustrup
incorporated Smalltalk features into
//constant declaration
C with classes. Later 1984, C with
const double PI = 3.142

149
classes was enhanced and renamed 8. This requires the student to
to C++. understand the basic structure
4. Similarities between C and C++ demonstrated by hello world in the
in syntax, semantics, data types student book on page 183.
and programming paradigmscan be 9. program to calculate sum and mean
obtained from internet. of 3 numbers
#include <iostream>
5. In procedural programming, a
program is broken down into using namespace std;

procedures while in OOP, procedures int main() {


and data are encapsulated into an int a, b, c, sum;
object. double mean;
cout << "Enter 1st number:"; cin >> a;
6. Rules of choosing variable names
cout << "Enter 2nd number:"; cin >> b;
• Case sensitivity: identifier cout << "Enter 3rd number:"; cin >> c;
written in uppercase is not the sum = a + b+c;
same as that written in lowercase mean = sum/3;
letters.
cout << "Sum is:" << sum << endl;
• White spaces, punctuation marks cout << "Mean is:" << sum << endl;
or symbols cannot be part of an return 0;
identifier. }
• Only letters, digits and single 10. This program is similar to that of
underscore characters are valid; number 9 only that the student is
in no case they can begin with a expected to use format specifiers
numeric digit. like set(w), setprecision() and fixed.
• Variable identifiers must be with 11. This program requires use of
a letter. For example, “3houses” looping or variable for each day
is invalid. then calculates degrees in farenheit
• Identifiers cannot be a keyword using:
or reserved by a compiler’s for • farenheit = 32+(9*cel)/5
specific purpose.
12. This program require use of the
• Avoid meaningless identifiers formula:
such as J23qrsnf.
• amount=P*(1+0.08)3
7. Because keywords are reserved by
• P is the principal amount
a compiler for specific purpose and
while amount is calculated value
cannot be redefined.
of deposit after 3 years.

150
PROGRAMMING

Procedural Programming

Unit 11 Expressions and Operators in C++ Language

Student's Book page 202 – 219. (12 Periods)

Key unit competence


By the end of this unit, the learner should be able to apply expressions and operators
in C++ programming.

Learning objectives • Read and interpret a simple C++


program containing expressions and
Knowledge and understanding
operators, and provide the intended
• Use different operators in C++
results.
program.
• Understand use of operators in Generic competences
expressions and their precedence. addressed in this unit
Skills Numeracy: This unit highly emphasizes
• Utilize arithmetic, logic, assignment, on computing accuracy in four number
relational, CAST, conditional, systems. This include manipulating binary,
bitwise and comma operators in decimal, octal and hexadecimal numbers
C++ program. using arithmetic operators
• Apply precedence of operators in Critical thinking: In most of the activities,
C++ program. the student is challenged to apply critical
• Interpret an expression in C++ thinking to solve computational problems.
program.
Interpersonal management: In every
Attitudes and values learning activity that requires group-work
• Derive algorithm for a given problem or pair work in this unit, the student
and implement the solution logic
gets a chance to apply interpersonal and
into C++ programming language
leadership skill.
using operators and provide
intended result Co-operation: In every learning activity

151
that requires pairs or group work, the Suggested teaching
student gets a chance to nature skill methodology
such as co-operation, collaboration and • Guided discovery
communication. • Research
Creativity and Innovation: This unit • Question and answer
is critical to creativity and innovation • Discussion
because the computations used helps Background information
the student explore various solutions to
Though the learner may have used
presented challenges.
mathematical operators in C++
Links to other subjects programs, this topic is aimed at detailed
This topic is highly linked to mathematics. discussion of types of operators used to
This is because the learner is expected write valid C++ expressions. Note that
to apply knowledge and skills learned we have deliberately rephrased the title
in mathematics to write correct to operators and expression different
expressions in C++. from the way it appears on the syllabus.
This is because we strongly feel the
Cross cutting issues addressed in learner should understand functions of
this unit an operator before writing expression.
Though this unit is largely mathematical, It is important to refer the student back
we have tried to use the following cross to the unit on introduction to algorithms
cutting issues: where operators and expressions were
1. Gender: In line with principles of introduced.
gender equality, we have balance
Suggested teaching/ learning
use of male and female across the
unit. Where such reference is not
activities
required, we have used neutral To introduce C++ operators and
phrases. expressions, use discovery methods,
2. Financial Education: This is indirectly group discussion and practical exercises
implied in activity 11.1 on page 214 in the computer lab.
(3) in which we have used a program
that computes amount used in Expressions and operations
purchasing goods and services.
Assessment criteria (2 periods)
The learner should be able to apply This topic defines and gives a brief
operators in C++ language in the overview of operators and expressions
correct place and in proper order to get in mathematics and computer science
intended results. context. The section also serves as
footprint to the other two sections that

152
covering operators, and expressions in Teaching guidelines 11.1
details.  Organize the class into pairs or
groups. Sensitize them on the
Information to the teacher
importance of working in groups
This unit introduces the learner to
and why each group should have a
operators and expressions from
mathematics point of view using group leader. Also ensure that each
arithmetic operators. This is important group has a secretary to record and
because students will be able to relate report the group’s findings.
operators used in C++ with those  Ask the groups to carry out research
used in mathematics. Curious students activities to familiarize themselves
may ask why multiplication and division with types of operators supported
symbols are not similar to those used by C++. Let the group leader give
in mathematics. In such a case let the each member an opportunity to
student the Apart from appreciating give description and solution to
various number base systems; draw the the problem as the secretary notes
attention of the students to standard down the key points.
ASCII characters supported by C++.
 The groups should present their
For example, using x for multiplication is
solution to the problem in a class
interpreted as letter x by C++ compiler.
discussion through their secretaries.
effort to connect such numbers to real
world of mathematics and physics. This  Provide a precise summary from
their presentation to help the
Materials: Computer, projector, C++
learners appreciate importance
compiler, digital materials, internet
of mathematics in computer
connection. You may also use wall charts
to classify operators and expressions. programming.

Preparation Classification of C++


Be prepared to handle weak students Operators
who have poor background in
mathematics because programming (5 periods)
requires creativity, critical thinking and This topic delves into detailed discussion
problem solving skills. You may need to of operators supported in C++ starting
give a weak learner to more specialized with familiar arithmetic operators.
attention using demonstrations and
practical exercises. Information to teacher
In this topic, we demonstrate how
to categorize and use operators
supported by C++. We point out that

153
C++ designer choose to use special the examples and activities are
symbols to represent operators because implemented using sequence control
this symbols are available on standard structure.
keyboard. However, it is important
to causation the student on illegal use Classification of C++
of these characters because this may Expressions
violate memory integrity. Use practical
examples when covering each category
(5 periods)
of operators discussed in the student’s In this topic, we demonstrate how to
book. Using practical exercises let the categorize and write expressions in
C++ programs. Note that in the student
students distinguish between unary
book, we classify expression according
operators and binary operators.
to number of operands, and side-effect
Materials: Computer, projector, C++ produced by the expression. By side-
compiler, digital materials, internet effect we mean that the expression can
connection. change (mutate) the state of the target
cell address. However, it is important to
Preparation
use more practical exercises to help the
Prior to introducing the topic, ensure learner easily understand how to write
that you have a computer programming an equation that returns desired results.
language installed in the lab. Make sure
Materials: Computer, projector, C++
you create and test sample programs compiler, digital materials, internet
that demonstrate use of unary and connection.
binary operators.
Preparation
Teaching guidelines 11.2 Prior to introducing the topic, ensure
 Capture the attention of the class that you have a computer programming
by making them carry out learning language installed in the lab. Make sure
Activities 11.1 to 11.7 from page 205 you create and test sample programs
to 211. that demonstrate use of unary and
binary operators.
 Through class exercises, make sure
each students participants classifying Teaching guidelines 11.3
and demonstrating use of various  Through practical exercises, give the
arithmetic operators. learner more challenging problems
to supplement that provided in
 After introducing the students to
activity 11.8 on page 217.
the class activities, direct them
 If you are not satisfied with the
to the previous unit in which all student’s answers, it would be

154
important to organize for practice (c) AND=10000010, OR =11111011
through remedial sessions to help 7. Arithmetic operators have higher
the weak students. Then evaluate precedence that relational operators
each learner’s understanding of
the concepts presented before Assessment Exercise 11.2 (page 217)
proceeding to the next unit. 1. Statement is more than expression
consisting of comments, input, output
and expressions while expression
Answers for Unit 11 is a combination of operands and
Assessment Exercise 11.1 (page 214) operators
1. Definition of terms: 2. Unary operator like ++x takes only
(a) Expression refers to a sequence one operand while binary operator
of operators and operands that works on two operands like x+y
specifies relational or mathemati- 3. The output is 35 for product, and 4
cal computation (bytes) returned by sizeof() operator
(b) Operand is numeric value manip-
ulated by an operator
(c) Operator is a symbol that in-
Guideline to Activities
structs a compiler to evaluate an Activity 11.1: Precedence rule
expressions (page 205)
2. Prefix operator is a unary that 1. This activity requires the learners
evaluates the operand on its right to use precedence rule in arithmetic
while a postfix evaluates an operand expressions that returns the value of
on its left. x as: 786
3. Categories of operators include 2. If the precedence rule is not applied,
arithmetic, assignment, relational, the value of x would be different
logical, bitwise and compound from 786. Assuming evaluation starts
operators from left to right, the value returned
4. To make C++ more efficient and would be something like 278.333.
universally acceptable 3. This activity requires the learner to
5. The statement implies that the value identify the assignment statement:
of x is stored in main hence replacing amount = quantity*price;
y with 8
4. The assignment statement expected
6. y = a*(x*x*x) + b*x +7; is:
(a) AND=1110011, OR =1111111 a*( x * x) + b * x + c;
(b) AND=10000, OR =111011

155
Activity 11.2: Assignment operator Activity 11.6: Bitwise operators
(page 205) (page 210)

This activity requires the learner to p&q p|q p^q


determine output produced after 0 0 0
replacing variables a and b with 12 and 15
respectively. This should produce a=>15; 0 1 1
b=> 5; c => 25. 1 1 0
0 1 1
Activity 11.3: Increment and
decrement operators (page 207) Activity 11.7: Conditional operators
This activity tests learner’s ability to (page 211)
use C++ increment and decrement. This activity tests learner’s ability to
This should produce orange++ =>16; determine the outcome of selection
banana++ =>365; isombe++ => 14; based on the following conditional logic.
clients++ =>4.
• 7= =5?4:3 =>3
• 7>=5+2?4:3 =>4 ;
Activity 11.4: Relational operator
(page 208) • 5>3?a:b =>a;

This activity tests learner’s ability to • a>b?a:b =>b;


determine the outcome of Boolean
expression. The expected answers for
Activity 11.8: Expressions and
each conditional logic is a follows: (x=
operators (page 217)
=y) =>0; (x>y) =>1; (x != y) =>0; (x<y)
=>0;. 1. This is an exploratory activity that
requires the learner to identify
different meaning (semantics) of the
Activity 11.5: Logical operators + and – symbol => binary operator,
(page 209) unary operator, increment/
This activity tests learner’s ability to decrement operator.
determine the outcome of Boolean 2. Binary expressions have two
expression. The expected answer for operands and manipulated by an
statement logic is as follows: operator between them while
• (x< =35) && (z==24) =>0 ternary expression takes three
operands and two operators (?:).
• (x= =35) || (y<10)=>1;
• (x>y) && (y<z)=>1;

156
Unit Test 11 (page 218) 4. Inclusive OR check if two conditions
1. Definition of terms: are both true or either must be true
(a) Operator precedence is priority for the return to be true. Exclusive
assigned to each operator. OR means that one of the two
(b) Self-assigned operators have conditions must be true and the
uniquely way of combining arith- other false
metic and assignment operators 5. The sizeof() returns memory size
2. Prefix operator is a unary that allocated to a variable in bytes e.g. 4,
evaluates the operand on its right while & returns actual address.
while a postfix evaluates an operand 6. Requires understanding of ASCII
on its left. character set e.g. 97 for lowercase a
3. Makes C++ more universal, efficient, and 65 for uppercase A
and easier to learn 7. See operator precedence summary
on page 212 in the student's book.

8. #include<iostream>
using namespace std;
int main(){
const double pi = 3.141596;
double radius, volume, area = 0.0;
cout << "Please enter the radius of sphere" << endl;
cin >> radius;
volume = ((4.0 / 3.0) * pi * radius*radius*radius);
area = 4.0 * pi * radius*radius;
cout << "The volume area is: "<< volume << endl;
cout << "The surface area is: "<< area << endl;
return 0;
}
9. #include <iostream>
#include <cmath> //for using power and root functions
using namespace std;
int main() {
double a =2, b=6, c=4;
double root1, root2, discriminant;
discriminant = (pow(b,2) - 4*a*c);

157
root1 = (((-b) + sqrt(discriminant))/(2*a));
root2 = (((-b) - sqrt(discriminant))/(2*a));
if (discriminant == 0) {
cout <<"The equation has same roots."<<root1<<" "<<endl;
}
else if (discriminant > 0) {
cout<<"The discriminant is " <<discriminant<<endl;
cout<<"The two roots are:"<< root1<<" "<<root2<<endl;
}
else {
cout <<"The equation has complex roots."<<endl;
}
return 0;
}

10.

11. The errors to be corrected are: declaration of num1 and numb2 to double or
float, replace >> with << in the first, third and fifth cout statements, decaration of
dec2, replace \ with division operator / in the last two cout statement, replace end
with endl, and insert return 0 before ending main. Below is the corrected code:
#include <iostream>
using namespace std;
int main() {
int dec1 = 2, dec2 = 4;
double num1 = 2.5, num2 = 5.0;
cout << dec1 << “ + “ << dec2 << “ = “ << dec1+dec2<<endl;
cout << num1 << “ + “ << num2 << “ = “ << num1+num2 << endl;
cout << dec1 << “ - “ << dec2 << “ = “ << dec1-dec2<<endl;
cout << num1 << “ - “ << num2 << “ = “ << num1-num2 << endl;
cout << dec1 << “ / “ << dec2 << “ = “ << dec1/dec2<<endl;
cout << num1 << “ / “ << num2 << “ = “ << num1/num2 << endl;
return 0;
} //end main

158
Programming

Procedural Programming

Unit 12 Control Statements in C++

Student's Book page 220 – 242 (16 Periods)

Key unit competence


By the end of this unit, the learner should be able to use control statements in C++
program to implement branching and iterations.

Learning objectives on computing accuracy in computer


programming.
Knowledge and understanding
Describe various control statements Critical thinking: In most of the activities,
used to implement conditions and the student is challenged to apply
iterations in C++ program. critical thinking to solve computational
problems.
Skills
Interpersonal management: In every
Apply control statements in C++
learning activity that requires group-
program.
work or pair work in this unit, the student
Attitudes and values gets a chance to apply interpersonal and
Derive algorithm for a given problem and leadership skill.
implement the solution logic into C++ Co-operation: In every learning activity
programming language using operators that requires pairs or group work, the
in correct place and in correct order. student gets a chance to nature skill
Read and interpret a simple C++ program such as co-operation, collaboration and
containing conditional branching and communication.
looping statements, and provide the Science and technology: This unit
intended results. exposes the learners to the inner
Generic competences working of computer programs. The
addressed in this unit learner is expected to transfer these
skills to programming in C++.
Numeracy: This unit highly emphasizes

159
Creativity and Innovation: This unit Assessment criteria
is critical to creativity and innovation The students should be able to use
because the computations used helps control statements in C++ program
the student explore various solutions to to effectively implement conditional
presented challenges. branching and iterations. Apart from
Genocide studies: This unit addresses activities and exercises provided in the
this emotive issue by providing a student book, the teacher should use
selection structure that uses looping other assessment methods and tools to
control statement to display “Genocide test whether the learner has acquired
Never!” five times on the screen. necessary knowledge, skills and attitude
in solving problems that require use of
Links to other subjects control statements in C++.
Most of the concepts in this unit are
linked to mathematics, more specifically Suggested teaching
arithmetic and Boolean algebra. This is methodology
because the learner is expected to apply Guided discovery
arithmetic and algebraic skills in designing Research
control statements. Question and answer
Discussion
Cross cutting issues addressed in
this unit Background information
Though this unit is largely mathematical, This unit builds on computer algorithms
we have tried to use the following cross to equip the learner with knowledge
cutting issues: and skills on how to design algorithms
using condition logic implemented
1. Gender: In line with principles of
using selection and looping control
gender equality, we have balance
structures. To test the logic of each
use of male and female across the
control structure illustrated in the
unit. Where such reference is not
student’s book, we recommend use of
required, we have used neutral
trace tables and programming languages.
phrases.
Similar to approach used in the previous
2. Standardization culture: In this unit, we make no reference to specific
unit, we have addressed the issue programming language.
of standardization through use of
standard C++ language library. Suggested teaching/learning
3. Financial Education: several activities activities
and assessment questions have The teacher is expected to use
been used to demonstrate prudent demonstrations, group discussions and
financial management. practical programming to implement
control structure earlier discussed in

160
unit 8 using C++ programming
Sequence Controllanguage. and why each group should have a
Structure group leader. Also ensure that each
group has a secretary to record and
report the group’s findings.
(2 periods)  Ask the groups to carry out Activity
This section contains an overview 12.1 ion page 221 in the student’s
sequence control. The section also book. Let the group leader give
serves as a footprint to sections that
each member an opportunity to
demonstrate use of conditional logic
give description and solution to
in selection and looping statements
discussed later. the problem as the secretary notes
down the key points.
Information to the teacher  The groups should demonstrate to
To widen the learner’s understanding of the problem in a practical session.
sequential control structure, we suggest
 Provide summary from practical
that the teacher provide more activities
work in order to help the learners
and exercises to complement what is
understand that how sequential
provided in the student’s book. Where
necessary, practical demonstration execution is performed in computer
should be used to help the learners programs.
understand difficult concepts. Your
approach should make the learner
Selection Statements in C++
appreciate design of sequential algorithms
covered in unit 7.
(2 periods)
Materials: Computer, projector, C++ This topic provides a more detailed
compiler and digital materials. You may discussion of selection control
also use wall charts depicting sequential statements starting with if construct,
control structure. the proceeding to if...else, nested if, and
Preparation switch.
Be prepared to handle weak students who Information to the teacher
have poor background in mathematics The teacher should demonstrate how to
because use of control statements implement selection control statements
requires creativity, critical thinking and using C++ examples. As a class or group
problem solving skills. activity, let the students compare nested
Teaching guidelines 12.1 if selection and switch statements.
 Organize the class into pairs or We encourage the teacher to use
groups. Sensitize them on the brainstorming sessions to guide students
importance of working in groups in identifying situations that demand use

161
of each of the four selection statements in C++. C++ programs. Let the learner research
Materials: Computer, projector, C++ on internet or relevant resource material
compiler, and chart showing general to clearly compare the behaviour of
syntax of selection statements. the while, do...while and nested loops.
We also encourage the teacher to use
Preparation brainstorming sessions to guide students
Ensure that you have tested and in identifying situations that demand
debugged sample programs you intend use of the looping, break and continue
to use in class to demonstrate various statements.
selection options. Materials: Computer, projector, C++
Teaching guidelines 12.2 compiler, and chart showing general
 Through demonstration, take the syntax of looping statements.
student through examples and Preparation
activities and in the student book This section has a lot of computations
to help them demonstrate use of required. Let the students prepare
selection control statements in C++. well to make sure that they perform
 Individually or in groups, let the correct octal to decimal computations.
learners work on activities 12.2 to Sensitize them on the need to have
12.5 from page 223 to 228 in the electronic calculators to simplify some
student’s book. computations.
 If you are not satisfied with the Teaching guidelines 12.3
student’s answers, it would be  Through demonstration, take the
important to organize for practice student through examples and
through remedial sessions to help activities in the student book to help
the weak students. Then evaluate them understand and use the four
each learner’s understanding of looping controls in C++ programs.
the concepts presented before  Individually or in groups, let the
proceeding to the next unit. learners work on activities 12.6 on
page 228 and 12.7 on page 238.
 If you are not satisfied with the
Looping Statements in
student’s answers, it would be
C++
important to organize for practice
(4 periods) through remedial sessions to help
the weak students. Then evaluate
This topic provides detailed discussion
each learner’s understanding of
of looping statements starting with
the concepts presented before
for loop. The teacher should then
proceeding to the next unit.
demonstrate how to implement loops in

162
Answers for unit 12 zero times while do..while is post-
test hence it executes statements at
Assessment Exercise 12.1 (page 228)
least once.
1. Selection refers to a situation where
further program execution depend 4. Saves coding time, more clear, saves
one making a decision from two more compile time.
alternatives. 5. This questions require students to
2. Four selection control structures are: use the following formats:
if, if..else, nested if and switch.
do {
3. Nested if is used to test multiple
options e.g. in assigning grades same statements;
as switch selection } while(condition);
4. When more than one alternatives id
to be selected, a decision has to be for(i n it ia l;c o n d it io n;
made based on conditional logic step){
5. simplicity, available options, data type statements;
}
#include <iostream>
using namespace std; The student should be able to step in a
int main() { for loop such as shown below:
int score; #include <iostream>
cout << "Enter mean score:"; using namespace std;
cin>>score; int main () {
if (score>= 50) { for (int count=1; count<=200;
count=count+2 ) {
cout<<"Pass\n";
cout << count << " , ";
}
return 0; }
} return 0;
}

Assessment Exercise 12.2 (page 237) Assessment Exercise 12.3 (page 241)
1. Looping refers to repeated execution 1. Jumps supported by C++ are goto,
of a statement until a certain exit(), continue, an break jumps.
condition is fulfilled while selection 2. Indiscriminate use of the statement
refers to taking alternative action. can be a source of program bugs that
may be hard to detect and debug
2. Looping controls in C++ are while,
3. Break exits from the loop or selection
for and do..while
while control cause the program to
3. While is a pre-test loop that executes skip the next statements if the codition
statement within the loop at least returns true.
4. Exit() is a function that terminates a
163
program prematurely int main() {
5. Exit can be used to exit from a loop int x,y;
or program. double result;
6. See Student's Book on page 217 and cout << "Enter two numbers x:";
218 programs that demonstrates use cin >> x;
of continue and goto jumps. cout << "Enter two numbers y:";
cin >> y;
Guideline to Activities if (y==0) {

Activity 12.1: Sequence Control cout << "Error: Division by zero";

Structure (page 221) } //end if


else {
This activity requires the learners to
result = (double)x/y;
demonstrate understanding of sequence
cout << "Result of x/y is: "<<result<<endl;
structure by writing a program swaps
} //end else
three numbers. Refer the leaner to
return 0;
sample program on pages 218 to 219 that
demonstrates how to swap user input. } //end main

Activity 12.2: if selection statement Activity 12.4: Nested if selection


(page 223) statement (page 226)
Below is a sample program the leaner This activity test the learner’s ability
is expected to provide to write to to use of nested if selection in a real
demonstrate understanding of if life scenario. Assist the student apply
selection. Refer the leaner to sample the concepts learnt in the example on
program on pages 220 that demonstrates assigning grade but they may have to use
the if selection. string type (string object) and initialize
medal to nil. The following is a program
that assign medals to athletes:
Activity 12.3: if ... else selection #include <iostream>
statement (page 224)
using namespace std;
This activity requires the learners to int main() {
translate the pseudocode given on page int position;
222 to a C++ program that implements string medal= "Nil";
if..else selection similar to the program cout << "Enter the runner's position:";
shown below: cin>>position;
if (position >0) { //ensure user input is non-
zero
#include <iostream>
if (position == 1) {
using namespace std;

164
medal="Gold"; int main () {
} int count=1, sum=0, number;
else if (position == 2) { double average;
medal= "silver"; while (count <=5) {
} cout << "Enter a number:";
else if (position == 3) { cin >> number;
medal = "bronze"; sum = sum+number;
} count++;
else { } //end while loop
medal = "Thanks for your participation"; average = (double)sum/count;
} cout<<setprecision(2)<<fixed<<average<<e
ndl;
} //end outer if
cout<<"The sum is: "<<sum <<endl;
else { //trap a non-zero user input
cout<<"The average is: "<<average <<endl;
cout<<"Position must be 1 and above\n";
return 0;
}cout << "Medal award is:"<< medal<<endl;
}
return 0;
} Activity 12.7: Looping control
statements (page 238)
This activity test the learner’s ability
Activity 12.5: Switch selection
to use for loop and break statements.
statement (page 228)
The following is a sample program
This activity test the learner’s ability to implemented using for loop within which
use of the nested if selection in a real is the if selection that causes a break if
life scenario. You may have to assist the the number is zero and below:
learners in replacing the segment of the #include <iostream>
inner if..else..if demonstrated in Activity #include <iomanip>
12.4 on page above. using namespace std;
int main(){
int number, sum=0, count=0;
Activity 12.6: Looping control
double average;
structure (page 228)
while (count <20) {
This activity test the learner’s ability
cout << "Enter a number:";
to use of looping control statements
cin >> number;
in a real life scenario. The following is a
if (number >0) {
sample program:
sum = sum+number;
#include <iostream>
count++;
#include <iomanip>
} //end if
using namespace std;

165
else { cout<<" ";
cout <<"loop exits at:"<<count<<endl; } //end inner for loop
break; while(k!=2*i-1){
} //end else cout<<"* ";
} //end while k++;
average = (double)sum/count; } //end while loop
cout<<setprecision(2)<<fixed<<average<< k=0;
endl;
cout<<"\n"; //line breaks
cout<<"Cummulative total: "<<sum <<endl;
} //end outer for loop
cout<<"Average: "<<average <<endl;
return 0;
return 0;
} //end main
}
Activity 12.8: Break, continue and
exit() (page 241) Unit Test 12 (page 241)
1. The first activity test the learner’s 1. If does not provide alternative for
ability to use for loop and break force while if---else does.
statements as demonstrated in 2. Nested for and do..while structures
activity 12.7. a) Nested for- provide a nested
2. The second activity test the loop for for, while or do..while.
learner’s ability to use for loop, b) do..while provide an example of
break and continue statements post-test besides those provided
as demonstrated in activity 12.7. in the student book
However, in this case, the student 3. Requires initializing count to 50 and
should trap entries above 100 using decrement the count by 1 as follows:
continue to allow the next iteration
count = 50;
to be executed.
while(count>=50){
3. The third activity test the learner’s cout<< count<< " , ";
ability to use loop, exit and output count--
as demonstrated in the following }
program:
4. The program require use of nested if
#include <iostream>
or switch selection control statements
using namespace std;
5. Requires use of control statement to
int main(){
accept n as input, increment sum that
int i,j,rows,k=0;
in initially assigned to zero as follows:
cout<<"Enter number of rows: ";
cin>>rows;
#include <iostream>
using namespace std;
for(i=1;i<=rows;i++) { //rows int main() {
int count =0, maxcount, number;
for(j=1;j<=rows-i;j++) { //cols

166
double average; int sum =0; 7. Require use of the following expression
cout<<"How many numbers";
cin>>maxcount; to computer interest:
while (count<maxcount){ amount = principal * (1.08)t
cout<<"Enter a number"; 8. Require use of the following expression
cin>>number;
sum=sum+number; to computer interest:
count++; amount = principal * (1.12)t
}
average=(double)sum/count; 9. Should be avoided or limited to use in
cout<<"Sum "<<sum<<endl; sequential programs when absolutely
cout<<"Average "<<average<<endl;
} necessary.

6. Requires use of the following


expression to convert celcius to
degrees
fahrenheit = 32+ (9*celcius)/5

10.

167
Programming

Procedural Programming

Unit 13 Functions in C++ Programming

Student's Book page 243– 261. (14 Periods)

Key unit competence


By the end of this unit, the learner should be able to define and use functions in
C++ program.

Learning objectives Generic competences


Knowledge and understanding addressed in this unit
• Describe dif ferent predef ined Numeracy: This unit highly emphasizes
functions in C++ programming on computing accuracy in computer
language. programming.
• Describe the steps of using functions Critical thinking: In most of the activities,
in C++ program. the student is challenged to apply
Skills critical thinking to solve computational
• Define a function in C++ language problems.
• Declare a function in C++ language Interpersonal management: In every
• Call a function in C++ language learning activity that requires group-
Attitudes and values work or pair work in this unit, the student
• Appreciate the importance of gets a chance to apply interpersonal and
functions for reusability and modular leadership skill.
design. Co-operation: In every learning activity
• Solve a given algorithm and apply that requires pairs or group work, the
the solution into C++ programming student gets a chance to nature skill
language using function. such as co-operation, collaboration and
• Read and interpret a simple C++ communication.
program containing function and
Science and technology: This unit
provide intended result.

168
exposes the learners to the inner to test whether the learner has acquired
working of computer programs. The necessary knowledge, skills and attitude
learner is expected to transfer these in solving problems that require use of
skills to programming in C++. C++ functions.
Creativity and Innovation: This unit Suggested teaching
is critical to creativity and innovation methodology
because the computations used helps • Guided discovery
the student explore various solutions to • Research
presented challenges. • Question and answer
Links to other subjects • Discussion

Most of the concepts in this unit are Background information


linked to mathematics. This is because the This unit introduces the learner to
learner is expected to apply arithmetic modular programming using C++ library
and algebraic skills in defining functions. and user-defined functions. To test the
logic of functions demonstrated in the
Cross cutting issues addressed in
student’s book, we recommend use of
this unit
trace tables.
Though this unit is largely mathematical,
we have tried to use the following cross Suggested teaching/learning
cutting issues: activities
1. Gender: In line with principles of The teacher is expected to use
gender equality, we have balance demonstrations, question and answer
use of male and female across the method, group discussions and practical
unit. Where such reference is not programming to implement procedural
required, we have used neutral programming using C++ language.
phrases.
2. Financial Education: Activities
Fundamentals of C++
such as 13.1 (2) on page 249 and
Functions
assessments exercise 13.1 (9), and
Unit Test (9) have been used to
(1 period)
analyze investment in the banking
This section contains an overview
sector.
of top-down approach to modular
Assessment criteria programming using C++ functions. The
The students should be able to define section also serves as a footprint to
and use functions in C++ program. Apart sections that demonstrate use of library
from activities and exercises provided in and user-defined functions in procedural
the student book, the teacher should programming.
use other assessment methods and tools
169
Information to the teacher  Provide a precise summary from
To widen the learner’s understanding of their presentation in order to
functions in C++, we suggest that the help the learners understand that
teacher provide activities and exercises selection and control structures
to drive home concepts provided in this are instrumental in day-to-day’s
section. Where necessary, use simple problem solving.
programs containing library and user-
defined functions and let the learner to Types of functions: Library
interpret them. Functions
Materials: Computer, projector, C++
compiler and digital materials. You may
(5 periods)
also use wall charts depicting top-down This discusses in details type of functions
approach to modular programming. starting with C++ library functions used
to manipulate numeric data, characters
Preparation and strings.
Be prepared to handle weak students
who have poor background in
Information to the teacher
mathematics because use of functions The teacher should demonstrate how
requires creativity, critical thinking and to use C++ library functions: math,
problem solving skills. character and string library functions
provided in the student's book. Once
Teaching guidelines 13.1 the students have mastered use of
 Organize the class into pairs or library function, introduce them to more
groups. Sensitize them on the advanced applications of the functions in
importance of working in groups real world scenarios such as computing
and why each group should have a loan repayment problem in activity 13.1
group leader. Also ensure that each on page 149. It is important to emphasize
group has a secretary to record and the return type using examples of
report the group’s findings. function prototypes available in C++
 Ask the groups to brainstorm on standard documentations.
programming paradigm supported
Materials: Computer, projector, C++
by functions in C++. Let the group
compiler, and chart showing general
leader give each member an
syntax of selection statements.
opportunity to give description and
solution to the problem using top- Preparation
down approach. Ensure that you have tested and
 The groups should present their debugged sample programs you intend
solution to the problem in a class to use in class to demonstrate various
discussion through their secretaries. selection options.

170
Teaching guidelines 13.2 that you emphasize on convention
 Through demonstration, take the of declaring functions using function
student through examples and prototype (signature) before the main()
activities and in the student book to function, and minimal declaration of
help them understand how functions global variables.
work Materials: Computer, projector, C++
 Individually or in groups, let the compiler, and chart showing general
learners work on exercises and syntax of looping statements.
activities provided in the student’s
book.
Preparation
 If you are not satisfied with the Ensure that you have tested and
student’s answers, it would be debugged sample programs you intend
important to organize for practice to use in class to demonstrate various
through remedial sessions to help function return types.
the weak students. Then evaluate Teaching guidelines 13.3
each learner’s understanding of  Through demonstration, take the
the concepts presented before student through examples and
proceeding to the next unit. activity 13.2 on page 252 in the
student book. let the students
Types of functions: user- appreciate benefits of modular
defined functions programming
(4 periods)  Individually or in groups, let the
learners work on activities in the
This topic provides the learner with student’s book.
knowledge and skills required to create
 If you are not satisfied with the
user-defined functions.
student’s answers, it would be
Information to the teacher important to organize for practice
The teacher should then demonstrate through remedial sessions to help
how to create user-defined function in the weak students. Then evaluate
C++ programs. Let the learner research each learner’s understanding of
on internet or relevant resource material the concepts presented before
to clearly distinguish between monolithic proceeding to the next unit.
programs and modular programs. We
also encourage the teacher to use more
Function declaration
sessions to guide students on parameter
passing by value because most beginners
(1 periods)
find it hard to conceptualize parameters
This discusses in details of function
passing by reference. It is also important

171
declaration in terms of arguments and
Recursive functions
return type.

Information to the teacher (3 periods)


The teacher should demonstrate how to This topic provides detailed discussion of
declare or define functions that return special type of functions that calls itself
simple data or void using different hence the term recursive function.
examples. Once the students have how
to declare a function use of provide
Information to the teacher
practical exercises to emphasize on Recursive functions are used to implement
rules of defining parameters list and the looping in functional programming
return type. paradigm. Let the student appreciate the
fact that C++ also implements functional
Materials: Computer, projector, C++
programming using recursion but not the
compiler, and chart showing general
library or user-defined functions that we
syntax of various return types and
have covered earlier. Demonstrate how
parameter list.
to implement recursive functions by
Preparation stating the base case. It is advisable to let
Ensure that you have tested and the students work in group to implement
debugged sample programs you intend several recursive functions beyond those
to use in class to demonstrate various provided in the student’s book.
selection options. Materials: Computer, projector, C++
compiler, and chart showing general
Teaching guidelines 13.4 syntax of looping statements.
 Through demonstration, take the
student through examples and Preparation
activities and in the student book to Ensure that you have tested and
help them understand how functions debugged sample programs you intend
work to use in class to demonstrate various
 Individually or in groups, let the examples of recursive functions.
students work on activities 13.3 to Teaching guidelines 13.5
13.5 from page 253 to 256 in the  Through demonstration, take the
student book. It is be important to student through examples and
set aside time for more practical activities in the student book to help
exercises to assist weak students. them understand how recursive
Then evaluate each learner’s functions works
understanding of the concepts  Individually or in groups, let the
presented before proceeding to the learners work on activity 13.6 on
next unit. page 257 as well as activity 13.7 on
page 259 in the student’s book.
172
It is advisable to evaluate each learner’s 7. Global identifiers are accessible by
understanding of the concepts on functions in the scope while local are
modular programming before closing the only accessible within a function.
unit or proceeding to the next unit. 8. Parameter passing is well illustrated in
the student's book page 252.
Answers for unit 13
9. Although the problem is similar to
Assessment Exercise 13.1(page 256) other problem of calculating amount.
1. Function definition contains This requires use of function that
implementation of its body while receives parameters from main():
declaration does not.
2. Advantages and disadvantages of using Assessment Exercise 13.2 (page 260)
functions 1. Recursion and recursive functions
Advantages
(a) Recursion is the process of re-
• A modular program is easier to
understand peating items in similar manner
• Easier to debug or modify a (b) Recursive function is a function
modular program that calls itself in a similar man-
• Increases programmer ner directly or indirectly.
productivity
• Libraries can be used in other 2. Recursion is tested against a base
programs case while iteration is tested against
Disadvantages loop variable.
• Requires more memory and
processor time 3. Infinite recursive function:
• Integration of various modules
may be difficult (a) He might not have defined the
• Global sharing of data may be base case.
dangerous (b) He need to use the if selection
3. Five characteristic of functions: to test the base case against each
• Complete subprogram recursion .
• Perform well defined task 4. Recursive functions can be expensive
• Can be compiled and tested in both processor time and memory
independently space
• Has only one entry and one exit
5. Students are expected to use the
• Can be used in different programs
sample code provided on page 256
4. y=a*(pow(x,3)+b*(pow(x,2)+c*x+d;
to implement a program that returns
5. Character functions include: tolower(),
GCD as shown by the sample
toupper(), isupper(), isdigit(), isalpha().
program below:
6. Both void and empty parenthesis
#include<iostream>
means a function does not receive
using namespace std;
parameters.
int gcd(int x,int y){

173
if ( y == 0 ) const double RATE =0.12;//equivalent to 12%
return x; using namespace std;
else if ( x == 0 ) int main() {
return y; int period =48;//4 years x 12 months
else double loan,repayment, month_rate; //
return gcd(y, x%y); cout << "Enter initial loan amount:";
} cin >> loan;
main() { month_rate =RATE/12;
int j,k,gcd_jk; //use this expression to calculate monthy loan
cout<<"Enter two numbers:"; repaymet;
cin>>j>>k; repayment=loan*month_rate/(1-
gcd_jk=gcd(j,k); pow(1+month_rate,-period));
cout<<"GCD is: " <<gcd_jk<<endl; cout<<setprecision(2)<<fixed<<repayme
return 0; nt<< endl;
} cout<<month_rate;

Guideline to Activities cout << "Your monthly loan repayment is: "<<

Activity 13.1: Library functions repayment<<endl;

(page 249) return 0;

1. This activity test the learner’s ability }

to identify and use library functions


such as pow(), sqrt() and log() listed Activity 13.2: User-defined functions
in the student’s book on page 242. (page 252)
2. This activity test the learner’s ability This activity test the learner’s ability to
to transfer knowledge learnt in identify formal parameters, and return
mathematics or economics to calculate type from the function:
loan repayment using the formula: • Formal parameters: x, y and z
• Return type: double
P = r(PV)/1-(1+r)-n • Value returned: maxValue
Where p = payment; PV = present loan Activity 13.3: Function declaration
value; r =rate per period (annual/12); (page 253)
n=number of periods (4 x 12 months). 1. In the first activity, the learner’s should
clearly explain the return type void
The following is a sample program that and difference between formal and
uses pow() function to calculate monthly actual arguments.
loan repayment in the second activity : 2. The following program is an shows
implementation of grade processing
#include <iostream> program consisting of three user-
#include <cmath> defined functions: main(), calculator()
#include <iomanip> and grader().

174
#include<iostream> supports implicit return type such
using namespace std;
char grade; as int but with warning message.
//declaration of calculator and grader For example Microsoft Visual C++
double calculator (int, int, int, int);
char grader (double);
compiler may return an error message:
int main (){
double average; error C4430: missing type specifier - int assumed.
int math, comp, sci, econ;
cout << "Enter marks for maths:"; Note: C++ does not support default-int
cin >> math;
cout << "Enter marks for computer:";
cin >> comp; 2. This activity requires the student to
cout << "Enter marks for science:"; demonstrate parameter passing and
cin >> sci;
cout << "Enter marks for economics:"; return type by modifying the program
cin >> econ; created in activity 13.3 (2) on page 251
average =calculator (math, comp, sci, econ);
grade =grader (average); to use void in printGrade() function
cout<<"Your average score is"<<average<<endl; that receives parameters from the
cout<<"Your grade is"<<grade<<endl;
return 0;
grader() function.
}
//calculator receives scores from main Activity 13.5: Parameter passing
double calculator (int math, int comp, int sci,
int econ) { (page 256)
int total; 1. This activity test the learner’s ability
double average;
total = math+comp+sci+econ; to transfer knowledge learnt in
average = (double)total/4; mathematics to write a modular
return average;
} program that calculates distance
//grader use score to assign grade between two points.
char grader (double average) {
if ((average >= 80) && (average <= 100)){ 2. This activity tests learner’s ability to
grade = 'A'; identify function arguments and return
} type. In this case, the function cannot
else if ((average >= 65) && (average <= 79)){
grade = 'B';
return x + y because its return type
} is void.
else if ((average >= 50) && (average <= 64)){
grade = 'C';
} Activity 13.6: Recursive functions
else { (page 257)
grade = 'F';
} This activity test the learner’s ability to
return grade; transfer knowledge learnt in mathematics
}
to write a recursive function such as
factorial in student’s book on page 254.
Activity 13.4: Function return type
Use the GCD function provided on page
and arguments (page 254)
256 to guide the students on how to solve
1. Failing to declare return type in C++
the problem.
is illegal but some C++ compilers

175
Activity 13.7: Recursive functions (b) She can eliminate the bug by pro-
(page 259) viding proper definition of argu-
This activity test the learner knowledge ments and return type.
and ability to use sample programs and 5. It the interface or communication link
code segments provided in the student’s between functions.
book on page 255 and 256 to generate 6. Global sharing of data may be cause
Fibonacci series and determine GCD of a program to produce invalid output.
two numbers.
7. This program requires students to
implement the sample code provided
Unit Test 13 (page 260)
on page 243.
1. Definition of terms
8. The program require the student
(a) Function is a self-contained sub-
to convert previous program for
program that performs specific
calculating temperature to a modular
task
program with main, a function that
(b) Argument: data transferred or returns double, and a third function
received by a function that just prints the results.
(c) parameter passing is transfer of
9. This problem is similar to monolithic
arguments between functions
programs demonstrated earlier only
2. Library functions are in-built into that it requires use of three function.
a compiler while user-defined are One of the function may use the
written by the programmer switch selection to display menu list.
3. requires use of an expression like
volume=4/3*pi*(pow(r,3);
4. Both void and empty parenthesis
means a function does not receive
parameters.
(a) She may not have defined formal
parameters or return type.

10.

176
Programming

Procedural Programming

Unit 14 Arrays in C++ Programming

Student's Book page 262 – 276. (12 Periods)

Key unit competence


By the end of this unit, the learner should be able to use arrays and strings in a C++
program.

Learning objectives Generic competences addressed


in this unit
Knowledge and understanding
• Describe use of arrays and strings Numeracy: This unit highly emphasizes
and their memory representation. on computing accuracy in computer
programming.
Skills
• Define, declare and use arrays in Critical thinking: In most of the activities,
C++ programming language. the student is challenged to apply
critical thinking to solve computational
• Define, declare and use string in
problems.
C++ programming language.
• Manipulate array in a C++ program Interpersonal management: In every
learning activity that requires group-
Attitudes and values work or pair work in this unit, the student
• Appreciate the importance of arrays gets a chance to apply interpersonal and
and string. leadership skill.
• Solve a given algorithm and apply
the solution into C++ programming Co-operation: In every learning activity
language using array and strings. that requires pairs or group work, the
student gets a chance to nature skill
• Read and interpret a simple C++
such as co-operation, collaboration and
program containing arrays and
communication.
strings, and provide intended result.

177
Science and technology: This unit in the student book, the teacher should
exposes the learners to the inner use other assessment methods and tools
working of computer programs. The to test whether the learner has acquired
learner is expected to transfer these necessary knowledge, skills and attitude
skills to programming in C++. to solve problems that require use of
Creativity and Innovation: This unit C++ arrays.
is critical to creativity and innovation Suggested teaching
because the computations used helps methodology
the student explore various solutions to • Guided discovery
presented challenges. • Research
Links to other subjects • Question and answer
• Discussion
Most of the concepts in this unit are
linked to mathematics and computer Background information
architecture. This is because the learner This unit introduces the learner to array
is expected to apply arithmetic and and strings to appreciate importance
algebraic skills in defining arrays. of complex data structures in C++. To
Cross cutting issues addressed in test the logic of arrays and functions
this unit demonstrated in the student’s book, we
recommend use of sample programs.
Though this unit is largely mathematical,
we have tried to use the following cross Suggested teaching/learning
cutting issues:
activities
1. Gender: In line with principles of
The teacher is expected to use
gender equality, we have balance
demonstrations, question and answer
use of male and female across the
method, group discussions and practical
unit. Where such reference is not
programming to implement one-
required, we have used neutral
dimensional arrays using C++ language.
phrases.
2. Standardization culture: In activity
14.1 on page 264, we have addressed
One-dimensional Arrays
the issue of equitable access to
transport through electronic
booking of travel. (1 period)
3. Financial Education: A number of This section contains detailed
exercises and activities in this unit implementation of one-dimensional
have been used to demonstrate arrays using C++ introduced earlier in
effective customer management in Unit 8 under control structures and one
financial institution. dimension arrays.
Assessment criteria
The students should be able to use arrays
Information to the teacher
and strings in a C++ program. Apart To widen the learner’s understanding of
from activities and exercises provided arrays in C++, we suggest that the teacher

178
provide more activities and exercises
to complement what is provided in the
Creating one-dimensional
student’s book. Where necessary, use
sample programs containing arrays and (5 periods)
string data types and let the learner to This topic discusses in details how to
interpret them. create and manipulate one dimensional
Materials: Computer, projector, array with more emphasis on numeric
internet connection, C++ compiler and data.
digital materials. You may also use wall
charts depicting how array is stored in Information to the teacher
computer memory. The teacher should demonstrate how
to use declare, define and initialize one
Preparation dimensional array. Once the students
Be prepared to handle weak students who have mastered use of provided exercises,
have poor background in mathematics introduce them gradually to creating
because use of control statements arrays on their own. Depending on the
requires creativity, critical thinking and level of learner, you can demonstrate
problem solving skills. how an array can be passed as parameter
to a function.
Teaching guidelines 14.1
 Organize the class into pairs or Materials: Computer, projector,
groups. Sensitize them on the C++ compiler, and chart showing one
importance of working in groups dimensional array in memory.
and why each group should have a
group leader. Also ensure that each Preparation
group has a secretary to record and Make sure that you have tested and
report the group’s findings. debugged sample programs you intend
 Ask the groups to carry out group to use in class to demonstrate various
activities to review concepts how computer allocates memory to an
discussed in Unit 8. Let the group array.
leader give each member an
opportunity to give description and Teaching guidelines 14.2
solution to real life problem that  Through demonstration, take the
involves use of arrays. student through examples and
 The groups should present their activities in the student book to help
solution to the problem in a class them understand how functions
discussion through their secretaries. work.
 Provide a precise summary from  Individually or in groups, let the
their presentation in order to learners work on activities 14.1 to
help the learners understand that 14.3 from page 264 to 269.
selection and control structures  If you are not satisfied with the
are instrumental in day-to-day’s
problem solving.

179
student’s answers, it would be activities in the student book to help
important to organize for practice them understand how to create and
through remedial sessions to help the manipulate array of characters/strings.
weak students. Then evaluate each  Individually or in groups, let the
learner’s understanding of concepts learners work on activities 14.4
presented before proceeding to the on page 272 and 14.5 on page 275
next unit. respectively.
 If you are not satisfied with the
student’s answers, it would be
Array of characters
important to organize for practice
through remedial sessions to help
(5 periods) the weak students. Then evaluate
This topic provides the learner with each learner’s understanding of
knowledge and skills on how to create the concepts presented before
and manipulate string defined as one- proceeding to the next unit.
dimension array of characters.

Information to the teacher Answers for Unit 14


The teacher should demonstrate how Assessment Exercise 14.1 (page 269)
to use declare, define and initialize one 1. One dimensional array is a list while
dimensional array of characters. Once the multi-dimensional has more than one
students have mastered use of provided subscripts.
exercises, introduce them gradually to 2. int cashflow [99];
creating and manipulating strings on 3. First element is denoted by index
their own. Depending on the level of 0 while the last in indicated using
learner, you may also demonstrate how subscript 98.
to use various library functions designed 4. Array initalization:
to manipulate string and an object or (a) int passeger [6] ={64,25,69,67,80};
array of characters. (b) int passager [99] ={0};
(c) The requires use of for loop to
Materials: Computer, projector, C++ write the default values as shown
compiler, and chart showing array of in student's book page 268.
characters. 5. This problem is C++ implementation
of an algorithm discussed earlier in
Preparation Data structures and algorithm on
Ensure that you have tested and page 148.
debugged sample programs you intend 6. Program error debugging
to use in class to demonstrate various (a) The maximum size is 10 but the
function return types. for loop runs 11 iterations caus-
ing an overflow error.
Teaching guidelines 14.3 (b) There is no ax[3] because array
 Through demonstration, take the count starts from 0.
student through examples and

180
7.

8. The errors to be corrected are: declaration of index, replace C with lowercase


c, replace MAX and MAX_ARRAY with SIZE. Below is the corrected code that
adds elements of array a and b and stores the new value in array c:
#include <iostream>
using namespace std;
int main (){
const int SIZE = 5;
int a[SIZE], b[SIZE],c[SIZE] ;
int index;
for (index = 0; index < SIZE; index++){
cout << “Enter elements for array [a]: “;
cin >>a[index];
}
for (index = 0; index < SIZE; index++){
cout << “Enter elements for array [b]: “;
cin >>b[index];
}
for (index = 0; index < SIZE; index++){
c[index] = a[index]+ b[index];
}
for (index = 0; index < SIZE; index++){
cout << “array a is “ << a[index] << endl;
cout << “array b is “ << b[index] << endl;
cout << “array c is “ << c[index] << endl;
}
return 0;
}

Assessment Exercise 14.2 (page 275) 4. char customer [30] = {"Ann", "Ben",
1. The character is a string terminator "Helen", "Paul", "Joy", "Ken");
that indicates the end of a string. 5. This requires use of for loop in in
2. char towns [30]; both read and write functions.
3. Each character of Buyoga will occupy 6. The two are the same because they
one byte with the last byte being are two alternatives of initializing a
occupied by '\0' null character string.

181
Guideline to Activities provided and be able to store the
Activity 14.1: Declaration of arrays responses in a one-dimensional array
(page 264) using the for loop for reading and another
for loop for displaying the responses from
his activity test the learner’s ability to the array elements. Refer the student to
represent and declare one-dimensional sample program on page 264 as hint to
array as follows: solving the problem.
a) Array name=>points; data
type =>int; elements => 6; array Activity 14.4: Initializing strings
name=>temperature; data type (page 272)
=>double; elements => 6 1. This activity test the learner’s ability
b) The sample declaration for each to represent and declare one-
of the two arrays is: int points[6]; dimensional array as follows:
double temperature[6];
•Array name=>value; data type
7. This activity test the learner’s ability =>char; elements => 15 to
to create a one-dimensional array. accommodate longest string;
The following is a declaration for
an array of 30 integers for the bus 2. This activity test the learner’s ability
problem: to declare an array of characters:
• int bus[30] ; • char value[15];

Activity 14.2: Initializing an array Activity 14.5: String functions


(page 265) (page 275)

1. For this activity, expected sample This activity test the learner’s ability to
array initialization is: identify and use string functions such as
int points[] ={21,32,43,54,65,76,87,8 strcat(), strlen() and strcpy() listed in the
8,99,200}; student’s book on page 268.
2. The initialization does not cause an
error because products populates Unit Test 14 (page 275)
the extra two elements with zeros 1. Array declaration does not initialize
3. This activity test the learner’s an array while initialization give
understanding one-dimensional default values
array initialization and loop construct 2. For loop is used because the number
to determine the output such as of elements in an array is known
shown in Fig. 14.2 on page 265 of the before hand. It is also easier to use.
student’s book: 3. Array name, number of elements,
data type
Activity 14.3: Reading and writing
4. It is difficult to detect array overflow
array elements (page 269)
because C++ compilers do not
This activity test the learner’s problem include such a facility.
solving ability from the case study

182
5. Characters occupy one byte while numeric values occupies at least 2 bytes.
6. Null character is used to terminate a string but null value represents nothing
7. cin.get(arrayname, elements-1) is a suitable for string input.
8. strcpy and strncpy are almost similar but strn specify number of characters to
copied.
10. The program requires the user to declare an array that uses nested if selection, to
increment count of each of the six faces of the die declared as
int faces [6] ={1,2,3,4,5,6};

11.

183
Operating System

Operating System overview

Unit 15 Introduction to Operating Systems

Student's Book page 277 – 302 (18 Periods)

Key unit competence


By the end of this unit, the learner should be able to:
1. Explain the role, types and the Evolution of Computer Operating System.
2. Use Ms-Dos commands.
3. Use Mobile Operating System.

Learning objectives Attitudes and values


• Appreciate the operating system
Knowledge and understanding
running in any electronic device.
• Explain functions, characteristics
• Appreciate the touch screen
and components of the operating
interface of Android on Smartphone
system.
and tablets.
• List and explain different operating
• Appreciate the Linux as open source
system. and more resistant against viruses.
• Identify different type of operating
Generic competences
system.
addressed in this unit
• Describe the use of different MS-
Problem solving: by doing the learning
DOS and Linux commands.
activities in this unit the student learns
Skills how to apply technology to solve
• Define operating system Enumerate problems.
common computer operating systems.
Interpersonal management: working in
• Explain different types of operating groups helps nature this skill.
system.
Working together also enhances a sense
• Use MS DOS commands.
of respect for each other regardless
• Use GUI and commands in Linux.
of socio-cultural differences hence

184
supports interpersonal respect and will show the role of the O/S.
promotes national unity. Materials: whiteboard, projector, video
Links to other subjects clip, student text book, .
Mathematics (Logic) Preparation
Cross cutting issues addressed in 1. Carry with you pictures of the logic
this unit role of the O/S.

Assessment criteria Additional information teacher


• Guide the students to do learning
Students can explain the role, the
activity 15.1 and 15.2 pages 277 and
types and the Evolution of Computer
278.
Operating Systems, use GUI in Linux,
Use commands in Ms-Dos and Linux. Teaching guidelines 15.1
• After doing activity 15.1 on page 277
Suggested teaching
let the students go ahead and cover
methodology
the content in this section. Point the
•  Guided discovery
student to Figure 15.1 and 15.2 then
•  Research
discuss with them the structure of
•  Question and answers O/s.
•  Discussion • Allow the students to make
•  Role play presentations.
Background information Functions of the operating
Operating systems introduces the learner system
on how the resources of the computer
are made available to the user. During (1 periods)
the course, the student will be able to Information to teacher
appreciate the important hardware and
Materials: student text book, wall
software abstraction role that the O/S
charts, whiteboard, projector, movie,
does to make the applications and user
computer connected to internet.
experiences enjoyable.
Preparation
Suggested teaching/ learning
activities Come with a picture showing the
role of a supervisor in a busy working
Definition of the operating environment.
system Teaching guidelines 15.2
(1 period)  Divide the students into groups. Let
them discuss the functions of the
Information to the teacher
operating system.
Prepare a video clip for the class which

185
while giving the students a chance
Characteristics of O/S to participate by referring them to
Figure 15.2 and 15.3 on page 278 and
282 respectively.
(2 periods)
 When it comes to the file system,
By the end of this section, the learner
drive the point home by having the
should be able to state the characteristics
learners browse the file system of
of an O/S.
the available O/S starting from the
Materials: A computer connected root to other files and folders on
to the internet, projector, student text the computer.
book. Evaluate the learners understanding of
Preparation the concepts presented by going round
Carry to class a wall chart showing the the class inspecting each of the work
characteristics of O/S done.

Teaching guidelines 15.3 Common Operating systems


 Start by referring the students to – UNIX
activity 15.3 on page 280.
 After that cover the content in this
section.
(2 periods)
 Evaluate the learners understanding By the end of this section, the learner
using formative assessment in class. should be able to describe UNIX abd use
its shell commands.
Materials: a computer connected
Components of the O/S
to the internet, a computer running
UNIX, student text book, whiteboard,
projector, UNIX manual.
(2 periods)
By the end of this section, the learner Teaching guidelines 15.5
should be able to describe the  Guide learners through the text in
components of the O/S. the student book. Let them know
that UNIX and Linux have the same
Materials: a computer connected
shell commands so the practice
to the internet, student text book,
for commands can be done when
whiteboard, projector.
covering Linux.
Teaching guidelines 15.4 Evaluate the learners understanding of
 Guide the learners to do activity the concepts presented by going round
15.4 on page 282. the class inspecting each of the work
 Cover the content in this section done.

186
the internet, a computer running Mac
Common operating system OS X, student text book, whiteboard,
– LINUX projector, Mac OS X manual.

Teaching guidelines 15.7


(1 periods)  Guide the learners to search for the
By the end of this section, the learner Mac OS X desktop pictures on the
should be able to describe Linux and use internet. If you have a demonstration
GUI and UNIX based shell commands. station in class, allow each student
Materials: a computer connected a chance to at least start and close
to the internet, a computer running common programs on the MAC.
Linux, student text book, whiteboard,  Let each student practice how to
projector, Linux manual. issue Mac OS X commands.
 Give each student the Mac OS X
Teaching guidelines 15.6 manual that you had prepared and
 Guide the learners to do activity
let them perform the tasks in it.
15.6
 Move round the class to make sure
 Let each student practice how to
each student is capable of using Mac
issue UNIX commands.
OS X
 Give each student the Linux manual
Evaluate the learners understanding of
that you had prepared and let them
the concepts presented by going round
perform the tasks in it.
the class inspecting each of the work
 Move round the class to make sure
done.
each student is capable of using
Linux
Common operating system
Evaluate the learners understanding of
– Windows
the concepts presented by going round
the class inspecting each of the work
(1 periods)
done.
By the end of this section, the learner
should be able to describe Windows and
Common operating system use its windows interface.
– MAC OS X
Materials: a computer connected to the
internet, a computer running Windows,
(1 periods) student text book, whiteboard,
By the end of this section, the learner projector, Windows manual.
should be able to describe Mac OS X Teaching guidelines 15.8
and use its GUI interface.  Guide the learners through the text
Materials: a computer connected to in the student book.

187
 Let each student practice how to Evaluate the learners understanding of
issue Windows commands. the concepts presented by going round
 Give each student the Windows the class inspecting each of the work
manual that you had prepared and done.
let them perform the tasks in it. Smartphone O/S
 Move round the class to make sure Android; Apple (iOS);
each student is capable of using Windows Phone; BADA;
Windows. Palm; Blackberry
Evaluate the learners understanding of
the concepts presented by going round
(6 periods)
the class inspecting each of the work
By the end of this section, the learner
done.
should be able to describe and use
Common operating system various smartphone O/S
– MS DOS Materials: a computer connected to
the internet, smart phones or tablets
(2 periods) running Android, iOS, Windows, Bada,
By the end of this section, the learner and Palm.
should be able to describe MS DOS and Teaching guidelines 15.7
use its GUI interface.  Guide the learners to do activities
Materials: a computer connected to 15.7 - 15.11 on pages 288 to 292.
the internet, a computer running MS respectively as you cover each of
DOS, student text book, whiteboard, the above topics per period.
projector, MS DOS manual.  Let each student practice how to
use Android, iOS, Bada, Palm, etc.
Teaching guidelines 15.6 as is in the student text book.
 Guide the learners to do activity  teach the content in this section. In
15.4 to 15.6 on pages 282 to 286. case you are not able to finish, give
 Let each student practice how to some assignment on the remaining
issue MS DOS commands. O/S.
 Move round the class to make sure
 Give each student the MS DOS
each student is capable of using the
manual that you had prepared and smartphone O/S.
let them perform the tasks in it.
Evaluate the learners understanding of
 Move round the class to make sure
the concepts presented by going round
each student is capable of using MS the class inspecting each of the work
DOS. done.

188
History of the operating  Give real life examples where each
system O/S type is used
Evaluate the learners understanding of
(2 periods) the concepts presented by going round
By the end of this section, the learner the class inspecting each of the work
should be able to describe historical done.
development of O/S.
Basic MS-DOS commands
Materials: a computer connected to and its main features
the internet, a computer student text
book, whiteboard, projector, video clip. (1 periods)
Teaching guidelines 15.8 By the end of this section, the learner
 Guide the learners to do activity should be able to describe use MS-DOS
15.12 on page 294. commands.
 Let each student participate in the Teacher please note you may have to
class activities. download and install MS-DOS on the
 Cover the content in this section. computers. The command prompt in
Evaluate the learners understanding of Windows may not have all the DOS shell
the concepts presented by going round commands in its command.com file.
the class inspecting each of the work Materials: a computer connected to
done. the internet, A computer running MS-
DOS wall chart.
Type of operating system
Teaching guidelines 15.12
 Guide the learners to do activity
(1 periods)
15.14 on page 298.
By the end of this section, the learner
 Let each student practice participate
should be able to describe types of O/S.
in the class activities to cover the
Materials: a computer connected to content in this section as taught in
the internet, wall chart. the student text book.
Teaching guidelines 15.12 Evaluate the learners understanding of
 Guide the learners to do activity the concepts presented by going round
15.13 on page 296. the class inspecting each of the work
 Let each student practice participate done.
in the class activities

189
Guidelines to Activities notes from them. Alternatively, provide
relevant materials which they can read
Activity 15.1: Research work
and make notes.
(pg. 277)
Activity 15.5: DOS commands
Brainstorm with the students concerning
(pg. 285)
the scenarios painted in the activity. The
idea is to have the learner appreciate the Guide the student on how to use the
importance of order and how it should be basic DOS commands at the DOS
maintained in a situation where different prompt. Let the student appreciate the
entities are competing for resources. It command line interface.
would be a good idea to visit one of the Activity 15.6: DOS commands
sites mentioned if possible but it is not (pg. 286)
a must.
Guide the student on how to use the
Activity 15.2: Operating systems basic Linux commands at the command
components (pg. 278) prompt. Let the student appreciate the
Guide the learners through this activity Linux GUI too and how to navigate.
with the aim of helping them build on Activity 15.7: Working with
what they already learned from Figure smartphone (pg. 288)
15.1. Let the learners appreciate how
Provide at least one smartphone in
different components work together to
class. Allow the student to navigate the
achieve the fully functioning O/S
smartphone starting by the following:
Activity 15.3: Research work • Logging on to the phone i.e. supplying
(pg. 280) a password or swiping a pattern to
This activity will build on the research unlock the screen when prompted.
skills of the learner. Identify a good • Accessing Apps e.g. contacts,
website or some online material and messages, games, internet etc.
request the student to access and make Activity 15.8: Working with
notes from them. Alternatively, provide android phone (pg. 289)
relevant materials which they can read
and make notes. Provide at least one android phone in
class. Allow the student to navigate the
Activity 15.4: Research work on smartphone starting by the following:
operating systems (pg. 282)
• Logging on to the phone i.e.
This activity will build on the research supplying a password or swiping a
skills of the learner. Identify a good pattern when prompted.
website or some online material and • Accessing Apps e.g. contacts,
request the student to access and make messages, games, internet etc.

190
Activity 15.9: Working with Activity 15.12: Research on
apple phone (pg. 290) historical development of
Provide at least one apple phone in operating systems (pg. 294)
class. Allow the student to navigate the Let the students continue developing
smartphone starting by the following: their research skills. This is yet another
• Logging on to the phone i.e. opportunity for them to traverse the
supplying a password or swiping a internet and available literature in order
pattern when prompted. to self-learn about the characteristics
• Accessing Apps e.g. contacts, of the O/S. After the research, you can
messages, games, internet, camera organize a class discussion then cover
etc. the content in this area.

Activity 15.10: Working with Activity 15.13: Types of operating


windows phone (pg. 291) systems (pg. 296)

Provide at least one windows phone in Let the students continue developing
class. Allow the student to navigate the their research skills. This is yet another
smartphone starting by the following: opportunity for them to traverse the
• Logging on to the phone i.e. internet and available literature in order
supplying a password or swiping a to self-learn about the types of O/S.
pattern when prompted. After the research, you can organize a
class discussion then cover the content
• Accessing Apps e.g. contacts,
in this area.
messages, games, internet, camera
etc. Activity 15.14: How to Learn and
Activity 15.11: Working with Use MS-DOS (pg. 298)
Palm operating system (pg. 292) Let the students do this activity to build
Provide at least one palm o/s phone in on what they did earlier in activity 15.5 0n
class. Allow the student to navigate the page 285. DOS is a command language so
smartphone starting by the following: although the student may find it difficult
at the beginning, they would become
• Logging on to the phone i.e.
more proficient with time as they learn
supplying a password or swiping a
and memorise commands. It would be
pattern when prompted.
best to download and install MS-DOS
• Accessing Apps e.g. contacts,
since the command line in Windows may
messages, games, internet, camera
not support some of the more advanced
etc.
DOS commands.

191
Answers for Unit 15 9. File: storage location of related
Unit Test 15 (page 302) records on a storage medium;
Folder: storage location of related
1. Application software is a user
files; Drive: the root storage
specific program that meets user
location that contains the entire
needs. Operating system is system
file system of a particular storage
software that manages the resources
device; Directory: similar to folder
of the computer and makes them
though sometimes it refers to the
available to user applications.
root folder on a device (drive) that
3. Shell, User Interface, Commands.
holds all other folders.
4. Kernel
10. (a) Processes data (b) Holds running
5. Scheduling, memory management, programs and data (c) help in
resource control and management, command / data input/output.
job scheduling, input/output
13. Smartphones are special purpose
management, job sequencing,
computers. They have similar
security.
resources and are used to
6. Usable and interactive, robust, perform complex tasks similar
efficient, portable, secure, scalable, computers hence the need for an
extensible operating system. They have a fast
7. (a) The user types commands on processor, large memory, many
the command line or prompt. user applications, fast access to the
The user has to remember all internet etc.
the commands 14. Computer OS are large and
(b) Instead of commands the O/S complex and perform many tasks;
displays menus from which the Smartphone OS are lighweight
user selects commands. The versions of the computer OS and are
user has to be able to identify designed to run on limited hardware
which command does what. resources e.g. to display the user
(c) GUI: displays commands and interface on small screens.
programs as icons and menus
with a pointer to select them.
Very user friendly. Gives tips on
what the icons and menus are
for therefore easy to learn.

192
Programming

Web technology and Java programming

Unit 16 HTML–Based Web Development

Student's Book page 303 – 343. (20 Periods)

Key unit competence


By the end of this unit, the learner should be able to build standard compliant web
pages using HTML Learning objectives.

Learning objectives Attitudes and values


• Design a web page and arrange
Knowledge and understanding
correctly HTML elements.
• Explain HTML, XHTML, HTML5
web technologies. • Be able to manage open/empty tags
and closed tags.
• Differentiate open/empty tag and
closed tag in HTML. • Evaluate the use of POST and GET
when choosing a correct method to
• Explain the use of XHTML entities.
send data.
Skills
Generic competences
• Create a static website using HTML
addressed in this unit
web technologies by formatting
text, images, and page links using Critical thinking: In most of the activities,
HTML tags and their attributes. the student is challenged to apply critical
• Use appropriately open/empty tags thinking to solve computational problems.
and closed tags. Interpersonal management: In every
• Load and format images, audio, and learning activity that requires group-work
video to a web page. or pair work in this unit, the student
• Use form controls to design a well gets a chance to apply interpersonal and
organized HTML form. leadership skill.
• Use HTML5 tags and attributes Co-operation: In every learning activity
to validate a form using input that requires pairs or group work, the
restrictions.

193
student gets a chance to nature skill we have addressed standardization
such as co-operation, collaboration and culture set by ISO and W3C in
communication. HTML4 and HTML5 standards.
Science and technology: This unit Assessment criteria
exposes the learners to the inner
The students should be able to build
working of internet, Web 2.0 and mobile
technologies. standard compliant web pages using
HTML. Apart from activities and
Creativity and Innovation: This unit
exercises provided in the student book,
is critical to creativity and innovation
the teacher should use other assessment
because the internet and web helps the
methods and tools to test whether
student explore various solutions to
the learner has acquired necessary
social and economic challenges.
knowledge and skills required to develop
Links to other subjects websites.
Some of the concepts in this unit are
Suggested teaching
linked to Mathematics and programming
methodology
languages. This is because the learner
• Guided discovery
is expected to apply mathematical and
• Research
programming skills in creating dynamic • Question and answer
or interactive websites. • Discussion
Cross-cutting issues addressed in
Background information
the unit
Before introducing services available on
Though this unit is largely mathematical,
Internet, it would be a good idea to give
we have tried to use the following cross
cutting issues: a brief overview of how Internet evolved
from a project known as ARPAnet
1. Gender: In line with principles of
conducted by the US department
gender equality, we have balance
of defense. Make the students also
use of male and female across the appreciate how internet and the World
unit. Where such reference is not Wide Web (www) have contributed to
required, we have used generic current social network, e-commerce and
phrases. other web services. It would be a good
2. Genocide studies: This unit idea also to organize for brainstorming
indirectly addresses this issue session so that the students identify
through assessment exercises. some of the benefits and limitations of
3. Standardization culture: In this unit using the internet and World Wide Web.

194
Suggested teaching/learning importance of working in groups
activities and why each group should have a
The teacher is expected to use group leader. Also ensure that each
demonstrations, research, group group has a secretary to record and
discussions and practical exercises to report the group’s findings.
nurture students competence in web  Ask the groups to carry out activities
development. 16.1 and 16.2 on page 303 and 304
respectively. Let the group leader
Fundamentals of World give each member an opportunity
Wide Web to give description and solution to
(1 period) the problem as the secretary notes
down the key points.
This topic introduces the learner to basic
 The groups should present their
concepts you may likely come across in
solution to the problem in a class
the course of accessing internet services.
discussion through their secretaries.
Information to the teacher  Provide a precise summary from
Through demonstration, the teacher their presentation in order to
should introduce key concepts such help the learners understand that
as browser, search engine, hypertext, selection and control structures
protocols (http, ftp, imap and smtp), are instrumental in day-to-day’s
web page, website, portal, and meaning problem solving.
of html related terms. You are also HTML Syntax and Structure
required to guide the students on how
to get online resources that they can (3 periods)
use appreciate importance of World This topic introduces the learner to the
Wide Web. Demonstrate using real life general syntax of an HTML document
example why www is a spide-like web. structure based on HTML 4.01.
Materials: Computers, Netbeans Information to the teacher
IDE, Projector and Internet connectivity. The teacher should demonstrate how
to create a web page using HTML4
Preparation
syntax and DTD specification. Once
This unit may require that computers be
the students have mastered practical
connected to internet to demonstrate
exercises, introduce them gradually to
to the learner some of the activities in
creating and manipulating web pages
the student’s book.
using HTML elements.
Teaching guidelines 16.1 Materials: Computers, Dreamweaver,
 Organize the class into pairs or Netbeans IDE, HTML editor, Projector
groups. Sensitize them on the and Internet.
195
Preparation page should serve as the reference for
This unit may require that computers be the elements discussed students book.
connected to internet to demonstrate Materials: Browser, HTML editor,
to the learner some of the concepts in Projector and Internet connectivity.
the student’s book.
Preparation
Teaching guidelines 16.2 This unit may require that computers be
 Through demonstration, take the connected to internet to demonstrate
student through examples and to the learner some of the concepts in
activities in the student book to help the student’s book.
them understand syntax and basic
structure of an HTML document. Teaching guidelines 16.3
 Individually or in groups, let the  Through demonstration, take the
students demonstrate mastery of student through examples and
HTML syntax and structure using a activities in the student book to help
simple web page that displays Hello them understand how to use HTML
World on the browser. elements to create web pages.
 Then evaluate each learner’s  Individually or in groups, let the
understanding of the concepts learners work on activities 16.3 on
presented before proceeding to page 308 and 16.4 on page 314 in the
the next section that exposes the student's book.
students to detailed discussion of  It is important that you emphasize
HTML elements. on practical work guided demos
and remedial sessions to help weak
HTML Elements students. You can then evaluate
competence before proceeding to
(3 periods) the next section.
This topic introduces the learner to the
Introduction to XHTML
basic HTML4 element based classified
into structural, presentational and
hypertext elements.
(3 periods)
This topic introduces the learner to the
Information to the teacher general syntax of an XHTML document
The teacher should demonstrate the based on XHTML 1.0 Transitional.
basic structure of HTML by creating
a simple website. It is important to
Information to the teacher
follow Document Object Model (DOM) The teacher should demonstrate how
guidelines provided by W3C when to create a web page using XHTML
creating HTML documents. The sample 1.0 strict DTD specification. Once

196
the students have mastered practical Information to the teacher
exercises, introduce them gradually to The teacher should demonstrate how
creating and manipulating web pages to use both HTML4 and XHTML to
using XHTML. Is would be a good idea create a webpage. Once the students
to let the learner point out benefits and have mastered syntax of HTML tags,
limitations of XHTML and HTML5. introduce them gradually to creating
Materials: Computers, Dreamweaver, websites on their own. It is advisable to
Netbeans IDE, HTML editor, Projector let the students work in group to provide
and Internet connectivity. solution develop a complete website
based on their favourite school activities.
Preparation
Materials: Computers, Photo editor
This unit may require that computers be
(e.g. Photoshop), Netbeans IDE,
connected to internet to demonstrate
Projector and Internet connectivity.
to the learner some of the concepts in
the student’s book. Preparation
Teaching guidelines 16.4 This unit may require that computers be
 Through demonstration, take the connected to internet to demonstrate
student through the examples to the learner some of the concepts in
provided in the student's book the student’s book.
before they attempt activity 16.5 Teaching guidelines 16.5
on page 317. This will help them  Through demonstration, take the
differentiate between HTML and student through examples and
XHTML in terms of syntax and activities in the student book to help
structure. them understand how to design
 Individually or in groups, let the websites using HTML.
learner work on assessment exercise  Individually or in groups, let the
16.1 on page 317 before proceeding learners work on activity 16.6
to the next section. before exposing them to detailed
Designing HTML Pages treatment of this section.
 Step-by-step introduce students on
(6 periods) how to insert web contents such
This topic introduces the learner to as lists, images, hyperlinks, tables
design and formatting of web pages using and forms. It is advisable to let the
basic HTML elements and attributes. students demonstrate their skills
Note that we have deliberately avoided by carrying out activities 16.6 to
using CSS until the students learns CSS 16.14 from page 318 to 334 of the
concepts in the next unit. students' book.
Then evaluate each learner’s

197
understanding of the concepts and 16.16 on pages 338 and 341
presented before proceeding to the respectively.
next section on HTML5. 
Migrating from HTML4
Introduction to HTML 5 to HTML5

(3 periods) (1 period)
This topic gives an overview of HTML5 This topic gives an overview of factors
that is expected to be a standard to be considered when migrating
replacement for HTML 5 and XHTML from HTML4 to HTML5 in terms of
standards. supported elements and browsers. At
this point, it would be important to
Information to the teacher
draw the attention of the students to
The teacher should demonstrate how to
the importance of Cascading Style Sheet
create a web page using HTML5 strict
(CSS) discussed in the next Unit.
DTD specification. Once the students
have mastered practical exercises, Information to the teacher
introduce them gradually to creating The teacher should demonstrate how to
and manipulating web pages using convert a website written using HTML4
HTML5 and CSS3 as per the W3C standard into an HTML5 documents.
recommendations. It would be a good This is by using HTML5 DOCTYPE, new
idea to let the learner point out benefits elements, input types, and constraints.
and limitations of HTML5 standard. It would be a good idea to let the learner
Materials: Computers, Dreamweaver, point out benefits and limitations of
Netbeans IDE, Projector and Internet. migration from HTML4 to HTML5
standard.
Preparation
Materials: Computers, Dreamweaver,
Ensure that you have tested and
Netbeans IDE, Projector and Internet
debugged sample programs you intend
connectivity.
to use in class to demonstrate various
elements of HTML5. Preparation
Ensure that you have tested and debugged
Teaching guidelines 16.6
sample HTML documents you intend
 Through demonstration, take the
to use in class to demonstrate how to
student through examples and
migrate from HTML4 to HTML5.
activities in the student book to help
them understand how recursive Teaching guidelines 16.7
functions works  Through demonstration, take the
 Individually or in groups, let the student through examples and
learners perform activities 16.15 activities in the student book to help

198
them understand how recursive Assessment Exercise 16.2 (page 335)
functions works 1. Commercial software have more
 Once the students have mastered user-friendly features such as
the concepts, let them attempt templates that simplify design
questions on activity 16.17 on page 2. HTML form has controls used to
342 in the student's book. capture data such textboxes, textarea,
checkboxes, buttons and lists
Answers for Unit 16 3. Widely supported graphical format
include GIF (Graphics Interchange
Assessment Exercise 16.1 (page
Format), JPEG (Joint Photographic
317) Experts Group), and PNG (Portable
1. Acronyms: Network Graphics).
(a) HTML - Hypertext Markup Lan- 4. (a) Relative URL points to files based
guage on their locations relative to the
(b) XHTML - Extensible Hypertext current file while absolute URL
Markup Language point to files based on their actual
locations on the file system. See
2. HTML tag marks the beginning or
student book pages 309 and 303.
end of an element while an element
is the component that comprise tag, (b) The get method appends data to
attribute and content. the URL while post sends data
within HTTP body.
3. (a) Title: <title>content</title>
(c) Tag marks the start or end of el-
(b) Body: <body>content</body>
ement while attribute refers to
(c) Paragraph: <p>content</p> property of an element.
(d) heading: <h2>content</h2> 4. The student book demonstrate how
4. The HTML page follows the DOM that to create and format tables, forms,
starts with DOCTYPE declaration and images.
followed by HTML element within 5. The get method appends data to the
which other elements like head and URL while post sends data within
body are defined. HTTP body.
5. Comments are important ease of
understanding of the code by other Assessment Exercise 16.3 (page 342)
developers. 1. (a) Deprecated elements are HTML
6. Using text editor, creat the HTML features that have been declared
page and save with .html extension obsolete.
7. Software tools include Dreamweaver, (b) Pattern is restriction used in reg-
Notepad, Aptana Studio and ular expressions.
Notepad++. (c) Formvalidate: This is to check

199
user input for any mistakes and syntax. The teacher is required to
such as entering text instead of assist the student on proper use of tags
numbers. and saving with .html extension but not
2. HTML4 and HTML5 Syntax in terms .txt.
of elements and case sensitivity are Activity 16.4: HTML tags (page 314)
almost similar only that HTML has
more elements, input types and This is a hands-on activity that introduces
improved input validation. the learner to basic HTML4 heading and
3. Factors making it difficult for old paragraph elements as demonstrated on
browsers to support HTML5 are: page 305 and 306 of the student book.
(a) Removed for depreciated Let the learner differentiate between
elements and attributes such as using paragraph tags and leaving a line
frame set. between paragraphs.
(b) Use of CSS 3 declaration that are Activity 16.5: XHTML entities and
not supported by earlier browsers. page code (page 317)
(a) New elements and inputs type not
compatible with older browsers. 1. This is a hands-on activity that introduces
4. By running it on various browserd the learner to use character entities or
codes to display special symbols such as
Guideline to Activities
copyright (&copy/&#169), greater than
Activity 16.1: Evolution of HTML (&gt/ &#62) and fractions (&frac12 and
(page 303) &frac14). These codes are listed on pages
This is an exploratory activity that 309 and 310 in the student’s book.
requires learners to conduct research 2. Let the learners demonstrate how
on evolution of the Internet World Wide to display the source code, (e.g.
Web to current Web 2.0 technologies on Mozilla, right click web page,
and services. then click View Page Source on the
Activity 16.2: Evolution of HTML context menu)
(page 304) Activity 16.6: Designing HTML
This is an exploratory activity that Page (page 318)
requires learners to conduct research on This is pre-emptive activity that is
how HTML was derived from Standard intended to prepare the learner for
Generalized Markup Language (SGML) the next section on adding lists, tables,
by Tim-Berners Lee. hyperlinks, form and images. Let the
Activity 16.3: HTML elements and learner search for HTML tutorials
Attributes(page 308) from Internet to enhance skills and
competence in developing web pages.
This is a hands-on activity that introduces
the learner to basic HTML4 structure

200
Activity 16.7: Ordered List (page requires the learners to demonstrate
319) use of hyperlink to direct a visitor to
a section of the same page using the
This is a hands-on activity that requires
following generic syntax:
the learner to use the following ordered
list type attribute: <a href=”/html/html_text_links.
htm#top”>Top</a>
<ol type = “i”> ...</ol>
Activity 16.12: Tables (page 329)
Activity 16.8: Ordered list (page
320) This is a group-work activity that requires
the learners to demonstrate use of table
This is similar to 16.7 that require the
elements and attributes as demonstrated
learner to use the following ordered list
on page 321 of the student book.
type attribute:
Activity 16.13 Form attributes
<ol type = “I”> ...</ol>
(page 331)
Activity 16.9: Definition list The difference between post and get
(page 321) is well discussed in the student book
This is a hands-on activity that requires but the teacher may demonstrate the
the learner to use definition list such as difference between the two by change
demonstrated on pages 306 and 307: the method in the example on page 323
from get to post. The method preferred
Activity 16.10: Embedding images
in sending sensitive data is post.
(page 324)
Activity 16.14: Form controls (page
This is a hands-on activity that requires
334)
the learner to use image tag <img.../>
and its src attribute to embed an image. Use of various form controls are well
Make the student use both relative and demonstrated in the example on page
absolute paths to access the image file. 326. However, in this activity, the teacher
For example, the following statements need to give more practical emphasis on
is a relative URL used to access house. how to insert read-only input, password
png in a folder/directory located one and radio button elements.
level above the current location of the Activity 16.15: HTML5 elements
page (see examples on page 319 of the (page 338)
student’s book:
This is a group activity that requires the
<img src=”../images/house.png” alt= “My learners to use Internet to identify and
Home” /> explains new HTML5 elements.
Activity 16.11: Hyperlinks (page Activity 16.16: HTML5 new input
324) types (page 341)
This is a group-work activity that This is a hands-on activity that requires

201
the learner to use the new HTML5 input 2. Internet refers to interconnection of
called pattern. The acronym regexp computers while web is a service on
stands for regular expression used to the internet
restrict form input to a specific values or 3. Web browser
pattern. The syntax for using regexp in 4. HTML4/ HTML5 and XHTML
the pattern attribute is:
5. (a) Scrolling image require use of
<input pattern="regexp"> Adobe flash or CSS3
For example, the HTML5 code below (b) This requires use of <img> ele-
is used to validate telephone number ment with attribute src pointing
input. Note that the regexp following the to the location of the image
pattern has only the plus symbol followed (c) This requires use of <table> ele-
by numeric digits (0-9). The numbers in ment with associated <th>, <tr>
the curly braces {10,15} means that the and <td>.
number entered must have a minimum
of 10 characters and a maximum of 15. 5. The statement indicates that user
input are to be submitted to the web
<!DOCTYPE html> server by student.php using the get
<html> method.
<head>
6. The most common controls include:
<title>This</title> text, textarea, select, radio buttons,
<bod> checkboxes, file select, command
<form action="demo_form.asp"> and reset buttons.
Tel: <input type="tel" name="telno" 8. (a) Hypertext is content accessible
pattern="[+0-9]{10,15}$"> on the web by clicking a hyperlink.
<input type="submit" value= "Send"> Hyperlink is a work or phrase yoy
</form> click to move from one web page
</bod> or section.
<html> (b) XHTML is HTML based on XML
Activity 16.17: Migrating from while HTML5 relaxes the rule im-
HTML4 to HTML5 (page 342) posed on XHTML but instead in-
troduces new features not com-
This is an exploratory activity that requires patible with XHTML and HTML4.
learners to compare HTML4 and HTML5 9. The relaxed restriction are case
and identify some of the challenges of re- sensitive elements, well-formed
engineering legacy web sites comply with XML document and doctype
requirements of HTML5. This activity may declaration.
require basic knowledge of CSS discussed
10. Brower supports, device viewport,
in the next unit.
(size), HTML version, audience,
Unit Test 16 (page 343) javascript, and CSS support.
1. Web server-Hardware or software
used to provide web services on the
internet

202
Programming

Web technology and Java programming

Unit 17 Cascading Style Sheets

Student's Book page 344 – 386. (8 Periods)

Key unit competence


By the end of this unit, the learner should be able to build standards compliant web
pages using CSS.

Learning objectives • Give selectors to html


elements(classes, ID) and use html
Knowledge and understanding
tags to set up their styles.
1. Differentiate html styling and CSS
• Use appropriately these attributes
styling.
(Font, Margins, Display, Background,
2. Identify the correct use of a given
Positioning, Floating, Border, Padding)
selector, how to set a selector and
to magnify the presentation of html
how to name different elements to
elements.
match one CSS selector.
3. Differentiate priorities of styles in Attitudes and values
a web page namely external CSS, • Differentiate the content and its
internal CSS and inline CSS. presentation using cascading style
4. Identify basic properties for different sheets.
selectors. Generic competences
Skills addressed in this unit
• Create a inline styles to style Problem solving: by doing the learning
specific elements inside a web page, activities in this unit the student learns
internal elements using selectors how to apply technology to solve
and external cascading style sheet problems.
to differentiate content and its Interpersonal management: working in
presentation groups helps nature this skill.

203
Working together also enhances a sense Materials: Computers, projector,
of respect for each other regardless digital material, text editor (programming
of socio-cultural differences hence in Dreamweaver is better)
supports interpersonal respect and
Suggested teaching/
promotes national unity. learning activities
Links to other subjects
Definition of CSS
HTML programming
Guide the student to do Activity 17.1
Cross cutting issues addressed in
on page 344 as a way of introducing the
this unit
students to CSS. Since the students have
Inclusive education; already covered HTML in the previous
Assessment criteria chapter, they will find it interesting to
learn about the new approach to styling
Students can build standards compliant
web pages.
web pages using HTML and CSS

Suggested teaching HTML Styling and disadvantages


methodology
• Guided discovery The aim of this session is to highlight
• Research the disadvantages of HTML and justify
• Question and answer the need for CSS by looking at the
• Discussion advantages of CSS.
• Role play Guide the students through the content
in this section. By the end of this
Background information content, the learner should have a very
This is one of the most enjoyable and clear understanding of the disadvantages
easiest units in computer science yet of HTML.
students find it very difficult if proper Comparison HTML and CSS
introduction and step by step instruction
is not given. Introduce this section with (1 period)
the simple of a web page format using The aim of this session is to introduce
tables. They have already covered this the student to CSS. Start from what they
know - - HTML. Discuss with them how
in chapter 16 so they will appreciate
formatting text using tables is difficult
the difficulty of making layouts using
for large web pages.
large tables and the advantage that CSS
promises to offer. Information to the teacher
Prepare two web pages, one done by

204
HTML and the other done by CSS. Let understanding of the structure of CSS.
the learners observe both in terms of
Information to teacher
size, loading time, display capability,
beauty to the eye etc. Materials: Computer running
Dreamweaver / or any text editor,
Materials: whiteboard, projector, student text book, internet connection,
student text book. web server, browser software.
Preparation Preparation
1. Prepare two websites: one
Make sure you download and install a
formatted with HTML tables, the
other with CSS. web server on all the computers in the
2. Let the learner appreciate the need lab (WAMP server is one of the best). If
for CSS- demand for mobile web, you can get Dreamweaver software, it
screens make it easy for learners to learn how
to develop websites using all manner of
Additional information teacher technologies. Alternatively, a text editor
• Guide the students to do learning
like notepad would do too.
activity 17.1 on page 344 again.
Teaching guidelines 17.2
Teaching guidelines 17.1
 Start by giving a small HTML code
• Start by demonstrating two web
extract e.g. one for changing the
pages – one formatted by HTML
font color to red. Ask the students
and the other by CSS. Allow the
to tell you what would happen if you
students to observe difference if any
have a website of 100 pages and you
e.g. the loading time, appearance
want to change font color to red.
etc.
• Yes, let the student appreciate the
• Proceed to discuss with the students
amount of repetition, be they tables,
the need for CSS. From the research
styles etc if we use HTML. Now
they did, allow them to present the
introduce them to the structure of
advantages of CSS, its limitations etc CSS rules (Figure 17.1 on page 346).
as compared to HTML too.
• Guide the student to create a small
• Conclude the session by allowing the CSS rule so that they can know how
students to research more about to apply a CSS rule.
CSS on the internet. • Guide the learner to load the CSS
CSS Syntax page in the server to view how
it would appear in a browser e.g.
http://localhost/x.css.
(1 periods)
• Guide the student to do activity 17.2
By the end of this section, the learner on page 349.
should be able to demonstrate

205
• Conclude by teaching about the Preparation
structure of the CSS rule: selector Prepare sample code for the three CSS
and declarations. insertion strategies:
Colors • External style sheet
• Internal code
(1 period) • Inline
By the end of this section, the learner You will use this to demonstrate to the
should be able to add color to text and student how to achieve the required
CSS pages. competence.
Materials: A computer connected to Teaching guidelines 17.4
the internet, text editor, Dreamweaver. • Provide sample code for inline CSS.
Preparation • Guide the student to do activity
17.3 and 17.4 pages 352 and 353
Prepare sample code for the Various
respectively.
color formatting strategies e.g. HEX,
• Demonstrate to the learner how
RGB etc.
the code is inserted in the HTML
Teaching guidelines 17.3 page.
• Provide sample code for color using • Demonstrate inline CSS. Let the
words like blue, green; RGB and learner do it practically.
HEX values. • Demonstrate internal CSS code. Let
• Guide the student to add colors to the student do it practically.
CSS web pages using rules. • Demonstrate external CSS code.
• Demonstrate to the learner how Let the student do it practically.
the code is inserted in the HTML
In all the above, let the student test the
page.
results in a localhost server.
In all the above, let the student test the
results in a localhost server. CSS Styles
Adding CSS to Web pages
(4 periods)
By the end of this section, the learner
(2 periods)
should be able to work with CSS styles
By the end of this section, the learner like Font, Margins etc.
should be able to add CSS to web pages
either as inline, internal or external. Materials: A computer connected to
the internet, text editor, Dreamweaver.
Materials: A computer connected to
the internet, text editor, Dreamweaver. Preparation
Prepare sample code for the styles::

206
• Font Teaching guidelines 17.6
• Margins • Give the students activity 17.12
• Display and 17.14 on pages 366 and 369 as
• Background a projects. Offer facilitation and
• Positioning guidance where necessarily. From
• Floating time to time, evaluate the students
progress and guide the appropriately
You will use this to demonstrate to the
student how to achieve the required Guidelines to Activities
competence. Activity 17.1: Research work
Teaching guidelines 17.5 (pg. 344)
• Provide sample code for all the above Guide the learner to do this activity
styling features at the right time as in order for them to self-discover the
you cover the relevant content. need and importance of CSS in web
• Allow the student to code and run development.
his/her code to see the various Activity 17.2: Research work
styles practically in the browser. (pg. 349)
• Guide the student to do Activities
Guide the learner to do this activity. In
17.5 upto 17.11 on pages 355 to 364
essence, this is a reminder of what they
as is relevant during
did in Chapter 16 as you continue setting
the covering of the content.
the platform for CSS programming. This
In all the above, let the student test the being the first time they are using Style in
results in a localhost server. a HTML page, the learner will obviously
be excited.
Creating CSS page from Scratch
Activity 17.3: CSS coding
strategies (pg. 352)
Guide the learner to do this activity and
(4 periods)
let them understand when to use which
By the end of this section, the learner strategy.
should be able to create a fully functioning
Activity 17.4: External CSS
CSS page.
example (pg. 353)
Materials: a computer connected
Guide the learner to apply external CSS
to the internet, student text book,
as the example shown in this activity.
whiteboard, projector, text editor,
After coding and running the code
projector.
correctly challenge the student to come
up with more external CSS examples.

207
Activity 17. 5 – 17.6 Fonts Activity 17.12 – 17.13: Setting
(pg. 355 - 6) padding (pg. 366 - 9)
Guide the learner to do this activity. Guide the students through this activity.
Draw the knowledge of the student Let each student set paddings as
using fonts in other applications like MS- instructed
Word and let them understand the same Activity 17.14: Creating CSS page
concept in the coding here. example (pg. 369)
Activity 17.7 – 17.8 Margins Guide the students through this activity.
(pg. 357 - 8) It is a complete CSS development activity.
Guide the learner to do this activity. Activity 17.15: CSS assignment
Draw parallels with margins in word (pg. 385)
processors to drive the point home.
Give this assignment to the students.
Activity 17.9 Hiding elements Guide them where they get stuck and
(pg. 359) require help as they progress.
Let the students hide and unhide
elements practically in CSS.
Answers
Activity 17.9 Hiding elements
Unit Test 17 page 372)
(pg. 359)
a. style attribute
Let the students hide and unhide b. comma
elements practically in CSS.
c. absolute
Activity 17.10 Background d. :hover
example (pg. 361) e. scroll or auto
Guide the students through this activity. f. span, div
Let each student set a background color g. -y
using CSS. h. clear
Activity 17.11 CSS float property i. text-indent:
(pg. 366) j. margin, border and padding
Guide the students through this activity.
Let each student set float properties for
elements.

208

Potrebbero piacerti anche