Computer Science: Syllabus 4021 For Secondary Schools
Computer Science: Syllabus 4021 For Secondary Schools
SCIENCE
Syllabus 4021
BOOK 1
UPDATED CURRICULUM
ZIMSEC EXAMINATIONS
@ LJHF 2019
1
TABLE OF CONTENTS
TOPIC PAGE(S)
Introduction to Computer Science 3-11
Programming 120-134
Databases 135-147
Technopreneurship 158-165
Chapter 1
2
INTRODUCTION TO COMPUTER
SCIENCE
COMPUTER LAB RULES
Computers are special machines that require discipline and care when
using them.
Discipline and care is called for in order to avoid
3
ALSO learners should make sure that they
-follow the correct procedures when switching a computer on or
off.
-report to the teacher any computer problem
What is a computer?
A computer is an electronic machine that works under the control of a
stored program. It has the ability to accept data, process that data, store
it, transmit it or produce desired output. Computers are used as tools to
make our everyday work easier.
The world is experiencing rapid changes and computers are playing a central
role in these changes. People must therefore be willing to adapt to the
changes that computers are bringing otherwise they will be forced to. Studying
computers is not just out of choice but has become a necessity to do so.
4
System
Unit
TYPES OF COMPUTERS
Computers come in different shapes and sizes and for different uses.
Computers can be classified according size, processing power or use.
(a) Palmtops are computers that can be used while being held on the
palms. Palmtops are a type of microcomputers. Examples include
PDA, iPads, calculators and tablets.
(b) Laptops: are computers that can be used whilst on the laps. They
are also a type of microcomputers. Examples include Net books and
Notebooks. They have fixed keyboard and touch pads.
5
(c) Desktops: these are computers that can only be usable if placed
on a desk or table. They are also a type of micro computer.
Desktops usually comprise of a separate keyboard, mouse, System
unit, printer, and other peripherals
Uses of Microcomputers
-offices, homes, schools, banks, security, weather stations, etc
-used in small business applications.
-can be used by students, teachers, managers and other people in
the home.
Advantages of Microcomputers
-Most of them are portable and handy
-relatively cheap
-easy to work with
-they are general purpose machines
-can process small to huge amounts of data
-some operate on battery and can be used in areas where there is no
electricity.
Disadvantages of Microcomputers
-Some are portable and some are not.
-smaller capacity compared to mini, mainframe and
supercomputers
-easily stolen.
-some have limited use.
2. Minicomputers/Midrange computers
6
processing, file handling, and database management, and are often
now referred to as small or midsize servers.
Advantages of Minicomputers
-more powerful than micros
-huge storage
-fast in processing than microcomputers
Disadvantages of Minicomputers
-less powerful than mainframe
-more expensive than microcomputer
-not suitable for personal use
3. Mainframes
Mainframes acquired their name because of their size, typically as large as a six-
foot-tall closet. They also required specialized heating, ventilation and cooling, as
well as a dedicated power supply. In practice, this meant a separate room had to
be dedicated to house the mainframe computer systems. They are used by
institutions to serve multiple users from personal computers used by individuals.
Mainframe computers are capable of handling and processing very large
amounts of data very quickly - much more data than a typical individual needs to
work with on his or her own computer.
7
Advantages of Mainframes
-more powerful than micros and minis.
-huge storage
-fast in processing than microcomputers
-can process huge amount of data.
-can connect so many computers and so many networks.
-have time sharing capacity
-can deal with complex mathematical business
Disadvantages of Mainframes
-less powerful than supercomputer
-most expensive to buy, operate and maintain than microcomputer
and minicomputers.
-not suitable for personal use
-require special room well ventilated by air cons
-produce a lot of heat
4. Super computers
Advantages of Supercomputers
-fastest of all
-sizes differ
Disadvantages of Supercomputers
-most expensive
-may be bigger than mainframes
9
Washing machines, cameras, microwave cookers, refrigerators, video
recorders, sewing machines, air cons, toys, rice cooker, dish washing
machine, TV, alarms, clocks, radios, DVD players, etc
HYBRID COMPUTERS
A computer capable of performing digital and analogue operation on the
same device. E.g. flight simulator and an intelligent robot and also a
modem
They are common in Science and engineering applications, Airplane
design and flight simulators and in military uses such as anti aircraft and
gun aiming.
ANALOGUE COMPUTERS
Computers that handle data of a continuous form. They work with the aid
of sensors. E.g. analogue watches (those with arms)
-They process data in form of electrical voltages and hydraulic pressures.
-They are similar in operation to measuring devices and thus measure
variable magnitudes.
-Output from analog computers is often in form of smooth graphs from
which information can be read
E.g. Temperature readers, voltage, sunshine, car and wind speed, sound,
light etc
-analogue computers are mostly used in research and engineering
institutions
DIGITAL COMPUTERS
-a computer that represent data in bits e.g. digital watches. Computers
that handle data of a discrete values, i.e. digital data. Zeros and ones.
-Are the most common types of computers which store, process and
represent data in discrete values of 1s and 0s.
-They also use the value 1 to mean ON and 0 to mean OFF
-Each number, letter or special symbol is represented as series of various
combinations of 1s and 0s.
-used to store record and manipulate files
-examples are Digital watch, desktops, laptops,
-Digital computers are used in business, schools, hospitals and homes
COMPUTER HARDWARE
These are the physical mechanical or tangible components of a computer.
From the diagram above, examples are printer, System unit, speaker etc.
Computer hardware is classified as
(a) input hardware
10
(b) and the Processor
(c) output hardware
(d) storage hardware
(e) communication hardware
ELEMENTS OF A COMPUTER
INPUT-A stage or process by which data is entered into the computer
using a variety of methods. E.g. using the keyboard to type a letter, using
a scanner to input a picture, writing on the computer screen using a
stylus pen. Etc
PROCESS- A stage when input data is transformed from one state into
another. E.g. calculated, sorted, compared, formatted, etc
STORAGE
-When data or information is stored into the computer for future use. Each
individual piece of information is stored under a unique name in a unique
folder. A received email can be stored for future use. Download notes
from the internet can be kept in the computer.
OUTPUT
-This is the result of processing presented as hardcopy or softcopy.
Hardcopy is tangible output such as on paper while softcopy is
information displayed on a screen.
CONTROL
-This an ongoing process where a computer (itself) coordinates the
general activities of the whole computer’s internal or external processes.
E.g. handling computer interrupts, handling computer errors, managing
two or more programs running on the same computer, fetching data and
executing the instructions as to how the data should be correctly
processed etc
ELEMENTS OF A COMPUTER
CONTROL
11
CHAPTER 2
Hardware: INPUT DEVICES
These are Devices that receive data or instructions from sources outside
the computer (CPU).
OR -A category of hardware that is used to enter data into the computer.
-some input devices are for direct entry such as the keyboard while other
input devices collect data automatically Such as Optical mark readers.
-all input devices whatever the size or name, get raw data or instructions
to the computer for processing.
1. Mouse
-A mouse is a pointing input device that is used to input data or
instructions by clicking on items on the screen. A mouse is a pointing
input device that rolls on a flat surface to control a pointer on the screen.
USES OF A MOUSE
Opening, closing and minimizing
software and document windows.
-moving, deleting or grouping items
-useful when editing images.
-clicking and dragging item during
movement or copying and pasting
-position the cursor when typing
-scrolling up and down or left and right a
document
-selecting options from a menu or from a
set of icons.
Mice are used on desktop computers and
can also be connected to a laptop as an
alternative to the laptop touch pad.
12
- A mouse can have a scroll button (wheel) which speeds up the process
of moving through a displayed document.
-some mice are codeless
-most mice take up a shape like a real mouse (creature)
-another special mouse is called a tracker ball
Advantages of mice
-optical mice do not pick up dirty easily.
-faster than the keyboard
-allows rapid navigation through folders and applications
-small and take up little desk space.
Disadvantages of mice
-old mouse types get dirty easily.
-people with disability of hands cannot use a mouse
They quickly get damaged
-they are difficult to use if there is no flat surface
2. KEYBOARD
-a device used to enter data or instruction into the computer mostly by
typing.
TYPES OF KEYBORDS
- QWERTY KEYBOARDS.
Or standard keyboard spell QWERTY on the first line of letters hence are
called QWERTY keyboards.
-CONCEPT KEYBOARDS
Are special and specific purpose input devices.
-they are intelligent input devices containing their own chips to process
instructions.
-each key has its ASCII equivalent. -uses icons and phrases instead of
letters.
-they are not common keyboard because they are not standardized.
-they are used in fast food restaurants, offices, shops, bars and cinemas
where single key represent an item. E.g. a key labeled TAX may result in
the computer calculating tax once pressed
-numeric keypad may be common in retail like supermarkets and ATMs As
well As Chip and Pin Machines including EPOS.
-used when working with spreadsheets
13
-ERGONOMICS KEYBOARD
Have shapes and design that help reduce health related problems such as
Carpal tunnel problem and RSI (repetitive strain injury.)
-most have funny shapes.
-ergonomic keyboards allow hands to be comfortably placed on keyboard.
-BRAILLE KEYBOARDS
-are used for visually impaired people. Its letters can be felt by the finger
because they are embossed on the keyboard surface.
Advantages of a keyboard
-always available as a standard input device
-well tried technology and a well known data entry method.
-easy to use once mastered
-data can be verified before processing as it appears on the screen.
-concept keyboard are fast to use than stand keyboards.
-concept keyboard are usually waterproof
-there are special concept keyboards designed for young children.
-concept keyboard are available for handicapped people such as
fingerless, or single fingered hands.
-most familiar input device.
Disadvantages of a keyboard
-different lay require users to study them before use.
-difficult to use at first.
-causes repetitive strain injury (a health problem)
-slow when entering large amounts of data.
-typing mistakes are common with keyboards.
-those with arm problems find it difficult to use.
-keyboard entry is slow to beginners and when compared to other
devices such as the mouse.
-take more desk space than the mouse.
-concepts keyboard are limited to specific applications.
-Key arrangements make typing difficult.
-standard keyboard gets dirt easily
3. SCANNERS
A scanner is an optical input device that reads a pattern of printed
bars that appear on products.
-an optical input device used to capture image data for digital
transfer into a computer.
TYPES of scanners
-Bar code reader
14
-Flatbed scanner (Document scanner)
-hand held scanner
-document readers
(OMR, OCR, MICR)
-biometric scanner
Advantages of a scanner
-scanned document can be saved in different document formats
-paper copies can be stored electronically where there is no wear
and tear.
-images can be stores for editing at a later date
-they are faster and more accurate than typing again
-it is possible to recover damaged images by scanning them and
then use appropriate software to produce an acceptable copy.
Disadvantages of a scanner
-it takes long to digitize long documents
-the quality of scanned document might be compromised due to
scanner resolution.
4. BARCODE READERS
-a barcode reader an optical input device used to enter product
identification code made of printed thick and thin bars into the computer
-a bar code is a product identification code made of printed thick and thin
bars
15
Information shown on supermarket products differs with the country or
system used one being the European Article system. This shows
information such as product
1. Country of origin (country code)
2. Manufucturers number (company code)
3. Product number or code
-After the above information is read from the product bar code,
the computer then looks up for more information from a computer
database such as
-name of product
-the price
-etc
16
Disadvantages of a bar code reader
-an expensive system to install.
-staff training is expensive
-workers can swap bar codes on supermarket items thus
undercharging or overcharging (or misinform the computer)
6. DOCUMENT SCANNERS/READERS
-these are types of scanners that read written documents, text or
images.
TYPES ARE
1. FLATBED SCANNER
2. MICR
3. OCR
4. OMR
Flatbed scanner
-it is a document reader. It is flipped up and then an image is placed
on a glass surface. The user closes the lid before scanning a
document.
-the scan head moves across the image to scan it.
-most common in supermarkets, department stores and educational
institutions as well as in photo processing shops
17
These are automatic data entry devices used in banks for clearing
cheques.
18
OMR is an optical input device that automatically reads paper
based characters (i.e. Text or marks manually written in pen or
pencil.) into the computer.
-the technique is also called MARK SENSING. (Mark sensor- for the
device)
- The optical mark reader detects pen or pencil marks upon the
form or paper and relays this information to the computer for
storage.
-users prepare documents with pen or pencil on paper and then
taken them to an OMR for automatic input to the computer.
- OMR use is application based. That means not all computer
systems use OMR technology.
7. BIOMETRIC SCANNER
-A pattern recognition system which makes a personal identification
based on person’s unique physical characteristics
VARIATIONS
-face recognition biometric scanner
-finger print matching
-iris and retinal scanner
-voice recognition system
=Hand geometry
USES
-users come and talk into, touch looks etc into the scanner as a way of
inputting data.
-can be used in mobile phone
-desktop and laptop computers
-smart cards
-can be used to control entry to buildings
-can be used to replace keys in a car.
Advantages
19
-no need to remember or carry personal identification
-a good security measure
-the person has to be present thus theft and fraud is reduced.
Disadvantages
-not yet sufficiently accurate, paper documents still necessary
-computers are prone to error
9. WEBCAM
(Web camera) A digital video camera designed to capture motion
pictures or still images or photographs and transmit then over the
internet. - A webcam is a type of video camera
-it can also take still pictures or photographs.
20
-used to input moving images from a fixed position
-webcam are used on laptops and notebooks where they are in-
built.
-a webcam can be externally connected to a desktop.
-used on voice over internet protocol systems (video conversations
over the internet where sound and picture are found)
-used in video conferencing.
-used for virtual classrooms environments where student listens and
view their teacher from the comfort of their homes.
-used in e-commerce by advertising organizations
-used for checking children activities in nursery schools
-used in weather forecasting around the globe,
-used in traffic monitoring systems in roads
-used for on line charting e.g. on SKYPE
Advantages
-can be installed at home or workplace as a security method to be
vied over the internet at a distance.
-people can keep in contact with each other without need to travel.
Disadvantages
-output is affected if there is not internet connection.
-the video output may have poor resolution.
-fixed position and usually can see one view
-need for a huge backing storage
-May slow down the internet during uploading -if large and bulky
21
-they are used by phographers as a way of life
-They are used in adverting
-they are used by news agents or journalists
-Digital cameras can be connected to a computer or photo printer
directly using a USB cable or use a portable card or else using
Infrared technology.
-mobile phone have digital camera too fixed on them.
ADVANTAGES
-they are hand held.
-images can be of high resolution
-most cameras accept additional memory
-moving images from camera to computer is easy
-a wide range of digital cameras are available.
-digital camera are not very expensive
-users can edit the images in a number of ways
-uploading photographs to a computer is fast
-digital photo are cheap to develop than film based ones.
-it is easy to delete an image from card and memory
-the memory cards used can serve several hundreds of images.
-quicker to produce a photo even while you wait.
-no need to use chemicals in developing
-a number of images can be taken for later comparison
-images can be placed in documents such as spreadsheets or word.
-can use software to improve the image.
-digital camera are portable.
-memory card readers are available in shops.
DISADVANTAGES
-once camera cards are on PC, they can be affected by virus.
-there is need for training to be able to use them effectively
- Films consume more camera memory.
-sense of original art is lost as computers can help edit a photo.
Resolution varies from camera to camera.
-in real practice, memory easily gets full.
-some films used to produce had high quality image better than some
digital cameras.
-computer skills are required to use a digital camera.
-special software is needed to edit a camera image
11. MICROPHONE
An analogue input device for voice or sound (audio) data only.
-used in presentations on a large gathering just for amplified output.
-used in studios in music applications
-used in churches
-used for setting up voice recognition systems.
22
-used in video conferencing
-used on mobile phones and PDA for speech input.
-used on PC
-used together with voice recognition systems
-used in voice mail systems or messages
-used with MIDI systems (Musical instrument digital interface- i.e.
hardware and software that connects musical instruments to a
computer.)
-used in natural language processing systems.
-used in cars
-used in voice over internet protocol platforms
ADVANATAGE
-easy to set up
-promote hands free
-One can dictate letters and other documents directly into a word
processor
-can take part in telecommunication platforms
-can add spoken words to a website, presentation or other multimedia
products.
-can be effectively used by disabled who cannot type
-some microphone are cheap to buy.
-faster than typing
DISADVANTAGES
-software has to be trained to understand voice
-users needs to determine the distance of mouth from microphone
otherwise input is disturbed.
-background noises can cause problems
-prone to error
-sound files when stored take up a lot of disk space
-microphone easily get damaged if not properly handled.
-some with short circuits causes shock.
-in hospitals.
23
-Data loggers with permanent computer connections are suitable for
science experiments in schools.
-In pollution measurement system e.g. in rivers or dams
NB -data logging has many application and fields that cannot be
exhausted in this column.
-a touch screen is an input device that can detect the presence and
location of a touch to the screen and also respond to the touch.
-touch screens respond to touch because they use sensors to detect
the touch.
-the type of sensors used differs with the touch screen technology.
-the touch screen is a special type of an LCD
-used in kiosks, airports, railway stations, tourism offices etc for public
information
-on tablets/PDA
-smart phones
-on finger prints detection systems e.g. at some ATMs at bank
-used in shops at POS terminals
-used in fast foods restaurants and bars
-used in department stores and supermarkets
Etc
-used as part of INTERACTIVE WHITE BOARDS (large wall screens)
for education
-used in CBT for answering on-screen tests.
ADVANTAGES
-simple to use
-can be used whilst standing or in bed
-Do not take up lot of useful space esp. Smartphone
-they are tamper proof, i.e. other data besides what it understands
cannot be entered.
-less dirty than keyboard and mice
-easy to clean
-data and instruction entry is fast
DISADVANTAGES
-screens can get dirty
-bacteria/germs can be easily spread when everyone touches the
Same screen
-they cost more than their alternative input devices
24
-once screen is damaged, whole device stops working
-they have limited uses.
-lead to strain of muscles i.e. RSI
13. SENSORS
-A sensor is an input device that detects an environmental condition
and respond by outputting a signal.-A sensor is an input device that is
used to detect physical quantities from the environment for input to
the computer.
-a sensor is an input device that is used to detect an external change
in an environment.
SOME ENVIRONMENT CONDITIONS AND TYPE OF SENSOR
LIGHT SENSOR
Used in photo processing machines, street lights, home lighting
systems, etc
SOUND SENSOR
-they detect sound esp. of a specific pattern and thus they can be used
in different setups.
-environmental heath office can use sound sensors to detect level of
sound from the neighborhood such as from bars, homes, etc where
music is being played. -Burglar alarm systems, -monitoring liquids
power flowing in pipes.
25
manufacture of microchips -spray painting systems -used in dams and
river beds.
PROXIMITY SENSOR
The sensor has two parts. If the parts are moved away from each
other, then a signal is output.
-also detects distance from objects. -installed in windows to report
burglary by use of alarms.
-used in cars to warn driver of objects ahead or behind.
POSTION SENSOR
-it detects an angle of turn, rotation /or spindle. -used in robot arms
PH sensor
-This Type of Sensor Is Usually submerged In Liquids, Soil or Solutions -
Used to find out how basic or acidic a solution is. -Greenhouses to
monitor soil acidity -chemical processing plants, -environmental
monitoring. -used to measure acidity in rivers (pollution monitoring)
ADVANTAGES
-they are continuous and reliable
-they collect data that human being cannot gather or present
accurately
-data recorded by sensor is presents into a way that a computer can
handle
-limit human labor e.g. travelling
DISADVANTAGES
-sensors cannot interpret data
-sensors detection of environmental data is very much restricted to a
specific area.
26
14. STYLUS PEN
A pen like input device that can be used on a screen to draw point and
select as well as write as if using a manual pen. A stylus pen is a
development from a light pen.
To use it you hold the pen in your hand and write or draw on a special
pad or directly onto the screen.
-the pen can also be used as a pointing device and to select options on
the screen
-they can be used to write documents as save them in a desired
document format such as word or pdf.
-they are modern pens that are used with LCD screens.
-the computer that used a stylus pen must have special software, a
dictionary of terms
ADVANTAGES
They are used on signature pads, -on tablets and PDAs and -on some
smart phones
-can be used to detect people handwriting
-faster to enter data in own handwriting as people are used to manual
pens already
DISADVANTAGES
-can be easily lost
--can be uncomfortable as hand remains firmly fixed to the pen for
long
-You hold the pen in your hand and write or draw on a special pad or
directly onto the screen.
-the pen can also be used as a pointing device and to select options on
the screen
-a light pen is a light sensitive input device which when placed onto the
screen its pixels position is detected and coded special monitoring
software.
-the light pen contain a sensor.
-it has the same uses a mouse have.
27
-they were common with CRT screens and technology changed; they
are very few in existence.
Nb. can only be used to draw and also point and select.
-popular in CAD (computer aided design) systems and are also used on
graphic tablets
ADVANTAGES
-easier to use than a mouse or keyboard.
-produces more accurate lines when drawing than a mouse.
-they have greater accuracy in pointing than when using fingers.
-can be used where there is no space for keyboard or mouse.
-easy to keep clean
-portable
DISADVANTAGES
-can be uncomfortable as hand remains firmly fixed to the pen for long
-can only be used with CRT type screen and not LCD and TIF screens
-easily get lost
-sometimes there are problems of lag (delay) when drawing.
-not very accurate in drawing.
28
(a) Used as CREDIT CARD (like debit cards but these do not deduct
money from issuing organization immediately. The organization
will makes payments at a later stage or date after card has been
used. E.g. VISA and MASTERCARD.
(d)Used as DEBIT CARD (they are issued by bank and can used in
supermarkets for cash withdraws or for purchases) users of the
card must have a bank account from which the money is
withdrawn.
They are use -in banks -by government agencies for travelling -in
libraries to read borrowers number
29
-at filling stations -used as ID Cards -can be used as public passport
passes -used with satellite systems to decode program signals -they
are used as driving licenses. -used to withdraws cash at ATMs
-the reader has a slot in which the card is slotted to be read. It is not
swiped.
-a PIN is entered using a number keypad
-the reader has a small screen that displays instructions.
-usually data stored in the chip is encrypted.
30
-they are affected when computer network is down usually in banking
system
-users cannot see information on the card
-hold small amount of data
This is a special screen sensitive pad that is used for graphics with a
stylus pen.
It is a separate pad that is connected to a computer.
-as the user draws or writes on the pad the drawing is directly entered
into the computer and can be stored in the computer.
-they are ideal for inputting free hand drawings.
-they can be use for retouching digital photographs
-items can be added to it by clicking on it with a stylus.
-They are used for inputting free hand drawing into the computer
-retouching digital photographs
-used in CAD systems
31
-It is used on DVD readers, home-theaters systems, satellite receivers,
HI-FI music systems, multimedia projector, model cars, toys, garage
doors
32
Chapter 3
HARDWARE : OUTPUT DEVICES
To view what the computer has processed for us we use what we call
OUTPUT DEVICES. Visual devices (including Visual Display Units [VDUs],
screens, OR monitors) Hard copy devices (including ink jet printer, laser
printers, dot-matrix printers, and plotters), Sound devices AND Computer
controlled devices (including robots) These devices show us information in
various forms that is as softcopy, or hardcopy as well as sound or light.
These output devices are actually peripherals that receives data from a
computer, usually for display, projection, or physical reproduction. Below
are the most common output devices.
LCD SCREEN
LCD screens are most often seen on portable or laptop computers
33
These are used in these applications because they are small and
light.
Also used where space is at the premium.
The molecules this substances line up in such a way that the light
behind the screens and creates an image.
Use in banks and Multinational companies
CRT MONITOR
Creates the image on the screen through electronic beam
This is same type that is use in Television
It consists of one or more guns
These guns generate red, green and blue (RGB) colors.
2. PRINTERS
A printer prints character, symbols and graphics on paper.
Printers are used to produce hard copy output.
Print resolution is commonly measured in dots per inch (dpi)
They have vast differences and are for different uses
Two major categories or types of printers are:
Impact Printer and Non Impact Printer
IMPACT PRINTER
-act like a typewriter
34
It prints characters or images by striking a print hammer or wheel
against an inked ribbon. Examples of impact printers include Dot
matrix printer, Line printer, Daisy wheel Printer, chain printer and
drum printer.
The Braille is mainly used by the blind. The most common printer types
are the once given above though the matrix printer is also finding its way
out of the system.
35
slower than laser printer but faster than dot matrix printer
They can print 1 to 6 pages per minute
Cheaper in price
Satisfactory in color
3. Speaker
4. Plotter
36
Plotters are used to draw different designs of buildings or internal
structure of machines. Mostly Engineers and Architects use plotters. They
are in different types, shapes and sizes.
5. Multimedia Projector.
6. Control devices
37
CHAPTER 4
(a) DVD DRIVE- used to read CD and DVD only. Some can also
write
Both the CD and DVD i.e. DVD writer.
(b) CD DRIVE- used to read CD only. Some can also write the
CD
(d) TAPE DRIVE- used to store and retrieve data from specific
type
Of magnetic tape. Drive varies with type of tape used.
(f) BUFFER
Temporal memory in the computer used in data spooling during
38
Input and output of information.
(g) PORT
A connection point onto a computer for a peripheral device.
PRIMARY STORAGE
Is also called immediate access memory or, Main memory or Core storage
or Working memory or Primary memory or internal memory. PRIMARY
MEMORY is found inside the computer on a motherboard fixed on a
memory chip slotted onto the motherboard. PRIMARY MEMORY
-Primary memory (main memory) is the group of chips inside the
computer that holds data temporary whilst processing takes place. This
data is readily available for computer use.
-there are two types of primary storage namely RAM and ROM (Random
access memory and Read only memory)
-at the time of writing of this book some computers have a RAM capacity
of 4GIG.
RAM
39
Random access memory. -data held in RAM is temporal. The contents of
RAM disappear if computer is switched off hence it is said to be volatile
and is used to store user data operating software and application
programs. RAM is used to hold data during processing
-holds operating system control programs during processing
-holds application programs during processing.
-modern printers have RAM memory.
ADVANDAGE O F RAM
-data is written and read at a very high speed.
-computer has fast access to data in main memory.
-it can be updated (added)
-RAM chips are locally available.
DISADVANTAGES OF RAM
-it is volatile i.e. it loses contents when power is cut.
-storage is limited.
-older computers have too little storage capacity for RAM
ROM
Read only memory). -holds data and programs that cannot be changed by
the user. Information on a ROM chip is called firmware. They are hard-
wired onto the motherboard. When a computer is switched on, the first
programs to run on the computer comes from ROM.
-ROM is permanent, non volatile and is used for booting routines.
All forms of ROM are used to hold programs used to boot a computer IE
(to load the O/S when a computer is switched on. -Stores BOIS (basic
input output system (information needed by the computer at start up. -
stores control programs needed by the computer. -stores translator
programs. -The ROM technology is used in the manufacture of CDs and
DVDs. -ROM is a type of WORM (write once Read many times) technology
PROM
40
-Programmable read only memory. This memory allows the user to
program it, but once programmed it becomes permanent ROM.
-differs from normal ROM in that ROM comes programmed by the
manufacturer while PROM can be done by the user.
EEPROM (EAPROM)
Electrically Erasable Programmable Read Only Memory
Or
Electrically Alterable Programmable Read Only Memory.
-just like EPROM, the difference is that the memory is not manually
removed from the computer. The processing is however done electrically
and it is slower to reprogramming EPROM electrically.
ADVANDAGEs OF ROM
-memory is permanent (even when the computer is accidentally switched
off, ROM is not affected)
-it is non-volatile
DISADVANTAGES OF ROM
-not easy to change (Non volatile)
-electronic errors can happen during erasure and this affects the process
SECONDARY STORAGE
Is also known as backing storage, auxiliary storage, external storage, or
permanent memory. SECONDARY STORAGE -includes disks, tapes,
flash, pen drives etc that are connected to the computer motherboard
through ports or cables.
HARD DISK
-circular storage media made of a metal coated with a magnetized
material
-there are two types i.e.
fixed hard disks and
External hard disks.
41
-data is stored randomly onto the surface.
-data is stored in-situ randomly onto the surface, i.e. that means in can
be overwritten.
-There are several types and sizes of hard disks
-The common once are the Desktop and laptop hard disks, but we also
have Mass storage HD Media disk used for a variety of applications
especially in broadcasting business.
-fixed hard disk (fixed permanently in the computer) may contain
multiple disks called a disk platter or disk pack. This platter is actually
a disk pack that can be changed. It gives the inseparable disks a
cylindrical shape and has read write heads in between disks and one drive
spindle for all the disks in the middle of the disks.
-the disk surface is made up of tracks, sections and inter-block gap
separating the sectors.
Cylinder- the same track number across all disks on a disk platter/pack.
-Fixed hard disk are used to store operating systems and application
programs
-external disks can be used for backup
- External hard disks can be used to boot up computers that fail
-external hard disks are used to store data and programs that need to be
transferred from one computer to another.
-all the two types can be used to store user information.
-fixed hard disks are used in real time systems (e.g. robots, control
systems and airline booking etc.
-fixed disks are also used as file servers for computers on a network or on
internet.
CD (COMPACT DISK)
-a flat portable circular optical storage media
42
-it is a type of WORM device (write once read many) times
-also called CD ROM
Nb all types of CD and DVD are called optical devices- because they use
laser technology . All types of CD and DVD are called WORM devices- i.e.
(write once read many times)
CDs Store data as a series of (optical pattern called) bumps using laser
beam technology. They are read only memory devices.
-can store up to 700MB
-differs with DVD in that their surfaces are lighter in appearance and have
a smaller capacity
-Again a CD drive cannot read a DVD while a DVD drive can read both the
CD and DVD.
-data is stored randomly onto the surface.
USES OD CDs
-used to hold music and software for distribution.
-used to hold animation files
-used to store computer data and programs
-used to boot up a computer.
-used for back up
-Most common on PCs
-most software is sold on CD rather than DVD
-used for archive data
-DVDs differ with CDs in that their surfaces are dark in appearance and
have a bigger capacity
43
-some store up-to 4.7 GB of data and others 8.5GB other up-to 100GB
-data is stored randomly onto the surface.
4. Blu-ray (BD-R)
-a new technology with a high capacity than other DVD types (from 25GB,
50GB, 100GB)
-used to store high definition videos
-it is possible to playback a blu-ray video disk and record it simultaneously
onto another media.
-data access is faster than on other DVD types.
-However they are expensive -They allow data encryption at disk-write
time and this is helpful as it avoids piracy.
USES OF DVDs
-Used to store videos and films for sale or distribution.
-Used for back up
-Most common used on PCs and DVD players
-used to archive data
44
-used for storing TV programs that do not need any update
-Blu-ray disks are used to store high definition videos
-Blu-ray disks are used for long play films- 2 hours and more.
-blue ray are also used in home video consoles.
-blue ray are used as back up for hard disks.
-DVD RAMS - Used in satellite receivers and Camcorders.
MAGNETIC TAPE
-A thin continuous film strip of plastic coated with a magnetic layer of iron
particles.
-Magnetic tape differ in types however the computer tape drive is just like
the CD drive, that is mounted onto the computer for tape use.
-the cassette tape is used in radios while the video tape is used for Video
tape players.
-data is stored serially or sequentially.
-data transfer rate (writing) is faster than data retrieval rate.
MEMORY CARDS
-These are small cards that are used to store data
-they are an example of solid state devices.
-data is stored on a chip inside them
45
-they are used to store data that needs to be transferred to a computer at
a later stage.
-used in digital cameras, mobile phones, palmtops, laptops and MP3 and
MP4 platters.
-can be used in digital photo processing system.
-used to stored photos on digital cameras.
-used as back up for data.
- FLOPPY DISK
A single thin disk made of a flexible plastic. -also called diskette. -stores
data on both sides. Each side has its own read write head. -they store
data in-situ randomly on their storage spaces.
There are no-longer in use today.
They were used
- To boot up a computer.
- On desktop PC to hold data files
- To hold driver software for hardware installations
- To transfer data from one computer to another.
-as back up.
46
-external hard disks are portable.
-all hard disks are fast when transferring and accessing data.
-all hard disk are even faster than DVD, CD, tapes, floppies and flash
memory
-they have a very large storage capacity.
-most have long life span except for floppy disks and CDs
-it is easier to store and update data on disks.
-large storage capacity for most disks and tapes and flash memory
47
CHAPTER 5
Control unit(CU) 48
DATA FLOW
CONTROL SIGNALS
ALU
-performs arithmetic (addition, multiplication etc) and logical operations
(AND, OR, comparisons, etc) of the computer.
CU- fetches instructions that specifies how data is to be processed,
decodes the instructions and execute them.
-coordinates and control hardware operations.
MAIN MEMORY
This is where data or information and instructions are stored before,
during and after processing.
EXERCISE
Identify hardware devices in your school by name.
explain how each hardware devices work
demonstrate how to connect each of hardware device
49
CHAPTER 6
COMPUTER SOFTWARE
Applets are small applications that sometimes come with the operating
system as "accessories." They can also be created independently using
the Java or other programming languages.
Shareware : software usually intended for sale after a customer has had
a trial period.
50
Liteware : shareware with some capabilities disabled.
52
Monitors system performance through Task Manager and other tools.
Produce error messages and troubleshooting options.
Implement interface for network communication.
Manages printers in single or multi-user systems.
Internal or network file management.
2. Device Drivers
A device driver is a piece of software that controls a particular type
of device (peripheral) which may be attached to your computer, such as
a keyboard or a mouse. Each peripheral device that we connect to the
computer must have its unique driver software installed. Driver software
ensures communication of a specific device with the operating system. By
default certain for devices already in the market come with the operating
system and some have to be added at a later time when the a new device
is added to the computer.
Examples of devices which require drivers:
Mouse
Keyboard
Soundcard
Display card
Network card
Printer
If a device is newer than the operating system, the user may have to
download drivers from manufacturer websites or alternative sources.
3. Firmware
Firmware or microcode is software that is loaded into a special area on
a microprocessor or read-only memory(ROM) this software is permanent
or may be changed after a long period of using the computer. Firmware is
embedded in ROM, or EPROM memory chip for the OS to identify it. It
53
directly manages and controls all activities of any single hardware.
Examples are:
(b) Interpreters and compilers all translate high level language into
machine readable form however they differ in one way or the other. See
separate notes for more details on translators.
Besides simplifying the work of software developers, translators help in
various design tasks. They;
Identify syntax errors during translation, thus allowing changes to be
made to the code.
Provide diagnostic reports whenever the code rules are not followed.
Allocate data storage for the program.
54
List both source code and program details.
5. Utilities
Utilities are system software programs designed to perform diagnostic
and maintenance tasks for the computer . It is a type of system software
which sits between system and application software. They come in handy
to ensure the computer functions optimally.
Most are third-party tools but they may come bundled with the operating
system.
Examples and features of utility software include:
Antivirus and security software for the security of files and applications,
e.g., Malware bytes, Microsoft Security Essentials, and AVG.
Disk partition services such as Windows Disk Management, Ease Partition
Master, and Partition Magic.
Disk defragmentation to organize scattered files on the drive. Examples
include Disk Defragmenter, Perfect Disk, Disk Keeper, Comodo Free
Firewall, and Little Snitch.
File Compression to optimize disk space such as WinRAR, Winzip, and 7-
Zip.
Data backup for security reasons, e.g., Cobian, Clonezilla, and Comodo.
Hardware diagnostic services like Hard Disk Sentinel, Memtest, and
Performance Monitor.
Data recovery to help get back lost data. Examples include iCare Data
Recovery, Recuva, and EaseUs Data Recovery Wizard.
Firewall for protection against external threats, e.g., Windows Firewall.
Etc
B] APPLICATION SOFTWARE
55
simply an app. Application software uses the capacity of a computer
directly for specific tasks and are used to manipulate text
( alphabetic letters and symbols) , images or graphics (pictures,
drawings and diagrams) , numbers ( digits 0-9.) audio and video
data.
56
BENEFITS OF CUSTOM MADE SOFTWARE
1. Simplicity
Bespoke software is designed specifically around your business so you
don’t have to worry about unwanted features or unfamiliar terminology
that is not appropriate to your business. This reduces learning time and is
obviously more efficient to use.
2. Branding and Identity
With unique tools, such as forms and auto messages in your brand voice,
you will stand out from the crowd. Sometimes even a simple detail can be
a key differentiator between you and the competition.
3. Efficient Workflow
it is both faster and easier to use.
4. Complete Development Ownership
There is no pressure to upgrade. This also means you won’t have
problems such as new versions not being backwards compatible with old
data or the screen layout changing and incurring a new learning curve.
It’s your software, and your decision.
5. Potential Marketability
a bespoke solution for you could become an off-the-shelf solution for
other businesses. You can sell it and make money.
6. Locally specific
most countries will have unique geographic parameters, such as currency,
time-zones and obviously languages. They may also have different
considerations for tax, VAT, and import duties. These can be fully
customized to your geographical areas.
7. Integration
Bespoke software can generally be customized to integrate smoothly with
any other key software used within the business – and introducing new
applications doesn’t mean the previous integrations will stop working.
57
CATEGORIES OF APPLICATION SOFTWARE
Multimedia Software:
Word Processing software - Use this kind of tool to create and edit
documents such as type letters, type novels , type notes, etc. Examples
are MS Word, WordPerfect, MS Works, AppleWorks , and Lotus Word Pro .
Internet Browsers - This software allows one to surf the Web. Often
they can read email and create Web pages too. Examples are Netscape
58
Navigator (or Netscape Communicator), MS Internet Explorer, AOL
Browser, Google Chrome, UC browser etc
Email programs - These programs send and receive email. Examples are
Netscape Messenger (part of Netscape Communicator), MS Outlook
Express, MS Outlook, Eudora, AOL browser.
59
are Java, C, C++, Visual Basic, C Sharp(C#), PHP, Python , Ruby,
JavaScript, SQL, etc.
EXERCISE
identify types of software
60
CHAPTER 7
Application of Computer Science
We have learnt in chapter one that a computer is a tool we can use to make our everyday
easier. Now let’s see how they are used or they can be used in each of the following areas.
Agriculture refers to the growing of crops and rearing of livestock. The following are
some of the uses of computers in agriculture:
1. Keeping records such as budget information, farm equipment inventories and animal
health forms .Like many small business owners’ farmers also use basic computer
programs such as databases for this
2. Farm implements such as tractors, fertilizers sprayers have computers that farmers
can program to automatically adjust the amount of fertilizers according to the
requirements of soil and crops which help in improving soil and higher crop yield.
3. Monitoring and Control systems for farm implements such as combine harvesters
and control system for green houses
4. Farmers often use global positioning system (GPS) receivers to electronically map
factors and areas that might affect crop yield, such as wet spots and weed patches
61
7. Geographic Information Systems (GIS) are being used for developing ranking
systems that evaluate land and provide a site assessment to aid what is now known
as precision agriculture. These hi-tech, interactive systems provide information
based on a variety of factors such as soil conditions, drainage and slope conditions,
soil pH and nutrient status, etc. Precision agriculture provides farmers with control by
predicting vital information including fertilizer application and problems with
drainage, insects, and weeds.
8. Global Positioning System (GPS) based technologies also help to monitor irrigation,
field mapping, soil sampling, tractor guidance and crop scouting. This kind of
technology equips farmers with enough information to increase crop yield in a
manner that is consistent with the best environmental practices for sustainable
agriculture.
9. Computer can also be used for inspection of agricultural implements, product quality
e.g. food quality etc
62
B] COMPUTER IN BANKING SYSTEMS
The following are some of the uses of computers in the banking system:
1. Storage of financial information for the bank and its clients.
2. Used to clear bank cheques using MICR(Magnetic ink character recognition)
3. Used for Printing correspondences, statements and account warnings, bank
cards, bank cheques etc
4. Used as security systems using CCTV, passwords and access cards and
security doors
5. Used for internal and external communication e.g. emails and chat sessions
6. Used for forms of online banking
7. Used for phone banking ( e.g. telecash, mukuru, Ecocash, onemoney etc )
8. Used for online (internet) banking e.g. make payments for ZESA and water
bills and apply for loans an also pay fees and home utilities.
9. Used for Electronic Funds transfer within same bank or bank to bank
10. Used for online application of bank loans
11. Used to process salaries
12. Used to prepare income and expenditure statements
13. Used for calculating foreign currency conversion
14. Used to read bank cards using chip and pin readers and smart card readers.
15. Used for ATM (Auto teller machine) to disburse money, deposit money,
change PIN (Personal Identification number) number, enquire account
balances and print mini statements.
16. Used to entertain clients with videos and music
17. Used for e-commerce (marketing the bank)
18. Used for bank biometric data capture (fingerprints, retinal scanning etc)
19. Used in the education and training of bank tellers
20. Used for communication using emails and other online platforms
63
2. Banks can have fewer client queues due to use of ATMS and fewer bank
workers are required
3. Customers do not need to travel they can use online banking
4. People can do home banking
5. Easy to pay bills and school fees
6. Money can be withdrawn any time on the ATM 24/7
7. Less error at the bank
8. Bank tellers do not need to count money physically
9. etc
64
C] APPLICATION OF COMPUTERS IN EDUCATION
The following are some of the uses of computers in education:
1. Store school and student information such as first name, surname, class,
hobby etc
2. Researching assignments
3. E-learning( the use of computers in the learning processing) that is Computer
assisted learning e.g. how to type, Computer based learning i.e. Learning that
involves the use of a computer, Computer based training i.e. training
managed by a computer, Computer based testing i.e. examination managed
by a computer.
4. Used for preparing income and expenditures and manage schools fees
payment.
5. Communication with teachers, students, education officials, parents, other
schools and other stakeholders
6. Used as a teaching tool by teachers e.g. using MS PowerPoint slides
7. Used for school entertainment (music, games, and videos)
8. Used for managing students registration e.g. on line registration.
9. Printing exam papers, statements, posters and timetables
10. Making time tables and report cards
11. Used for training at universities and polytechnics e.g. nurses and doctors
using specialized software’s like CAD.
12. Managing students daily attendances by logging in
13. Application of educational loan
14. Designing students ID cards
15. Used as expert systems in specific subject matters
16. Used for electronic shopping of school materials e.g. books, vehicles etc
17. Used for marking examinations using OMR
65
2. Quick data processing is possible with the help of computer which plays an
important role in education.
3. Better presentation of information in schools and colleges is possible using
computer to improve education.
4. Computer also helps to access Internet to get more knowledge from the world.
5. Nowadays Quick communication is possible between parents, teachers and
students with the help of computer.
6. Computer allows students to learn advanced concept easily and effectively.
7. Audio - Visual aids. Easy and effective way to gain knowledge with the help of
computers.
8. With the recent advancement in the education industry, schools and colleges
started using computer technology for effective learning.
9. Computer also allows teachers to share ideas as well resources online using
computer network.
10. Online learning is now possible with the help of internet & computer, which
improves education in the world.
11. Desktop computer can be seen in schools and colleges which help students
and teachers to improve education.
12. Computer enhances classroom experiences by incorporating audio visual
media.
1. Some children spend more and more time in playing computer games which
may affect education.
2. They also waste their time in watching movies or videos on computer.
3. With the excessive use of computer, Students lacks the verbal as well as non
verbal skills which is very important for the development of social and
emotional skills.
4. Sitting in front of a computer for a long time may affect the eyes and health of
a student which may indirectly affect education.
5. High infrastructure cost, electricity cost and other additional cost may increase
by purchasing computer.
6. Exposure to inappropriate content is possible on social sites which may have
negative impact on students as well as education.
ACTIVITY
1. List 10 uses of computers at your school [10]
2. Find out on the types of software used at your school and what they are used for.
[10]
66
D] Social Networks
Social networking is the use of internet-based social media programs to make
connections with friends, family, classmates, customers and clients. Social
networking can occur for social purposes, business purposes or both. Social
networking is also a significant target area for marketers seeking to engage users
SOCIAL MEDIA
"Social media is an internet tool that people can use to communicate, participate,
share, network, collaborate and bookmarking online.
2. Profile pages: A page that includes information about the individual user, like a
profile photo, bio, website, feed of recent posts, recommendations, recent activity
and more.
3. Friends, followers, groups, hashtags and so on: Individuals use their accounts to
connect with other users. They can also use them to subscribe to certain forms of
information.
4. News feeds: When users connect with other users on social media, they're basically
saying, "I want to get information from these people." That information is updated for
them in real-time via their news feed.
67
4. Wikipedia is a free, open content online encyclopedia created through the
collaborative effort of a community of users known as Wikipedians. Anyone
registered on the site can create an article for publication; registration is not required
to edit articles.
5. LinkedIn is a social networking site designed specifically for the professional
business community. The goal of the site is to allow registered members to establish
and document networks of people they know and trust professionally.
6. Reddit is a social news website and forum where stories are socially curated and
promoted by site members. Members submit content which is then voted upon by
other members. The goal is to send well-regarded stories to the top of the site's main
thread page.
7. Pinterest is a social curation website for viewing, sharing and categorizing images
found online. Clicking on an image will take you to the original source, so, for
example, if you click on a picture of a pair of shoes, you might be taken to a site
where you can purchase them.
8. WhatsApp: people show or share photos, messages, small videos, news,
posts, ,recent activity, update and more.
2:- Education – It is very easy way for teachers and students to learn from others
who are experts and professionals.
3:- Help – You can share your issues with the community to get help and giddiness.
4:- Information and Updates – The main advantage of the social media is that you
update yourself from the latest happenings around in the world.
5:- Promotion – Whether you have an offline business or online, you can promote
your business to the largest audience.
7:- Awareness – Social media also create awareness and innovate the way people
live. It is the social media which has helped people discover new and innovative
stuffs that can enhance personal lives
.8:- Helps Govt and Agencies Fight Crime- It is also one of the advantages of the
social media that it helps Governments and Security Agencies to spy and catch
criminals to fight crime.
68
9:- Improves Business Reputation – Just like it can ruin any business reputation, It
can also improve business sales and reputation. Positive comments and sharing
about a company can help them with sales and goodwill.
10:- Helps in Building Communities – Since our world has different religions and
beliefs. Social media helps in building and participating in the community of own
religion and believes to discuss and learn about it.
1:- Cyberbullying – Since anyone can create a fake account and do anything
without being traced, it has become quite easy for anyone to bully on the Internet.
Threats, intimidation messages and rumors can be sent to the masses to create
discomfort and chaos in the society.
2: – Hacking – Personal data and privacy can easily be hacked and shared on the
Internet.
3:- Addiction – . The teenagers are the most affected by the addiction of the social
media.
4:- Fraud and Scams – Several examples are available where individuals have
scammed and commit fraud through the social media.
5:- Security Issues – Now a day’s security agencies have access to people
personal accounts. This makes the privacy almost compromised.
6:- Reputation – Social media can easily ruin someone’s reputation just by creating
a false story and spreading across the social media
7:- Cheating and Relationship Issues – Most of the people have used the social
media platform to propose and marry each other. However, after some time they
turn to be wrong in their decision and part ways. Similarly, couples have cheated
each other by showing the fake feelings and incorrect information.
8:- Health Issues – The excess usage of social media can also have a negative
impact on the health. Since exercise is the key to lose weight, most of the people get
lazy because of the excessive use of social networking sites.
9:- Social Media causes death – Not just by using it, but by following the stunts and
other crazy stuffs that are shared on the internet. For example bikers doing the
unnecessary stunts, people doing the jump over the trains and other life threatening
stuffs.
10. Time Waster -Research shows that a lot of time is spent online on social
networks. With these type of numbers, some of the time spent on social media
occurs at work. When these visits are for non-work related activity, it can cost
companies money through lost productivity.
69
APPLICATION OF COMPUTERS FOR RESEARCH AND
DEVELOPMENT
Almost every person is involved in research of one type or another. Research takes
place in homes, school and other organizations. Nurses, teachers, students, etc use
computers for research. Research can be carried out to do the following
• Computer Education: Many people in his world are seeking to understand how to
use computers i.e. the young and old.
• Computer Use for research: Almost all the researchers are using computer one or
other purposes.
• Purpose of using Computer: The research scholars are using computer for
preparing assignment, project, research and some extend to entertainment rather
business purpose
• Internet and World Wide Web: Almost all the respondents are aware of Internet
and World Wide Web and one third of them having good experiences in using
Internet and World Wide Web.
• The research scholars are not only depending upon the school or university Internet
Centre’s but also Cyber cafes and free WIFI zones. Only minimum number are
using in their home.
• Internet use Learning: The researchers are learnt Internet browsing by themselves
and through friends. This indicates that the syllabus does not have any course on
Internet study area
• Search Skills: Keyword search is preferred search methods adopted by the majority
of the researchers’ rather content/ topical search. The moderate level of satisfaction
they acquired through keyword search.
70
• Search techniques: Boolean operators, phrase searching are some of search
techniques rarely being used by the researchers. The other techniques such as
nesting, truncation, controls, wildcard, etc never being used by the almost all the
research scholars.
71
72
73
CHAPTER 8
Data Representation
Different codes are used to represent data in the computer. E.g. American
Standard Code for Information Interchange (ASCII), Binary Coded Decimal
(BCD) etc. Using ASCII code letter A is represented as 01000001.
Once users press a letter, number, symbol or key on the keyboard the
processor converts that key press into its equivalent binary representation.
The word computer comes from the word compute, and to compute is to
crunch numbers or calculate and these numbers are computed or
calculated only in the form of bits. Our normal counting is done in decimal,
denary or base 10 and computers and digital machines work with bits.
STUDY THE TABLE BELOW AND SEE BASE 10 NUMBERS THAT ARE
EQUIVALENT TO BASE 2 NUMBERS
74
7 00000111
8 00001000
9 00001001
10 00001010
11 00001011
12 00001100
13 00001101
14 00001110
15 00001111
16 00010000
The binary system works well for computers because the mechanical and
electronic relays recognize only two states of operation which was once
dismissed as primitive but has become central to the development of
computer science and many forms of electronics. Many important tools of
communication, including the typewriter, cathode ray tube, telegraph,
and transistor has its operational basis in binary.
75
Computer have a task when working binary numbers because every
different type of data (e.g. words, numbers, images, music, speech)
must be converted to and from the binary representation for human
use.
The on/off nature of circuits using binary causes issues when trying to
get high speed computations.
LOGIC CIRCUITS/GATES
Logic gates are electronic digital circuit designed to perform logic functions. They
accept one or more logical bits performs logical operations on them and produce a
single logical output based on the logical inputs. In the logic circuits below A and B
represents logical inputs and C represent a logical output. Logical circuits differ in
shape and operation but may produce the same output.
Out of the six logical gates, there are only three basic circuits i.e. the
AND, OR and NOT. There are also three derived gates(gates formed from
the three basic ones) and these are NAND date, NOR gate and the XOR
Gate.
76
SYMBOLS USED TO DENOTE LOGICAL OPERATORS
SYMBOL OPERATOR
● AND e.g. A.B read as A AND B
+ OR e.g. A+B read as A OR B
Or
77
Or
INPUTS OUTPUT
A B C
0 0 0
0 1 1
1 0 1
1 1 1
C=A+B
78
Or
NOT
0 1
INPUT OUTPUT
A B
0 1
1 0
B=Ā
79
OR
0
NOR 0
1
INPUTS OUTPUT
A B C
0 0 1
0 1 0
1 0 0
1 1 0
C=A+B
80
OR
0 NAND
1
1
INPUTS OUTPUT
A B C
0 0 1
0 1 1
1 0 1
1 1 0
C= A.B
81
OR
0
XOR 1
1
INPUTS OUTPUT
A B C
0 0 0
0 1 1
1 0 1
1 1 0
C= AΘB
CHAPTER 9
Communication Networks
82
NETWORK TERMS
• Packets - packets are pieces of data transmitted over a network.
83
TAN- Tiny area network. Connection of very few computers up to about
four computers.
HAN- Home Area Network: Small scale network in a home setup e.g.
such as a Connection of computers and entertainment appliances.
CATEGORIES OF NETWORKS
There are two basic categories of networks as below:
84
Wireless networks
Are as a result of developments in wireless transmission media.
These have seen increased emphasis on wireless networks. Presently
wireless technology is mainly used in some LANs, WANs and mobile
computing where mobile machines connect to the home or office
network using cellular technology or satellite systems.
85
on a LAN can enable students to communicate with teachers,
managers and peers at their own place or in the world.
Workgroup Computing. Workgroup software (such as Microsoft
BackOffice) allows many users to work on a document or project
concurrently. For example, educators located at various schools
within a county could simultaneously contribute their ideas about
new curriculum standards to the same document and
spreadsheets.
Simultaneous access to files or software . Files or software
can be accessed by many people at the same time.
NETWORK TOPOLOGIES
Topology refers to the physical or logical arrangement of
computers, devices and wires in a network. There are four basic
network topologies namely: Star, Ring, Bus and Mesh
86
Advantages
• Easy to setup
• Small amount of wire
• Easy to connect a computer or peripheral to a linear bus.
• Requires less cable length than a star topology.
• Easy to extent the bus
Disadvantages
Easy to crash
Entire network shuts down if there is a break in the main cable.
Terminators are required at both ends of the backbone cable.
Difficult to identify the problem if the entire network shuts down.
Not meant to be used as a stand-alone solution in a large building.
Slow
Congestion is common in bus network if number of computer
increases
2. STAR TOPOLOGY
• All nodes connect to a hub, a server or central computer. Most
common topology
87
Advantages
• Easy to setup
• Easy to install and wire or add up a client
• No disruptions to the network when connecting or removing devices.
• Easy to detect faults and to remove parts.
• If One cable is not functioning the system cannot crash
Disadvantages
• If the central computer crashes the entire network breaks down
• Requires more cable length than a linear topology.
• More expensive than linear bus topologies because of the cost of the
concentrators.
• Uses lots of cable
3. RING TOPOLOGY
– Nodes connected in a circle
– Tokens used to transmit data. Nodes must wait for token to send or
communicate. Data transmitted in one direction.
88
Advantages
• Time to send data is known
• No data collisions
• Every computer has equal access to the token
Disadvantages
• Generally Slow in communication
• Lots of cable are required
• A fault on the cable makes the whole network down
4. MESH TOPOLOGY
– All computers connected together. Internet is a mesh network.
89
Advantage
• Data will always be delivered as there are many channels to
transmit data.
Disadvantages
• Lots of cable
• Hard to setup
• Expensive to setup
CHAPTER 10
90
The Internet and Technologies
91
(b)MODEM(MOdulator/DEModulator)
(c) Telephone line
(d)Specialist connection software(provided by ISP)
Once you have the above, you then contact an ISP who will
issue the following:
DISADVANTAGES OF INTERNET
-expensive equipment used
-One needs training ,knowledge and skills to use internet
-problems of hackers
-problems of virus distribution
-facilitates breaking of copyright rules
-leads to loss of privacy
-causes addiction
-pornography to young people is a ethical problem
CHAPTER 11
92
Internet services
SERVICES ON THE INTERNET
(This is what we can do with or get on the internet)
(c) file transfer from one computer to another using the FTP(File
Transfer Protocol)
(j) bulletin board services where one can post a question which
will be answered by anyone
93
Is a text message created on a computer and sent over a
computer and telecommunications network.
NOTE:
Ac: refers to academic institution such as college, university or
school
Org: refers to organization
Co/com : refers to company or co-operation or commercial
organisation
nyasha@hotmail.com
brendon@netone.co.zw
john@netscape.net,
Michael@gmail.com
B] E-COMMERCE
E-commerce is buying and selling goods and service online. It is doing
business on the Internet.
94
EXAMPLES OF ECOMMERCE
Online shopping
Buying and selling goods on the Internet. Buyers browse and purchase
products with mouse clicks.
Electronic Payments
When you are buying goods online and paying online. It reduces the
inefficiency associated with writing and mailing cheques. It also does
away with many of the safety issues that arise due to payment made
in currency notes.
Online auctions
Online auctions are an efficient mechanism for price discovery. Many
buyers find the auction shopping mechanism much interesting than
regular storefront shopping.
Internet banking
Performing bank transaction using the internet, such as money
transfers.
Online ticketing
Air tickets, movie tickets, train tickets, play tickets, tickets to sporting
events, and just about any kind of tickets can be booked online.
Online ticketing does away with the need to queue up at ticket
counters.
ADVANTAGES OF ECOMMERCE
Faster buying/selling procedure, as well as easy to find products.
Buying/selling 24/7.
More reach to customers, there is no theoretical geographic limitations.
Low operational costs and better quality of services.
No need of physical company set-ups.
Easy to start and manage a business.
Customers can easily select products from different providers without
moving around physically.
Using E-commerce site will decrease the cost related with client’s
base, consumer loyalties and higher deals it produces.
The Problems related with running a retail location will lessen on the
grounds due to reason that exchange is done through a site and
not through a guiding store, likewise, the cost of lighting, leasing,
staffing and restocking a store will totally take out.
Your business can reach every corner of the geographical location, it
empowers the business to reach in worldwide markets with
95
national and global requests. What’s more, your business action is
no longer limited with any geological limitations.
With this, and even private company can get to the worldwide
markets for offering and purchasing of products and ventures.
The client or consumer can buy and pay the amount and
transactions is carried out 24 hours a day and on holidays and
weekends.
It gives the consumer an option to compare the prices and at the
same time also benefited the customers for cheaper products at
fine quality.
No need to stand in big queues or on hold waiting for your turn.
Various amazing deals and coupons are available to provide an extra
discount.
Managing the stocks, and inventory is an easy process also the
records of payments and payouts can be done easily.
DISADVANTAGES OF ECOMMERCE
Any one, good or bad, can easily start a business. And there are many
bad sites which eat up customers’ money.
There is no guarantee of product quality.
Mechanical failures can cause unpredictable effects on the total
processes.
As there is minimum chance of direct customer to company interactions,
customer loyalty is always on a check.
There are many hackers who look for opportunities, and thus an
ecommerce site, service, payment gateways, all are always prone to
attack.
Delivery time of the product is more.
Unavailability of touching off and feeling of the product.
In case of items of clothing you have to buy without trying.
Sometimes wrong or damaged product is delivered then the
problem of returning and getting money back is a still difficult
process.
You have to wait for the delivery person because he can come at
any time doesn't matter you are busy or what you have to collect
your item or should wait for some extra days.
Sometimes you find an image of the product very attractive but
the product you received does not match with the image you
actually viewed on the website.
Internet access is still not cheaper and is inconvenient to use for
many potential customers like one living in remote villages.
Every people is not digitally literate so that he/she is not capable
of buying the product.
96
C] E-LEARNING
E learning is any form of learning in which digital communication,
electronic devices or the internet is used to support the learning
process.
M-learning
97
Mobile learning means learning using portable devices that allow
the student to learn in different environments and whilst on the
move instead of being restricted to a classroom setting or tied to a
desk. Mobile learning is, of course, by its electronic nature, a
subset of e-learning, but it refers far more specifically to these
handheld devices and portable technology.
98
Different learning styles are addressed and facilitation of
learning occurs through varied activities
Development of computer and Internet skills that are
transferable to other facets of learner's lives
Successfully completing online or computer-based courses
builds self-knowledge and self-confidence and
encourages students to take responsibility for their learning
CHAPTER 12
99
Security and Ethics (Unhu/Ubuntu/Vumunhu)
CYBER USE
CYBER WELLNESS
Principles
(1) Respect for Self and Others
Students need to:
100
make wise and healthy choices (e.g. maintain a healthy balance of
their online and offline activities)
CYBER-CULTURE.
A cyber culture may be defined as a way of life and even speaking that
takes place entirely online. This culture has emerged, or is
emerging, from the use of computer networks for
communication, entertainment, and business. It is also the study
of various social phenomena associated with the Internet and other new
forms of the network communication, such as online communities,
online multi-player gaming, social gaming, social media, mobile apps,
augmented reality, and texting, and includes issues related to identity,
privacy, and network formation.
MANIFESTATIONS OF CYBERCULTURE
Cyber culture refers to values and norms that emanate from use of
computer networks. They can be activities, pursuits, games, places and
metaphors, and include a diverse base of applications. Examples include
but are not limited to:
- Blogs
- Chat
- Bulletin Board System
- Cybersex
- E-Commerce
- Games
- Internet memes
- Peer to peer file-sharing
- Social Networks
- Usenets
- Visual worlds
QUALITIES OF CYBERCULTURE
It is a mixture of several cultures across the network or globe
101
It Placeless culture
It is highly dynamic
Relies heavily on the notion of information and knowledge exchange.
Make Friends
Shop
Learn
Transmit Files
Make a Living
Romantic Relationships
Entertain themselves and others
Look for employment
102
How to check a website is safe
Google Safe browsing is a good place to start. Type in this URL
http://google.com/safebrowsing/diagnostic?site= followed by the site
you want to check, such as google.com or an IP address. It will let you
know if it has hosted malware in the past 90 days. If the site is not safe
then you can block it. You can also tell others about this unsafe site.
103
ONLINE RELATIONSHIPS
QUESTIONS
104
1. Write a list of those things that one should not practice or do on the
internet
2. Write a list of those good things that one should do when using the
internet
3. List down a number of things that you should do to keep yourself
safe when using the internet.
EXERCISE
outline the characteristics of cyber culture and its impact
describe the characteristics of safe and unsafe sites
suggest effects of online content and behaviour
Blocking unsafe websites
COPYRIGHT
What is copyright
• The legal right granted to an author, composer, playwright,
publisher, or distributor to exclusive publication, production, sale, or
distribution of a literary, musical, dramatic, or artistic work.
105
What does copyright do?
• It gives authors or artists the legal right to exclude others from
using their works.
Copyright information
• Copyright protects “original works of authorship” that are fixed in “a
tangible form of expression.”
• Rights begin at the moment of “fixation.”
• Copyright is automatic when a protectable work has been fixed in a
tangible medium such as a floppy disk or hard drive.
• A poem or picture is as much protected on a disk as on a piece of
paper or on a canvas.
106
How can I tell if certain work has a copyright
• Look for trademark information
• Contact author if possible
• Some items have statements for copyright
Plagiarism is:
1) to steal and pass off (the ideas or words of another) as one's own
2) to use (another's production) without crediting the source
3) to commit literary theft
4) To present as new and original an idea or product derived from an
existing source.
107
• changing words but copying the sentence structure of a source
without giving credit
• copying so many words or ideas from a source that it makes up the
majority of your work, whether you give credit or not
Types of Plagiarism
1) “The Ghost Writer” The writer turns in another’s work, word-for-
word, as his or her own.
2) “The Photocopy” The writer copies significant portions of text
straight from a single source, without alteration.
3) “The Potluck Paper” The writer tries to disguise plagiarism by
copying from several different sources, tweaking the sentences to make
them fit together while retaining most of the original phrasing.
4) “The Poor Disguise” Although the writer has retained the essential
content of the source, he or she has altered the paper’s appearance
slightly by changing key words and phrases.
5) “The Labor of Laziness” The writer takes the time to paraphrase
most of the paper from other sources and make it all fit together,
instead of spending the same effort on original work.
6) “The Self-Stealer” The writer “borrows” generously from his or her
previous work, violating policies concerning the expectation of
originality adopted by most academic institutions.
7) “The Forgotten Footnote” The writer mentions an author’s name
for a source, but neglects to include specific information on the location
of the material referenced. This often masks other forms of plagiarism
by obscuring source locations.
8) “The Misinformer” The writer provides inaccurate information
regarding the sources, making it impossible to find them.
9) “The Too-Perfect Paraphrase” The writer properly cites a source,
but neglects to put in quotation marks text that has been copied word-
for-word, or close to it. Although attributing the basic ideas to the
source, the writer is falsely claiming original presentation and
interpretation of the information.
10) “The Resourceful Citer” The writer properly cites all sources,
paraphrasing and using quotations appropriately. The catch? The paper
contains almost no original work! It is sometimes difficult to spot this
form of plagiarism because it looks like any other well-researched
document.
108
11) “The Perfect Crime” Well, we all know it doesn’t exist. In this
case, the writer properly quotes and cites sources in some places, but
goes on to paraphrase other arguments from those sources without
citation. This way, the writer tries to pass off the paraphrased material
as his or her own analysis of the cited material.
PIRACY
Piracy is the unauthorized copying, distribution, use,
reproduction, sale or storage of intellectual property (IP)
protected under copyright law. It is a form of copyright
infringement.
Software piracy
Software piracy is the copying, distribution, or use of software without
the owner’s permission.
109
Copying discs for installation or distribution
Taking advantage of upgrade offers without having a legal copy of
the version to be upgraded
Acquiring academic or other restricted or non-retail software
without a proper license
Swapping discs in or outside the workplace.
CHAPTER 14
System Analysis and Design
3. Life cycle: this refers to activities that are continuously and periodically
done to keep the system in existence or keep it going on and on.
EXAMPLES OF SYSTEMS
1. Personal computer (keypad/board, mouse/touchpad, screen, etc)
2. Computer department at a company
3. The blood circulatory system
4. Rainfall system
5. Student registration system
6. Voter registration system
7. Car registration system
8. The school is a system(made up of students, teachers, buildings,
grounds etc)
111
What is the
problem/work which
must be done
PROBLEM IDENTIFICATION
10. Improving system performance, speed and time to process data
11. Present system is ageing, has not been upgraded and is now
becoming difficult to maintain
FEASIBILITY
REVIEW/EVALUATION STUDY
12. Easier system development
AND MAINTENANCE
in the future
13. Supporting an increased number of system users
14. Improving data storage
15. No longer supplying a specific range ofANALYSIS
productsSTAGE
16. Changes in hardware
IMPLEMENTATION STAGE
SDLC MODEL
SDLC is made up of seven distinct stages as follows
DESIGN STAGE
DEVELOPMENT STAGE
112
Terms of reference document
(a) This is a stage where the current system problems or errors or
weaknesses are identified and named and or listed.
(b)Each error, problem or weakness is described so that it is clear what
it means as well as its scope (depth)
(c) A description of how the system must operate(its aims, objectives,
scope, boundary etc )
(d)A description of system outputs
(e) Time required for system processes
(f) System constraints (areas that must not be changed)
(g)A written report to system management about the problems, errors
or weaknesses
(h)Suggested ways of solving the weaknesses, errors or problem.
Advantages
- The analyst obtains reliable data
- it is possible to see exactly what is being done
- this is an inexpensive method compared to other
techniques
Disadvantages
-people are generally uncomfortable being watched and may work in a
different way
- what they are watching may not be representative of a typical day’s
work
- if workers perform tasks that violate standard procedures, they may
not do this when being watched!!
(B) QUESTIONNAIRES
this involves sending out simple to answer typed and printed
questions to the work force and/or to customers to find out their views
113
of the existing system and to find out how
some of the key tasks are carried out. As with observation, there are a
number of advantages and disadvantages in using this technique:
Advantages
- Questions can be answered quickly
- an inexpensive way of gathering data from a large number of people
- allows individuals to remain anonymous
- it is quick to analyze data
Disadvantages
- number of people returning questionnaires is often quite low
- questions asked tend to be rather inflexible
- no immediate way to clarify a vague/incomplete answer to a
question
- it is difficult to prepare a good questionnaire
(C) INTERVIEWING
this involves a one to one question and answer session between the
analyst
and an employee or a customer.
Advantages
- opportunity to motivate the interviewee to give open and free
answers to the analyst’s questions
- allows the analyst to probe for more feedback from the interviewee
(easier to extend a topic than it is when using questionnaires)
- can ask modified questions or questions specific to the interviewee
based on previous responses
-gestures can help in data collection process
Disadvantages
- Can be a very time consuming exercise
- can be expensive to carry out
- unable to remain anonymous
114
Advantages
Low cost
Relatively rapid
Unobtrusive
Can be highly accurate
Often good to moderate validity
Usually allows for historical comparisons or trend analysis
Disadvantages
CHAPTER 15
Algorithm Design and Problem-solving
115
ALGORITHM DESIGN AND PROBLEM SOLVING
Problem Solving
ALGORITHM
Definitions of an Algorithm.
PURPOSE OF AN ALGORITHM.
116
ALGORITHM TOOLS
Algorithms can be designed using two tools, iePseodocode or
flowcharts.
(a) Pseudocode
Pseudocode is a simple way of writing programming code in
English. Pseodocode is the statement in plain English written to
represent an algorithm for later translation into a programming
language (program). Pseudo code is an
intermediary between an algorithm and implemented program.
Psoedo means before. So it’s written before a computer code. It can
also be in half English and half programming language.
Pseudocode is not an actual programming language. So it cannot
be compiled into an executable program. It uses short terms
or simple English language. Egg pseodocode to add two numbers
and display sum.
Start Program
Enter two numbers, A, B
Add the numbers together
Print Sum
End Program
(b) Flowchart
it is a pictorial representation of an algorithm. A pictorial
representation of steps to be followed to solve a computer problem.
117
e.g. flowchart to add two numbers and display sum
Variables
-variables are names of data items or entities used in an algorithm.
These names are given by the user or programmer.. e.g. if a user is to
develop a program that calculates average of two numbers, he or she
needs variables such as num1, num2, sum, average. The purpose of
the algorithm is to calculate the average.
Variables are program entities which may change its value during
program execution. These are memory locations where different types
of data can be stored. The data types can be integer, character, date,
float etc.
The variable name can be any word, which is not a reserved word
(which is not used by the program like
118
DO NOT USE RESEREVED WORDS AS VARIABLE NAMES.
Do not use same variable name in the same program or set of
statements.
Begin with a letter or an underscore
It should not contain spaces
Dry running:
It is the manual method of tracing the program in order to find errors
(bugs) in the program. Dry run table is the same as trace table.
(a) Sequence
End
STAGES DESCRIPTION
Start Stage different programming languages have different
ways to start an algorithm
119
Declare and Different programming languages have different
Initialize ways to start an algorithm. To declare a variable is
variables stage to tell a computer names you are going to use
together with their data types. To initialize a variable
is to give a variable a start value especially it will
change its value during processing. Variable may
change values trough incrementing them,
decrement, or reassignment of a value.
Input data to the Once variables are declared they are now given (assigned)
variables stage their values at this stage.
Process stage Every computer program should be able to input data,
process the data and store and output information. To
process is to perform mathematical or logical operation on
the data. In addition to input, process and output, programs
may be designed to be able to control and communicate
with other programs. Area= Length x Width is an example of
a process statement.
Output stage This is a stage where the results of processing are either
displayed or printed
End Every program that start must end otherwise an infinite
program is bad programming.
EXERCISE
Write and algorithm of a program to find the area of a rectangle.
(a) Write the Pseodocode
(b) Draw the flowchart
(c) Explain each statement line of the program
(d) What will happen to the area if the inputs change
(e) What other problem can be solved using sequence structure.
CHAPTER 16
Programming Concepts (in the context
of VB.NET)
Programming is the process of writing computer programs.
It is the process of taking an algorithm and encoding it into a
notation (a programming language) so that it can be executed by
a computer.
120
It is the process of creating (computer programs) software.
PROGRAMMING LANGUAGES
A programming language is a special language programmers use to
develop software programs that computers can execute. An algorithm is
described using a particular chosen programming language.
Two types of low level languages are 1, machine code which is written in
binary system and Assembly language which uses pneumonic.
PROGRAMMING ERRORS?
Semantics refers to meaning of language symbols (i.e. its grammar)
whereas syntax refers to rules (or format) of language symbols.
121
A+5=25. With semantics, A should be representing a number value and
not an alphabetic value which is 20. With syntax, A must be declared as a
number value first before it can be added to 5 otherwise A cannot add to
5 because the two comes from different domains. This is the meaning of
the statement and the expected format of the statement.
So, Every programming language like Visual basic has its set of
language words and format that may differ with another programming
language.
DATA TYPES
Computer systems work with different types of data. In the early days
of computing, data consisted primarily of text and numbers, but in
modern-day computing, there are lots of different data types, i.e., text,
audio, images and video data. There are further other types of data
under each of the four main data types. Ultimately, however, all data
122
types are stored and processed in binary digits form. These notes will
focus more on Text data.
1. Text data
This is a group of several data types which include, numeric data,
character data, strings, arrays, Boolean etc
Integer data
Integer data are positive numbers, zero or negative numbers e.g.
-12, 0, 345. E.g. 3+4=7 (3 and 4 are all numeric data
types.)
123
GROUP C= {“Triphune”, “Mernard”, “Mellody”, “Doit”,
“Happymore”}
We have three arrays of data in the example above.
2. Audio data
Audio data refers to sound data e.g. speeches, music.
3. Image data
Image is graphical data i.e. data in the form of pictures,
diagrams or drawings.
4. Video data
This is data in the form of moving pictures such as animations
and films.
Int A=4
this tells a computer that A is a variable of integer data type
and is holding the value 4
124
Char Sex = ‘M’
-tells the computer that Sex is a variable of data type
character and hold the value M (for male)
Basics of Operators
Operators are symbols that tell the compiler to perform specific mathematical or logical
manipulations. THEY TELL A COMPUTER HOW DATA IS TO BE PROCESSED.
A: Arithmetic Operators:
Relational Operators:
These operators are used for comparison. They return either true or false based on the
comparison result. The operator '==' should not be confused with '='. The relational operators
are as follows:
125
Symbol Operation Usage Explanation
C: Logical Operators:
126
These operators take boolean values as input and return boolean values as output.
Note: In C,C++ any non-zero number is treated as true and 0 as false but this doesn't hold for
Java.
Symbo
Operation Usage Explanation
l
127
Languages for Applications and Program development
C, C#, C++, D, Java, Tcl, Visual Basic
Languages for Artificial Intelligence development
Assembly language, C
Languages for Internet and web page development
128
STEPS TO CREATE A VB.NET PROGRAM
1. Load the VB.NET program you have on your computer (Express version)
129
3. Choose either “Windows Form application” or “Console Application”
Windows Form application uses GUI (objects or picture’ and Console uses
Command prompt.
4. Start coding your program between Sub Main() and End Sub
130
Click over there
To debug and
run
131
Module Module1
Sub Main()
'A program that accepts the name and surname and print hello “Name &
Surname”
Dim name As String
Dim Surname As String
Dim age As Integer
Dim sex As Char
Console.WriteLine("Please enter your identification details below :")
Console.WriteLine("************************************************")
Console.WriteLine("Name :")
name = Console.ReadLine
Console.WriteLine("Surname :")
surname = Console.ReadLine
Console.WriteLine("Age :")
age = Console.ReadLine
Console.WriteLine("sex M or F :")
sex = Console.ReadLine
Console.WriteLine("_________________________________________________")
Console.WriteLine(" hello " & name & " " & surname)
Console.WriteLine(" You are :" & age & " years old")
Console.WriteLine(" your sex is :" & sex)
Console.WriteLine(" ________________________________________________")
Console.ReadKey()
End Sub
End Module
The first line of the program Imports System is used to include the
System namespace in the program.
The next line has a Module declaration, the module Module1. VB.Net
is completely object oriented, so every program must contain a module
of a class that contains the data and procedures that your program uses.
The next line ('This program) will be ignored by the compiler and it has
been put to add additional comments in the program.
132
The next line defines the Main procedure, which is the entry point for all
VB.Net programs. The Main procedure states what the module or class
will do when executed.
The last line Console.ReadKey() is for the VS.NET Users. This will
prevent the screen from running and closing quickly when the program
is launched from Visual Studio .NET.
133
Integer 4 bytes -2,147,483,648 through 2,147,483,647
(signed)
Long 8 bytes -9,223,372,036,854,775,808 through
9,223,372,036,854,775,807(signed)
Object 4 bytes on 32- Any type can be stored in a variable of type
bit platform Object
8 bytes on 64-
bit platform
SByte 1 byte -128 through 127 (signed)
Short 2 bytes -32,768 through 32,767 (signed)
Single 4 bytes -3.4028235E+38 through -1.401298E-45 for
negative values;
1.401298E-45 through 3.4028235E+38 for
positive values
String Depends on 0 to approximately 2 billion Unicode
implementing characters
platform
UInteger 4 bytes 0 through 4,294,967,295 (unsigned)
ULong 8 bytes 0 through 18,446,744,073,709,551,615
(unsigned)
User- Depends on Each member of the structure has a range
Defined implementing determined by its data type and
platform independent of the ranges of the other
members
UShort 2 bytes 0 through 65,535 (unsigned)
Array declarations in Visual Basic .NET are similar to those in Visual Basic
and other languages.
CONSTANTS
The constants refer to fixed values that the program may not alter during its
execution. These fixed values are also called literals.
The constants are treated just like regular variables except that their values
cannot be modified after their definition. An enumeration is a set of named
integer constants
134
STEPS TO FOLLOW WHEN DESIGNING A PROGRAM
1. Analyze the problem
2. Sketch the G.U.I on paper
3. Write the Algorithm
4. Write code on paper
5. Dry Run program (run on paper /without the compiler)
6. Code on machine
7. Test & Debug
8. Document Program
If you follow the above steps you won’t make mistakes
135
Module Module1
Sub Main()
Dim num1, num2, sum As Integer
Console.Write(" Enter the first number to be added: ")
Console.ReadLine(num1)
Console.Write(" Enter the second number to be added: ")
Console.ReadLine(num2)
sum = num1 + num2
Console.Write(" The sum of two numbers is:" & sum)
Console.ReadLine()
End Sub
End Module
Module Module1
Sub Main()
Dim num1, num2, sum As Integer
num1 = 4
num2 = 8
sum = num1 + num2
Console.Writeline( " The sum of “&num1 “and “ & num2 “ is:" &
sum)
Console.ReadLine()
End Sub
End Module
CHAPTER 17
Databases(Using MS Access)
DEFINITION OF A DATABASE
A collection of related files stored on a computer under one
common name.
A collection of related data elements that may be structured in
various ways to meet multiple processing and retrieval needs of
organizations or individuals.
A single organized collection of data, stored with a minimum
of duplication of data items so as to provide a consistent and
controlled pool of data.
136
EXAMPLES OF MANUAL DATABASES (DATA RECORDED
ON PAPERS)
Customer information at a company, Students information at a
school, Employee information Product details at a company ,
Telephone directory, Encyclopedia, Student report books, Library
catalogues, Vendor information, Order information, Inventory
information
DATABASE MODELS/SCHEMES/STRUCRURE
There common models are relational, network, Hierarchical structure
and List structure
Relational database
A database with two or more tables each containing some
interconnected data.
Files are connected together by common field names held in a
number of interrelated files. It uses tables called relations. Records
appear in rows and columns. Rows are also called tuples and
columns are also called attributes. Tables are called files. A single
table can also be called a database.
137
Tendai Moyo 1b
Mutsa Dhliwayo 1c
Tawanad Mendi 3c
a
Doit Philips 1a
Examples of DBMS
MS ACCESS (relational model ), FoxPro, FoxBASE, Dbase, Paradox, Data
Ease, Rbase, System V, Informix, Codasyl ( network model), Oracle etc
Functions of DBMS
-store data, -retrieve data, -update data, -create and maintain a data
dictionary, -manage data backups and data recovery, -Provide security
o data (user ids, access levels and passwords)
-manage data sharing facilities, -provides security to the database
against corruption and unauthorized access , -Maintain indices to data –
indices used to retrieve and cross reference data
138
Database- a table or all related tables making up a database. A
database made up of one table is called a flat file. Flat files may also
mean databases on small systems.
Query- an extract of information for screen display –(a search condition
used to select specific records from a given database ( to select all form
3 out of all students in a school)
Form- Graphical interface that is used to display or collect information.
It is a window providing labels and text boxes to collect or display data.
Report- an extract of information in a printed format. (Extracted from
one or more tables.)
Macro- a small program that tells the DBMS to perform one or more
actions such as running a query, opening a form or printing a report.
Primary key- database field that uniquely identifies a record. Used
when search for a specific record or sorting records.
Secondary key - a database field which can be used to organize
records e.g. sort students according to surname.
Normalization-the processing of separating entities in a database so
as to create all possible relationship between the entities in a bid to
remove all repetition of data which in turn makes the database more
efficient.
File Management Systems- database systems on small computers
like the PC used with flat files.
Sort -rearrange data in the order of an index.
Disadvantages
Expensive and difficult to install
Large size-Used more hardware storage space
Require a great deal of planning time and creation time
May contain errors or failures
complex and require a high level of education (specialist -DBA)
Greater impact on system failure
Create records
Add new records
Append or insert records to already existing ones
Search specific records
Update or amend a record (e.g. change of address)
Sort records
Delete unwanted records
Display records in datasheet view, form view and as reports
Viewing records (navigate through records)
Export data to other related packages
Merge two or more data files
PLANNING A DATABASE
The following procedures are necessary to follow in planning and
creating a database.
140
o Make table relationship
o Make a list of all possible questions about the data (for query design)
o Design and run queries (forms are the best way of showing query
results)
o Determine the best way to show answers to the questions asked
above(reports)
o Design and show reports
o Design the suitable user interface (customize the database user
interface- switchboards and macros)
CREATING A TABLE
steps
1. Select Table from the Object tab
2. Go to design view
141
Unique
Field
name
143
Column
header
(Name)
Just click
Record on the
selector Change box if
date paid
format in
the design
view
Activity
Insert a column named email address and enter the email addresses for
each student
Insert a new row between Nisha and Nawaz and fill in the details.
Delete record with student number 0004
Change field name for Gender to Sex
In design view, move the field Email to be the last field (use record
selector to click and drag field)
Add three more records in the table.
Change any one of the email address (update)
Create another table called Mesuremetstbl and create the structure
under the following fields. Studn0, Sname, height, weight
Copy details from the previous table and type the rest.
Sort records in the Studentstbl according to ascending alphabetical
order of surname
144
CREATING A QUERY
Queries
Students with four or more distinctions
Students whose surname starts with an M
Steps
1. From the object tab elect query in design view
2. Add Studentstbl and Close
3. Tick all the fields and enter the criteria as follows
Click here
Added table
to run the
query
Specify each
fields and tick
on Show Enter
criteria as
follows
QERRY CRITERA
All girls Sex= “F”
All students from Harare Hometown= “Harare”
All grade 4 pupils Grade=”4’
All boys in grade 4 Sex= “m” or grade= “4”/
=”m” or “f” under “sex”
All pupils who paid less than Fees paid <20.00
$20.00
All pupils born from 1 January DOB<01/01/88
145
1998
Search all pupil of the Jongwe Surname=” Jongwe”
family
Students from form 2 and =”2” under “Form” and >60
marks greater than 60 under “marks”
Students who did not get Not<=40 under “marks)
marks less than or equal to 40
Marks between 50 and 70 >=50 and <=70 in the marks
column
To get text data use any of the “tinotenda” under Fname
following under the respective brings out all pupils with the
column name tinotenda
CREATING A FORMS
Form view- used to enter data, edit it or navigate through the data
Layout view- used to design the form while viewing the actual data
Design view- used to design the form with a header, footer and details
and an also put images using the toolbar.
Steps
1. From the Object tab elect Form wizard
Specify
table
146
CREATING A REPORTS
Steps
1. Create report using report wizard and choose studentstbl
2. Choose next on areas where there is no need to change anything
3. Select the column layout and landscape page layout
4. Give it a name as studentsrpt
5. Click finish
6. Go to design view and insert a logo on the report
7. In the design view resize objects
CREATING MACROS
Macros are created form the object tab and are saved. They can be
used with command buttons. Executing a macro is called running a
macro.
Steps
1. Go to the Object tab
2. Select macro
3. Specify action (open a form)
4. Select the form to be opened
5. Save the macro (the name will appear under the object tab)
6. Open a form
7. Go to design view
8. Click and a command but and drag it in the form window
9. Link the command button to a macro in the miscellaneous group
10. Run the form
11. Click the command button
To link tables, the two tables should have certain fields in common.
(foreign key)
In our database table, the field Student number is appearing in both
tables. This has been done to create table relationships.
Steps
1. Click the relationship button
147
2. Add the tables to be shown (two tables above) and close
3. Click create
4. Link the foreign key together in the two tables by dragging one to
another
5. Save and close
148
CHAPTER 18
Web design (with Notepad++)
Colour: The choice of colours depends on the purpose and the type
of viewers. it should be simple, attractive and conveying the
personality of a person or the brand of an organization. Similar to
human dressing.
Fonts: The use of various fonts can enhance a website design. Most
web browsers can only read a select number of fonts, known as "web-
safe fonts", so your designer will generally work within this widely
accepted group.
149
Easy of Navigation: Site architecture, menus and other navigation tools in
the web design must be created in a way that help the user to move around
the site with ease, efficiently finding the information they require.
Multimedia: . Well designed and arranged visual and audio content can
encourage visitors to spend more time on the webpage.
HTML
HTML, an acronym for HyperText Markup Language, it is a computer
language for creating websites and web applications.
There are many free and paid HTML editors, below are some
of the top options you can choose from:
Introduction to Tags
Once you’re into HTML, the first thing you need to understand is
tags. In essence, tags separate normal text from HTML code.
Tags are used to format, link, display a series of web page content
150
The content to be affected should be placed inbetween an opening
tag and a closing tag in most cases.
<head>
This tag usually contains information about the document such as its
title, meta tags, CSS file (document styles), character set, document
title, scripts, etc.– content which is not visible directly on the browser
page.
</head>
<body>
</body>
</html>.
Examples of tags
<b> </b> to bold text
<h1> </h1> for the biggest heading and ranges from <h1> to
<h6>
<p></p> paragraphs
151
<u></u> or underlining
<ol>
<li>Item 1</li>
<li>Item 2</li> For ordered and numbered lists
<li>Item 3</li>
</ol>
<ul>
<li>Item 1</li>
<li>Item 2</li> For unordered and bulleted lists
<li>Item 3</li>
</ul>
<ul>
<li>Item 1
<ul>
<li>Item 1 nested</li>
<li>Item 2 nested</li>
For nested unordered and bulleted lists
<li>Item 3 nested</li>
</ul>
</li>
<li>Item 2</li>
152
<li>Item 3</li>
This tells the browser to display an image pulled from the image file
“heisaboy.jpg” and have it linked to https://websitesetup.org. The
“alt” attribute represents what should be shown if the image is
unable to be displayed (due to browser settings or some other stuff
that prevent images from showing).
153
<table border=1>
<tr>
<th>Table Header 1</th>
<th>Table Header 2</th>
<th>Table Header 3</th> For table creation
</tr> Table with rows
and columns
<tr>
<td>Input 1 under header 1</td>
<td>Input 1 under header 2</td>
<td>Input 1 under header 3</td>
</tr>
<tr>
<td>Input 2 under header 1</td>
<td>Input 2 under header 2</td>
<td>Input 2 under header 3</td>
</tr>
<tr>
<td>Input 3 under header 1</td>
<td>Input 3 under header 2</td>
<td>Input 3 under header 3</td>
</tr>
</table>
154
<i--<b>bold</b> --> for comment, in this case its
bolded.
<code>Computer code is put in here</code>
<frameset>
<frame src="http://www.google.com"></frame>
<frame src="https://www.facebook.com"></frame>
</frameset>
Introduction to Elements
155
In HTML, an “element” consists of the opening and closing tag as
well as the content between the tags. When a tag is opened, content
is introduced and the tag is closed, we have an element.
Introduction to Attributes
The attribute is used to define the characteristics of an element, it’s
used inside the opening tag of the element. Attributes are used to
communicate additional information inside an element. Attributes
are made up of a name and a value.
Example:
156
The head section of a web page
<head>
<title>My first web page</title>
<meta charset =”UTF-8”>
</head>
To practice using web templates, open a web page from the internet,
save it in your computer. Open it from your computer, right click and
view code. Start altering the contents.
(a) Text:
157
include good internal links that help readers gain access to more
information.
158
CHAPTER 19
Techno-preneurship
Definition of terms
(b) Technopreneurship
It is a process of running a business by combining the power of technology (IT)
with one’s entrepreneurial talent and skills. OR It is use of technology in the
delivery or conduct of normal business activities.
COMPONENTS/ELEMENTS OF TECHNOPRENUERSHIP
159
Human Resources components
Researchers – these are thinkers, business idea generator, innovators
Developers – implementers, technical people, they implement innovations
Marketing people – scan for markets, sell innovations to stakeholders
especially customers
Financer- these are sponsors in a business
Environment component
These are the environmental factors that a business venture can take
advantage of.
o Science and parks
o incubation centers (centers that help upcoming technoprenuers by
offering them a practice ground so that they can build enough resources
to start their own businesses)
o Academic institutions
o Records development centers
o Internet access
o Communications and other support services
o Geographic accessibility
o Research and development centers
Financial components
Investor- individuals who own the business, who invested in it.
Business sector- the business venture is part of the business sector.
Funding agencies- organizations or individuals
Financial services –Good business finance management, e.g. accounting
services
CAPITAL
Capital is needed in starting a business.
Capital refers to assets that can enhance one's power to perform economically
useful work. It is Wealth in the form of money or other assets owned by a person
or organization or available for a purpose such as starting a company or
investment.
160
Capital can be classified into various types for which one of the types of capital
is intellectual capital.
Elements of intellectual capital
Human capital
Structural capital (or organizational capital)
Relational (customer or social ) capital
(a) Human Capital refers to the skills/competences, training and education, and
experience and value characteristics of an organization’s workforce that in
the minds of individuals: knowledge, skills, competences, experience, know-
how, capabilities, expertise of the human members of the organization.
(b) Relational Capital (also also called relationship Capital, Customer Capital,
External Capital). All relations a company entertains with external subjects,
such as suppliers, partners, clients. External capital comprises relationships
with customers and suppliers, brand names, trademarks and reputation.
( Social Capital - quality of the relationships with customers, suppliers and
partners.)
161
Consumer satisfaction.
Building strong relationship with customers and clients
1. Business licenses
To legally start a business, you’ll likely need a business license. Visit your local city
council or government office for more information.
6. Workers’ compensation
Most states require employers to buy an insurance policy that compensates
employees if they get hurt or become ill from workplace exposure.
162
8. Obtain an employer identification number
To file your business taxes, you’ll need an employer identification number.
163
If your small business offers healthcare policies that can be accessed online,
you’ll need to come up with a security plan for this data as well. If the
information is ever breached, there are rules in place to notify those affected.
20. Bankruptcy
If your business has cash flow problems and is exploring the possibility of
bankruptcy, there are several laws you’ll want to familiarize yourself with before
filing the paperwork.
)
1. Email Marketing
Email marketing involves gathering the email addresses of leads and customers,
sending them emails regularly, and getting them to open those emails or click the
links in them.
2. Content Marketing
Unlike directly advertising your products and services, content marketing aims to
reach your target audience through informational or entertaining content. The idea
is that when your target audience is attracted by this content, they’ll learn about
your business as a result. The content you use can come in any of the following
formats:
articles
videos
audio
illustrations
infographics
eBooks
whitepapers
case studies
164
testimonials
and website copy (such as your homepage text or "About Us" page text).
Because content marketing doesn’t directly ask for the sale, it works best primarily
as a brand engagement strategy rather than a sales strategy.
3. Blogging
For businesses, blogging means regularly posting new updates to your blog or
website. Although blogging is technically part of content marketing, it often requires
a separate plan since it’s a recurring project.
5. Pay-Per-Click Advertising
Pay per click (PPC) advertising is simply a form of online advertising where you
pay for the clicks you get on an online ad.
7. Print Advertising
One of the more traditional marketing approaches, print advertising is simply about
buying ad space on printed media such as newspapers, magazines, newsletters,
direct mail, or yellow pages.
8. Referral Marketing
As the name implies, referral marketing is about getting new leads and sales from
referrals. These could be from your existing customers or other people who simply
know about your business.
9. Event Marketing
Small businesses, especially those that have a storefront or serve a local
community, can also benefit from hosting simple events that appeal to their target
audience. This approach is known as event marketing. The idea is that by creating
an event, your target customers will be gathered together in the same space. In
this space, they can buy your products or at least become aware of your brand.
165
10. Business Partnerships
To make your small business stronger, sometimes it’s best to look for other small
businesses and band together. This could be in the form of cross promoting each
other’s products, bundling some of your products together, or co-hosting an event
for your target customers.
166