Computer (F1-4) Malawi
Computer (F1-4) Malawi
Form 1
Chapter 1
INTRODUCTION TO COMPUTERS
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Computers are designed in different sizes and designs but the most common is a computer referred
to as Personal Computers (PC) which are mostly used in offices, schools, business premises and
homes.
Computers have undergone some evolution processes from non- electronic computing
devices to electronic computing devices
Non- Electrical computing devices are tools that were used to perform arithmetic computations
manually or Non-Electronic. These include sticks, stones, abacus, bones etc.
a) Abacus:
❖ It was invented by the Chines and it was meant for counting instrument dates back to 300
BC.
❖ The Abacus has bead – like parts that move along rods. Each bead above the middle bar
stands foe five units while a bead below stands for one unit.
b) Napier’s bones: Napier `Bones was developed by John Napier, a Scottish mathematics in
the 17th Century. It was used for performing multiplication and division.
d) The Analytic Engine: The Analytic engine was designed by Charles Babbage in 1932
used for English and Mathematics. Die technological limitation, Babbage never
implemented it. The engine is recognized as the first real computer and Babbage as the
father of computing.
Uses of computers
Computers are used in each and every day just because they are more efficient and accurate.
Computers are used in some of these areas:
Types of computers
Computers are categorized based on the following criteria
c) Hybrid Computers: are designed to process both analog and digital data.
a. Micro – computers
❖ It is a type of computer which uses microchips as its CPU
❖ Micro - computers are generally known as Persona Computers (PC)
❖ Micro – Computers are known as PC because they are designed to be used by one
person at time.
❖ Micro – Computers are generally used for general purpose in places like:
o Schools
o Home
o Business
❖ Personal Digital Assistant (PDA): are PCs which uses touch sensitive screens of
which image choices re made by pressing the image button using a special pen known
as STYLUS.
b. Mini computers
❖ Mini – computers are large multi – user computers
❖ They are smaller and less powerful than mainframes.
❖ Mini Computers are used to link other computers on a local area networks.
Byte: A group of bits (often 8) used to represent a single character in the computer memory.
A Byte is the basic unit for measuring memory.
Word: Two or more bytes make a word. The term word length is used as a measure of the
number of bits in each word. Data is usually read or written to memory in words. A word
can have 16 bits, 32 bits, 64 bits etc.
Kilobyte: A Kilobyte is exactly 210 bytes = 1024 bytes. Roughly speaking a kilobyte is
approximately equal to 1000 bytes (one thousand bytes).
Megabyte: A megabyte is exactly 220 bytes = 1024 x 1024 bytes = 1,048,576 Bytes
❖ Roughly speaking, a megabyte is approximately 1,000, 000 bytes (one million bytes) or
(one thousand kilobytes).
Gigabyte: A gigabyte is exactly 230 bytes = 1024 x 1024 x1024 x 1024 bytes =
1,099,511,627,776 bytes.
When making conversion between various data units, we use the following
approximations.
Character sets
Data is entered in the computer in form of characters. Each character, be a number, alphabet
or symbol is recognized by the computer because of its unique sequence of O1s and 1`s. a
word can be made of one or more characters. Therefore, when you Press character A on a
keyboard, the character set converts a binary number / code to its equivalent human
readable form and vise – versa. It is the character set for example that marks a binary code
to the letter A on the keyboard.
NB: ASCII and EBCDIC tables are widely available on the internet.
Chapter 2
COMPUTER HARDWARE
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Introduction
They are two major components of a computer system and these are:
✓ Hardware System
✓ Software System
Hardware system
❖ Hardware systems are physical components of the computer that apple to the sense of
touch.
❖ Input devices
❖ Output devices
❖ Central processing Unit
❖ Storage devise
❖ Memory
Input devices
Are devices that get data into the computer system? Example of input devices are:
❖ Keyboard
❖ Microphone
❖ Digital camera
❖ Digital video camera
❖ Pointing devices such as mouse, joystick
• Keyboard is a board with a set of keys used to send command into the computer system.
Functions of a Keyboard.
Pointing Derives:
- Pointing devices whose major function are choosing commands from on screen menu and
drawing of graphics. Examples of pointing devices are
Types of a mouse
Pointing and clicking on icons to send commands or opening window dialog boxes
SCANNERS
Types of Scanners
• Soft copy
• Hard Copy
Soft Copy
• A soft copy is a kind of input which is not tangible but can be seen or heard.
• Soft copy can be audio through speakers or visual through monitors
Visual display Unit is also known as a Monitor or Screen which is used to display data
inform of text, picture and Video.
Screen Resolution
Screen resolution is the number of pixels a monitor is able to display image on the
screen are made up of a collection of small dots called pixels. Pixels are short form for
picture “pix” elements “el” therefore pix + el form pixels e.g. 400 x 800 pixels. A
screen is divided into rectangular.
• Data projectors are used to display output from computer into a plain white screen like
a wall or whiteboard.
• Output form a data projector is a creative way of presenting computer output to the
audience.
A hardcopy is a tangible output that can be felt such as printed paper. Example of output
devices are:
• Printers
• Plotters
Printers
Categories of Printers
• Impact Printers
• Non – Impact Printers
Impact Printers
• Impact printer, they form a character by hammering the shape of a character into a
carbon or ink ribbon placed against the paper. Examples are:
• Dot matrix printers
a. Dot Matrix printers has got a head with needles which prick on the ribbon to
produce a partten on a paper.
• Daisy wheel Printers
• It forms the image of the page by spraying tiny droplets of ink on the paper.
• They are common for home and office use
Thermal Printers
Plotters
• They are commonly used to print geographical architectural and engineering drawings
such as maps, advertisement posters to be placed on bill boards.
Register or memory
• It read information stored in digital computer inform of numbers such as 0s and 1s
Types of memory
TYPES OF RAM
1. Static RAM (SRAM) is a fast type of memory mostly located inside a microprocessor and
it is used for special purpose memories such as cache memory which is used to enhance
the processing speed by holding data and instructions that are instantly required by the
processor.
2. Dynamic RAM (DRAM) is a relatively slower type of RAM compared to SRAM. DRAM
is needed periodically for storage purpose to maintain data storage in the computer system.
These are memories included inside the microprocessor or input and output devices in order to
enhance the performance of the computer system. These type of special memories are:
1) Cache Memory which is a fast type of RAM. They are three types of cache memory
namely :
a) Level 1 also known as primary cache is located inside the microprocessor
b) Level 2 also known as external cache it may be inside the microprocessor or mounted
on the motherboard.
c) Level 3 is the latest type of cache that works with Level 2 cache to optimize the
performance.
Memory capacities
Memory and storage capacity is measured in special units called bytes. A Byte is equivalent to
single character. Characters can be numbers from 0 to 9 or letters from A to Z and symbols
including spaces between characters. Bytes are formed from bits. For example 8 bits make 1
byte. Memory quantities can be expressed in:
• Kilobytes (KB) are approximately one thousand bytes, but the actual size is 1024
bytes, because the computer uses base 2 system (0 and 1 : 2n)
• Megabytes (MB) are approximately one million bytes, but the actual size is 1048575
bytes
• Gigabytes (GB) are approximately one billion bytes but the actual size is 1073741824
bytes.
• Terabytes are approximately one trillion bytes but the actual size is 1099511627776
bytes
Computer performance
Storage devices
• Storage devices are devices that help to keep processes data from the computer system
• Storage devices are also known as backing storage, because they help to keep the copy
of original file from the computer system
• The following diagram illustrates various examples of storage devices
• Magnetic media
• Solid state media
• Optical media
Magnetic media
• They store data in magnetic fields, examples of magnetic media are :
a. Floppy diskettes
b. Zip Diskettes
c. Jazz Disk
Floppy Disk
• They consist of a flexible plastic disk coated with metal oxide that can be magnetized.
• The disk is enclosed inside a plastic jacket to protect from dust, sunlight and moister.
• It is cheap
Zip Diskette
• They are working on the same technology with floppy diskettes and the way they store
data.
• Read/ Write Window, which allows the retrieval of Data and entry of Data in the
computer system
• Metal Shutter, its function is to cover the read / write window to avoid dust and direct
sunlight to the magnetic tapes.
• Write protected notch, its function are to lock and unlock the floppy diskette (for
data protection)
• Index Hole, it facilitates the rotation of the Diskette.
• Hub, it holds the magnetic diskette to remain within its position.
• Disk Label, it holds the name of data stored within its position.
a. Zip Diskette has small read / write head which allow it to store more data than
floppy diskette.
Optical Media
• “Optical” means something to do with light.
• Optical media use a laser beam light to read or write on a disk.
• CD - ROM
• CD - R
• CD - RW
• DVD
• VCD
• CD
Advantages of CD - ROM
Disadvantages of CD-ROM.
Advantage of CD-R
Disadvantage of CD-R
Disadvantages of CD-RW
Disadvantage of VCD/DVD
Disadvantage of VCD/VD
Communication Devices
• Communication devices components used to connect computer on a network.
Modem
• Modems are devices used to change signal from analogue to digital and from digital to
analogue
• Modulation is the process of converting digital signal to analogue signals
• Demodulation is the process of converting analogue signals to digital signals
Types of modems
• Internal Modems
• External Modems
• Internal modems are built inside the computer systems
• External modems are connected using telecommunication line.
Advantages of modems
• It is cheap
• It can be used anywhere provided there is a telephone line
• It is easy to use hence is plug and play
Disadvantages of modems
• Data transfer using modems are relatively slow as a result much faster internet
connections where developed such as.
• ISDN (Integrated Service Digital Network)
• ADSL (Asymmetric Digital Subscriber line)
Advantages OF ISDN AND ADSL
Network switch/hub
• Are devices used to connect computers on a local Area network (LAN)
• The computer on a network can access each other through a hub or switch.
Chapter 3
COMPUTER SOFTWARE
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Introduction
They are two major components of a computer system and these are:
✓ Hardware System
✓ Software System
Computer Software
Software refers to set of instruction that help computer to do something
1. System software
2. Application software
❖ Booting the computer and making sure that all the hardware elements are working
properly
Copyright © learnmalawi | All rights reserved
❖ Performing operations such as retrieving, loading, executing and storing application
❖ Storing and retrieving files
❖ Performing a variety of system utility functions.
Application software
Are programs that are designed to help the user accomplish specific task, application software
are also known as application packages.
❖ They may have some features not needed by user, which may take extra storage
space
❖ They may require users to change to change processes and hard ware for compatibility
which may inurn be expensive
❖ They may lack some features required by the user
NB: Software can also be classified according to end-user License (EUL) and general public
license (GPL)
User interface
❖ it is means of communication operating system provide between the computer and
the user
o For job sequencing; it controls the amount of time allocated to task by the central
processing-unit
Information organization
❖ It is the major function of operating system to organize information
❖ It is important to organize data in the computer environment because of the
following reasons;
o It enables easy access to information
o It is easy to transfer information from one location to another
o Easy sorting of information
Contents of DOS
i. CD….. or CD means changing drives from the current drives to another drives
ii. DIR means viewing the contents of the directory page by page
iii. DIR/P means viewing the contents of the directory page by page
iv. CD\ means returning to the root directory
v. MKDIR or MD means making a new directory
vi. RMDIR for removing or deleting the directory
vii. DEL for deleting file in a directory
viii.COPY for copying directory from one location for another
ix. COPY*.* for copying all files in the directory
x. REN for renaming files in the directories
xi. CLS means clear screen
Disk management (formatting a disk)
❖ A disk cannot be used in a computer if it is not formatted
❖ Formatting is a process in which the computer arranges the surface of a disk into a
form it can be recognized and used to store data
❖ When formatting a disk in DOS, FORMAT command is used. Type FORMAT to the
prompt system followed by drive letter
❖ FORMAT command is used to prepare a disk making it ready to be used.
❖ DISKCOPY are external commands used to copy the content of a disk while COPY
is internal command
Wildcard character
❖ Icons are buttons with small meaningful pictures or symbols representing the
computer programs easy memorizing their functions
❖ Icons are used as shortcuts for opening the items or sending commands they
represent
Types of icons
o Programs icons
o Folder icons
o Toolbar icons
❖ Program, file and file icons are displayed in a dialog box or the desktop
Linux is one of popular version of UNIX operating System. It is open source as its source code
is freely available. It is free to use. Linux was designed considering UNIX compatibility. Its
functionality list is quite similar to that of UNIX.
• Ubuntu linux
Copyright © learnmalawi | All rights reserved
• Centos
• Suse linux
• Fedora
• Kali
• Kernel − Kernel is the core part of Linux. It is responsible for all major activities of
this operating system. It consists of various modules and it interacts directly with the
underlying hardware. Kernel provides the required abstraction to hide low level
hardware details to system or application programs.
• System Library − System libraries are special functions or programs using which
application programs or system utilities accesses Kernel's features. These libraries
implement most of the functionalities of the operating system and do not requires
kernel module's code access rights.
• System Utility − System Utility programs are responsible to do specialized, individual
level tasks.
• Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
• Kernel − It is the core component of Operating System, interacts directly with
hardware, provides low level services to upper layer components.
• Shell − An interface to kernel, hiding complexity of kernel's functions from users. The
shell takes commands from the user and executes kernel's functions.
• Utilities − Utility programs that provide the user most of the functionalities of an
operating systems.
In Linux everything is a file. Linux organizes its files in a hierarchical directory structure called
a tree. The first directory in the filesystem is called the root directory. The root directory
contains files and subdirectories, which contain more files and subdirectories, and so on.
In windows each storage device has a separate filesystem. Linux has always one filesystem
tree no matter how many drives or storage devices are attached to the computer. In Linux, a
storage device is mounted at various points on the tree.
The tree in Linux is like an upside-down tree with the root at the top and the various
branches descending below.
/ Root Only root user has write privilege under this directory.
/usr/bin - contains binary files for user programs e.g at, awk, cc,
less, scp
Chapter 4
USING COMPUTERS
Website: www.learnmalawi.com
Email: info@learnmalawi.com
The keyboard
- A keyboard is board with a set of keys used for entering data in a computers
system
- Command from the keyboard is what tells the what to do
- A key is a button on keyboard which performs specific tasks
Types of keyboard
- There are two main types of keyboards, namely
o Standard keyboard
o Extended keyboard
Standard keyboard has three different types of keys of which includes
o Alphabet keys
o Digit keys
o Control keys
o Function keys
o Cursor keys
- While extended keyboard has only alphabetic keys and control keys with one
set of numerical keys
Alphabet keys
o Are used for entering text data
o They arrangement of the keyboard are based on the standards type writer
known as QWERTY. The QWERTY from is proved by counting keys from Q to Y
which make the term QWERTY
Digit keys
o Digit keys are used to enter numbers
Blind typing
- It refers to the process of pressing hands dangled at the middle of the keyboard
while fingers press other keys
- Fingers are used to type a letter or symbol close to it
- Thumb finger used to place space bar. All the eight finger including thumbs rest
in the Centre of the keyboard
Parts of a mouse
Mouse terms
Left click
- Single click (or Click): Press and release the left mouse buttons (left button).
This is used to select options or items
- Double click: Quickly press and release the left mouse button twice. Mainly
used for opening documents
Scroll
This is the rotating button between the two click buttons and is used to scroll up and
down pages. In some cases, the rotating button between the two click buttons can
pressed for other actions.
• Mechanical mouse: Houses a hard rubber ball that rolls as the mouse is
moved. Sensors inside the mouse body detect the movement and translate it into
information that the computer interprets.
• Optical mouse: Uses an LED sensor to detect tabletop movement and then
sends off that information to the computer for merry munching.
• Infrared (IR) or radio frequency cordless mouse: With both these types,
the mouse relays a signal to a base station wired to the computer’s mouse port.
The cordless mouse requires power, which comes in the form of batteries.
• Trackball mouse: Like an upside-down mouse. Rather than roll the mouse
around, you use your thumb or index finger to roll a ball on top of the mouse.
The whole contraption stays stationary, so it doesn’t need a lot of room, and its
cord never gets tangled.
• Stylus mouse: Another mouse mutation enjoyed by the artistic type is the
stylus mouse, which looks like a pen and draws on a special pad.
Mouse pointer
The mouse pointer is the little indicator that moves when you move the mouse.
Sometimes, the mouse pointer has a different shape, depending on where it’s currently
resting or to show that a computer is processing something so you must wait.
The following diagram illustrate various shapes of mouse
Logging off
• Click the Start button in the lower left corner.
• Click the arrow button which can be found next to the Shut down button.
1. Choose Start→Control Panel and in the resulting window, click the Add or Remove User
Accounts link.
Folders of a computer
In computers, a folder is the virtual location for applications, documents, data or other sub-
folders. Folders help in storing and organizing files and data in the computer. The term is most
commonly used with graphical user interface operating systems.
you start your computer, to the moment you turn it off, the desktop is always there. The desktop has
two parts – The work area, and the taskbar. The work area has desktop icons. The
taskbar has the start button, taskbar buttons/icons, toolbars and notification area.
Work area. The onscreen area where users can perform their work, as well as store
programs, documents, and their shortcuts. Although in technical terms the desktop
refers both to taskbar and work area, people loosely take the work area as the desktop
and they use it interchangeably. If you right click the work area you get desktop
properties. The appearance of the desktop can be changed using the following desktop
properties: Display settings and Personalize.
The desktop icons-Each little picture on the desktop is an icon. Each icon, in turn, represents some
program you can run, or some location on your computer where things are stored. The Recycle bin
icon is one of the most common icon that sits on the desktop- the recycle bin keeps
deleted items. If items need to be permanently deleted, the recycle bin must be
emptied. If you want to use an item from the recycle bin then it needs to be restored.
A restored item returns to the previous location where it was deleted from.
The taskbar - This is a special toolbar that is unique to the desktop. You can use the
taskbar for such tasks as switching between open windows and starting new
applications. The taskbar includes the following:
• Start menu
• Quick Launch bar (Windows Vista and earlier only)
• Taskbar buttons
• Toolbars (optional)
• Notification area
The Start menu contains commands that can access programs, documents, and
settings. Examples of some contents (commands) of the start menu are accessories- paint, calculator,
notepad, snipping tool; Microsoft office programs – word, excel, access, and so on; file explorer – my
documents, my pictures, my computer (This PC), and so on; Control Panel; Games; Help and
Support; Shut down; Search programs and files.
The Notifications area - The Notifications area contains the icons that keep you posted as
to the status of various programs or services running on your computer.
Folder window
Application window
Most windows have certain elements in common, such as a title bar and a menu bar.
Not all windows, however, have every element.
A menu bar displays commands or options in drop-down menus. The Close button
in the upper right corner of a window closes the window. The Maximize button in
the upper right corner of a window enlarges the active window so that it fills the entire
desktop. The Minimize button in the upper right corner of a window reduces the
active window to an icon on the Windows taskbar.
Menus
Menus are hierarchical lists of commands or options available to users in the current
context. Commands are actions users can take while using your application.
Toolbars are a way to group commands for efficient access. Toolbars can be more
efficient than menu bars because they are direct (always displayed instead of being
displayed on mouse click), immediate (instead of requiring additional input) and contain
the most frequently used commands (instead of a comprehensive list). In contrast to
menu bars, toolbars don't have to be comprehensive or self-explanatory just quick,
convenient, and efficient.
A ribbon is a command bar that organizes a program's features into a series of tabs at
the top of a window. A ribbon can replace both the traditional menu bar and toolbars.
Ribbon example
Dialog Boxes
A dialog box is a secondary window that allows users to perform a command, asks
users a question, or provides users with information or progress feedback. There are
two types of dialog boxes – modal and modeless. Modal dialog boxes require users
Copyright © learnmalawi | All rights reserved
to complete and close before continuing with the owner window. Modeless dialog
boxes allow users to switch between the dialog box and the owner window as desired.
Dialog boxes consist of a title bar (to identify the command, feature, or program where
a dialog box came from), an optional main instruction (to explain the user's objective
with the dialog box), various controls in the content area (to present options), and
commit buttons (to indicate how the user wants to commit to the task).
Standard Icons
Standard icons are the error, warning, information, and question mark icons that are
part of Windows.
• Error icon. The user interface (UI) is presenting an error or problem that has
occurred.
• Warning icon. The UI is presenting a condition that might cause a problem in
the future.
• Information icon. The UI is presenting useful information.
• Question mark icon. The UI indicates a Help entry point.
Windows offer another utility "Windows Explorer" which helps you in working with files
and folders on your computer.
• Click on Start,
Two drives nearly all computers have are a floppy drive (drive A:) and a hard drive
(drive C:). If you have more than one drive, then they are named D:, E: and so on. If
you have a CD drive or a DVD drive, it also is named with a letter.
- Opening a hard drive is easy. Just double click the icon representing the drive
you want to open. Files and folders contained in the drive are now shown in the
opened window. Now for opening a folder, double click its icon.
• Click the file or folder to be copied. More than one file or folder can be copied at
a time.
• To select more than one consecutive files or folders, click the first file or folder,
press and hold down CTRL key, and then click the last files or folders.
• Select the target drive or folder to which you want to copy the files
• Under Edit menu, select Paste to copy the desired file or folder to the target
drive.
4. It will display all the details about the files such as Name, Type, size etc.
- Folders help you to organize your files. You can create a folder either by using
My Computer window or through Windows Explorer.
- You can create a Folder in any existing disk drive or folder or on the windows
desktop. The steps for creating a folder are:
4. Type a name for the new folder, and then press ENTER.
5. A new folder can also be created directly on the desktop by right-clicking a blank
area on the desktop, pointing to New, and then clicking Folder.
5. Alternately file or folder can also be renamed by right-clicking it and then clicking on
Rename.
4. Files or folders can also be deleted by right-clicking the file or folder and then clicking
Delete.
5. Deleted files or folders are stored in the Recycle Bin, till they are permanently
removed from the Recycle Bin.
6. To retrieve a deleted file, double-click the Recycle Bin icon on the desktop. Right-
click on the file to be retrieved, and then click Restore.
7. To permanently delete a file, press and hold down SHIFT key and drag it to the
Recycle Bin.
Chapter 5
SAFE USE OF COMPUTERS
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Hazards to system
a. Power surge/cut
- Power surges or unexpected power cuts can not only cause instant loss of data
but can also fry a processor rendering it useless.
- It is not just power from the grid that causes problems either, lightning can
surge through cables (even phone wires) frazzling your system and a build up of
static can cause similar results.
b. Dirt/Dust
- dusty environment will clog a computer and block cooling vents causing a
computer to overheat.
- Dust can also contain conductive material and particles can stick to circuit boards
and cause a short circuit.
- A cloud of dust can also explode if it comes into contact with a source of ignition
(like a computer).
- Even home computers if not properly cleaned can succumb to problems caused
by too much dust.
- Of course computers are electrical and with all electrical equipment, computers
and water do not mix, just one spilt cup of coffee could see the end of your PC.
d. Heat
e. Cold
- Just as with heat, computers don't enjoy the cold too much either.
- Processors will not operate at all if the operating temperature is too cold as
condensation inside the machine can freeze and expand damaging the processor
and electronics.
f. Knocks/bangs
Musculoskeletal Problems
• This includes areas of your body such as your back, neck, chest, arms, shoulders
and feet.
• Having sore muscles and complaints of the muscles being tired are common.
Tips to Consider
• Find a correct height for both your desk and chair so that your computer screen
is at eye level or slightly lower.
• Sit with your back straight, legs at 90 degree angles to the floor, and feet resting
flat on the floor.
• ALWAYS take small breaks from your computer work to stretch your muscles,
keep your blood flowing, and to rest your eyes.
2. Vision Problems
• Computers are notorious for their bright lights, glare and flickering images that
can cause strain on your eyes.
• Finding that you constantly focusing on the screen with delays in blinking can
result in drying out your eyes.
Tips to Consider
• Make sure to adjust the brightness on your computer screen so that your eyes
are not as strained.
• You may notice pain in your neck, shoulders, or really anywhere from the
shoulders to your fingers related to repetitive muscle use.
• Using the computer may cause you to use your muscles in an odd way that may
cause increased stiffness, pain, or swelling in any of those areas.
• One of the most common conditions related to repetitive use of your muscles
when using the computer is carpal tunnel syndrome.
Tips to Consider
• Place your mouse at a location next to the keyboard that will require you to
move your whole arm to get to it rather that just twisting your wrist outward to
reach it and move it.
• Type gentle to decrease the stress put on each of your fingers.
• Keep your wrists flexible when typing; avoid keeping them fixed in a certain
position; keeping them flexible will avoid repetitive, strenuous stress.
4. Headaches
• Headaches are common and may occur because of the increased muscle tension
or from pain in the neck.
• Any vision problems, or continued strain on the eyes can also cause headaches.
Tips to Consider
• Attend regular eye exams in order to work toward correcting any vision
problems.
• Try your best to keep your neck straight in front of the computer and take
breaks.
5. Obesity
• Prolonged use of computers may lead to an overall sedentary lifestyle that lacks
adequate physical activity and/or exercise.
• In children prolonged use of computers, or electronics in general, is a major
contributing factor to obesity.
Tips to Consider
6. Stress Disorders
Tips to Consider
• Promote your own health and prevent future health conditions or worsening the
ones you already have by seeking treatment options for any stress that you may
encounter.
• Try things from yoga, to natural remedies, to medications as prescribed by a
medical provider to combat your stress.
• Laptop injuries fall into a category of their own; there is a growing use of laptops
that continues to cause more pain and strain among those individuals who use
them.
• Laptops are designed for short periods of use for those who do not have access
to desktop computer.
• In present day individuals choose to use laptops over desktops more frequently,
due to convenience.
• The problem is this: the screen and keyboard are very close together and there
is really no right way to use a laptop because if you position the screen at the
right height for your back and neck, it will cause you to have to lift your arms
Tips to Consider
8. Sleeping Problems
• Artificial lighting that is given off from computer screens can actually trick your
brain and suppress its release of melatonin – the substance that assists your
sleeping patterns.
Tips to Consider
• Keep the volume of your headphones down to a tolerable level, one that blocks
out any extra noise but that is just loud enough for you to hear.
• Listening to your headphones at approximately 80 decibels is recommended; if
you are unaware of what that sound level is it can easily be researched.
• Being immobile and not allowing your blood a chance to get moving around your
extremities may cause it to pool, creating build-up of blood cells that will
eventually clot (or stick together) due to not being able to be circulated around.
• Blood clots can be life-threatening if they break away from where they are
lodged and travel to another area, such as your lungs.
• Sitting in one position for too long (especially if your legs are crossed), generally
over a period of over 4 hours, can greatly increase your risk for this.
Tips to Consider
• Avoid crossing your legs when using a computer for an extended period of time.
• Burglar proofing the room- It includes fitting grills on doors, windows, and
roof to control forceful entry into a computer room.
• Installing fire prevention and control equipment such as smoke detectors,
non-liquids based fire extinguishers.
• The room should be well laid out with enough space for movement and
setup of computers.
• Powering the computer on/off, the computer should be always be switched
off using the correct procedures to avoid loss of data and destruction of
software.
• Dust and dump control, the room should be installed with good windows
curtains and an air conditioning system that filters dust particles.
• Insulating power cables, cables and power sockets should be well installed
and be of the correct power rating to avoid short circuit.
• Avoid taking meals in the compute laboratory, food particles may fall in
moving computer parts like keyboards.
Data loss is defined as unexpected missing of data files from a computer system
- When you are halfway through writing a long article and you have not saved it
yet, then in case of power going out you lose your data. This is perhaps the
simplest example but imagine working with sophisticated databases or creating
detail-rich graphic illustrations...you get the idea what can happen if you lose
power during working.
- Another, even deeper problem may arise when power failures affect operation
5. Theft of computer
- It is a real tragedy to lose both computer and data at the same time .
- There is always the danger of burglars breaking in to your home and stealing
electronic devices. While traveling, you may leave your laptop unattended; lose it
in an airport, conference centers, coffee shops or any other crowded place.
6. Spilling coffee, and other water damages
- Since laptop usage has been growing during past few years, the damages
caused by spilling drinks on to the computers have become more often as well.
- Average laptop does not have extra covers to protect internal parts from getting
soaked
- Liquids cause short circuit of important electronic components and they are really
hard to recover afterwards.
7. Fire accidents and explosions
- Explosions happen rarely but fire most probably completely destroys both you
computer and data saved on it.
- Fire is also dangerous to the backups that are stored in the same house. For
example, having weekly backups stored on an external hard drive which is kept
in same building does not help much if the building burns down.
- In this case, both computer and backup drive will be destroyed and data will be
completely lost. The safest practice against fire is to make regular backups and
keep them in other (different) locations.
Computers that you no longer need should be disposed of with great care. The data on
your computer can easily be accessed whether you sell, scrap, give away or donate it,
and even ‘deleted’ data can be retrieved with relative ease by criminals.
The following are risks associated with careless disposal of computers
1. The personal information stored in files on your computer can be accessed and
used for criminal activity.
2. Any passwords stored on your computer could give access to secure websites
holding your personal and financial information.
1. Copy all of the data you will need in the future, on to your new PC or storage
device, or back it up in the cloud.
2. Fully erase the hard disk(s) so that any personal information is completely
deleted. Simply deleting files is not enough to permanently erase them.
3. Ensure that any CDs or DVDs which contain your data are removed from the
computer.
4. Don’t forget that your CDs, DVDs, memory cards, USB sticks and other USB
connected devices may also contain your sensitive data and should be disposed
of with equal care.
5. If the computer equipment is at the end of its life and you do not intend to sell it
or give it away, take it to a proper disposal facility, which will ensure that is
dismantled and the components recycled correctly and responsibly
- You can’t just throw your computer away. There are various components within
a computer that are either environmentally toxic, such as mercury and lead, or
valuable, such as copper, aluminum, and gold.
- Because of this, there are many programs available to help take your old
computers off your hands.
Computer Viruses
A computer virus is a type of computer program that, when executed, replicates itself
by modifying other computer programs and inserting its own code.
Types of Computer Viruses
The following are the common types of computer viruses
1. Boot sector virus
This type of virus can take control when you start — or boot — your computer. One
way it can spread is by plugging an infected USB drive into your computer.
This type of virus exploits the code of web browsers and web pages. If you access such
a web page, the virus can infect your computer.
3. Browser hijacker
This type of virus “hijacks” certain web browser functions, and you may be
automatically directed to an unintended website.
4. Resident virus
This is a general term for any virus that inserts itself in a computer system’s memory. A
resident virus can execute anytime when an operating system loads.
This type of virus comes into action when you execute a file containing a virus.
Otherwise, it remains dormant.
6. Polymorphic virus
A polymorphic virus changes its code each time an infected file is executed. It does this
to evade antivirus programs.
This common virus inserts malicious code into executable files — files used to perform
certain functions or operations on a system.
8. Multipartite virus
This kind of virus infects and spreads in multiple ways. It can infect both program files
and system sectors.
9. Macro virus
Macro viruses are written in the same macro language used for software applications.
Such viruses spread when you open an infected document, often through email
attachments.
A computer virus attack can produce a variety of symptoms. Here are some of them:
Website: www.learnmalawi.com
Email: info@learnmalawi.com
A. Financial systems
B. Accounting system
C. Banking systems
D. Sales and marketing
E. Retail system
F. Reservation of epos terminal
G. Education system
H. Communication system
I. Industrial system
J. Scientific and research systems
K. Scientific and research systems
L. Library systems
M. Entertaining and multimedia systems
L. Transport systems
M. Law enforcement systems
N. Computers in agriculture
N. Human resource system
O. Communication system
A. Financial systems
• In financial systems computers enables organization to manage their financial
• The financial institutions include:
1. Accounting systems
B. Accounting systems
• Accounting systems are popular in business management
• Computers in accounting systems are used to enter customer’s order and billing
sup systems records for generating customers’ orders
• For keeping of the items in stock and help in management of items reorder
• Computers also help in hook keeping and produce reports in data being
processing.
C. Banking systems
• The banking industry is one of the earliest customers of information and
communication technology.
• The computers in banking services perform the following tasks.
1. Process customer transactions
• Computers in bank are used for easy carrying out financial transactions such
as
E. Retail systems
• Supermarkets
• Distribution outlets.
• Computers are used in stores for stock control and transaction handling.
• Shops owners processing data to be ordered and reordered
• Most retail transaction are handled using and electronic point – sale (EPOS)
• EPOS is a computer terminal used in retail stores to input and output data.
• EPOS terminal has all the normal facilities of cash register, direct data capture
devices such as bar reader, card reader, a monitor and a receipt printer.
• Transaction at the point of sale terminal my involve the following steps;
o The bar code leader is passed over the items bar code to generate the item
number.
o Using the number, the computer searches for the item with corresponding
number in the product file.
o Once record is found its description and price is used for processing sales.
Computer in reservation systems are used mainly to make bookings in areas such as
• Airlines
• Hotels
• Car rental and theaters
• Bookings are made from a remote terminal connected to a centralized computer
Known as server.
• To access a server a client makes enquires via the remote terminal referred to as
client computer or using mobile phone
G. Education systems
I. Industrial systems
• The application of computers technology in industrial or manufacturing process
has become one of the most effective methods of automated production which
has improved the productivity.
• Computers are used in some of the following industrial plants;
• Motor vehicle manufactures
• Mining plants
• Chemical plants
• Refineries
• Computers in industries are used in a number of ways of which some includes
• Process control
• Industrial simulation
K. Library systems
• Library use computerized system for a number of task such as;
• Lending system : the library lending system manages the issuance and return
of borrowed reading materials.
• Inventory; it involves use of computer to manage stock, which includes checking
for books currently in stock and those on high demand.
• Cataloguing system; it is a collection of cards with information about each book
reference found in the library.
O. Transport systems
• Computers are also highly used in transport systems in the following areas;
1. Road traffic control
2. Air traffic control – through the use of geographical position system (GPS)
3. Shipping control whereby computers are used to guide the paths or direction taken
by spaceships and water vessels as they travel to distant land geographical position
systems (GPS) is also used.
Q. Computers in agriculture
• In agriculture computers are used for;
1. Legal issues
2. Economic issues
3. Environmental issues
4. Effect on employment
5. Effects on automated production
6. Issues of workers health
7. Ethical issues
1. Legal issues
Benefits
Challenges
3. Environmental issues
➢ Emission of heart into the environment and other forms of electromagnetic
radiations.
➢ Cadmium oxide found in mobile phone and laptop batteries could leak into
underground water if proper disposal is not done
➢ Emission of greenhouse gases during manufacture of ICT components
4. Effects on employment
• Computers at work place has resulted in creation of new jobs replacement of
computer illiterate workers and displacement of jobs that were formerly manual.
5. Automated production
• Number of manufacturing industries such as vehicle assembly, oil refineries and
food processing use computers.
➢ High initial cost of setting up an automated system. E.g the cost of one industrial
robot is high than employing a human resource.
➢ Automated production may lead to unemployment in areas that are labour
intensive one person can do the work of twenty people.
7. Ethical issues
• Ethical in the society is both an informal and formal process of placing values on
actions, classifying them as either good or bad,
• computer has changed the way people used to communicate, work and relate.
• This has resulted to ethical dilemma due to the use of internet, social network
and mobile phones.
Cultural effects
Safeguarding computers
- Computer resources are expensive, therefore need to be safeguarded from
a. Theft
Copyright © learnmalawi | All rights reserved
b. Breakage
c. Virus infection and
d. Unauthorized access
These measures are to ensure that only authorized users are able to perform actions
or access information in a network or a workstation.
References
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 1-2. MIE: Domasi.
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 3-4. MIE: Domasi.
Nasalangwa Andrew, (2014) Excel and succeed Junior secondary computer studies form
1, Nirobi, Kenya.
Mulli, D. Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on Computer studies for senior
secondary volume 2. Nairobi: Kenyatta Literature Bureau.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 1.
Nairobi: Jomo Kenyatta Foundation.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 4.
Nairobi: Jomo Kenyatta Foundation.
Stephen, M (2010). Get started computing windows 7 edition. London: Hodder Education.
Stephen, M (2010). Get started excel windows 7 edition. London: Hodder Education.
http://www.cs.bu.edu
www.google.com
https://www.www.tutorialspoint.com
Wikipedia
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Word processors
Word processing is the process of creating, formatting editing and deleting text and
graphics
It is an application program used to create, format, edit and delete text and graphics.
A typewriter
1. Cursor
- This is blinking vertical line that shows the user where next to type.
8. Mail Merge
- This is the ability of WP to create a common letter, e-mail or labels and add
different addresses or particulars to each letter for different people at the
same time.
- It has three main parts:
a. Creating main letter,
b. Creating addresses and
c. Merging the addresses to the letter.
9. Dictionary
- WP has a dictionary where certain words can be added, to make them
accepted by WP such that it will not show the red colour symbolizing that it is
a spelling mistake or a non English word.
- You can add nouns from a different language and WP will recognize them as
part of the English language.
- Depending on the default language used by the computer, certain words
may not be accepted though they are English words.
- You need to add such words to the dictionary of WP. For example, British
English will accept labour, but American will only accept labor and so on.
• Click the start button which is at the bottom corner the of the screen.
• Select programs with the mouse pointer
• Click Microsoft word.
CLO
SE
- Click on the File tab and click “Close” from the menu
CLO
SE
- Ribbons are located near the top of the program. Locate the
“Home” ribbon and note the different tabs and tab sections.
- Locate the page and word count feature in the lower left portion of your
program screen
PAGE / WORD
COUNT
- The word document window can display its contents in different viewers such
as;
a. Normal view
- This is a default view for a document
b. Draft View
- Draft view is the most frequently used view. You use Draft view to quickly
edit your document.
c. Web Layout
- Web Layout view enables you to see your document as it would appear in a
browser such as Internet Explorer.
d. Print Layout
- The Print Layout view shows the document as it will look when it is printed.
e. Reading Layout
- Reading Layout view formats your screen to make reading your document
more comfortable.
f. Outline View
- Outline view displays the document in outline form.
Saving a document
- Once a document has been created it has to be saved so that it is stored in the
computer.
- To save the document for the first time, do the following;
STEP 2:
Type the STEP 3:
document name Click “Save”
- Click save
Open Button
DEFINITIONS:
➢ File – a document or item that can be opened with a specific program
➢ Folder – a small place where you store files
ICONS (BUTTONS):
DEFINITIONS:
➢ Template – a pre-formatted document that allows you to simply “fill in the
blanks” rather than create a similar document from scratch
➢ Sample templates – a template that is already installed on your computer and
ready to use
➢ My templates – additional templates that typically come standard with
microsoft word
➢ New from existing – a template that you previously built and saved yourself
➢ Office.com templates – templates found online, typically through the
microsoft website
DEFINITIONS:
➢ FONT – The style and typeface in which the text of a Microsoft Word document
is presented
➢ Become familiar with the basic FONT buttons presented on the ribbon
ITALI
FON BOL CSUNDERLI
T D FONT TEXT
NE
SIZE COLOR
Bullets
- Locate the SPELL CHECK button on the picture below. NOTE: It is located
on the “Review” ribbon
Spell
Check
Copyright © learnmalawi | All rights reserved
Formatting a document
CUT, COPY & PASTE
- The Cut, Copy, & Paste features are a vital part of most everyday business
applications of Microsoft Word, as well as many other programs.
DEFINITIONS:
➢ Clipboard – This is the area where items being cut, copied, and pasted are
temporarily stored. Think of it just as the name implies, as an imaginary
clipboard to hold the items needed for the project at hand
➢ Cut – The process of removing a text, picture, or other object from the
document and placing it on the CLIPBOARD
➢ Copy – The process of making a copy of a text, picture, or other object from the
document and placing it on the CLIPBOARD
➢ Paste – The process of removing something from the CLIPBOARD and adding it
to the current document
• Locate the “CUT”, “COPY” & “PASTE” buttons located in the “Clipboard” Tab
Section of the “Home” tab
Paste
Cop Cu
y t
Changing margins
• Locate the “Margins” menu found in the “Page Setup” Tab Section of the “Page
Layout” tab
Margi
• Click on the “Margins” menu button and
ns view the different options
Using themes
- Themes can help to add a little extra flair to your document by changing
colors and layouts at the touch of a button.
• Locate the “Themes” menu found in the “Themes” Tab Section of the “Page
Layout” tab
Click on the “Themes” menu button and view the different options
Merging
- Merging is the process of bringing text and graphic together. They are two
main types of merging and these are;
a. Mail merge
MERGING MAIL
• When creating mail merge a list of addresses for the recipients is required. To
create a mail merge from a new mailing list do the following in Ms word window;
- Click maillings
- Select start mail merge
• In the task pane follow the follow all the six steps as follow;
- Select the document type e.g letters, e-mail messages and labels.
- Starting document e.g select current document in the task pane.
- Selecting recipients by clicking type new list. Then type the new recipients
address in the new address list window, and click save and OK to confirm.
- Write your letter by adding the address block and greetings line on top of your
letter.
- Complete the merge by either printing or editing individual letter. In every step
remember to click next in the dialogue box.
- Open Word or the document where you wish to put a table. You can insert
tables into any version of Word.
- Position the cursor on the area where you want the table to be inserted. Click
the “Table” button that is located under the “Insert” tab. ...
- Choose your method of inserting your table.
Editing tables
Tables can be resized, new columns/rows inserted, rows/columns can be merged and
they can also be split.
- Resizing rows/columns
The easier way of expanding your rows is to place the cursor within a row and press
enter.
Hint: Alternatively, select the row to expand and right click. A pop-up window will
appear, choose table properties then click the row tab. The window below will appear.
On size, specify height.
Place the cursor on the boundaries of the column you intend to expand. A double
headed pointer as shown below will appear. Columns are resized by moving the double
headed pointer in the direction you want to expand the table. This is illustrated below.
Deleting rows/columns
• Right click on it
• On the pop-up menu, click either delete rows or delete columns depending on what
you selected to delete.
Merging rows/columns
- Simply place your cursor in the cell you wish to enter data and type the usual
way.
Formatting Tables
Steps:
When you click on borders and shading, the following window pops-up.
• Choose colour
Exercise
Using shading tab, apply shading on the first row of the table in on the exercise above.
Make sure to choose, the style, the colour and where to apply the shading.
Split cells
Under Table Tools, on the Layout tab, in the Merge group, click Split Cells.
Hint: Once you highlight the table tools will appear on top of the menus.
In Print Layout view, move the pointer over the table until the table move handle
appears. Click the table move handle to select the table that you want to sort.
Under Table Tools, on the Layout tab, in the Data group, click Sort. In the Sort dialog
box, select the options that you want.
- For example, if the cells in a column contain both last and first names, you can use
commas to separate the names.
- Under Table Tools, on the Layout tab, in the Data group, click Sort.
- Select the “Insert” menu. Locate and press the “Picture” button in the
“Illustrations” section.
- In the Dialog box that appears, browse to the photo you wish to insert and press
the “Insert” button
- .
Printing a document
PRINT PREVIEW / PRINT
• Locate and left-click the “Print” menu button located in the “File” tab
o Notice the different options to customize your print
References
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 1-2. MIE: Domasi.
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 3-4. MIE: Domasi.
Nasalangwa Andrew, (2014) Excel and succeed Junior secondary computer studies form
1, Nirobi, Kenya.
Mulli, D Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on computer studies for senior
secondary volume 1. Nairobi: Kenyatta Literature Bureau.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 1.
Nairobi: Jomo Kenyatta Foundation.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 4.
Nairobi: Jomo Kenyatta Foundation.
Stephen, M (2010). Get started computing windows 7 edition. London: Hodder Education.
Stephen, M (2010). Get started excel windows 7 edition. London: Hodder Education.
http://www.cs.bu.edu
www.google.com
https://www.www.tutorialspoint.com
Wikipedia
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Presentation software
➢ Microsoft PowerPoint
➢ Lotu’s freelance Graphics
➢ Corel presentations
➢ Harvard Graphics
➢ Open Office Impress e.t.c
Some of the areas where electronic presentation has become handy include;
➢ presentation facts and figures – examples, sales people often have to give
presentation to customers or managers just to let managers the sales
performances and the customers the latest product.
➢ Teaching – presentation software is regularly used as teaching.
➢ Reporting research findings - researchers and students present their project
reports through electronic presentation.
➢ Conferences – presentation software is regularly used during workshop and
seminars speakers use software to drive their point home.
➢ It is easy to learn.
➢ It has large library of background templates and custom layout.
➢ Multimedia effects can easily be added to the presentation.
➢ Presentation are easy to edit.
➢ It can easily produce output in different format e.g. interactive whiteboard and
handouts.
➢ Excellent for summarizing facts using charts or diagrams to an audience.
➢ Can be used to produce a set of hangouts for people to write on whilst
presentation is being given.
➢ Let’ the speaker face audience and make eye contact rather than facing the screen.
➢ They have large range of readily available pre-designed templates that one can
easily use to create the presentation.
➢ It has a selection of layouts used to create slides.
Plan
Prepare
Practice
Present
➢ Microsoft office button which will help you to perform command like save as
when saving your work e.t.c
➢ Ribbon, it has tabs like Home, insert, Design, Animation, Slide Show, review and
view in Ms Office 2007.
➢ Quick access button contains frequently use commands like undo or redo.
➢ Work area contains panes to insert and graphics.
➢ Status bar, which displays the current actions in the slides.
➢ Mini toolbar it display common formatting tools, such as bold, Italic, fonts, Font
size and Font color.
➢ Note pane, used to add more notes that could not fit on the slide.
1. In the new presentation window, click installed templates or press Shift + Ctrl +
P)
2. In the installed template section, choose the desired template.
1. Normal view – is the main editing view and it has four working areas, outlines,
slide tab, slide pane and notes pane.
-
3. Slide show
- A full screen view
1. Select the slide immediate before where you want the new slide to be inserted.
2. Click new slide layout that fits the contents.
3. Add contents to the slide.
Formatting a presentation
For the presentation to appear to the audience do the following;
Formatting drawing
To format a shape :
Printing a presentation
➢ Slide – this option lets you prints one slide per page.
➢ Handout – this option allows for more slides (1,2,3,4,6, or 9) per page.
➢ Notes page – prints slides that includes the speaker notes.
➢ Outline view – used to print the outline of the presentation.
Presenting
To start the slide show proceed as follows:
References
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 3-4. MIE: Domasi.
Nasalangwa Andrew, (2014) Excel and succeed Junior secondary computer studies form
1, Nirobi, Kenya.
Mulli, D Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on computer studies for senior
secondary volume 1. Nairobi: Kenyatta Literature Bureau.
Mulli, D. Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on Computer studies for senior
secondary volume 2. Nairobi: Kenyatta Literature Bureau.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 1.
Nairobi: Jomo Kenyatta Foundation.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 4.
Nairobi: Jomo Kenyatta Foundation.
Stephen, M (2010). Get started computing windows 7 edition. London: Hodder Education.
Stephen, M (2010). Get started excel windows 7 edition. London: Hodder Education.
http://www.cs.bu.edu
www.google.com
https://www.www.tutorialspoint.com
Website: www.learnmalawi.com
Email: info@learnmalawi.com
Introduction: computers are made up of separate parts which are assembled together
a working unit. So it is important for us to know how to assemble a computer, configure
its hardware and software and read system information.
Hardware Installation
Setting up computer is very important before carrying out any activity. The following
precautions should be observed;
➢ All devices should disconnect from power source before starting to work on them.
➢ You must be guided by your ICT trainer working on peripheral devices.
➢ Never work alone because you may need help in case of emergency.
➢ You must discharge any static electricity that might have built in the hands by
touching the earthed metallic object and then wearing an antistatic wrist member.
The human body can hold 200 volts of static charge that can damage sensitive
components on the mother bold.
➢ Screw drivers
➢ Antistatic wrist member
➢ Pliers
➢ Device manuals
➢ Device software ( drivers )
➢ Power supply – it receives AC power from the wall socket and converts it to 12
volts DC power cables needed by computer components.
➢ Power cables – provide power to system unit components.
➢ Optical disk drive – used to read / write data from or to optical disk.
➢ Hard disk – used to store computer programs and data for a long time.
➢ Data cables – enable exchange of data between components.
➢ Motherboard – used to interconnect all devices, chips and components with
copper circuit drawn on it.
➢ Expansion lots – helps when adding new device to the computer such as TV
card, network card E.t.c
➢ Interface ports – enables connection of peripheral devices such as mouse,
keyboard e.t.c
➢ Memory slots – enables installation of RAM chips on the motherboard.
➢ Chips – have processing logic and firmware needed for correcting functioning of
the computer.
Special ribbon cables are used to correct computer components on the motherboard.
Hard disk and optical drive are connected on the motherboard through interface
connectors referred to as controllers.
Types of controllers
Hard drive
NB: SATA has replaced EIDE, ATA and PATA. SATA is more efficient and support hot-
swapping. Hot-swapping means that the drive can be removed or inserted while the
computer is still on. SATA and EIDE are the common controllers used in most computers.
➢ Wear antistatic wrist member to discharge any static charge on the body
➢ Determine which drive will be master and use the drive information to determine
which jumper settings to use for a master or a slave
➢ Check that a free drive bay is available, slide a drive into the bay and screw it into
place.
➢ Ensure that there is a free power connector from the power supply unit and
connect it to the drive. Notice that it is designed to fit in its socket in only one
direction.
➢ Identify pin 1 as labeled on the drives socket and match it with the red or brown
continuous line of the ribbon cable. Most cables will only fit in one direction.
➢ Connect the interface cable to the drive, then into the controller slot on the
motherboard.
Floppy drives are installed the same way the EIDE drives but floppy drives have no master
or slave configuration. It is possible to attach two floppy drives on the ribbon cable and
one floppy drive will automatically be assigned by letter A and the other on the
motherboard will be assigned by letter B
You must check the port and interface cable of the device being connected to the
computer system. When connecting external device proceed as follows;
Gently and carefully connect the interface cable of each device to the correct port and to
the device if it is not already fixed permanently.
Observe boot up information on the screen to see whether power On – Self Test (post)
display any error message.
A successful boot means that the computer was properly set up. Then it also means that
new programs must be installed in the hard disk drive.
Device Management
Hardware and software have to be configured for easy management using system
information.
System Information refers to Hardware and software configurations of a computer
a. The hardware device present on the computer including used space and empty
space.
b. The type of processor on the computer and its speed.
c. The Random Access Memory (RAM) installed on the computer and its size.
d. The width of the system bus.
e. The size of the hard disk on the computer including used space and empty space.
f. The type of operating system installed
System information can be accessed through the control panel of the operating system (
for windows user) when the computer is on.
- It is possible to check all these when the computer has booted properly. In
windows,
➢ The larger the Random Access Memory (RAM), the better the performance of a
computer the and higher the cost .
➢ The larger the hard disk size of a computer, the larger the data the computer can
store and the larger the software that can be installed on the computer. Larger
hard disks also imply better performance and higher cost.
➢ The higher the cache memory of a computer, the faster the response time of the
computer. Cache memory also has implications on the cost of the computer with
higher cache implying higher cost.
The table below summarises the effect of system information on the performance and
cost of a computer
References
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 1-2. MIE: Domasi.
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 3-4. MIE: Domasi.
Nasalangwa Andrew, (2014) Excel and succeed Junior secondary computer studies form
1, Nirobi, Kenya.
Mulli, D Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on computer studies for senior
secondary volume 1. Nairobi: Kenyatta Literature Bureau.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 1.
Nairobi: Jomo Kenyatta Foundation.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 4.
Nairobi: Jomo Kenyatta Foundation.
Stephen, M (2010). Get started computing windows 7 edition. London: Hodder Education.
Stephen, M (2010). Get started excel windows 7 edition. London: Hodder Education.
http://www.cs.bu.edu
www.google.com
https://www.www.tutorialspoint.com
Wikipedia
Website: www.learnmalawi.com
Email: info@learnmalawi.com
There are number of problems associated with computers, someone would want to
diagnose and fix such problem.
It is possible to find out which hardware devices are functioning properly and which are
not via device managers’ window and drivers indicated and those are not working
Properly or those have missing drivers have a ! or ?
References
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 1-2. MIE: Domasi.
Ministry of Education, Science and Technology (2001). Malawi senior secondary teaching
syllabus for computer studies forms 3-4. MIE: Domasi.
Nasalangwa Andrew, (2014) Excel and succeed Junior secondary computer studies form
1, Nirobi, Kenya.
Mulli, D. Ochieng’, D Ndegwa, J, Kioko, J (2010). Log on Computer studies for senior
secondary volume 2. Nairobi: Kenyatta Literature Bureau.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 1.
Nairobi: Jomo Kenyatta Foundation.
Musonye, D Wanjohi, A (2005). Foundation computer studies student’s book for form 4.
Nairobi: Jomo Kenyatta Foundation.
Stephen, M (2010). Get started computing windows 7 edition. London: Hodder Education.
Stephen, M (2010). Get started excel windows 7 edition. London: Hodder Education.
http://www.cs.bu.edu
www.google.com
https://www.www.tutorialspoint.com
Wikipedia
Objectives
Contents
• Meaning of a spreadsheet
• List types of spreadsheets
• Exploring features of a spreadsheet
• Benefits of spreadsheets
• Differences between a workbook and a worksheet
• identifying cells, columns and rows
• Difference between labels and values
• Differences between relative cell references and absolute cell
references
• Launching a spreadsheet programme
• Creating a worksheet and a workbook
• Saving a workbook
• Closing a worksheet
• Opening a workbook
• Entering data in a worksheet
• Editing a worksheet and a workbook
• Formatting a worksheet and a workbook
• Protecting workbooks
• Using shortcuts and commands in a worksheet
• Using relative and absolute cell addressing in a worksheet
• Freezing panes
• Hiding and unhiding columns
• Using basic formulae
Copyright © learnmalawi | All rights reserved
1
• Using basic built-in functions in a worksheet (eg SUM, AVERAGE, MIN,
MAX, COUNT, IF)
Introduction
People across the global work with numbers and manipulate them using
formulas. spreadsheets have become the one of best approaches for data
organization, manipulation and analyzing
Definition of spreadsheet
- This is a book which organizes data in roles and columns
Types of spreadsheet
- Spreadsheets are classified into two
a. Manual or traditional spreadsheets
b. Electronic spreadsheets
Manual spreadsheet
- This is made up of sheet of papers divided into rows and columns on
which numerical data is entered manually
2
Electronic spreadsheet
This is application software consisting of rows and columns used to organize,
calculate and analyse numerical data electronically
3
Examples of electronic spreadsheets
a. Lotus 1-2-3
b. Microsoft Excel
c. LibreOffice/OpenOffice/NeoOffice
d. Quattro pro
e. Lotus symphony spreadsheets
f. PlanMaker
g. Google Sheets - (online and free).
4
2. Analyzing data
- Various analytical actions can be performed on data entered in
electronic spreadsheet
3. Data presentation
- Electronic spreadsheet provides many ways of presenting data
entered, including tables, graphs and charts
4. Future planning
- Due to visualization aspect, one is able to have an insight of present
and future trend of data hence ability to calculate the potential effects
of a mode;
5. Information modeling
- Able to include calculations that are automatically processed when
when the values in a cell are edited
6. Data manipulation
- Allow users to enter custom formulas with a range of common inbuilt
functions for data manipulation.
7. Decision making
- Ability to carry out performance measurement, e.g sales projections
analysis
5
- Complex calculations in electronic spreadsheets can be perfomed very
quickly and accurately than using manual spreadsheet
2. Professional- looking results
- Data in electronic spreadsheets look professional due to the ability to
quickly edit and format, perform calculations, create graphs and print
the spreadsheet
3. Ability to edit data
- Data entered in electronic spreadsheet can be edited and revised using
program commands
- Cell entries can be erased, moved or copied
4. Ability to format data
The appearance of data entered in electronic spreadsheets can be
enhanced in many ways
5. Auto recalculations
- Dada in a cell where formula has been used can change and updated
automatically if cell contents has been edited
6. Chart creation
- Ability to create chart for the data hence enhance data visualization
7. Easy to store and to retrieve data
- Ability to hold vast amount of data than traditional spreadsheets with
tools for easy retrieval and sorting of said data
8. Ability to use multiple worksheets and files
6
- Has ability to open and use multiple files and able to create multiple
worksheets
9. Forecasting
- Predictions can be made about what is likely to happen during next
time
10. Modeling scenarios
- Has ability to model different scenarios to find out what is likely to
happen when a variable is changed
Components of spreadsheet
- Any Spreadsheet has the following components
i. Worksheet
- Work area that has rows and columns where data is entered
ii. Database
- Collection of related data items organized for rapid search and retrieval
of data
Copyright © learnmalawi | All rights reserved
7
iii. Charts/graphs
- Visual representation of worksheet data
- Helps users to easily pick out pattern and trends of data
100%
80%
60%
40%
20%
0%
Starting Excel
To start Microsoft excel window spreadsheet follow the following steps
1. Click the start button on the lower left corner of your computer
2. Click the All programs arrow at the bottom left of the start menu
8
3. Click the Microsoft Office folder on the start menu. This will open
the list of Microsoft office application
4. Click the Microsoft Excel 2007 option
9
1. Rows
- This is horizontal arrangement of cells in a worksheet
- Rows are labeled using numbers 1,2,3, ….
2. Columns
- A column is vertical arrangement of cells in a worksheet
- Columns are labeled using letters A, B, C …. In a worksheet
3. Cell
- A cell is the intersection between a column and a row
10
- A cell pointer indicates the current active cell and usually highlighted
with a bold outline
4. Worksheet
- This is working area made up of rows and columns where data is
entered
5. Cell address
- This is a name of cell
- Also called cell reference
- Cell address is formed by combining column position and row position ,
for example cell A1 is formed by intersecting column A and Row 1
6. Workbook
- This is excel file that contains one or more worksheets
- Excel will assign file name to the workbook such as Book1, Book2,
Book3 and so on, depending on how many workbooks are opened.
7. Worksheet tabs
- Worksheet tabs identify the various worksheets in a workbook and
allow you to move from one worksheet to another
- A workbook initially contains three worksheets which are saved in a
single file
8. Title bar
- This displays the name of the program as well as the name of the
current workbook if it has been saved
11
- It the workbook has not been saved, it is identified by a number for
example Book1
9. Scroll bars
- There are vertical and horizontal scroll bars
- They are used to scroll the workbook window vertically or horizontally
through a worksheet
10. Status bar
- It displays helpful information as you use the program
- The ready indicator that appears lets you know that the program is
ready for data input
11. Name box
- This identifies an active cell by indicating its cell address
- An active cell is a cell with a black highlighted outline/boarder which is
ready for data entry
12. Formula bar
- This displays the contents of the active cell, if any
13. Quick access toolbar
- This is a customizable toolbar that contains a set of commands that
are independent of the tab that is currently displayed.
14. Ribbon
- Strip of buttons and icons located above the work area
- Above the ribbon are a number of tabs such as Home, Insert and page
layout
12
Navigating through the excel worksheet
There are many ways of how one can navigate through excel worksheet
1. Using arrow keys of a keyboard
- Up and down arrows to move up or down of the active cell
- Left and right arrows to navigate into a cell to the left or right of an
active cell
2. Clicking a cell where you want to navigate into
3. Using tab key
- To navigate into cell to the right of an active cell
13
- For example names of students in form three at Kings Foundation can
be entered as labels
- Sometimes numerical values can be formatted so that they are used as
labels
2. Values
- This is numerical data that can be manipulated mathematically in a
worksheet
- Examples of such values include currency, number (0-9) and date
3. Formula
- This is mathematical expression that can be used to manipulate data in
a worksheet
- For example formula =B1+B3 adds the contents of cells B1 and B3.
4. Function
- This is inbuilt formula that can be quickly used instead of having to
create a new formula each time.
- For example a function =SUM(B1:B7) adds up the contents of cells
B1 up to B7
14
- The information will be entered immediately, and the cursor will move
down one cell.
Editing a worksheet
This involves changing the appearance of the data being handled in an excel
worksheet
Inserting Data
For inserting data in MS Excel, just activate the cell type text or number
and press enter or Navigation keys.
Inserting Formula
15
For inserting formula in MS Excel go to the formula bar, enter the formula
and then press enter or navigation key. See the screen-shot below to
understand it.
For modifying the cell content just activate the cell, enter a new value and
then press enter or navigation key to see the changes. See the screen-shot
below to understand it.
16
- Drag the mouse over the data you want to select. It will select those
cells as shown below.
ii. Select with special
- If you want to select specific region, select any cell in that region.
Pressing F5 will show the below dialogue box
- Click on Special button to see the below dialogue box. Select
current region from the radio buttons. Click on ok to see the current
region selected.
- Select the rows, which you want to delete with Mouse click +
Control Key. Then right click to show the various options. Select the
Delete option to delete the selected rows.
Copyright © learnmalawi | All rights reserved
17
Move data in a worksheet
To move data in a worksheet follow the following steps.
Step 1 − Select the data you want to Move. Right Click and Select the cut
option.
Step 2 − Select the first cell where you want to move the data. Right
click on it and paste the data.
18
- View the clipboard content. Select the cell where you need to paste.
Click on paste, to paste the content.
- You may not want to copy everything in some cases. For example, you
want to copy only Values or you want to copy only the formatting of
cells. Select the paste special option as shown below.
• All − Pastes the cell’s contents, formats, and data validation from the
Windows Clipboard.
• Formulas − Pastes formulas, but not formatting.
• Values − Pastes only values not the formulas.
• Formats − Pastes only the formatting of the source range.
• Comments − Pastes the comments with the respective cells.
• Validation − Pastes validation applied in the cells.
• All using source theme − Pastes formulas, and all formatting.
• All except borders − Pastes everything except borders that appear
in the source range.
• Column Width − Pastes formulas, and also duplicates the column
width of the copied cells.
• Formulas & Number Formats − Pastes formulas and number
formatting only.
Copyright © learnmalawi | All rights reserved
19
• Values & Number Formats − Pastes the results of formulas, plus
the number.
• Merge Conditional Formatting − This icon is displayed only when
the copied cells contain conditional formatting. When clicked, it merges
the copied conditional formatting with any conditional formatting in the
destination range.
• Transpose − Changes the orientation of the copied range. Rows
become columns, and columns become rows. Any formulas in the
copied range are adjusted so that they work properly when
transposed.
20
Find and Replace
To access the Find & Replace, Choose Home → Find & Select → Find or
press Control + F Key. See the image below.
21
You can replace the found text with the new text in the Replace tab.
Exploring Options
Now, let us see the various options available under the Find dialogue.
22
Spell Check
• Ignore Once − Ignores the word and continues the spell check.
23
• Ignore All − Ignores the word and all subsequent occurrences of it.
• Add to Dictionary − Adds the word to the dictionary.
• Change − Changes the word to the selected word in the Suggestions
list.
• Change All − Changes the word to the selected word in the
Suggestions list and changes all subsequent occurrences of it without
asking.
• AutoCorrect − Adds the misspelled word and its correct spelling
(which you select from the list) to the AutoCorrect list.
24
Zooming in and Zooming Out
- You can change the zoom percentage from 10% (tiny) to 400%
(huge).
Zoom In
- You can zoom in the workbook by moving the zoom slider to the right.
- It will change the only view of the workbook. You can have maximum
of 400% zoom in
Zoom Out
- You can zoom out the workbook by moving the slider to the left.
- It will change the only view of the workbook.
- You can have maximum of 10% zoom in
You can reverse almost every action in Excel by using the Undo command.
We can undo changes in following two ways.
25
• Press Control + Z
- You can reverse the effects of the past 100 actions that you performed
by executing Undo more than once.
- If you click the arrow on the right side of the Undo button, you see a
list of the actions that you can reverse. Redo Changes
You can again reverse back the action done with undo in Excel by using the
Redo command. We can redo changes in following two ways.
26
Formatting Cell
- MS Excel Cell can hold different types of data like Numbers, Currency,
Dates, etc.
- You can set the cell type in various ways as shown below −
27
• Currency − This displays cell as currency i.e. with currency sign.
• Accounting − Similar to Currency, used for accounting purpose.
• Date − Various date formats are available under this like 17-09-2013,
17th-Sep-2013, etc.
• Time − Various Time formats are available under this, like 1.30PM,
13.30, etc.
• Percentage − This displays cell as percentage with decimal places
like 50.00%.
• Fraction − This displays cell as fraction like 1/4, 1/2 etc.
• Scientific − This displays cell as exponential like 5.6E+01.
• Text − This displays cell as normal text.
• Special − Special formats of cell like Zip code, Phone Number.
• Custom − You can use custom format by using this.
- You can set the font of the selected text from Home » Font group »
select the font.
28
Setting Font From Format Cell Dialogue
29
Text Decoration
Various options are available in Home tab of the ribbon as mentioned below.
30
• Double Underline − It makes the text highlighted as double
underlined by choose Home » Font Group » Click arrow near U »
Select Double Underline.
- There are more options available for text decoration in Formatting cells
» Font Tab » Effects cells as mentioned below.
Rotate Cells
Rotate cells
31
2. Right Click on the cell. Choose Format cells » Alignment » Set the
degree for rotation.
32
Changing Foreground Color
Also you can change the foreground color by selecting the cell Right click »
Format cells » Font Tab » Color.
33
Change Alignment
This involves making changes on the orientation of data in a cell
Can be done in two ways
1. Using Home Tab
- You can change the Horizontal and vertical alignment of the cell.
- By default, Excel aligns numbers to the right and text to the left.
- Click on the available option in the Alignment group in Home tab to
change alignment.
34
2. Using Format Cells
- Right click on the cell and choose format cell. In format cells dialogue,
choose Alignment Tab. Select the available options from the Vertical
alignment and Horizontal alignment options.
35
Exploring Alignment Options
• Left − Aligns the cell contents to the left side of the cell.
• Center − Centers the cell contents in the cell.
• Right − Aligns the cell contents to the right side of the cell.
• Fill − Repeats the contents of the cell until the cell’s width is filled.
• Justify − Justifies the text to the left and right of the cell. This option
is applicable only if the cell is formatted as wrapped text and uses
more than one line.
Merge Cells
36
- When you merge cells, you don’t combine the contents of the cells.
- Rather, you combine a group of cells into a single cell that occupies
the same space.
Additional Options
37
Wrap Text and Shrink to Fit
- If the text is too wide to fit the column width but don’t want that text
to spill over into adjacent cells, you can use either the Wrap Text
option or the Shrink to Fit option to accommodate that text.
Apply Borders
- Then you can apply border by Home Tab » Font group » Apply
Borders.
38
Apply Shading
- You can add shading to the cell from the Home tab » Font Group »
Select the Color.
39
Printing a worksheet
1. Choose File » Print (which displays the Print pane), and then click the
Print button.
2. Press Ctrl+P and then click the Print button (or press Enter).
- You can adjust the print settings available in the Page setup dialogue
in different ways as discussed below.
- Page setup options include Page orientation, Page Size, Page Margins,
etc.
1. The Print screen in Backstage View, displayed when you choose File »
Print.
Copyright © learnmalawi | All rights reserved
40
2. The Page Layout tab of the Ribbon.
- To switch to a different printer, choose File » Print and use the drop-
down control in the Printer section to select any other installed printer.
- Sometimes you may want to print only a part of the worksheet rather
than the entire active area. Choose File » Print and use the controls
in the Settings section to specify what to print.
• Active Sheets − Prints the active sheet or sheets that you selected.
• Entire Workbook − Prints the entire workbook, including chart
sheets.
41
• Selection − Prints only the range that you selected before choosing
File » Print.
42
You'll see a confirmation message to save the workbook.
43
Step 2 − Press the Save Button to save the workbook
Opening a worksheet
Step 1 − Click the File Menu as shown below. You can see the Open
option in File Menu.
- There are two more columns Recent workbooks and Recent places,
where you can see the recently opened workbooks and the recent
places from where workbooks are opened.
44
Step 2 − Clicking the Open Option will open the browse dialog as shown
below. Browse the directory and find the file you need to open.
45
Step 3 − Once you select the workbook your workbook will be opened as
below −
Cell referencing
- A cell reference refers to a cell or a range of cells on a worksheet
- Can be used in a formula so that Microsoft Office Excel can find the
values or data that you want that formula to calculate.
- In one or several formulas, you can use a cell reference to refer to:
... Data contained in different areas of a worksheet.
Types of cell reference
iv. There are three types of cell references
46
1. Relative cell references:
- It does not contain dollar signs in a row or column, e.g. A2.
- Relative cell references type in excel change when a formula is copied
or dragged to another cell.
- In Excel, cell referencing is relative by default, it is most commonly
used cell reference in the formula.
47
A formula is mathematical expression which is used to perform calculation
and return a result in excel worksheet
A functions are predefined (inbuilt) formulas that perform certain types of
calculations automatically and return the result.
Entering Formulas
v. A formula in excel always begins with an equal sign (=) which
defines it as numerical entry
Formulas use the following arithmetic operators to specify the numerical
operation to perform
48
=45/67 the contents of cell B3
Divide 45 by 67
^ Exponentiation B2^2 Square the contents of cell B2
(raising to a 45^2 Square 45
power)
Order of Operations
If more than one operator is used in a formula, there is a specific order that
Excel will follow to perform these mathematical operations. This order of
operations can be changed by adding brackets to the equation. An easy way
to remember the order of operations is to use the acronym:
BEDMAS
Brackets
Exponents
Division
Multiplication
Addition
Subtraction
49
Any operation(s) contained in brackets will be carried out first followed by
any exponents.
The same goes for the next two operations – addition and subtraction. They
are considered equal in the order of operations. Which ever one appears first
in an equation, either addition or subtraction, is the operation carried out
first.
50
The following is a general syntax for writing excel functions
=Function Name(Argument1, Argument2, …., Argument n)
Function Name – identifies the type of calculationto be performent
Argument – This is the data the function uses to perform the calculation
Arguments can either be numbers or names or range or cell references that
contains numbers. For example =SUM(B2,B3,B4) adds the contents of
cells B2, B3 and B4
51
ix. It is often necessary for you to understand the functions in
order to be able to figure out these descriptions. Once you’ve
learned the functions, though, it is faster to type the basic
function in from the keyboard as opposed to going through the
steps of this tool.
SUM FUNCTION
52
- The syntax is: =SUM(first value, second value, etc)
follows: 1 25
2 50
We will look at several different specific examples
that show how the typical function can be used! 3 75
=sum(A1:A3,
A1, A2, A3 and 100 250
100)
=sum(A1:A2,
A1, A2, A5 75
A5)
PRODUCT FUNCTION
53
An example of multiplying two numbers, such as 235
and 546, using the PRODUCT function would be:
While this approach to using the PRODUCT function works, it limits the
usefulness of the function. A better way of using the function is to type the
numbers you are multiplying into cells on the spreadsheet and then enter
those cell references (the address of the cells) into the function.
For example, if we enter the numbers 235 and 546 into cells C1 and C2, we
would write the function as:
=PRODUCT( C1:C2 )
The answer is still 128,310, but the advantage of this approach is that if the
numbers ever change, you only need to change the numbers in cells C1 or
C2 and the function automatically updates the answer.
For example, if you find that the number in C1 wasn't 235 but 230, simply
type 230 in cell C1 and the function updates the answer to 128,580.
This approach works well for instances where you have constantly changing
numbers – say on a monthly income statement where the income amounts
Copyright © learnmalawi | All rights reserved
54
get multiplied by set numbers to find deduction rates for taxes, pensions, or
medical benefits.
DIVISION
Even though you can use numbers directly in your division formula, it is
much better to use the references or addresses of the cells containing your
data. If you use the cell references [A1, B1, F2] rather than the actual data,
later, if you need to change the data in either cell, the results of the formula
will update automatically without you having to rewrite the formula.
As an example, lets create a formula in cell E1 that will divide the contents
of cell C1 by cell D1.
Our formula:
Copyright © learnmalawi | All rights reserved
55
=C1 / D1
Our data:
56
To expand your formula to include additional operations - such as
subtraction or addition - just continue to add the correct mathematical
operator followed by the cell reference containing your data.
AVERAGE FUNCTION
- Text fields and blank entries are not included in the calculations of the
Average Function.
1 25
Let's use the table here for the discussion that follows:
2 50
We will look at several different specific examples that show
3 75
how the average function can be used!
4 100
57
=average (A1:A4,
A1, A2, A3, A4 and 300 110
300)
=average (A1:A2,
A1, A2, A4 58.33
A4)
MAX FUNCTION
This will return the largest (max) value in the selected range of cells.
• Blank entries are not included in the calculations of the Max Function.
A
x. Text entries are not included in the calculations 1 10
of the Max Function.
2 20
- Let's use the table here for the discussion that follows.
3 30
We will look at several different specific examples that show
how the Max functions can be used! 4 Test
58
100)
MIN FUNCTION
This will return the smallest (Min) value in the selected range of cells.
• Blank entries are not included in the calculations of the Min Function.
A
Text entries are not included in the calculations of the Min 1 10
Function. Let's use the table here for the discussion that
2 20
follows.
3 30
We will look at several different specific examples that show
how the min functions can be used! 4 Test
59
number)
COUNT FUNCTION
- This will return the number of entries (actually counts each cell that
contains number data) in the selected range of cells.
1 10
Let's use the table here for the discussion that follows.
2 20
We will look at several different specific examples that show
3 30
how the Count functions can be used!
4 Test
Example of
Cells to look at Answer
Count
60
100)
COUNTA FUNCTION
xi. This will return the number of entries (actually counts each cell
that contains number data OR text data) in the selected range of
cells.
1 10
Let's use the table here for the discussion that follows.
2 20
We will look at several different specific examples that show
3 30
how the CountA functions can be used!
4 Test
61
Example of
Cells to look at Answer
CountA
=CountA (A1:A3,
A1, A2, A3 and 100 4
100)
IF FUNCTION
The IF function will check the logical condition of a statement and return
one value if true and a different value if false. The syntax is
62
specific examples that 3 $1.37 Yes
show how the IF
comparing
functions can be used! 4 returning #
#
5 14000 0.08
6 8453 0.05
Example of IF
Compares Answer
typed into column B
=IF
is ( .95 > 1) No
(A2>1,"Yes","No")
PMT FUNCTION
The PMT function returns the periodic (in this case monthly) payment for an
annuity (in this case a loan). This is the PMT function that was used for the
Copyright © learnmalawi | All rights reserved
63
car purchase in the first example. There are a few things that we must know
in order for this function to work. To calculate the loan we must know a
combination of the following
Note that the rate is per period. If we have an annual interest rate of 9.6%
and we are calculating monthly payments, we must divide the annual
interest rate by 12 to calculate the monthly interest rate.
64
SIN, COS. TAN FUNCTIONS
Excel has most of the math and trig functions built into it. If you need to use
the SIN, COS, TAN functions, they can be typed into any cell. If you
wanted to find:
90 1.00 0.00
format for degrees formula = sin (angle * pi()/180) the argument angle is
in degrees
format for radians formula = sin (angle) the argument angle is in radians
65
You can type in either an actual number for the REF or you can also type in
a reference from the excel spreadsheet (like A2).
If you have a lot of duplicate formulas you can also perform what is referred
to as a FILL DOWN.
66
Often we have several cells that need the same formula (in relationship) to
the location it is to be typed into. There is a short cut that is called Fill
Down. There are a number of ways to perform this operation. One of the
ways is to
3 4 6 fill down would be (A2+B2). And the equation pasted into (C3)
would be (A3+B3). And the equation pasted into (C4)
4 3 8 fill down
would be(A4+B4).
67
Chapter 2: Introduction to Desktop publishing
Objectives
Contents
• Definition
• Benefits of desktop Publishing
• Examples of desktop publishing software
o corel draw
o photoshop
o publisher
o page maker
• Types of Desktop Publishing Software
o graphical based
o layout based
• Features of Desktop Publishing Software
• Working with desktop publishing software
o creating, formatting, editing, saving, printing, opening, closing,
graphics, inserting objects, exiting
• Designing publications
o Types, orientation, layout, margins, text boxes, page size,
manipulating graphics, moving, resizing, reshaping, flipping and
rotating, cropping, exporting and printing publications
Graphic-based DTPs
- These DTPs are specifically used to edit and format graphics objects
such as pictures and vector drawings
Layout-based DTPs
- These types are specifically used to design page layout for text and
graphic
- Examples of layout-based DTPs includes
i. Adobe page maker
ii. Microsoft publisher
iii. Adobe InDesign
1. Click the File tab to go to Backstage view, then select New. The
Available Templates pane will appear.
2. Select the type of publication you wish to create.
- If you don't want to use a template or can't find a template that suits
your needs, you can create a blank publication.
- Remember, when you create a blank publication you will have to set
up page margins, add guides, and make all layout and design
decisions on your own.
1. On the Ribbon, select the Page Design tab, then locate the Page
Setup group.
2. Click the Margins drop-down command.
1. On the Ribbon, select the Page Design tab, then locate the Page
Setup group.
2. Click the Size drop-down command.
1. On the Ribbon, select the Page Design tab, locate the Page Setup
group, then click the Orientation drop-down command.
Copyright © learnmalawi | All rights reserved
19
2. Select Portrait orientation to make your publication taller than wide
or Landscape to make it wider than tall.
1. On the Ribbon, select the Page Design tab, then locate the
Template group.
2. Click the Change Template command.
Copyright © learnmalawi | All rights reserved
21
3. The Change Template dialog box will appear. Select a template to
preview it in the Preview pane.
4. Modify template options as desired.
5. When you are satisfied with the new template, click OK.
• To open the Page Navigation pane, click the View tab on the
Ribbon, then locate the Show group. Select the Page Navigation
check box.
2. The Insert Page dialog box will appear. Specify the number of
pages to insert and the location where you wish to insert them.
3. Choose what will appear on the new pages. By default, the pages will
be blank, but you can also choose to create pages that include one
text box or pages that are duplicates of an existing page.
4. Click OK.
Depending on the template you're using, when you add a new page you
may see a dialog box with page layout options.
1. In the Page Navigation pane, locate the page you wish to move.
To delete a page
1. In the Page Navigation pane, right-click the page you wish to delete,
then select Delete in the list that appears.
Challenge!
Formatting publication
Text basics
1. On the Ribbon, select the Insert tab, then locate the Text group.
2. Click the Draw Text Box command.
Wrapping text
- If you place a text box near an image or another object, you may
notice that the text is overlapping with the object or doesn't appear
exactly where you want.
- To fix this problem, you'll need to change the object's text
wrapping settings.
1. Select the object, then click the Format tab that appears on the
Ribbon.
2. Locate the Arrange group, then click the Wrap Text drop-down
command.
- As you work with text boxes, you might find that a text box isn't
large enough to contain all of the text you want to include.
- When you run out of room for text, you can use the Link command
to connect text boxes.
- Once two or more text boxes are connected, text will overflow or
continue from one text box to the next.
Text Fit
- The Text Fit options allow you to format text boxes that
automatically adjust font or text box size to get a good fit.
- There are four text fit options you can apply to any text box:
i. Best Fit,
- which makes the text larger or smaller to fit the text box
- which automatically shrinks the font size when the text box has no
room for additional text
- which automatically enlarges the text box based on text size and
length
- which makes no automatic changes to the text or text box size; this
is the default option
- On the other hand, if you have a certain amount of space for your
text box and want your text to fill the entire area, you might select
Best Fit.
Hyphenation
1. Select a text box, then click the Text Box Tools Format tab on the
Ribbon and locate the Text group.
2. Click the Hyphenation command.
Formatting text
i. Drop Cap,
- which enlarges the first letter of the selected text
iii. Ligatures,
iv. Sets,
- which let you choose between various embellishments for your
fonts, usually in the form of exaggerated serifs or flourishes
To insert a shape:
- If you hold down the shift key while resizing a shape, the shape will
keep its proportions instead of getting stretched out.
Modifying shapes
1. Select the shape, then click the Format tab and locate the Shape
Styles group.
2. Click the Change Shape drop-down command.
Copyright © learnmalawi | All rights reserved
58
3. A drop-down list will appear. Select the desired shape.
1. Select the shape, then click the Format tab and locate the Shape
Styles group.
2. Click the More Shape Styles drop-down arrow.
1. Select the shape, then click the Format tab and locate the Shape
Styles group.
2. Click the Shape Fill drop-down command.
3. A drop-down list of colors will appear. Select the desired fill color
from the list. You can also choose No Fill to remove the fill from
your shape or More Fill Colors to select a custom color.
1. Select the shape, then click the Format tab and locate the Shape
Styles group.
2. Click the Shape Outline drop-down command.
To add a shadow:
i. Page parts,
- which are stylized placeholders for your images and text
ii. Calendars
iv. Advertisements
1. Select the Insert tab, then locate the Building Blocks group.
2. Click one of the four Building Block drop-down commands.
3. A drop-down menu will appear with Building Block styles and options.
Select the desired Building Block.
Copyright © learnmalawi | All rights reserved
73
4. The Building Block will be inserted.
Aligning
- You can click and drag objects to align them manually, but this can
be difficult and time consuming.
- Publisher includes several commands that allow you to align your
objects quickly and precisely. Objects can be aligned to each other
or to the page.
1. Click and drag your mouse to form a selection box around the
objects you want to align. All of the objects will now have sizing
handles to show that they are selected.
- If you have arranged objects in a row or column, you may want them
to be an equal distance from one another for a neater appearance.
- You can do this by distributing the objects horizontally or
vertically.
To distribute objects:
Grouping
- At times, you may want to group multiple objects into one object
so they will stay together if they're moved.
- This can be easier than selecting all of the objects each time you
want to move them.
To group objects:
- You can ungroup grouped objects at any time. Simply select the
group, then click the Ungroup command.
3. The Insert Picture dialog box will appear. Locate and select the
picture you would like to insert, then click Insert.
3. The Clip Art pane will appear on the right. Use the search tools to
search for a suitable image.
o Enter keywords in the Search for: field that are related to the
image you wish to find.
o Click the drop-down arrow in the Results should be: field,
then deselect any types of media you do not wish to see.
o If you would like to also search for Clip Art on Office.com, place
a check mark next to Include Office.com content.
Otherwise, it will just search for Clip Art on your computer.
To get your picture to fit well on the page, you may have to adjust it by
resizing, cropping, and rearranging it.
To resize a picture:
1. Select the picture, then click the Picture Tools Format tab and
locate the Crop group.
2. Click the Crop command.
3. The black cropping handles will appear. Click and drag a handle
to crop the picture. The areas that will be cropped will appear to be
semi-transparent.
- To get your pictures to fit properly with text and other objects, you
may have to align them and adjust their text wrap settings.
- The procedures for doing these things are identical to the procedures
for working with shapes and other objects.
Modifying pictures
1. Select the picture you wish to adjust, then select the Picture Tools
Format tab and locate the Adjust group.
2. Click the Brightness drop-down command.
1. Select the picture you wish to recolor, then select the Picture Tools
Format tab and locate the Adjust group.
2. Click the Recolor drop-down command.
1. Select the picture, then click the Picture Tools Format tab and
locate the Picture Styles group.
2. Click the More Picture Styles drop-down arrow.
1. Select the picture, then click the Picture Tools Format tab and
locate the Picture Styles group.
2. Click the Caption drop-down command.
1. Select the picture, then click the Picture Tools Format tab and
locate the Adjust group.
2. Click the Reset Picture command.
Compressing pictures
NB: Only compress pictures after you have edited and resized them.
Attempting to enlarge or otherwise edit a compressed picture may result
in a blurry or otherwise low-quality image.
To compress pictures:
1. Select a picture, then click the Picture Tools Format tab and locate
the Adjust group.
2. Click the Compress Pictures command.
Test printing
- Depending on the types of edits you make to your pictures, they may
not print exactly as they appear onscreen.
Objectives
Contents
Introduction
This section discusses basic skills on how to install computer software
starting with Operating system, utility software and application software.
Definitions
Software installation refers to copying of computer program into a hard
disk of computer in a form that it can be executed by the CPU.
- Software installation is also called program setup
1
- Today most of software installations platforms are GUI-based wizards
that requires minimal input from the user.
Software Uninstallation: refers to an act of removing the program from
the computer.
- This involves more than erasing the program folder since registry files
and other code in the system need to be modified or deleted for
complete uninstallation.
2
Installation of Operating system
Operating systems exist in various categories such as
i. Windows Operating system
ii. Linux Operating system
iii. Mac-OS
3
Part Minimum Requirement
4
3. Insert Windows 7 DVD into optical drive or removable
bootable flash containing windows 7 operating system and
start the computer
- Then your computer will display the following interface
- After pressing any key, the windows files start loading as follows
5
4. Select your language, time & currency format, keyboard or
input method and click Next as displayed below
6
6. The following screen will displayed
7
8. Click Upgrade if you already have a previous Windows version
or Custom (advanced) if you don’t have a
previous Windows version or want to install a fresh copy
of Windows 7.
8
9. Select the drive where you want to install Windows 7 and
click Next. If you want to make any partitions, click Drive options
(advanced), make the partitions and then click Next.
9
10. It will now start installing Windows 7. The first step,
(i.e. Copying Windows files) was already done when you booted
the Windows 7 DVD so it will complete instantly.
11. After completing the first step, it will expand (decompress) the
files that it had copied.
10
12. After that it will automatically restart after 15 seconds and
continue the setup. You can also click Restart now to restart
without any delays.
11
Copyright © learnmalawi | All rights reserved
12
\
14. A
fter restarting for the first time, it will continue the setup. This is the
last step so it will take the most time than the previous steps.
13
15. T
ype your desired user name in the text-box and click Next. It will
automatically fill up the computer name.
14
16. I
f you want to set a password, type it in the text-boxes and
click Next.
15
17. T
ype your product key in the text-box and click Next. You can also
skip this step and simply click Next if you want to type
the product key later. Windows will run only for 30 days if you do
that.
16
18. S
elect your desired option for Windows Updates.
19. S
elect your time and click Next.
17
20. I
f you are connected to any network, it will ask you to set the
network’s location.
21. W
indow is finalizing your settings
18
Welcome screen
Preparing Desktop
19
And there you have a fresh copy of Windows 7 installed!
20
1. Requirements
You'll need to consider the following before starting the installation:
- Connect your laptop to a power source.
- Ensure you have at least 25GB of free storage space, or 5GB for a
minimal installation.
- Have access to either a DVD or a USB flash drive containing the
version of Ubuntu you want to install.
- Make sure you have a recent backup of your data. While it's unlikely
that anything will go wrong, you can never be too prepared.
It's easy to install Ubuntu from a DVD. Here's what you need to do:
21
3. Boot from USB flash drive
22
4. Prepare to install Ubuntu
- You will first be asked to select your keyboard layout. If the installer
doesn't guess the default layout correctly, use the ‘Detect Keyboard
Layout' button to run through a brief configuration procedure.
- After selecting Continue you will be asked What apps would you like to
install to start with? The two options are ‘Normal installation' and
‘Minimal installation'. The first is the equivalent to the old default
bundle of utilities, applications, games and media players - a great
launchpad for any Linux installation. The second takes considerably
less storage space and allows you to install only what you need.
- Beneath the installation-type question are two checkboxes; one to
enable updates while installing and another to enable third-party
software.
- It is recommended to enable both Download updates and Install third-
party software.
- Stay connected to the internet so you can get the latest updates while
you install Ubuntu.
- If you are not connected to the internet, you will be asked to select a
wireless network, if available. We advise you to connect during the
installation so we can ensure your machine is up to date
23
5. Allocate drive space
24
6. Begin installation
25
7. Select your location
26
8. Login details
27
9. Background installation
- The installer will now complete in the background while the installation
window teaches you a little about how awesome Ubuntu is.
- Depending on the speed of your machine and network connection,
installation should only take a few minutes.
28
10. Installation complete
- After everything has been installed and configured, a small window will
appear asking you to restart your machine.
- Click on Restart Now and remove either the DVD or USB flash drive
when prompted. If you initiated the installation while testing the
desktop, you also get the option to continue testing.
29
Installing Device drivers
- A device driver is a computer program that controls a particular
device that is connected to your computer.
- Typical devices are keyboards, printers, scanners, digital cameras
and external storage devices. Each of these needs a driver in order
to work properly
30
- To install a driver
- Double click on a driver which you want to install especial the one with
yellow exclamation mark and you will get to this box
31
- Click on Update a drive which will give you two options
a. To search a driver from internet
b. To browse it from your local computer
32
NB you need internet connection for your computer to search a driver
from internet.
- Your computer starts searching for a driver and installed automatically
33
Installing application software
Installation of application software is only limited to
- Hardware configuration
- Operating system
- License agreement
The following are examples of application software that can be
installed
- Word processor
- Spreadsheet
- Database management system
NB Before you install any application software, select only those
application software relevant to a user of a particular computer ie
whether general purpose or special purpose software
34
2. Enter the Product Key.
- This is the 25-character key found on the packaging that your Office
2010 came in.
- If you purchased online, the key will be displayed in the order
confirmation window.
- You do not need to enter the dashes in between groups of characters
35
3. Accept the License Terms.
- In order to proceed with the installation, you need to check the box
indicating that you have read and agree to Microsoft’s terms of use.
36
4. Choose your installation.
- Clicking Install Now will install all of the Office products included in the
version that you purchased. Office will be installed to your default hard
drive (the same that Windows is installed on).
- Choose Customize to specify which products you want to install. For
example, if you never use Excel and just need Word, use Customize to
disable the Excel installation.
37
- You can also use the Customize option to install Office to a different
location on your computer.
38
- Once Office is finished installing, you can access each of the individual
Office programs from the Start menu.
39
3. Select the program you want to remove.
4. Click Uninstall or Uninstall/Change at the top of the program list then
windows will uninstall the selected software successfully
40
CHAPTER 4: TROUBLESHOOTING OF COMPUTERS
Objectives
Contents
Troubleshooting is a cycle
The following flow chart summarises the steps that must be taken
during troubleshooting cycle
Identify a problem
• This step should provide a clear problem statement that defines the
problem as a set of symptoms and associated causes.
• This is done by identifying the general symptoms and then
determining the possible causes that could result in these symptoms.
• The outcome of this step should be a written set of ideas and
possibilities.
- If you are having troubles booting Windows, then you may have
to reinstall it with the Windows recovery disk.
- When you computer freezes, you may have no other option than
to reboot and risk losing any unsaved work.
- Freezes can be a sign of
i. insufficient ram,
ii. registry conflicts,
iii. corrupt or missing files, or spyware.
- Press and hold the power button until the computer turns off,
then restart it and get to work cleaning up the system so that it
doesn’t freeze again.
6. Computer is Slow
- If your computer is slower than normal, you can often fix the
problem simply by cleaning the hard disk of unwanted files.
- You can also install a firewall, anti-virus and anti-
spyware tools, and schedule regular registry scans.
7.Strange Noises
Slow Internet
9. Overheating
i) Corrupted drivers
- You can also use a third-party app like IObit Driver Booster to
automatically find and fix driver problems.
iv) Heating PC
Contents
• Basic terminologies
o communication
o data communication
o telecommunication
o network
• History of communication technologies
o Telephone
o Cellular
o internet
• Uses of networks
o business applications
▪ e-banking
▪ mobile banking
▪ auto teller machines
▪ point of sale
o home applications
o remote access
o mobile communication
• Elements of communication systems
• Network devices
o Modems
o Routers
o Transmitters
o Receivers
o Switches
o Repeaters
o Hubs
Copyright © learnmalawi | All rights reserved
1
o Nics
o Bridges
• Transmission signals (signals; analogue, digital, modulation)
o data signals
o Transmission of data signals
o analogue signals
o digital signals
o modulation
• Transmission media
o Physical
o copper cables
o optic fibre cables
o wireless
• Transmission techniques
o Parallel and serial data transmission techniques
• Transmission modes
o Simplex
o Half duplex
o Full duplex
BASIC TERMINOLOGIES
Communication
- Process of using sounds, words, symbols, signs, pictures or signals to pass a
message or information from one person to the other
- Message origin is called source or sender
- Message target recipient is called receiver
- The message is usually targeted for sending to the receiver
Data Communication
- Data communication refers to the process of transmitting data signals from
one point to the other through communication channel
2
Telecommunication
- Telecommunication the use of technology to exchange messages in form of
data and information over wired or wireless communication media.
- Telecommunication technologies include telegraph, telephone, Radio,
television and computers
Telecommunication network
Telecommunication network is interconnection of telecommunication
equipment like telephone, mobiles, radios, televisions and computers using
transmission media or links
The network enables the flow of data or information from the source to
destination
Computer network
A computer network is an interconnection of computers using transmission
media and networking devices to enable exchange of data and information.
3
History of communication technologies
- Evolution has not spared communication technologies in the following
aspects
i) telephone
ii) cellular
iii) internet
history of Telephone
- Telephone was inverted after telegraph by Alexander Graham who was
trying to improve telegraph in 1876
- Telegraph used dots and dashes (beeps) coded as electric signals to transmit
text characters over long distances
- The following were the generalised categories of telephone evolution
i) Rotary dial telephone
ii) Touch tone dial telephone
iii) Mobile telephone
iv) Smart phones
Rotary Dialing
4
Touch Tone Phones
Cordless Phones
- Cordless phones started to hit the market in the 1970s. In 1986, the FTC had
released the frequency range between 47 and 49 MHz for use by cordless
phones.
- This wider frequency range meant phones could work wirelessly with less
interference and less power required in order to run.
- As cordless phones became more and more popular, the FTC would
eventually grant more and more frequency range to cordless phones over the
years.
- Cell phones have obviously exploded with growth over the past 20-odd
years.
- But the first cell phone dates back to post-World War II America.
- In 1947, researchers began theorizing that a mobile telephone was possible.
Smart phones
5
- The first smartphone, created by IBM, was invented in 1992 and released for
purchase in 1994. It was called the Simon Personal Communicator (SPC).
- While not very compact and sleek, the device still featured several elements
that became staples to every smartphone that followed.
The following are some of the other key features of a smartphone:
• Internet connectivity.
• A mobile browser.
• The ability to sync more than one email account to a device.
• Embedded memory.
• A hardware or software-based QWERTY keyboard.
• Wireless synchronization with other devices, such as laptop or desktop
computers.
Uses of networks
6
- The information is stored in remote databases to which the user gains access
through information systems like the World Wide Web.
iv. E-Commerce
7
vi. Cost–Effective Systems
vii. VoIP
8
- This is a device that receives the message
Message user
- This is a person who uses received message
Protocol
- These are set of rules and procedures that govern communication on the
network
Network devices
- These are Hardware devices that are used to connect computers, printers, fax
machines and other electronic devices to a network .
- These devices transfer data in a fast, secure and correct way over same or
different networks.
- Network devices may be inter-network or intra-network.
- Some devices are installed on the device, like NIC card or RJ45 connector,
whereas some are part of the network, like router, switch, etc. Let us explore
some of these devices in greater detail.
Modem
9
- The main function of the modem is to convert digital signal into analog and
vice versa.
- Modem is a combination of two devices − modulator and demodulator.
- The modulator converts digital data into analog data when the data is being
sent by the computer.
- The demodulator converts analog data signals into digital data when it is
being received by the computer.
Types of Modem
i. Simplex − A simplex modem can transfer data in only one direction, from
digital device to network (modulator) or network to digital device
(demodulator).
10
ii. Half duplex − A half-duplex modem has the capacity to transfer data in
both the directions but only one at a time.
iii. Full duplex − A full duplex modem can transmit data in both the directions
simultaneously.
RJ45 Connector
- RJ45 is the acronym for Registered Jack 45. RJ45 connector is an 8-pin
jack used by devices to physically connect to Ethernet based local area
networks (LANs).
- Ethernet is a technology that defines protocols for establishing a LAN.
- The cable used for Ethernet LANs are twisted pair ones and have RJ45
connector pins at both ends.
- These pins go into the corresponding socket on devices and connect the
device to the network.
11
Ethernet Card
- Ethernet card speeds may vary depending upon the protocols it supports.
- Old Ethernet cards had maximum speed of 10 Mbps.
- However, modern cards support fast Ethernets up to a speed of 100 Mbps.
- Some cards even have capacity of 1 Gbps.
12
Router
- A router is a network layer hardware device that transmits data from one
LAN to another if both networks support the same set of protocols.
- So a router is typically connected to at least two LANs and the internet
service provider (ISP).
- It receives its data in the form of packets, which are data frames with their
destination address added.
- Router also strengthens the signals before transmitting them. That is why it
is also called repeater.
Routing Table
- A router reads its routing table to decide the best available route the packet
can take to reach its destination quickly and accurately.
- The routing table may be of these two types
13
i. Static
- In a static routing table the routes are fed manually. So it is suitable only for
very small networks that have maximum two to three routers.
ii. Dynamic
Switch
14
- Data transmission speed in switches can be double that of other network
devices like hubs used for networking.
- This is because switch shares its maximum speed with all the devices
connected to it. This helps in maintaining network speed even during high
traffic. In fact, higher data speeds are achieved on networks through use of
multiple switches.
Gateway
15
- A gateway usually is a computer with multiple NICs connected to different
networks.
- A gateway can also be configured completely using software. As networks
connect to a different network through gateways, these gateways are usually
hosts or end points of the network.
Wi-Fi Card
16
- The physical area of the network which provides internet access through Wi-
Fi is called Wi-Fi hotspot.
- Hotspots can be set up at home, office or any public space. Hotspots
themselves are connected to the network through wires.
Repeater
17
- Its job is to regenerate the signal over the same network before the signal
becomes too weak or corrupted so as to extend the length to which the signal
can be transmitted over the same network.
- important point to be noted about repeaters is that they do not amplify the
signal.
- When the signal becomes weak, they copy the signal bit by bit and
regenerate it at the original strength.
- It is a 2 port device.
Hub
Types of Hub
i. Active Hub:
- These are the hubs which have their own power supply and can clean, boost
and relay the signal along with the network.
- It serves both as a repeater as well as wiring centre.
- These are used to extend the maximum distance between nodes.
ii. Passive Hub :
18
- These are the hubs which collect wiring from nodes and power supply from
active hub
- These hubs relay signals onto the network without cleaning and boosting
them and can’t be used to extend the distance between nodes.
Bridge
TRANSMISSION SIGNALS
- Data Signal refers to voltage level that represent flow of data or information
from one point to another in a network
- When data is sent over physical medium, it needs to be first converted into
electromagnetic signals.
- Signals can either be Digital or analog
Digital signals
- These are discrete in nature and represent sequence of voltage pulses.
- Digital signals are used within the circuitry of a computer system.
Copyright © learnmalawi | All rights reserved
19
Analog Signals
- Analog signals are in continuous wave form in nature and represented by
continuous electromagnetic waves.
NB :
- Data itself can be analog such as human voice, or digital such as file on the
disk.
- Both analog and digital data can be represented in digital or analog signals.
Transmission Impairment
- When signals travel through the medium, they tend to deteriorate.
- The following are causes of signal impairment
i. Attenuation
- For the receiver to interpret the data accurately, the signal must be
sufficiently strong. When the signal passes through the medium, it tends to
get weaker.
- As it covers distance, it loses strength.
ii. Dispersion
- As signal travels through the media, it tends to spread and overlaps.
- The amount of dispersion depends upon the frequency used.
iii. Delay distortion
- Signals are sent over media with pre-defined speed and frequency.
- If the signal speed and frequency do not match, there are possibilities that
signal reaches destination in arbitrary fashion.
- In digital media, this is very critical that some bits reach earlier than the
previously sent ones.
20
iv. Noise
- Random disturbance or fluctuation in analog or digital signal is said to be
Noise in signal, which may distort the actual information being carried.
- Noise can be characterized in one of the following class
Thermal Noise
o Heat agitates the electronic conductors of a medium which may
introduce noise in the media. Up to a certain level, thermal noise is
unavoidable.
Intermodulation
o When multiple frequencies share a medium, their interference can
cause noise in the medium.
o Intermodulation noise occurs if two different frequencies are sharing
a medium and one of them has excessive strength or the component
itself is not functioning properly, then the resultant frequency may not
be delivered as expected.
v. Crosstalk
- This sort of noise happens when a foreign signal enters into the media.
- This is because signal in one medium affects the signal of second medium.
vi. Impulse
- This noise is introduced because of irregular disturbances such as lightening,
electricity, short-circuit, or faulty components.
- Digital data is mostly affected by this sort of noise.
21
TRANSMISSION MEDIA: PHYSICAL ;COPPER CABLES, OPTIC
FIBRE CABLES; WIRELESS)
- Transmission media which is also called transmission medium is the
means through which we send our data from one place to another.
- Transmission media is categorized into two main types
- Guided media, which are those that provide a conduit from one device to
another, include i. Twisted-Pair Cable,
- A signal travelling along any of these media is directed and contained by the
physical limits of the medium.
- Twisted-pair and coaxial cable use metallic (copper) conductors that accept
and transport signals in the form of electric current.
- Optical fibre is a cable that accepts and transports signals in the form of
light.
- This cable is the most commonly used and is cheaper than others.
22
- It is lightweight, cheap, can be installed easily, and they support many
different types of network.
23
ii. Shielded Twisted Pair (STP)
• Installation is easy
• Flexible
• Cheap
24
• It has high speed capacity,
• 100 meter limit
• Higher grades of UTP are used in LAN technologies like Ethernet.
• It consists of two insulating copper wires (1mm thick). The wires are twisted
together in a helical form to reduce electrical interference from similar pair.
- This cable has a metal foil or braided-mesh covering which encases each
pair of insulated conductors.
- Electromagnetic noise penetration is prevented by metal casing.
- Shielding also eliminates crosstalk .
- It has same attenuation as unshielded twisted pair.
- It is faster the unshielded and coaxial cable. It is more expensive than
coaxial and unshielded twisted pair.
25
Advantages of Shielded Twisted Pair Cable
• Easy to install
• Performance is adequate
• Can be used for Analog or Digital transmission
• Increases the signalling rate
• Higher capacity than unshielded twisted pair
• Eliminates crosstalk
• Difficult to manufacture
• Heavy
26
- As shown in the below figure, a twisted-pair cable can pass a wide range of
frequencies. However, with increasing frequency, the attenuation, measured
in decibels per kilometre (dB/km), sharply increases with frequencies above
100kHz. Note that gauge is a measure of the thickness of the wire.
• In telephone lines to provide voice and data channels. The DSL lines that are
used by the telephone companies to provide high-data-rate connections also
use the high-bandwidth capability of unshielded twisted-pair cables.
• Local Area Network, such as 10Base-T and 100Base-T, also use twisted-pair
cables.
27
Coaxial Cable
- Coaxial is called by this name because it contains two conductors that are
parallel to each other.
- Copper is used in this as centre conductor which can be a solid wire or a
standard one.
- It is surrounded by PVC installation, a sheath which is encased in an outer
conductor of metal foil, barid or both.
- Outer metallic wrapping is used as a shield against noise and as the second
conductor which completes the circuit.
- The outer conductor is also encased in an insulating sheath. The outermost
part is the plastic cover which protects the whole cable.
28
Coaxial Cable Standards
29
- The BNC connector is used to connect the end of the cable to the device,
such as a TV set.
- The BNC T connector is used in Ethernet networks to branch out to a
connection to a computer or other device.
- The BNC terminator is used at the end of the cable to prevent the reflection
of the signal.
1. BaseBand
- This is a 50 ohm (Ω) coaxial cable which is used for digital transmission.
- The major drawback is that it needs amplification after every 1000 feet.
30
2. BroadBand
• Bandwidth is high
• Used in long distance telephone lines.
• Transmits digital signals at a very high rate of 10Mbps.
• Much higher noise immunity
• Data transmission without distortion.
• The can span to longer distance at higher speeds as they have better
shielding when compared to twisted pair cable
31
- From the below figure, it can be seen that the attenuation is much higher in
coaxial cable than in twisted-pair cable.
- In other words, although coaxial cable has a much higher bandwidth, the
signal weakens rapidly and requires the frequent use of repeaters.
• Coaxial cable was widely used in analog telephone networks, where a single
coaxial network could carry 10,000 voice signals.
• Cable TV networks also use coaxial cables. In the traditional cable TV
network, the entire network used coaxial cable. Cable TV uses RG-59
coaxial cable.
• In traditional Ethernet LANs. Because of it high bandwidth, and
consequence high data rate, coaxial cable was chosen for digital
transmission in early Ethernet LANs. The 10Base-2, or Thin Ethernet, uses
32
RG-58 coaxial cable with BNC connectors to transmit data at 10Mbps with a
range of 185 m.
The below figure shows how a ray of light changes direction when going from a
more dense to a less dense substance.
33
Bending of a light ray
If the angle of incidence I (the angle the ray makes with the line
perpendicular to the interface between the two substances) is less than the
critical angle, the ray refracts and moves closer to the surface.
If the angle of incidence is greater than the critical angle, the ray
reflects(makes a turn) and travels again in the denser substance
If the angle of incidence is equal to the critical angle, the ray refracts and moves
parallel to the surface as shown
Note: The critical angle is a property of the substance, and its value differs from
one substance to another.
34
Propagation Modes of Fiber Optic Cable
i. Multimode and
ii. Single mode
35
In multimode step-index fibre,
- The density of the core remains constant from the centre to the edges.
- A beam of light moves through this constant density in a straight line until it
reaches the interface of the core and the cladding.
- The term step-index refers to the suddenness of this change, which
contributes to the distortion of the signal as it passes through the fibre.
Single Mode
- Single mode uses step-index fibre and a highly focused source of light that
limits beams to a small range of angles, all close to the horizontal.
- The single-mode fibre itself is manufactured with a much smaller diameter
than that of multimode fibre, and with substantially lower density.
- The decrease in density results in a critical angle that is close enough to 90
degree to make the propagation of beams almost horizontal.
- Optical fibres are defined by the ratio of the diameter or their core to the
diameter of their cladding, both expressed in micrometers.
- The common sizes are shown in the figure below
37
Fibre Optic Cable Connectors
There are three types of connectors for fibre-optic cables, as shown in the figure
below.
• Higher bandwidth
• Less signal attenuation
• Immunity to electromagnetic interference
38
• Resistance to corrosive materials
• Light weight
• Greater immunity to tapping
39
WIRELESS TRANSMISSION MEDIA
- Wireless transmission media which are also called Unguided medium
transport electromagnetic waves without using a physical conductor.
- Signals are normally broadcast through free space and thus are available to
anyone who has a device capable of receiving them.
1. Radio waves
2. Micro waves
3. Infrared waves
Radio Waves
40
inside a building. It is a disadvantage because we cannot isolate a
communication to just inside or outside a building.
Radio waves use omnidirectional antennas that send out signals in all directions.
41
Micro Waves
42
- A parabolic antenna works as a funnel, catching a wide range of waves and
directing them to a common point.
- In this way, more of the signal is recovered than would be possible with a
single-point receiver.
- A horn antenna looks like a gigantic scoop.
- Outgoing transmissions are broadcast up a stem and deflected outward in a
series of narrow parallel beams by the curved head.
- Received transmissions are collected by the scooped shape of the horn, in a
manner similar to the parabolic dish, and are deflected down into the stem.
43
Applications of Micro Waves
1. Terrestrial Microwave
2. Satellite Microwave
• It is very costly
Terrestrial Microwave
44
The microwave communication can either parabolic or horn type of antennas
Satellite Microwave
45
Features of Satellite Microwave
• Transmitting station can receive back its own transmission and check
whether the satellite has transmitted information correctly.
• A single microwave relay station which is visible from any point.
46
Infrared Waves
- Infrared waves, with frequencies from 300 GHz to 400 THz, can be used for
short-range communication.
- Infrared waves, having high frequencies, cannot penetrate walls. This
advantageous characteristic prevents interference between one system and
another, a short-range communication system in on room cannot be affected
by another system in the next room.
- When we use infrared remote control, we do not interfere with the use of the
remote by our neighbours. However, this same characteristic makes infrared
signals useless for long-range communication.
- In addition, we cannot use infrared waves outside a building because the
sun's rays contain infrared waves that can interfere with the communication.
• The infrared band, almost 400 THz, has an excellent potential for data
transmission. Such a wide bandwidth can be used to transmit digital data
with a very high data rate.
• The Infrared Data Association(IrDA), an association for sponsoring the use
of infrared waves, has established standards for using these signals for
communication between devices such as keyboards, mouse, PCs and
printers.
• Infrared signals can be used for short-range communication in a closed area
using line-of-sight propagation.
47
Factors to be considered while selecting a Transmission Medium
When selecting the suitable transmission media, the following factors must
be considered
1. Transmission Rate
2. Cost and Ease of Installation
3. Resistance to Environmental Conditions
4. Distances
TRANSMISSION TECHNIQUES
Data signals can be transmitted using two main techniques
1. Serial data transmission
2. Parallel data transmission
- In serial data transmission, bits are sent sequentially (one after the other)
down the same wire (channel)
- Using a single wire reduces costs but slows down the speed of transmission.
- Sending data sequentially is perfect for transmitting over longer distances as
there are no synchronization issues.
48
Uses of serial transmission
49
Uses of parallel transmission
TRANSMISSION MODES
1. Simplex Mode
2. Half duplex Mode
3. Full duplex Mode
50
SIMPLEX Mode
- In this type of transmission mode, data can be sent only in one direction i.e.
communication is unidirectional.
- We cannot send a message back to the sender.
- Unidirectional communication is done in Simplex Systems where we just
need to send a command/signal, and do not expect any response back.
- Examples of simplex Mode are loudspeakers, television broadcasting,
television and remote, keyboard and monitor etc.
51
HALF DUPLEX Mode
52
In full duplex system there can be two lines one for sending the data and the other
for receiving data.
53
CHAPTER 6: Programming Fundamentals
Objectives
Contents
• definitions (computer program, programming, compiler, translator,
assembler)
• history of programming languages (machine language, assembly
language, high level languages)
• programming languages (examples: pascal, fortran, COBOL, C, C++,
Java, HTML, visual basic)
• programming techniques
o constructing a computer programme
▪ programme-structure
▪ compiling a computer programme
▪ running a computer programme
o program constructs
▪ discussing data types
▪ discussing data variables
▪ modifying data variables
▪ discussing how to access data types
▪ key words (calculate, count)
▪ input and output (read, display, print)
• designing programs that Read from the keyboard
using the Read command
• writing to the terminal using the Write command
▪ Operators (arithmetic: addition, subtraction, multiplication,
division, logical: and, or, not comparison operators; equal
to, not equal to, less than, greater than)
• using arithmetic operators: + (plus), - (minus), //
(forward slash, * (multiplication)
1
• using Boolean and comparison operators in
programming (arithmetic: Addition, Subtraction,
Multiplication, Division, logical: and, or, not
comparison operators; equal to, not equal to, less
than, greater than)
▪ Control structures (sequence, selection, loops)
• designing programmes that use control structures
o Debugging programmes
2
- Programmers are also called software developers or software engineers
Algorithm
- This is a design of a computer program prior to the implementation
- Algorithms are also referred to as program blue prints
Source code
- This is set of instructions written by a programmer that are not
converted into machine readable form
- This is usually a text file written in programming languages like BASIC,
Pascal or C++
Object code
- This is set of instructions that have been converted into machine
readable form
- Assemblers, interpreters and compliers are used to convert a source
code into an object code
Assembler
- Converts assembly language into machine readable form
Interpreters
- Converts source code into an object code statement by statement
allowing CPU to execute one line at a time
- Interpreted line is not stored in the computer memory hence every time
the program is needed for execution, each line has to be interpreted
- Interpreters were mostly used by early computers that did not have
memory
3
Compiler
- Converts entire source code into object code
- The process of converting a source code into an object code by
compilers is called compilation
- The following are the steps of compilation process
4
Differences between interpreters and compilers
Interpreters Compilers
1. Translate the source code 1. Translate the entire source
to object code one code at once before execution
statement at a time
2. Translate the program each 3. Complied program (object
time it is to run hence code) can be saved on a
slower than compliers storage media and run as
required, hence they are faster
than interpreters
Interpreted object code takes less Compiled programs require more me
memory compared to compiled mory since object files are larger
program
5
- Programmers have to design their code by hand then transfer it to a
computer by using a punch card, punch tape or flicking switches.
- There is no need to translate the code and it will run straight away.
This may sound rather archaic,
Advantages of Machine language
i. Code can be fast and efficient
ii. Code can make use of specific processor features such as special
registers
i. Lack of portability
6
- To convert an assembly code program into object code to run on a
computer requires an Assembler and each line of assembly can be
replaced by the equivalent one line of object (machine) code
Lack of portability
7
NB: first and second generation programming languages are referred to Low
level Languages because computers can understand their code with minimal
effort.
8
v. C :
o suitable for developing operating systems
vi. Ada
o suitable for developing military, industrial and real time systems
Would output: 8
9
- Examples of 4GLs includes
i. Structured Query Language (SQL),
ii. Oracle Reports
iii. CSS
An example of code written using SQL is as follows
Scripting Languages
- A scripting language is a programming language designed for
integrating and communicating with other programming languages.
- Some of the most widely used scripting languages are
i. JavaScript,
ii. VBScript,
iii. PHP,
iv. Perl,
v. Python,
vi. Ruby,
vii. ASP and
viii. Tcl.
10
- Since a scripting language is normally used in conjunction with another
programming language, they are often found alongside HTML, Java or
C++.
11
Components of HTML code
Consider the following HTML code
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Code Explanation
12
• The <body> element contains the visible page content
• The <h1> element defines a large heading
• The <p> element defines a paragraph
1. High level languages are programmer friendly. They are easy to write,
debug and maintain.
2. It provides higher level of abstraction from machine languages.
3. It is machine independent language.
4. Easy to learn.
5. Less error prone, easy to find and debug errors.
6. High level programming results in better programming productivity.
13
- A program development process consists of various steps that are
followed to develop a computer program.
- These steps are followed in a sequence in order to develop a
successful and beneficial computer program.
- Following is the brief description about program development process.
problem
definition
Program Review
Algorithm Design
and Maintenance
Program Testing
Program Coding
and debugging
14
3. Coding or Writing The Program
4. Program Testing Execution
5. Debugging
6. Program review and maintenance
Designing an Algorithm
15
Coding or Writing the Program
- The next step after designing the algorithm is to write the program in
a high-level language.
- This process is known as coding.
Program Testing
i. Syntax error
16
The following steps are used
b. Debugging
c. Test data
- Carry out trial runs using test data to check for logical run-time errors
- Achieved by entering valid and invalid input to test whether the
program produces desired result
Debugging
17
Final Documentation
1. Portability:
- Portability refers to the ability of an application to run on different
platforms (operating systems) with or without minimal changes.
2. Readability:
18
3. Efficiency:
- Every program requires certain processing time and memory to
process the instructions and data.
- As the processing power and memory are the most precious resources
of a computer, a program should be laid out in such a manner that it
utilizes the least amount of memory and processing time.
4. Structural:
5. Flexibility:
19
Hence, the payroll application should be flexible enough to incorporate
all the changes without having to reconstruct the entire application.
6. Generality:
7. Documentation:
20
Framework and the common language runtime with the productivity
benefits that are the hallmark of Visual Basic.
- VB.NET is implemented by Microsoft's .NET framework. Therefore, it
has full access to all the libraries in the .Net Framework. It's also
possible to run VB.NET programs on Mono, the open-source alternative
to .NET, not only under Windows, but even Linux or Mac OSX.
The following tools are required to set up environment for writing and
running Visual basic programs
21
1. The .Net Framework
i. Windows applications
ii. Web applications
iii. Web services
NB : for you to start programming in VB, make sure one of the above IDE
is installed in your computer
Structure of VB program
22
To understand structure of VB program, lets consider the following example
of simple program written in VB.net
• Namespace declaration
• A class or module
• One or more procedures
• Variables
• The Main procedure
• Statements & Expressions
• Comments
Let us look at a simple code that would print the words "Hello World" −
Imports System
Module Module1
'This program will display Hello World
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
23
End Module
When the above code is compiled and executed, it produces the following
result −
Hello, World!
- 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.
- Classes or Modules generally would contain more than one procedure.
Procedures contain the executable code, or in other words, they define
the behavior of the class. A procedure could be any of the following −
o Function
o Sub
o Operator
o Get
o Set
24
o AddHandler
o RemoveHandler
o RaiseEvent
- The next line( 'This program) will be ignored by the compiler and it has
been put to add additional comments in the program.
- 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 Main procedure specifies its behavior with the statement
- 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.
If you are using Visual Studio.Net IDE, take the following steps −
25
• Choose Console Application.
• Specify a name and location for your project using the Browse button,
and then choose the OK button.
• The new project appears in Solution Explorer.
• Write code in the Code Editor.
• Click the Run button or the F5 key to run the project. A Command
Prompt window appears that contains the line Hello World.
You can compile a VB.Net program by using the command line instead of the
Visual Studio IDE −
- First of all, launch Microsoft Visual Basic 6 compiler that you have
installed earlier.
Copyright © learnmalawi | All rights reserved
26
- In the New Project Dialog , choose Standard EXE to enter Visual Basic
6 integrated development environment.
- In the VB6 IDE, a default form with the name Form1 will appear.
- Next, double click on Form1 to bring up the source code window for
Form1, as shown in Figure below
- The top of the source code window consists of a list of objects and
their associated events or procedures.
27
- In the source code window, the object displayed is Form1 and the
associated procedure is Load.
- When you click on the object box, the drop-down list will display a list
of objects you have inserted into your form.
- Here, you can see a form with the name Form1, a command button
with the name Command1, a Label with the name Label1 and a Picture
Box with the name Picture1
- Some of the procedures associated with the object Form1 are Activate,
Click, DblClick (which means Double-Click) , DragDrop, keyPress and
more.
28
- Each object has its own set of procedures.
- You can always select an object and write codes for any of its
procedure in order to perform certain tasks.
- You do not have to worry about the beginning and the end statements
- Just key in the lines in between the above two statements exactly as
are shown here.
29
- When you press F5 to run the program, you will be surprised that
nothing showed up
- .In order to display the output of the program, you have to add the
Form1.show statement or you can just use Form_Activate (
) event procedure
- The command Print does not mean printing using a printer but it
means displaying the output on the computer screen.
- Now, press F5 or click on the run button to run the program and you
will get the output as
Example 1
Form1.show
End Sub
Example 2
Print 20 + 10
Print 20 - 10
30
Print 20 * 10
Print 20 / 10
End Sub
31
You can also use the + or the & operator to join two or more texts (string)
together
Example 3
Private Sub
A = "Tom"
B = "likes"
C = "to"
D = "eat"
E = "burger"
Print A + B + C + D + E
32
End Sub
Example 4
Private Sub
A = "Tom"
B = "likes"
C = "to"
D = "eat"
E = "burger"
Print A & B & C & D & E
End Sub
33
Steps in Building a Visual Basic Application
Step 1: Design the interface by adding controls to the form and set their
properties
34
- We will place two command buttons and a label on the form. One of
the command buttons will be used to change the background color
while the other one will be used to change the foreground color.
- The Label is for displaying the foreground color. There are two events
here, change background color and change foreground color.
Therefore, we need to write code for the two event procedures.
• To make the program more interesting, we will use the Rnd() function,
the Int() function and the RGB codes to change the color randomly.
- The Rnd() function creates a random number between 0 and 1 and the
RGB code uses a combination of three integers to form a certain color.
- The Int() is a function that converts a number into an integer by
truncating its decimal part and the resulting integer is the largest
integer that is smaller than the number. For example, Int(0.2)=0,
Int(2.4)=2, Int(4.8)=4.
- Therefore, Int(Rnd()*256) returns the smallest integer 0 and the
biggest integer 255.
- The format of RGB code is RGB(a,b,c), where a, b, c range from 0 to
255. For example, RGB(255,0,0) is red, RGB(255,255,255) is white and
(0,0,0) is black. Do not worry about the jargons, you will learn them in
later.
35
• Form1-MyForm
• Label1-LblMessage
• Command1-cmd_bgColor
• Command2-cmd_fgColor
36
b = Int(Rnd() * 256)
Lbl_Msg.ForeColor = RGB(r, g, b)
End Sub
- When you run the program, each time you press on the 'Change
Background Color' button, you will see different background color.
- Similarly, each time you press on the 'Change Foreground Color', you
will see the message on the Label changes color. The output is shown
below
37
- You can set the properties of the controls in the properties window or
at runtime.
- In the properties window, the item appears at the top part is the
object currently selected.
- At the bottom part, the items listed in the left column represent the
names of various properties associated with the selected object while
the items listed in the right column represent the states of the
properties.
- Properties can be set by highlighting the items in the right column then
change them by typing or selecting the options available.
38
- For example, in order to change the caption, just highlight Form1
under the name Caption and change it to other names.
- You may also alter the appearance of the form by setting it to 3D or
flat, change its foreground and background color, change the font type
and font size, enable or disable, minimize and maximize buttons and
more.
- You can also change the properties at runtime to give special effects
such as change of color, shape, animation effect and so on.
39
Example 6 Program to change background color
This example changes the background colour of the form using the
BackColor property.
40
The TextBox
- The text box is the standard control for accepting input from the user
as well as to display the output.
- It can handle string (text) and numeric data but not images or
pictures.
- A string entered into a text box can be converted to a numeric data
by using the function Val(text).
- The following example illustrates a simple program that processes the
input from the user.
Example 8
- In this program, two text boxes are inserted into the form together
with a few labels.
41
- The two text boxes are used to accept inputs from the user and one of
the labels will be used to display the sum of two numbers that are
entered into the two text boxes.
- Besides, a command button is also programmed to calculate the sum
of the two numbers using the plus operator.
- The program use creates a variable sum to accept the summation of
values from text box 1 and text box 2.
- The procedure to calculate and to display the output on the label is
shown below.
42
The Label
- The label is a very useful control for Visual Basic, as it is not only used
to provide instructions and guides to the users, it can also be used to
display outputs.
- Caption, it can display text and numeric data. You can change its
caption in the properties window and also at runtime.
43
- The most common event associated with the command button is the
Click event, and the syntax for the procedure is
44
Run the program and enter a password, then click on the Show Password
button to reveal the password, as shown below.
- You can also reveal the password by setting the PasswordChr property
back to normal mode, as follows:
The PictureBox
- The Picture Box is one of the controls that is used to handle graphics.
- You can load a picture at design phase by clicking on the picture item
in the properties window and select the picture from the selected
folder.
45
- You can also load the picture at runtime using the LoadPicture
method.
- For example, the statement will load the picture grape.gif into the
picture box.
Picture1.Picture=LoadPicture ("C:\VBprogram\Images\grape.gif")
In this program, insert a command button and a picture box. Enter the
following code:
* You must ensure the path to access the picture is correct. Besides that,
the image in the picture box is not resizable. The output is shown below
46
The Image Control
Image1.Picture=LoadPicture ("C:\VBprogram\Images\grape.gif")
47
Example :: Loading Image
* Note the difference between the image in Figure 3.5 and Figure 3.6.
The ListBox
- The function of the ListBox is to present a list of items where the user
can click and select the items from the list.
48
- In order to add items to the list, we can use the AddItem method.
For example, if you wish to add a number of items to list box 1, you
can key in the following statements
Example
Private Sub Form_Load ( )
List1.AddItem “Lesson1”
List1.AddItem “Lesson2”
List1.AddItem “Lesson3”
List1.AddItem “Lesson4”
End Sub
The Output
- The items in the list box can be identified by the ListIndex property, the
value of the ListIndex for the first item is 0, the second item has a ListIndex
1, and the third item has a ListIndex 2 and so on
Copyright © learnmalawi | All rights reserved
49
The ComboBox
- The function of the Combo Box is also to present a list of items where
the user can click and select the items from the list.
- However, the user needs to click on the small arrowhead on the right
of the combo box to see the items which are presented in a drop-down
list.
- In order to add items to the list, you can also use the AddItem
method.
- For example, if you wish to add a number of items to Combo box 1,
you can key in the following statements
Example
Private Sub Form_Load ( )
Combo1.AddItem "Item1"
Combo1.AddItem "Item2"
Combo1.AddItem "Item3"
Combo1.AddItem "Item4"
End Sub
50
The Output
The CheckBox
- The Check Box control lets the user selects or unselects an option.
- When the Check Box is checked, its value is set to 1 and when it is
unchecked, the value is set to 0.
- You can include the statements Check1.Value=1 to mark the Check
Box and Check1. Value=0 to unmark the Check Box, as well as use
them to initiate certain actions.
- For example, the program in Example below will show which items are
selected in a message box.
Example
Private Sub Cmd_OK_Click()
If Check1.Value = 1 And Check2.Value = 0 And Check3.Value = 0 Then
MsgBox "Apple is selected"
Copyright © learnmalawi | All rights reserved
51
ElseIf Check2.Value = 1 And Check1.Value = 0 And Check3.Value = 0 Then
MsgBox "Orange is selected"
ElseIf Check3.Value = 1 And Check1.Value = 0 And Check2.Value = 0
Then
MsgBox "Orange is selected"
ElseIf Check2.Value = 1 And Check1.Value = 1 And Check3.Value = 0 Then
MsgBox "Apple and Orange are selected"
ElseIf Check3.Value = 1 And Check1.Value = 1 And Check2.Value = 0 Then
MsgBox "Apple and Pear are selected"
ElseIf Check2.Value = 1 And Check3.Value = 1 And Check1.Value = 0 Then
MsgBox "Orange and Pear are selected"
Else
MsgBox "All are selected"
End If
End Sub
52
The Output
The OptionButton
- The OptionButton control also lets the user selects one of the choices.
However, two or more Option buttons must work together because as
one of the option buttons is selected, the other Option button will be
unselected
- In fact, only one Option Box can be selected at one time.
- When an option box is selected, its value is set to “True” and when it
is unselected; its value is set to “False”.
Example
53
- We insert three option buttons and change their captions to "Red
Background","Blue Background" and "Green Background" respectively.
- Next, insert a command button and change its name to cmd_SetColor
and its caption to "Set Background Color". Now, click on the command
button and enter the following code in the code window:
Run the program, select an option and click the "Set Background Color"
produces the output, as shown below
54
The Shape Control
- In the following example, the shape control is placed in the form
together with six OptionButtons.
- To determine the shape of the shape control, we use the shape
property.
- The property values of the shape control are 0, 1, and 2,3,4,5 which
will make it appear as a rectangle, a square, an oval shape, a circle, a
rounded rectangle and a rounded square respectively.
Example
55
- clicking the paste button, a popup dialog will ask you whether you
wish to create a control array, select yes.
- The control array can be accessed via its index value, MyOtion(Index.
In addition, we also insert a shape control.
- Now, enter the code in the code window. We use the If..Then..Else
program structure to determine which option button is selected by the
user. Private Sub MyOption_Click(Index As Integer)
If Index = 0 Then
MyShape.Shape = 0
ElseIf Index = 1 Then
MyShape.Shape = 1
ElseIf Index = 2 Then
MyShape.Shape = 2
ElseIf Index = 3 Then
MyShape.Shape = 3
ElseIf Index = 4 Then
56
MyShape.Shape = 4
ElseIf Index = 5 Then
MyShape.Shape = 5
End If
End Sub
- Run the program and you can change the shape of the shape control
by clicking one of the option buttons.
- The output is shown in Figure below.
Figure 3.
The DriveListBox
57
- When you place this control into the form and run the program, you
will be able to select different drives from your computer as shown
below
The DirListBox
58
DirListBox
The FileListBox
- You can coordinate the Drive List Box, the Directory List Box and the
File List Box to search for the files you want.
Event Procedure
Copyright © learnmalawi | All rights reserved
59
- For each event, you need to write an event procedure so that it can
perform an action or a series of actions.
- To start writing code for an event procedure, you need to double-click
an object to enter the VB code window.
- For example, if you want to write code for the event of clicking a
command button, you double-click the command button and enter the
codes in the event procedure that appears in the code window, as
shown below
Figure 4.1
60
Private Sub Command1_Click
VB Statements
End Sub
Object.Property
61
the name Text1, Text2.text=100 is to pass a value of 100 to the text
box with the name text2, Timer1.Enabled=False is to disable the
timer with the name Timer1 and so on.
- Let’s examine a few examples below:
Example
Private Sub Command1_click()
Label1.Visible=false
Label2.Visible=True
Text1.Text="You are correct!"
End sub
Example
Private Sub Command1_click()
Label1.Caption="Welcome"
Image1.visible=true
End sub
Example
Private Sub Command1_click()
Pictuire1.Show=true
Timer1.Enabled=True
Lable1.Caption="Start Counting"
Copyright © learnmalawi | All rights reserved
62
End sub
Example : A Counter
The Code
Dim n As Integer
Private Sub cmd_StartCount_Click()
Copyright © learnmalawi | All rights reserved
63
Timer1.Enabled = True
End Sub
64
The Output
- This program display a message whether the label is being click once
or click twice.
- In this program, insert a label and rename it as MyLabel and change
its caption to "CLICK ME". Next, key in the following codes:
65
The out
- Running the program and click the label once, the "CLICK ME" caption
will change to "You Click Me Once". If you click the label twice, the
"CLICK ME" caption will change to "You Click Me Twice!".
NB: In Visual Basic, most of the syntaxes resemble the English language.
Among the syntaxes are Print, If…Then….Else….End If, For…Next,
Select Case…..End Select , End and Exit Sub. For example, Print “
Visual Basic” is to display the text Visual Basic on screen and End is to end
the program.
- Program code that involves calculations is fairly easy to write, just like
what you do in mathematics. However, in order to write an event
66
procedure that involves calculations, you need to know the basic
arithmetic operators in VB as they are not exactly the same as the
normal operators , except for + and - .
Example
Private Sub Form_Activate()
Text3.text=text1.text+text2.text
End Sub
67
- When you run the program above and enter 12 in textbox1 and 3 in
textbox2 will give you a result of 123, which is wrong.
- It is because VB treat the numbers as string and so it just joins up the
two strings. On the other hand,
Example
Private Sub Form_Activate()
Text3.text=val(text1.text)+val(text2.text)
End Sub
- Running the above program code will give you the correct result, i.e.,
15.
- VB6 classifies the information into two major data types, they are the
- Numeric data types are types of data that consist of numbers that can
be computed mathematically with standard operators.
- Examples of numeric data types are
o height,
Copyright © learnmalawi | All rights reserved
68
o weight,
o share values,
o the price of goods,
o monthly bills,
o fees and others.
69
-3.402823E+38 to -1.401298E-45 for negative
Single 4 bytes values 1.401298E-45 to 3.402823E+38 for
positive values.
-1.79769313486232e+308 to -
4.94065645841247E-324 for negative values
Double 8 bytes
4.94065645841247E-324 to
1.79769313486232e+308 for positive values.
-922,337,203,685,477.5808 to
Currency 8 bytes
922,337,203,685,477.5807
+/- 79,228,162,514,264,337,593,543,950,335
if no decimal is use +/-
Decimal 12 bytes
7.9228162514264337593543950335 (28
decimal places).
70
Nonnumeric Data Types
Length of
String(fixed length) 1 to 65,400 characters
string
String(variable Length + 10
0 to 2 billion characters
length) bytes
January 1, 100 to
Date 8 bytes
December 31, 9999
- Literals are values that you assign to data. In some cases, we need to
add a suffix behind a literal so that VB can handle the calculation more
accurately.
- For example, we can use num=1.3089# for a Double type data. Some
of the suffixes are displayed in Table below
71
Suffixes for Literals
& Long
! Single
# Double
@ Currency
memberName="Turban, John."
TelNumber="1800-900-888-777"
LastDay=#31-Dec-00#
ExpTime=#12:00 am#
Managing Variables
72
- In term of VB, variables are areas allocated by the computer memory
to hold data. Like the mail boxes, each variable must be given a name.
- To name a variable in Visual Basic, you have to follow a set of rules.
i. Variable Names
- The following are the rules when naming the variables in Visual Basic
Examples of valid and invalid variable names are displayed in Table below
My_Car My.Car
73
Declaring Variables Explicitly
Example
Dim password As String
Dim yourName As String
Dim firstnum As Integer
Dim secondnum As Integer
Dim total As Integer
74
Dim doDate As Date
Dim password As String, yourName As String, firstnum As Integer
For example,
75
Scope of Declaration
- Other than using the Dim keyword to declare the data, you can also
use other keywords to declare the data.
- Three other keywords are
i. private ,
ii. static and
iii. public.
76
- Public is the keyword that declares a global variable, which means it
can be used by all the procedures and modules of the whole program.
Constants
- Constants are different from variables in the sense that their values do
not change during the running of the program.
Declaring a Constant
Example
77
- In addtion, the variable a is to store the value of area in twip using the
formula area of circle=πr2. Besides that, the constant Pi represents π
which we fixed at 3.142. Finally, the variable area is to store the value
in cm by multiplying a with 0.001763889. (1 twip =0.001763889 cm)
The Code
Dim h, r, a, rad, area As Single
Const Pi As Single = 3.142
End Sub
78
The Output
Variable=Expression
79
- The variable can be a declared variable or a control property value.
- The expression could be a mathematical expression, a number, a
string, a Boolean value (true or false) and more.
- The following are some examples variable assignment:
firstNumber=100
secondNumber=firstNumber-99
userName="John Lyan"
userpass.Text = password
Label1.Visible = True
Command1.Visible = false
Label4.Caption = textbox1.Text
ThirdNumber = Val(usernum1.Text)
X = (3.14159 / 180) * A
- Operators are symbols that are used to manipulate inputs from users
and to generate results,
- We need to use various mathematical operators
80
- . In Visual Basic, except for + and -, the symbols for the operators are
different from normal mathematical operators, as shown in Table
below
Arithmetic Operators
^ Exponential 2^4=16
* Multiplication 4*3=12,
/ Division 12/4=3
"Visual"&"Basic"="Visual
+ or & String concatenation
Basic"
Example
Private Sub Command1_Click()
firstName = Text1.Text
secondName = Text2.Text
yourName = secondName +"" + firstName
Copyright © learnmalawi | All rights reserved
81
Label1.Caption = yourName
End Sub
Example
Dim number1, number2,number3 as Integer
Dim total, average as variant
Private sub Form_Click()
number1=val(Text1.Text)
number2=val(Text2.Text)
number3= val(Text3.Text)
Total=number1+number2+number3
Average=Total/5
Label1.Caption=Total
Label2.Caption=Average
End Sub
- In the above example , three variables are declared as integer and two
variables are declared as variant.
- Variant means the variable can hold any data type. The program
computes the total and average of the three numbers that are entered
into three text boxes.
82
Example : Easy Math
- This is a simple math drill program where the user enter two numbers
and calculate its sum. The program will tell him whether the answer is
right or wrong.
- To add some gist to the program, the user needs to enter the
password before he or she can proceed.
The Code
Dim password As String
Dim yourName As String
Dim firstnum As Integer
Dim secondnum As Integer
Dim total As Integer
Dim doDate As Date
83
Label1.Visible = False
Command1.Visible = False
Else
userpass.Text = ""
userpass.SetFocus
End If
End Sub
3.'
Private Sub Form_Load()
password = "liewxun"
End Sub
End Sub
84
The Output
85
- Basically, they resemble mathematical operators.
- Conditional operators are very powerful tools, they let the VB program
compare data values and then decide what action to take, whether to
execute a program or terminate the program and more.
- These operators are shown in Table below
Conditional Operators
Operator Meaning
= Equal to
Logical Operators
86
Logical Operators
Operator Description
- You can also compare strings with the operators. However, there are
certain rules to follow where upper case letters are less than lowercase
letters, and number are less than letters.
CONDITIONAL STATEMENTS
If conditions Then
VB expressions
Else
VB expressions
87
End If
Example
The Code
Private Sub OK_Click()
Dim username, password As String
username = "John123"
password = "qwertyupi#@"
88
End Sub
The Output
Example
<5000 0
Copyright © learnmalawi | All rights reserved
89
5000-9999 5
1000-14999 10
15000-19999 15
The Code
90
comm = 0
End If
LblComm.Caption = Format(comm, "$#,##0.00")
End Sub
The Output
- This is a guess a number game where the user key in a number and
see check whether the answer is correct.
- This program will provide a hint whether the number is too small or
too big.
- After a number of trial, the user should get the right answer.
- The program employ the If..Then..Else technique to check whether the
entry is correct.
91
The Code
'Guess a Number
Const realNumber = 99
Dim userNumber As Integer
userNumber = entry.Text
If userNumber > realNumber Then
entry.Text = ""
entry.SetFocus
Else
92
hint.Caption = "Congratulation, your number is correct"
End If
End Sub
IIf(x, y, z)
Example
Private Sub CmdNumeric_Click()
Dim x, y, a, b, ans As Double
x = InputBox("Enter a number")
y = InputBox("Enter another number")
a = Val(x)
Copyright © learnmalawi | All rights reserved
93
b = Val(y)
94
The Interface
- If you click test string and enter the first word long and the second
word short, the logical condition is true, hence the word long will be
displayed, as shown in Figure 7.5.
- If you click test numeric and enter the first number 200 and the
second number 40, the logical condition is false, hence the second
expression will be executed, which is 20x40=800, as shown below
Select Cases
95
control structure can handle conditions with multiple outcomes in an
easier manner than the If...Then...ElseIf control structure.
- The syntax of the Select Case control structure is shown below:
Case value2
Block of one or more VB Statements
Case Else
Block of one or more VB Statements
End Select
Example
Dim grade As String
Private Sub Compute_Click( )
grade=txtgrade.Text
Select Case grade
Case "A"
result.Caption="High Distinction"
Case "A-"
result.Caption="Distinction"
Case "B"
result.Caption="Credit"
Case "C"
result.Caption="Pass"
Case Else
result.Caption="Fail"
End Select
End Sub
96
Example
Dim mark As Single
Private Sub Compute_Click()
'Examination Marks
mark = mrk.Text
Select Case mark
Case Is >= 85
comment.Caption = "Excellence"
Case Is >= 70
comment.Caption = "Good"
Case Is >= 60
comment.Caption = "Above Average"
Case Is >= 50
comment.Caption = "Average"
Case Else
comment.Caption = "Need to work harder"
End Select
End Sub
Example
97
Case 70 to 84
comment.Caption = "Good"
Case Else
comment.Caption ="Excellence"
End Select
End Sub
The Code
Dim Secret_Number As Integer
Case Else
Beep
MsgBox ("Your number is correct, congratulation!")
End Select
End Sub
Copyright © learnmalawi | All rights reserved
98
Private Sub Form_Load()
Secret_Number = 1 + Int(6 * Rnd)
End Sub
Looping
- These are control structures that are used to write a Visual Basic
procedure that allows the program to run repeatedly until a condition
or a set of conditions is met
- Looping is a very useful feature of Visual Basic because it makes
repetitive works easier.
- There are three kinds of loops in Visual Basic,
i. Do...Loop ,
ii. For.......Next loop
iii. While.....Wend Loop
The Do Loop
a)
Do While condition
Block of one or more VB statements
Loop
b)
Do
Block of one or more VB statements
Copyright © learnmalawi | All rights reserved
99
Loop While condition
c)
Do Until condition
Block of one or more VB statements
Loop
d)
Do
Block of one or more VB statements
Loop Until condition
Example
Do while
counter <=1000
num.Text=counter
counter =counter+1
Loop
* The above example will keep on adding until counter > 1000
Do
counter=counter+1
Loop until counter>1000
Example
Dim sum, n as Integer
Private Sub Form_Activate()
List1.AddItem "n" & vbTab & "sum"
Copyright © learnmalawi | All rights reserved
100
Do
n=n+1
sum=sum+n-resize
List1.AddItem n & vbTab & sum
If n=100 Then
Exit Do
End If
Loop
End Sub
Explanation
Next
101
Example
Example
For counter=1000 to 5 step -5
counter=counter-10
If counter<50 then
Exit For
Else
Print "Keep Counting"
End If
Next
Example
Private Sub Form_Activate( )
For n=1 to 10
If n>6 then
Exit For
Else
Copyright © learnmalawi | All rights reserved
102
Print n
Enf If
Next
End Sub
- Sometimes the user might want to get out from the loop before the
whole repetitive process is executed, the command to use is Exit For.
To exit a For….Next Loop, you can place the Exit For statement within
the loop; and it is normally used together with the If…..Then…
statement.
While condition
Statements
Wend
The above loop means that while the condition is not met, the loop will go
on. The loop will end when the condition is met. Let’s examine the program
listed in example below
Example
Dim sum, n As Integer
Private Sub Form_Activate()
List1.AddItem "n" & vbTab & "sum"
While n <> 100
n=n+1
Sum = Sum + n
List1.AddItem n & vbTab & Sum
Copyright © learnmalawi | All rights reserved
103
Wend
End Sub
REFERENCES
104
Fishpool, B Information technology level 1: foundation diploma. Pearson
Company.
Gay, G Blades, R (2009). Oxford information technology for CSEC. New York:
Oxford University
Press.
Internet
105
Using spreadsheets
• Sorting data
• Using the filter function
• Charts and graphs
• Creating charts and graphs in a worksheet
o Formatting charts
o setting up a page to print
o selecting print area
o setting up printing margins
o setting header and footer
o setting up page orientation
o selecting titles to print
• importing files into a spreadsheet
• linking files
• Database
o Definition
o Types of databases,
▪ computerized,
▪ manual
• Database models,
• Database features,
• Benefits of databases
• Database management software (examples)
• Working with databases (create a database)
o creating tables, forms, queries, reports in a database
o setting primary and secondary keys in tables
o setting field properties and data types
o printing reports, forms, queries
o sorting tables or forms
o filtering tables or forms