0% found this document useful (0 votes)
9 views

Programming Fundamentals 1-By Malemba(0)

The document is an educational guide on using spreadsheets, particularly focusing on electronic spreadsheets like Microsoft Excel. It covers definitions, types, components, and the benefits and disadvantages of spreadsheets, along with practical applications and navigation techniques. The document also explains data entry, cell referencing, and provides practical activities for students to engage with the material.

Uploaded by

khulamepk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Programming Fundamentals 1-By Malemba(0)

The document is an educational guide on using spreadsheets, particularly focusing on electronic spreadsheets like Microsoft Excel. It covers definitions, types, components, and the benefits and disadvantages of spreadsheets, along with practical applications and navigation techniques. The document also explains data entry, cell referencing, and provides practical activities for students to engage with the material.

Uploaded by

khulamepk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 924

COMPUTER

STUDIES
SENIOR
SECONDARY
St. Patrick's Sec School
FORM 3 & 4

BY Mr. R. MALEMBA

R. MALEMBA S 1
T. PATRICK'S SEC SCHOOL
TOPIC 1: USING
SPREADSHEETS I

R. MALEMBA S 2
T. PATRICK'S SEC SCHOOL
INTRODUCTION
 Many problems in Mathematics, science and finance requires a
person to work with numbers and manipulate them using formulas.

 The simplest of doing this is to manually perform calculations using


calculator

 Today, several computer applications have been developed to


analyze numerical data

 One of such application is electronic spreadsheets

R. MALEMBA S 3
T. PATRICK'S SEC SCHOOL
DEFINITION AND TYPES
OF SPREADSHEETS
In financial accounting, spreadsheet is an
accounting ledger book in which data is organized
into rows and columns.

R. MALEMBA S 4
T. PATRICK'S SEC SCHOOL
TYPES OF
SPREADSHEETS
 There are two types of spreadsheet
namely:

i. Manual or traditional spreadsheet

ii. Electronic spreadsheet

R. MALEMBA S 5
T. PATRICK'S SEC SCHOOL
TRADITIONAL
SPREADSHEETS
 A traditional spreadsheet is made up of sheet of papers divided into
rows and columns in which data is entered manually.

 A manual worksheet is a ledger sheet within which values can be


entered and arithmetic computations made manually on them

 Manual spreadsheets have been used:

i. To organize data into tabular format

ii. In financial and accounting offices where figures are entered for
easier organization and arithmetic computation

iii. In stock management where stock values are entered in an


organized way.

R. MALEMBA S 6
T. PATRICK'S SEC SCHOOL
ELECTRONIC
SPREADSHEET
 An electronic spreadsheet is an
application software made up of rows
and columns, and is used to organize,
calculate and analyse numerical data.
 The rows and columns are similar to the
ones of a manual spreadsheet.

R. MALEMBA S 7
T. PATRICK'S SEC SCHOOL
EXAMPLES OF ELECTRONIC
SPREADSHEETS
i. Microsoft Excel

ii. OpenOffice Calc

iii. Lotus 1-2-3

iv. Corel Quattro Pro

R. MALEMBA S 8
T. PATRICK'S SEC SCHOOL
COMPONENTS OF
SPREADSHEETS
i. Worksheets

ii.Database

iii.Graphs

R. MALEMBA S 9
T. PATRICK'S SEC SCHOOL
Worksheet

 A worksheet is a work area that is made


up of rows and columns where data is
entered
 Each row is labelled with numbers (1,2,3,
…) while columns are labelled with
letters (A,B,C,…) as shown below:

R. MALEMBA S 10
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 11
T. PATRICK'S SEC SCHOOL
 A row is a horizontal arrangement of cells while
a column is vertical arrangement of cells.

 The intersection between a row and column is


called a cell.

 Each cell is referred using the column label


followed by the row label.

 The active cell in the Excel window below is


C3 R. MALEMBA S 12
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 13
T. PATRICK'S SEC SCHOOL
DATABASE
 A spreadsheet database is a collection of related data items or
records.

 A record is made up of distinct data elements called fields that


together form an entity.

 An entity is something of interest such as a person, a place or


item.

 For example, a student is an entity of which can create a record


containing first name, last name, gender and date of birth
fields.

 Assuming that the worksheet holds these details for many


R. MALEMBA S 14
T. PATRICK'S SEC SCHOOL
GRAPHS
 A graph is a pictorial representation of the relationship
between two or more values on a worksheet.
 In most spreadsheet, graphs are referred to as charts.

 A chart enables the user to present complex values from a


worksheet in a simple, easy to understand format.
 Examples of charts include: pie chart, line carts, column
chart and bar chart

R. MALEMBA S 15
T. PATRICK'S SEC SCHOOL
USES OF A
SPREADSHEET
 Some of the uses of a spreadsheet include

i. Arranging information: since worksheets are made up of rows and columns,


data can be entered and organized automatically into printable tabular layout

ii. Preparation of budget: a spreadsheet is used to prepare budgets and other


accounting documents like cash flows and expenditure statements

iii. Interest calculation: spreadsheet is used to compute both simple and


compound interest

iv. Statistical analysis: spreadsheet has tools that enable scientists and other
users to perform simple and complex statistical analysis. Simple analysis
includes: computation of mean, mode, deviation, sum and product. Complex
analysis includes computation of variance, cumulative distribution, regression
analysis etc.

R. MALEMBA S 16
T. PATRICK'S SEC SCHOOL
BENEFITS OF ELECTRONIC
SPREADSHEET
 Electronic spreadsheet offers various benefits over manual spreadsheets. These
include:

i. Electronic spreadsheets enable computations to be done fast, accurate and efficiently

ii. Electronic spreadsheet offers a large virtual sheet for data entry and manipulation. A
manual spreadsheet has only 30 columns and 51 rows where as electronic spreadsheet
has at least 255 columns and 255 rows.

iii. It is easy to enter data in the worksheet because most spreadsheet provide
autocomplete and autocorrect features.

iv. Electronic spreadsheet utilizes the storage space on storage media to save and retrieve
documents.

R. MALEMBA S 17
T. PATRICK'S SEC SCHOOL
v. Electronic spreadsheets enable the user to produce neat work
because all the work is edited on the screen and clean copy is
produced.

vi. Electronic spreadsheets have better editing and formatting


features.

vii.Electronic spreadsheets have inbuilt formula called function


that enable the user to quickly analyse numeric data.

viii.Electronic spreadsheets automatically adjust the result of a


formula if the value in a worksheet are changed. This is called
automatic recalculation.
R. MALEMBA S 18
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
ELECTRONIC SPREADSHEETS
i. Startup cost including computer and software
purchase may be high

ii. Learning how to use electronic spreadsheet


requires considerable effort and is mostly at a cost

iii.Electronic spreadsheet files require to be


protected against unauthorized access and
malware like viruses.

R. MALEMBA S 19
T. PATRICK'S SEC SCHOOL
GETTING STARTED WITH
MICROSOFT EXCEL
 Microsoft Excel 2013 simply referred to as Excel is a member of Microsoft Office
suite.

 Earlier versions of Excel include Excel 97, Excel 2000, Excel XP/2002, Excel 2007 and
Excel 2010.

 There are a number of ways used to start Excel. To launch Excel 2013 from the Start
menu, proceed as follows:

i. Click on the Start menu and point to Programs/All Programs.

ii. Point to Microsoft Office, then click Excel 2013. Excel application windows
below opens.
R. MALEMBA S 20
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 21
T. PATRICK'S SEC SCHOOL
FEATURE OF EXCEL SPREADSHEET
APPLICATION WINDOW

i. Rows: a row is a horizontal arrangement of cells in a worksheet. It is


labelled using numbers 1,2,3….. in the worksheet

ii. Column: a column is vertical arrangement of cells in the worksheet. It


is labelled using letters A, B, C …… in the worksheet

iii. A cell: a cell is intersection between a column and a row. A cell


pointer indicates the current active cell

iv. Worksheet: A worksheet is the work area made up of rows and


columns where data is entered

R. MALEMBA S 22
T. PATRICK'S SEC SCHOOL
v. Workbook: A workbook is a spreadsheet file that consists of
one or more related worksheets.

vi. Labels: columns and rows have labels. Column labels are
letters A-Z, AA-AZ, row labels are numbers 1,2,3 ….. in the
worksheet

vii. Cell address: Each cell has an address. The address is


column label followed by row label e.g. A1.

viii. Name box: It displays the address of the current cell


R. MALEMBA S 23
T. PATRICK'S SEC SCHOOL
ix. File tab: Has common commands like New, Open, Save as, Print,
Close etc.

x. Command ribbon: Each menu has a set of commands like Home


ribbon has commands.

xi. Formula bar: Is an input box where a cell entry or a formula is


displayed before it is inserted into the active cell.

xii. Worksheet tabs: worksheet tabs are located at the bottom of a


spreadsheet. They are labelled sheet1, sheet2 ……but can be
renamed by right clicking the sheet and click rename
R. MALEMBA S 24
T. PATRICK'S SEC SCHOOL
SPREADSHEET DATA
ENTRIES
 Data entered into a spreadsheet can be classified into four categories namely:

i. Label

ii. Value

iii. Formulae

iv. Functions

R. MALEMBA S 25
T. PATRICK'S SEC SCHOOL
LABEL
 A label is a text or alphanumeric characters entered in a
cell.

 By default, a label is aligned to the left of the cell and


cannot be computed mathematically

 A label is usually used to describe a row or column heading

 Sometimes, numbers can be formatted so that they can be


used as a label by adding an apostrophe before the
number e.g. ‘1990.
R. MALEMBA S 26
T. PATRICK'S SEC SCHOOL
VALUES
 A value is a numerical number that can
be manipulated mathematically

 By default, values are aligned to the


right of the cell.

R. MALEMBA S 27
T. PATRICK'S SEC SCHOOL
FORMULA
 A formula a mathematical expression used to
perform calculations

 A formula starts with = sign followed by cell


addresses and operator eg =B3 + D4, add
contents of B3 and D4 and return the sum.

R. MALEMBA S 28
T. PATRICK'S SEC SCHOOL
FUNCTION

 These are predefined or inbuilt formula

 Example of function is =SUM (B3:D4)


which add contents of cells B3 to D4

R. MALEMBA S 29
T. PATRICK'S SEC SCHOOL
NAVIGATING THE
WORKSHEET
 The cell pointer in the worksheet shows the position of the current cell

 The process of moving the cell pointer around the worksheet is called
navigating the worksheet and can be achieved in several ways:

i. Arrow keys let the user move one cell to the next direction of the arrow key

ii. Tab key moves the cell pointer on a cell to the right

iii. You can directly move a particular cell by clicking the desired cell.

iv. Ctrl + Home keys move the cell pointer to the cell A1

R. MALEMBA S 30
T. PATRICK'S SEC SCHOOL
USING ARROW KEYS ON
THE KEYBOARD
 The up-arrow key moves the cell pointer one row up

 The down arrow key moves the cell pointer one row
down

 The right arrow key moves the cell pointer one


column to the right

 The left arrow key moves the cell pointer one


column to the left

R. MALEMBA S 31
T. PATRICK'S SEC SCHOOL
USING THE TAB KEY

 Pressing the tab key moves the cell


pointer one column to the right

 Pressing shift + tab moves the cell


pointer one column to the left

R. MALEMBA S 32
T. PATRICK'S SEC SCHOOL
USING THE MOUSE

 Clicking a cell moves a cell pointer to the


cell clicked

R. MALEMBA S 33
T. PATRICK'S SEC SCHOOL
USING SCROLL BARS

 The vertical scroll bar moves the worksheet up

and down while the horizontal one moves it to the


left and right

R. MALEMBA S 34
T. PATRICK'S SEC SCHOOL
PAGE DOWN and PAGE
UP
• PAGE DOWN and PAGE UP keys move
the worksheet one page down and one
page up respectively

R. MALEMBA S 35
T. PATRICK'S SEC SCHOOL
BLOCK OPERATIONS

 Performing calculations on a worksheet data


involves block operations

 A block of selected cells in a worksheet is


referred to as a range

 A range is specified by the address of its top


left and bottom right cells or using a name.

R. MALEMBA S 36
T. PATRICK'S SEC SCHOOL
CELL REFERENCING
 Using cell addresses also called referencing enables Microsoft
Excel calculations accurate and automatically recalculates
results of a formula in case the value in the cell change. This is
referred to as automatic recalculation.

 There are three types of cell referencing used when creating


formula and manipulating cell contents and these are:

1. RELATIVE REFERENCING

2. ABSOLUTE REFERENCING

3. MIXED REFERENCING

R. MALEMBA S 37
T. PATRICK'S SEC SCHOOL
RELATIVE REFERENCING
 A relative referencing is one that changes depending
on its position of reference in the worksheet.

 When you copy the cell that contents relative


reference says A3 the reference adjusts to reflect
the new location

 For example, if =A1+B1 is in cell C1 and is copied


to C2, the formula reference change to =A2+B2

R. MALEMBA S 38
T. PATRICK'S SEC SCHOOL
ABSOLUTE
REFERENCING
 In absolute referencing, the reference is made
to a specific address and does not change even
if the formula is copied to another cell.

 In excel, absolute referencing is made by


placing dollar sign before reference ($A$2)

R. MALEMBA S 39
T. PATRICK'S SEC SCHOOL
MIXED REFERENCE

 This is a combination of relative and


absolute referencing on a specific cell
address to make the row or column
relative or absolute
 For example, in A$3, the column is
relative while the row is absolute

R. MALEMBA S 40
T. PATRICK'S SEC SCHOOL
PRACTICAL ACTIVITY

R. MALEMBA S 41
T. PATRICK'S SEC SCHOOL
TOTAL
NAME TEST 1 TEST 2 TEST 3 AVERAGE GRADE
MARKS

Sophia 59 65 67

Beth 62 50 23

Paula 46 70 90

Aisha 85 68 45

Grace 20 49 12

Sarah 68 23 61

R. MALEMBA S 42
T. PATRICK'S SEC SCHOOL
CREATING A WORKBOOK
AND WORKSHEET
 Creating a workbook involves starting the spreadsheet program and
entering data in the cells of the current worksheet.

 However, the user can choose to create a worksheet either using the
general format or from a preformatted worksheet called a template.

R. MALEMBA S 43
T. PATRICK'S SEC SCHOOL
USING A BLANK
WORKSHEET
 When a spreadsheet application is launched, it presents
the user with a new blank template.

 If you wish to create another workbook while the


application is still running:

i. Click the File tab, and select New from the drop-down
menu

ii. In the New Workbook dialog box, double click Blank


Workbook icon.

R. MALEMBA S 44
T. PATRICK'S SEC SCHOOL
USING A PREDEFINED
TEMPLATE
 When Excel is installed, some of the templates are installed.

 However, some of these templates require online access.

 To create a workbook based on a predefined template:

i. Click the File tab, and select New

ii. In the New Workbook dialog box under Templates pane,


click the Installed Templates.

iii.Select a template and replace the general data in the


templates with your own.

R. MALEMBA S 45
T. PATRICK'S SEC SCHOOL
SAVING A WORKBOOK
 The procedure for saving a workbook is similar to that of saving a
Word document.

i. Click the File tab the select Save As command. The Save As
dialog box is displayed

ii. Select the location in which your workbook will be saved in the
Save in box then type a unique name for the workbook in the
File name box. Make sure that the option Microsoft Excel
Workbook is selected under the save as type box. Excel saves
the workbook with .xlsx extension.

iii. Click Save button to save and close the dialog box.
R. MALEMBA S 46
T. PATRICK'S SEC SCHOOL
RETRIEVING A
WORKBOOK
 To retrieve an existing workbook, use the procedure below:

i. On the File tab, click Open from the drop-down menu

ii. Select the location, drive or folder where the workbook


was saved

iii.Double click the icon of the workbook you wish to open

R. MALEMBA S 47
T. PATRICK'S SEC SCHOOL
CLOSING A WORKBOOK
AND EXITING EXCEL
 Closing a workbook is the process of closing the current
spreadsheet workbook without exiting the spreadsheet application

 On the other hand, exiting Excel is the process of closing all open
workbooks and exiting the spreadsheet application.

 To close a workbook and exit Excel, proceed as follows:

i. On the File tab, click Close. Alternatively press Ctrl + F4

ii. To exit from Excel,

iii. On the File menu, click Exit. Alternatively press Alt + F4 on


the keyboard.

R. MALEMBA S 48
T. PATRICK'S SEC SCHOOL
EDITING WORKSHEET
AND WORKBOOK
 Editing refers to making necessary
modification to a worksheet that has already
been created.

 It involves deleting entries, copying, moving,


find and replace as well as spell checking

R. MALEMBA S 49
T. PATRICK'S SEC SCHOOL
EDITING CELL ENTRIES
 There are two methods of editing a cell entry:

1.Using the formula bar: click the cell to


display its content and make the changes in
the formula bar.

2.Double clicking: this places the insertion


pointer in the cell and then type or modify
the cell.

R. MALEMBA S 50
T. PATRICK'S SEC SCHOOL
DELETING A
WORKSHEET RANGE
 To delete worksheet range, select the
cells and click Delete

R. MALEMBA S 51
T. PATRICK'S SEC SCHOOL
COPYING AND MOVING
CELL CONTENTS
i. Select the cells to be copied or moved, right-
click and click Copy (to copy) or Cut (to
move).

ii.Right-click where you want to put the


contents and click Paste
 NOTE: Use shortcut keys Ctrl + C to copy,
Ctrl + X to cut and Ctrl + V to paste
R. MALEMBA S 52
T. PATRICK'S SEC SCHOOL
INSERTING AND DELETING
ROWS/COLUMNS
 To insert a new column/row:

i. Position the pointer where the new row or column


will appear

ii. On the Insert menu, click Rows or Columns

 To delete a column or row

i. Select the column or row to be deleted

ii. On the Edit menu click Delete


R. MALEMBA S 53
T. PATRICK'S SEC SCHOOL
INSERTING AND
DELETING WORKSHEETS
 To insert more worksheets, do the following:

i. On the Insert menu, click Worksheet. A new worksheet is


added into your workbook

 To delete a worksheet:

i. Click the Worksheet tab

ii. On the Edit menu, click Delete Sheet

R. MALEMBA S 54
T. PATRICK'S SEC SCHOOL
FIND AND REPLACE
 To search and replace a specified range:

i. On Edit menu, click Find, type the text to search for

ii. To replace, choose Replace from the dialog box

iii. In the Find What box, type the word or phrase to find

iv. Click the Replace tab and in the Replace With, type
the word or phrase to replace the found word or phrase

R. MALEMBA S 55
T. PATRICK'S SEC SCHOOL
CORRECTING SPELLING
MISTAKES
i. Specify the worksheet range you want
to spell check

ii. On the Review menu, click Spelling or


press F7

iii.On the spelling dialog box, replace or


ignore the misspelt words
R. MALEMBA S 56
T. PATRICK'S SEC SCHOOL
FORMATTING
WORKSHEETS
 Worksheet formatting refers to enhancing the appearance of the worksheet to
make it more attractive and appealing to the reader

 It essentially consists of resizing column width and row height, changing text
colour, typeface (font), size, style and alignment

R. MALEMBA S 57
T. PATRICK'S SEC SCHOOL
FORMATTING ROWS AND
COLUMNS
 Sometimes, the information entered in the spreadsheet may not fit neatly in the
cell set with the default height and width

 It therefore becomes necessary to adjust the height of a row or width of a


column

R. MALEMBA S 58
T. PATRICK'S SEC SCHOOL
To change column width:
i. Move the mouse pointer to the right-hand side line that separates the column
headers for instance, the line between A and B

ii. Notice that the mouse pointer changes from a cross to a double arrow

iii. Click the mouse button and hold it down so that you can now resize the width
of the column by dragging it to the size you wish. After dragging to the required
point release the mouse button. The column will have a new size

R. MALEMBA S 59
T. PATRICK'S SEC SCHOOL
To resize a column using the
Format menu
i. On Format menu, point to Column, then click Width

ii. Type a width in the column width dialog box, and then click OK button to
apply

R. MALEMBA S 60
T. PATRICK'S SEC SCHOOL
To change row height
i. Point to the line that separates two row numbers. E.g., the line between 1 and
2. The mouse pointer becomes a double arrow

ii. Drag the line until the height of the row is as required, then stop and release the
mouse button

R. MALEMBA S 61
T. PATRICK'S SEC SCHOOL
FORMATTING CELLS AND
THEIR CONTENTS
i. To format a single cell, make it the current cell then click Format menu option
and select the cells command

ii. In the format cells dialog box, make the formatting specifications that you wish,
then click OK button to apply.

iii. If it is a range of cells, they must be highlighted first before formatting them as
a block of cells

R. MALEMBA S 62
T. PATRICK'S SEC SCHOOL
FORMATTING LABELS
i. Highlight the cells that have the text to be formatted

ii. Click Format menu, then Cells command

iii. Select Font tab by clicking it

iv. Select the font type e.g. Times New Roman. Other font formatting features like
style, size, underline and colour are available and can be selected

v. Click OK button to apply

 NB: Alternatively, use the formatting toolbar to accomplish all your text
formatting needs.
R. MALEMBA S 63
T. PATRICK'S SEC SCHOOL
FORMATTING NUMBERS
i. Highlight the cells that have the numbers to be formatted

ii. Click Format menu, then Cells command

iii. On the dialog box, select the Number tab

iv. You can now choose number formats as explained below

R. MALEMBA S 64
T. PATRICK'S SEC SCHOOL
Table below shows different
table formats:
NUMBER MEANING
General Cells have no specific number format
Number Used for general display of numbers
Currency For displaying monetary values e.g. $100, MK12
Accounting Lines up the currency symbols and decimal points
Date Displays date in specified format
Time Displays time in specified format
Percentage Multiply the value in the cell with 100 and display it as a
percentage %
Text Format text to be treated as a text even when numbers are
entered
Custom For number format not predefined in Microsoft Excel
R. MALEMBA S 65
T. PATRICK'S SEC SCHOOL
FORMATTING BORDERS
 You may need to put a printable border around the worksheet or range of cells
to make it more appealing.

 To put a border, proceed as follows:

i. Highlight the range you wish to insert borders. Click Format Cell
command to display the dialog box

ii. Click the Borders tab to specify border option

iii. Click OK button

R. MALEMBA S 66
T. PATRICK'S SEC SCHOOL
FORMATTING ROWS AND
COLUMNS
 Sometimes, data entered in a worksheet may not fit in a cell

 Therefore, it becomes necessary to adjust the height of a


row or the width of a column.

 The default width of a column in Microsoft excel is 8.11


but can be adjusted to any size between 0 and 255.

R. MALEMBA S 67
T. PATRICK'S SEC SCHOOL
This can be done in two ways:

i. Move the pointer to the top heading until the


mouse pointer turns a cross, then click and drag to
the required size.

ii. Move the mouse pointer to the row headings of


column headings and right click the click row
width or column height.

R. MALEMBA S 68
T. PATRICK'S SEC SCHOOL
GLOBAL WORKSHEET
FORMATTING
 The word global in this context refers to the entire worksheet. To format the
entire worksheet, select the whole worksheet using these two methods:

i. Clicking the triangular symbol at the intersection of column A and row 1

ii. Pressing Ctrl + A on the keyboard

 Once the entire worksheet is selected, use the Format Cells dialog box to
format the content

R. MALEMBA S 69
T. PATRICK'S SEC SCHOOL
USING AUTOFORMAT
 It allows the user to apply one of the 16 sets of formatting to a selected range on
the worksheet. This quickly creates tables that are easy to read and that are
attractive to look at.

 Select a range to make it attractive.

i. Select a range e.g. B1:G7 to make it active

ii. Click Format then select the Autoformat command on the menu that appears.
Select a format from the autoformat dialog box

iii. Click Ok button to apply the format to the selected range.

R. MALEMBA S 70
T. PATRICK'S SEC SCHOOL
FORMATTING ENTIRE
WORKBOOK
 Sometimes, it is necessary to apply the same format to the
entire workbook. To achieve this, you must select all the
worksheets then apply the desired options

 Whatever is applied on the first worksheet will be reflected


on all the other worksheets in the workbook.

R. MALEMBA S 71
T. PATRICK'S SEC SCHOOL
To format entire workbook:

i. Hold the CTRL key and click the Worksheet tabs to select
them

ii. Once all worksheets are selected, apply desired format to the
first worksheet

iii. Save the data and then navigate through the worksheet by
clicking the sheet tabs.
 Notice that the format applied to the first worksheet are
reflected on the entire workbook.
R. MALEMBA S 72
T. PATRICK'S SEC SCHOOL
PROTECTING WORKBOOK
AND WORKSHEETS
 There are several techniques for protecting workbook in excel and
these are

1. Making a workbook read only: This allows a user to just view the
document but not edit, copy or print the workbook

2. Encrypt using password

3. Restricting access by adding digital signature

R. MALEMBA S 73
T. PATRICK'S SEC SCHOOL
 To perform all these three:

i. Click File tab, then Info

ii. Click Protect Workbook

iii. Select Mark as read to make the workbook


read only, click encrypt with password to
put a password or click Add digital
signature to restrict access

R. MALEMBA S 74
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 75
T. PATRICK'S SEC SCHOOL
KEYBOARD SHORTCUT

 The following are some of the keyboard


shortcut used in Excel:

R. MALEMBA S 76
T. PATRICK'S SEC SCHOOL
KEYBOARD KEY COMBINATION FUNCTION
1 CTRL + O Open file
2 CTRL + N New file
3 CTRL + S Save file
4 Esc Exit current dialog
5 CTLRL + X Cut
6 CTRL + C Copy
7 CTRL + B Bold
8 CTRL + I Italicize
9 CTRL + U Underline
10 CTRL + T Insert table
11 CTRL + F4 Close current file
12 ALT + F4 Close excel
13 CTRL + Z Undo
14 ALT + Y Redo
15 CTRL + P Print
16 F4 Repeat last action
17 F1 Open online help documentation
18 CRL + F1 Hide/unhide commands ribbon
19 Shift + Arrow Highlights cells
20 CTRL + Spacebar Select current column

R. MALEMBA S 77
T. PATRICK'S SEC SCHOOL
FREEZING AND
UNFREEZING PANES
 When working with large document that does not fit on
the screen it requires scrolling down so that the column
and row headings are seen.

 Therefore, to prevent scrolling, you need to freeze or lock


the first row or column from scrolling.

 The main reason for freezing the pane is to make certain


column or row that contains headings to be seen when
scrolling on large document.

R. MALEMBA S 78
T. PATRICK'S SEC SCHOOL
 To freeze pane, proceed as follows:

i. Move the cell pointer into the cell(s) you want to freeze

ii. On the View ribbon in the Window group, click Freeze


Pane.

iii. Scroll horizontally and vertically to view other parts of


the worksheet

 To unfreeze, click Unfreeze Pane from the view ribbon


in freeze pane

R. MALEMBA S 79
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 80
T. PATRICK'S SEC SCHOOL
HIDE/UNHIDE COLUMNS
OR ROWS
 To hide or unhide column or row

i. Select the column or rows that you want to


hide

ii. On the Home ribbon click Format in the


cells group

iii. Select the command to hide or unhide


rows or columns
R. MALEMBA S 81
T. PATRICK'S SEC SCHOOL
WORKING WITH FORMULAS
AND FUNCTIONS
 A formula is a mathematical expression used to
perform calculation while a function is predefined
formula.

 In excel, a formula or function starts with an = sign

 Performing calculations on worksheet data involves


selecting a range of cells or worksheet table.

 A range of cells is specified by name of address of its


top left and bottom right cells.
R. MALEMBA S 82
T. PATRICK'S SEC SCHOOL
 To select a range of contiguous cells

i. Click the top left cell of the range to


be selected

ii. Hold down the Shift key, and then click


the bottom right cell of the range. The
range will be highlighted.

R. MALEMBA S 83
T. PATRICK'S SEC SCHOOL
 To select a range of non-contiguous
cells

i. Click the top left cell of the range to be


selected

ii. Hold the Ctrl key, and then click


individual cells, columns or rows to be
selected
R. MALEMBA S 84
T. PATRICK'S SEC SCHOOL
 To create a named range of cells

i. Select the range to be named

ii.Click inside the name box, replace


the cell address by typing a name for
the range and then press Enter key
to apply.
R. MALEMBA S 85
T. PATRICK'S SEC SCHOOL
CREATING FORMULA

 The three elements that make up a


user-define formula are:

1. = sign

2. Operand

3. Operator

R. MALEMBA S 86
T. PATRICK'S SEC SCHOOL
TYPES OF OPERATORS
There are two types of operators:
i. Arithmetic operators
ii. Relational operators

R. MALEMBA S 87
T. PATRICK'S SEC SCHOOL
1. ARITHMETIC
OPERATOR
 These include additional, subtraction, division and
multiplication

 Arithmetic operators mostly follow precedence rule


similar to mathematical concept of BODMAS.

 This means that whatever is in parenthesis is


evaluated first. Multiplication and division are
evaluated from left to right while addition and
subtraction are evaluated last.
R. MALEMBA S 88
T. PATRICK'S SEC SCHOOL
SYMBOL DESCRIPTION EXAMPLE
/ Division =A2/b2
* Multiplication =a2*b2
+ Addition =a2+b2
- Subtraction =a2-b2

R. MALEMBA S 89
T. PATRICK'S SEC SCHOOL
2. RELATIONAL
OPERATORS
 A relational operator returns either
true of false depending on the absolute
value of the operand being evaluated

 Used to compare data

R. MALEMBA S 90
T. PATRICK'S SEC SCHOOL
SYMBOL DESCRIPTION EXAMPLE

= Equal to =A2=B2

> Greater than =A2>B2

< Less than =A2<B2

<> Not equal to =A2<>B2

<= Less than or equal to =A2<=B2

>= Greater than or equal to =A2>=B2

R. MALEMBA S 91
T. PATRICK'S SEC SCHOOL
OPERATOR PRECEDENCE
 If several operators are used in a formula, Microsoft Excel
performs the operations in order shown in the table
below

 If the formula has operators of the same precedence like


multiplication and division, the expression is evaluated
from left to right.

 Enclosing part of the parenthesis alters the order of


operation by making that part to be evaluated for.

R. MALEMBA S 92
T. PATRICK'S SEC SCHOOL
OPERATORS NAME PRECEDENCE

1. – Negation as in -1 1
2. % Percent 2
3. ˄ Exponential 3
4. * and / Multiplication and division 4
5. + and – Addition and subtraction 5
6. =,<>,>,<, Relational 6
<=,>=

R. MALEMBA S 93
T. PATRICK'S SEC SCHOOL
CREATING USER-
DEFINED FORMULAE
 A user defined formula is created by the user to
manipulate numeric data in the worksheet.

 First click the cell in which you wish to get the


results of the formula then type the formula.

R. MALEMBA S 94
T. PATRICK'S SEC SCHOOL
 Examples are:

1. =C2 + D4 add the contents of cells C2 and D2

2. =B4 * 0.2 displays 20% of the value in cell B4

3. =F5*1.2 Increases the value in cell F5 by 20%

4. =(G6/4)*5+6*(3-1) Will be evaluated using precedence rule

5. =C2-D2 Will subtract contents in D2 from contents in


C2

6. =C2/D2 Will divide contents in C2 by contents in D2

7. =C2*D2 Will multiply contents in C2 by contents in D2

R. MALEMBA S 95
T. PATRICK'S SEC SCHOOL
FUNCTIONS

1. Maths & Trig


2. Statistical
3. Logical
4. Date and Time

R. MALEMBA S 96
T. PATRICK'S SEC SCHOOL
LOGICAL FUNCTIONS
 Logical functions return true or false from an expression.

 Examples of logical functions are

i. IF

ii. COUNTIF

iii. AND

iv. OR

v. NOT

vi. SUMTIF
R. MALEMBA S 97
T. PATRICK'S SEC SCHOOL
1. IF()
 IF(): return a value or a label if a condition you specify
evaluate to TRUE and another if it evaluates to FALSE

 e.g. If C5 holds mean score and display PASS if


the mean is greater than 50 and FAIL if the mean
is less than 50 or FAIL if otherwise then we can
use =IF(C5>50,”PASS”,IF(C5<50,”FAIL”))

OR

=IF(C5>50,”PASS”,”FAIL”)

R. MALEMBA S 98
T. PATRICK'S SEC SCHOOL
2. COUNTIF()
COUNTIF(): counts the
number of cells within a range
that satisfies a certain criteria.
For example
=COUNTIF(A1:D1,”>50”)
return the number of cells in the
range from A1 to D1 that have
values greater than 50
R. MALEMBA S 99
T. PATRICK'S SEC SCHOOL
3. SUMIF()

SUMIF(): calculate the sum of values in a


range of cells that satisfy a certain criteria.
FOR EXAMPLE =SUM(A1:D1,”<20”) will
add values within the range of cells from
A1 to D1 that have values less than 20

R. MALEMBA S 100
T. PATRICK'S SEC SCHOOL
4. AND()

AND(): Return to TRUE if both expression


in comma separated family evaluate to
TRUE
e.g, AND(1+2=3, 4+6=10) return TRUE

R. MALEMBA S 101
T. PATRICK'S SEC SCHOOL
5. OR()

OR(): return TRUE if one of the


expression returns to true
e.g. OR(3-1=2, 4+2=5) will return to
TRUE

R. MALEMBA S 102
T. PATRICK'S SEC SCHOOL
6. NOT()
NOT(): this is a unary operator the
reverses the value of a Boolean
expression from true to false and vice
versa.
For example =NOT(2+2=1) will return
TRUE

R. MALEMBA S 103
T. PATRICK'S SEC SCHOOL
NEXT LESSON!!!

ASSESSMENT 1

SOFTWARE INSTALLATION

R. MALEMBA S 104
T. PATRICK'S SEC SCHOOL
THE END !!!!
R. MALEMBA S 105
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 106
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 107
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 108
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 109
T. PATRICK'S SEC SCHOOL
SPREADSHEETS II
Pre-knowledge
Worksheet is made up of rows, columns, labels, cells
and the formula bar among other features
• In this unit, you will learn how to enter data in the
cells, format the data and worksheet, perform
arithmetic operations on data, create visual objects
like graphs and charts and print a worksheet

R. MALEMBA S 110
T. PATRICK'S SEC SCHOOL
CELL ENTRIES
• Spreadsheets accept various types of cell entries
like labels (text), numbers (values), formulae and
functions

R. MALEMBA S 111
T. PATRICK'S SEC SCHOOL
FORMULAS
A formula is a user defined mathematical expression
which returns a value in a cell.
• All excel formulae start with an equal sign (=)
• To insert a formula in a cell:
• Click the cell where you want to enter the formula
i. Type the formula. For example, the formula = B6
+ E5 adds the contents of cells B6 and E5 and
returns the sum value on the current cell

R. MALEMBA S 112
T. PATRICK'S SEC SCHOOL
FUNCTIONS
A function is an inbuilt formula which is predefined
and returns a value in a cell when it is provided with
the correct arguments
Functions have names like SUM, MAX and STDEV
• To insert a function in a cell,
• Click the cell where you wish to enter the formula
i. Click the function button on the formula bar and
insert a function. The function must have a cell
range argument like =sum (B4:E4)

R. MALEMBA S 113
T. PATRICK'S SEC SCHOOL
NAVIGATING THE
WORKSHEET
The cell pointer in the worksheet shows the position
of the current cell
• The process of moving the cell pointer around the
worksheet is called navigating the worksheet and
can be achieved in several ways

R. MALEMBA S 114
T. PATRICK'S SEC SCHOOL
Using arrow keys on the keyboard

The up arrow key moves the cell pointer one row up


The down arrow key moves the cell pointer one row
down
The right arrow key moves the cell pointer one
column to the right
i. The left arrow key moves the cell pointer one
column to the left

R. MALEMBA S 115
T. PATRICK'S SEC SCHOOL
Using the tab key
Pressing the tab key moves the cell pointer one
column to the right
i. Pressing shift + tab moves the cell pointer one
column to the left

R. MALEMBA S 116
T. PATRICK'S SEC SCHOOL
Using the mouse
i. Clicking a cell moves a cell pointer to the cell
clicked

R. MALEMBA S 117
T. PATRICK'S SEC SCHOOL
Using scroll bars
i. The vertical scroll bar moves the worksheet up
and down while the horizontal one moves it to
the left and right

R. MALEMBA S 118
T. PATRICK'S SEC SCHOOL
• Page down and page up keys move the worksheet
one page down and one page up respectively

R. MALEMBA S 119
T. PATRICK'S SEC SCHOOL
BLOCK OPERATIONS
Performing calculations on a worksheet data involves
block operations
A block of selected cells in a worksheet is referred to
as a range
• A range is specified by the address of its top left
and bottom right cells or using a name.

R. MALEMBA S 120
T. PATRICK'S SEC SCHOOL
To select a range of
continuous cells
Click the top left cell of the range to be selected
Hold down the shift key
i. Click the bottom right cell of the range; the range
will be highlighted

R. MALEMBA S 121
T. PATRICK'S SEC SCHOOL
To select a range of non-
continuous cells
Click the top left cell of the range to be selected
Hold down the Ctrl key
i. Click the bottom right cell of the range. Ctrl
selects individually clicked rows, columns or cells

R. MALEMBA S 122
T. PATRICK'S SEC SCHOOL
To create a named range
Select the range to be named
Click inside the name box. Delete the cell reference
and type a name for the range
i. Press Enter key to apply

R. MALEMBA S 123
T. PATRICK'S SEC SCHOOL
ARITHMETIC OPERATORS
Arithmetic operators mostly follow the rule similar to
mathematical concept of BODMAS.
This means that whatever is in the parenthesis is
evaluated first.
• Multiplication and division are evaluated from left
to right while addition and subtraction are
evaluated last

R. MALEMBA S 124
T. PATRICK'S SEC SCHOOL
Summary of operators
used to create formula

SYMBOL DESCRIPTION EXAMPLE

/ Division =A2/B2

* Multiplication =A2*B2

+ Addition =A2+B2

- Subtraction =B2-A2

R. MALEMBA S 125
T. PATRICK'S SEC SCHOOL
RELATIONAL OPERATORS
• A relational operator returns either true or false
depending on the magnitude of the value being
evaluated

R. MALEMBA S 126
T. PATRICK'S SEC SCHOOL
Summary of relational
operators
SYMBOL DESCRIPTION EXAMPLE

= Equal to =A2=B2

> Greater than =A2>B2

< Less than =A2<B2

<> Not equal to =B2<>A2

<= Less than or equal to =A2<=B2

>= Greater than or equal to =A2>=B2

R. MALEMBA S 127
T. PATRICK'S SEC SCHOOL
OPERATOR PRECEDENCE
If several operators are used in a single formula,
Microsoft Excel performs the operators in the order
shown in the table below.
A formula with operators that have the same
precedence; that is, if a formula contains both
multiplication and division, operators are evaluated
from left to right
• Enclosing part of the formula to be calculated in
parentheses or brackets makes that part to be
calculated first
R. MALEMBA S 128
T. PATRICK'S SEC SCHOOL
OPERATOR NAME PRECEDENCE

- Negation as in -1 1

% Percent 2

^ Exponentiation 3

* and / Multiplication and 4


division

+ and - Addition and 5


subtraction

=, <>, >, <, <=, >= Relational 6

R. MALEMBA S 129
T. PATRICK'S SEC SCHOOL
CELL REFERENCING
Relative referencing
Absolute referencing
i. Mixed cell referencing

R. MALEMBA S 130
T. PATRICK'S SEC SCHOOL
RELATIVE REFERENCING
The cell references of the formulas keep on changing
automatically depending on their position in the
worksheet
When you copy a formula that contains cell
references, say A3, the references adjust to their
new location.
• For example, if C1 containing a formula =A1+B1 is
copied to C2, the reference changes to A2+B2

R. MALEMBA S 131
T. PATRICK'S SEC SCHOOL
ABSOLUTE REFERENCING
The reference is made to a specific address and does
not change even if the formula is copied to another
cell
In Excel, an absolute cell reference is made by placing
a dollar sign before the reference
• For example, if the result in C1 is 170,if absolute
reference is used, 170 will be copied to C2

R. MALEMBA S 132
T. PATRICK'S SEC SCHOOL
MIXED CELL REFERENCING
This is a combination of relative and absolute
reference, for example $A3 or A$3.
• In the first case the column reference is absolute
while the row is relative, in the second case the
column reference is relative while the row
reference is absolute

R. MALEMBA S 133
T. PATRICK'S SEC SCHOOL
USING IN-BUILT FUNCTIONS
A function must start with an (=) sign followed by
the function name and arguments
Arguments are numeric, logical values or text
enclosed in parenthesis.
• Categories of in-built functions are:
• Mathematical
• Statistical
• Logical
i. Date and time
R. MALEMBA S 134
T. PATRICK'S SEC SCHOOL
To use a function from any
category
On the Insert menu, click Function. Alternatively,
click fx button on the standard toolbar
In the function dialog box displayed, select the
category
In the function list box, select a function
i. Specify the function argument then click OK.

R. MALEMBA S 135
T. PATRICK'S SEC SCHOOL
MATHEMATICAL
FUNCTIONS
SUM() : Adds all the values in the selected range of cells. For
example if A3, B3 and C3 contains 20,50 and 80 respectively,
=SUM(A3:C3) returns 150
ROUND() : Rounds a number to a specified number of decimal
places. Zero rounds off the number to the nearest integer. For
example, =ROUND (49.769, 1) returns 49.8 while =ROUND
(49.769, 0) returns 50
SUMIF() : Conditionally adds the specified cells according to
the set criteria. =SUMIF(A3:A10, ">=1000") returns a sum for
all the values greater than or equal to 1000
i. PRODUCT() : Multiplies all the values in the argument, for
example, =PRODUCT(40,3,2) returns 240.
R. MALEMBA S 136
T. PATRICK'S SEC SCHOOL
STATISTICAL FUNCTIONS
AVERAGE() : Returns the arithmetic mean of its
arguments. For example, if A3,B3 and C3 contains 20,50
and 80 respectively, =AVERAGE(A3:C3) returns 75
COUNT () : Counts the number of cells that contain
numbers within a range. For example, =COUNT (A3:C3)
returns 3
i. COUNTIF () : Conditionally counts the number of
cells within a range that meets a given condition.
For example, if A3,B3,C3,D3, and E3 contains
20,50,80,60 and 45 respectively then
=COUNTIF(A3:E3, ">50") returns 2
R. MALEMBA S 137
T. PATRICK'S SEC SCHOOL
MAX() : Returns the largest value in a set of values or
within a range. For example, =MAX(A3:E3) for the
values above returns 80
MIN() : Returns the smallest value in a set of values
or within a range. For example, =MIN(A3:E3) of the
values above returns 20
iv. RANK() : Returns the position or rank of a
number from a list of values. For example,
=RANK(A2, $A$3 : $A$8, 1) returns the position
of A2 as if the list was sorted in ascending order.
R. MALEMBA S 138
T. PATRICK'S SEC SCHOOL
LOGICAL FUNCTIONS
i. IF() : Returns a value or label if a condition you specify is
evaluated to TRUE and another is evaluated to FALSE. For
example, if A3, B3,C3,D3, and E3 contained a set of marks
35,50,80,60 and 45, grades are to be awarded as follows:

80 to 100 A
60 to 79 B
40 to 59 C
Below 40 Fail,
To assign a grade use,
=IF (A3>=80, "A", IF (A3 >= 60, "B", IF (A3>=40, "C", "FAIL")))
R. MALEMBA S 139
T. PATRICK'S SEC SCHOOL
AND() : Returns true if all its arguments are true and
returns false if any argument is false. For example,
=AND (3+2 =5, 2+2 = 4) returns TRUE, but =AND
(3+2 =5, 2+2 =6) returns FALSE
OR() : Returns true if any of its arguments is true,,,,
or false if both arguments are false. For example,
=OR (3+2 =7, 2+2=4) returns TRUE
ii. NOT() : Negates the unary operand. For
example, =NOT(3+2 = 5) Returns FALSE

R. MALEMBA S 140
T. PATRICK'S SEC SCHOOL
DATE AND TIME
FUNCTIONS
TODAY() : Returns a number that represents today's date.
The function takes no arguments
NOW() :Returns the current date and time formatted as
date time. It take no arguments.
DATE() : Returns a serial number that represents a
particular date. Ms Excel uses year 1900 serial number 1.
For example, =DATE(107, 1, 4) Returns January 4, 2007.
Year = (1900 + 107), month = 1, day =4.
• HOUR(), MINUTE() or SECOND() : Functions return the
current hour as number 0 to 23, minute from 0 to 59
and seconds from 0 to 59 respectively.
R. MALEMBA S 141
T. PATRICK'S SEC SCHOOL
EDITING WORKSHEETS
Editing refers to making necessary modification and
proofreading a worksheet or workbook
• It involves deleting entries, copying, moving, finding
and replacing words as well as spell checking

R. MALEMBA S 142
T. PATRICK'S SEC SCHOOL
EDITING CELL ENTRIES
There are two methods of editing a cell entry:

Using the Formula bar- click the cell to display its


content on the formula bar. Delete or insert required
word or text
i. Double click the cell to place the insertion
pointer in it and then type or modify the entry

R. MALEMBA S 143
T. PATRICK'S SEC SCHOOL
DELETING WORKSHEET
RANGE
Select the cell or range of cells
i. Press the Delete key. Alternatively select Clear on
the Edit menu

R. MALEMBA S 144
T. PATRICK'S SEC SCHOOL
COPYING AND MOVING
CELL CONTENTS
Select the range of cells
On the Edit menu or standard toolbar select Copy or
Cut
Click the cell where you want the content to be
copied or moved
i. On the Edit menu click Paste

NB: Use shortcut keys Ctrl + C to copy, Ctrl + X to cut


and Ctrl + V to paste
R. MALEMBA S 145
T. PATRICK'S SEC SCHOOL
INSERTING AND DELETING
ROWS/COLUMNS
• To insert a new column/row:
• Position the pointer where the new row or column
will appear
i. On the Insert menu, click Rows or Columns

• To delete a column or row


• Select the column or row to be deleted
i. On the Edit menu click Delete

R. MALEMBA S 146
T. PATRICK'S SEC SCHOOL
INSERTING AND DELETING
WORKSHEETS
• To insert more worksheets, do the following
i. On the Insert menu, click Worksheet. A new
worksheet is added into your workbook

• To delete a worksheet:
• Click the Worksheet tab
i. On the Edit menu, click Delete Sheet

R. MALEMBA S 147
T. PATRICK'S SEC SCHOOL
FIND AND REPLACE
• To search and replace a specified range:
• On Edit menu, click Find, type the text to search for
• To replace, choose Replace from the dialog box
• In the Find What box, type the word or phrase to
find
i. Click the Replace tab and in the Replace With,
type the word or phrase to replace the found
word or phrase

R. MALEMBA S 148
T. PATRICK'S SEC SCHOOL
CORRECTING SPELLING
MISTAKES
Specify the worksheet range you want to spell check
On the Tools menu, click Spelling or press F7
i. On the spelling dialog box, replace or ignore the
misspelt words

R. MALEMBA S 149
T. PATRICK'S SEC SCHOOL
FORMATTING
WORKSHEETS
Worksheet formatting refers to enhancing the
appearance of the worksheet to make it more
attractive and appealing to the reader
• It essentially consists of resizing column width and
row height, changing text colour, typeface (font),
size, style and alignment

R. MALEMBA S 150
T. PATRICK'S SEC SCHOOL
FORMATTING ROWS AND
COLUMNS
Sometimes, the information entered in the
spreadsheet may not fit neatly in the cell set with the
default height and width
• It therefore becomes necessary to adjust the height
of a row or width of a column

R. MALEMBA S 151
T. PATRICK'S SEC SCHOOL
To change column width:
Move the mouse pointer to the right hand side line
that separates the column headers for instance, the
line between A and B
Notice that the mouse pointer change from a cross
to a double arrow
i. Click the mouse button and hold it down so that
you can now resize the width of the column by
dragging it to the size you wish. After dragging to
the required point release the mouse button.
The column will have a new size
R. MALEMBA S 152
T. PATRICK'S SEC SCHOOL
To resize a column using
the Format menu
On Format menu, point to Column, then click Width
i. Type a width in the column width dialog box,
and then click OK button to apply

R. MALEMBA S 153
T. PATRICK'S SEC SCHOOL
To change row height
Point to the line that separates two row numbers.
E.g., the line between 1 and 2. The mouse pointer
becomes a double arrow
i. Drag the line until the height of the row is as
required, then stop and release the mouse
button

R. MALEMBA S 154
T. PATRICK'S SEC SCHOOL
FORMATTING CELLS AND
THEIR CONTENTS
To format a single cell, make it the current cell then
click Format menu option and select the cells
command
In the format cells dialog box, make the formatting
specifications that you wish, then click OK button to
apply.
i. If it is a range of cells, they must be highlighted
first before formatting them as a block of cells

R. MALEMBA S 155
T. PATRICK'S SEC SCHOOL
FORMATTING LABELS
Highlight the cells that have the text to be formatted
Click Format menu, then Cells command
Select Font tab by clicking it
Select the font type e.g. Times New Roman. Other font
formatting features like style, size, underline and colour
are available and can be selected
i. Click OK button to apply

• NB: Alternatively, use the formatting toolbar to


accomplish all your text formatting needs.
R. MALEMBA S 156
T. PATRICK'S SEC SCHOOL
FORMATTING NUMBERS
Highlight the cells that have the numbers to be
formatted
Click Format menu, then Cells command
On the dialog box, select the Number tab
i. You can now choose number formats as
explained below

R. MALEMBA S 157
T. PATRICK'S SEC SCHOOL
NUMBER MEANING
General Have no specific number format
Number Used for general display of numbers e.g
2345.23
Currency For displaying general monetary values
e.g. K100
Accounting Lines up the currency symbols and
decimal points
Date Displays date in chosen format
Time Displays time in chosen format
Percent Multipliew the value in a cell with 100
and displays it as %
Text Formats cells to be treated as text even
when numbers are entered
Custom For a number format not predefined in
Microsoft Excel, select custom then
define the pattern

R. MALEMBA S 158
T. PATRICK'S SEC SCHOOL
FORMATTING BORDERS
• You may need to put a printable border around your
worksheet or range of cells to make it more attractive. To put
a border:

Highlight the range you wish to insert borders. From the format
menu, click cells command
Click the borders and specify the border options for left, right,
top and bottom.
From the style options, select the type of line thickness and
style. Also select the preset option
i. Click the OK button. The selected range will have a border
around it
R. MALEMBA S 159
T. PATRICK'S SEC SCHOOL
GLOBAL WORKSHEET
FORMATTING
The word global in this case refers to the entire
worksheet
• In order to format the whole worksheet globally, it
must be selected as a whole. Two methods can be
used to select the entire worksheet:
• Clicking at the intersection of the column and row
i. Pressing Ctrl + A on the keyboard
• Note that the whole worksheet becomes
highlighted. It can now be formatted as one big
block using the Format Cells command.
R. MALEMBA S 160
T. PATRICK'S SEC SCHOOL
USING AUTOFORMAT
It allows the user to apply one of the 16 sets of formatting to
a selected range on the worksheet. This quickly creates tables
that are easy to read and that are attractive to look at.
• Select a range to make it attractive.

i. Select a range e.g. B1:G7 to make it active


ii. Click Format then select the Autoformat command on
the menu that appears. Select a format from the
autoformat dialog box
iii. Click Ok button to apply the format to the selected range.

R. MALEMBA S 161
T. PATRICK'S SEC SCHOOL
WORKSHEET DATA
MANAGEMENT
A worksheet may contain a list of data items that are
related.
Data management features available in Spreadsheets
help a user manage large amounts of related data.
• Some database operations that can be performed
on a worksheet list include data entry using forms,
sorting, filtering, subtotaling and input validation.

R. MALEMBA S 162
T. PATRICK'S SEC SCHOOL
DATA ENTRY USING FORMS
• A data form lets the user to easily display and enter
records into a worksheet database. To display a
data form:
• Position the cell pointer in any cell containing data
• On Data menu, click Form. A form is displayed.
i. Navigate through, add new, delete or find

R. MALEMBA S 163
T. PATRICK'S SEC SCHOOL
SORTING
• To carry out sorting, proceed as follows:
• Highlight the range that you wish to sort by clicking
its column header letter
• Click Data, then Sort to display the dialog box.
Notice that the sort by field is already reading the
field that you selected. This field is called the
Criteria field.
i. Select the field to be used as the key for sorting
and the sort order as either descending or
ascending, then click OK button to apply.
R. MALEMBA S 164
T. PATRICK'S SEC SCHOOL
GENERATING CHARTS
A chart also known as a graph, is a visually appealing diagram
or diagrams generated from numerical data on a worksheet.
Charts make it easy for users to see comparisons, patterns,
and trends in data.
For example, instead of analysing sales details on a
worksheet, you can use a line chart to see at a glance whether
sales figures are on an upward or downward trend and how
actual sales compare to the projected sales.
• A chart is linked to the worksheet data it is created from,
and whenever data on the worksheet is modified, the chart
is updated automatically.

R. MALEMBA S 165
T. PATRICK'S SEC SCHOOL
TYPES OF CHARTS/GRAPHS
• Some types of chats available in Microsoft Excel include:
• Line chart - represents data as lines with markers at each
data value in the x-y plane
• Column chart - represents data as a cluster of columns
comparing values across categories
• Bar chart - data values arranged horizontally as clustered
bars. Compares values across categories
• Pie chart - displays the contribution of each value to a
grand total
i. Scatter chart - compares pairs of values on the same
axis.
R. MALEMBA S 166
T. PATRICK'S SEC SCHOOL
To generate chart
The chart wizard is a special tool within a spreadsheet
that quickly helps a person to create charts.
To insert the wizard, simply click the chart wizard icon
and the wizard will start.
• To generate a chart, proceed as follows:
i. Select the range of values for which you want to
create a chart. In charts, a data range is referenced
as an absolute range. For example, =Sheet1!
$B$2:$C$8 means that the base data is referenced
from Worksheet 1 and the selected range is B2 to
C8.
R. MALEMBA S 167
T. PATRICK'S SEC SCHOOL
Click the Chart wizard button on the standard toolbar
and the chart wizard dialog box is displayed.
Click the type of chart you wish to create. If the office
assistant appears, close it. The chart sub-type preview
will show several styles of the selected chart type
Click the Next button
ii. Click the Series tab to specify data series
properties. Data series refers to related data
points plotted on a chart, each represented by
unique colour or pattern
R. MALEMBA S 168
T. PATRICK'S SEC SCHOOL
Click the Expand dialog box button to bring the full
dialog box into view then click the Next button. In
step 3 of the wizard, use the appropriate tabs to type
the title of the chart, show a legend, select whether
to display gridlines or not etc. After all these
functions, click the Next button.
vi. In step 4,determine whether the chart will be
inserted in the current worksheet or in a new
worksheet, then click Finish button.

R. MALEMBA S 169
T. PATRICK'S SEC SCHOOL
EDITING AND FORMATTING
CHARTS
• Once the chart is created, its data series patterns or
colours, size,location and orientation can be
changed

R. MALEMBA S 170
T. PATRICK'S SEC SCHOOL
RESIZING AND MOVING A
CHART
To resize a chart, simply click the chart you wish to
resize and use the place handles just to drag to size.
• To move the chart, click inside the chart area, then
drag to the desired position

R. MALEMBA S 171
T. PATRICK'S SEC SCHOOL
LABELLING DATA VALUES
Each representation of data on a chart can either be
labelled by a value or text label. For example, in a bar
chart that compares the height of pupils, each bar
can be given a label to make it more readable.
• To label a chart:
• Right click the chart then select the Chart options
command from the shortcut menu
i. Click the Labels tab and choose whether you
want value or text labels, then click OK button to
apply.
R. MALEMBA S 172
T. PATRICK'S SEC SCHOOL
INSERTING TITLES
Each chart must have a heading showing clearly what
it represents. To make the chart understandable,
include axis titles.
• To include axis titles, proceed as follows:
• Right click the chart, then select the Chart options
command.
• Click the Titles tab, then type the chart title
(heading) and axis titles respectively.
i. Click OK button to apply.

R. MALEMBA S 173
T. PATRICK'S SEC SCHOOL
INSERTING A LEGEND
• A legend is equivalent to a key used on manually
drawn charts. It shows what each color or pattern
of data series represents. For example, a chart may
have green representing boys and pink representing
girls. Without a legend it would be difficult to know
how to differentiate the two data series.

R. MALEMBA S 174
T. PATRICK'S SEC SCHOOL
To create a legend,
proceed as follows:
Right click the chart, then select the Chart options
command.
Click the Legend tab and specify that it will be
displayed in the chart area
i. Click OK button to apply.

R. MALEMBA S 175
T. PATRICK'S SEC SCHOOL
CHANGING THE CHART
LOCATION
• To change the location of a chart, proceed as
follows:
• Select the chart
• On Data menu, click Location
i. Specify whether to embed the chart onto a
worksheet, or place it in a new worksheet, then
click OK.

R. MALEMBA S 176
T. PATRICK'S SEC SCHOOL
CHANGING THE CHART
TYPE
• To change the chart type, proceed as follows:
• Select the chart.
• On Data menu, click Chart Type
i. On the Chart Type dialog box, select the type of
chart you want to replace with, then click OK.

R. MALEMBA S 177
T. PATRICK'S SEC SCHOOL
ERRORS COMMON IN MICROSOFT
EXCEL AND WAYS OF FIXING THEM.
i. =ROUND(SUM(A1:C10,0))
• The inner bracket on the right should be moved to
be just before the comma in order to match all the
opening and closing parenthesis pairs as follows:
=ROUND(SUM(A1:C10),0)
ii. AVERAGE(G:H4)
• G alone is not a cell reference. Make sure all the
arguments of a formula are entered. Also make
sure you do not enter too many arguments. In this
case, we need like =AVERAGE(G2:H4)
R. MALEMBA S 178
T. PATRICK'S SEC SCHOOL
iii. =MAX(D12;H25)
• The semi-colon cannot specify a range. Always use
a full colon like: =MAX(D12:H25)
• Excel cannot support more than 64 nested
functions.
iv. Enter numbers in formulas without formatting.
For example, do not enter $30 but rather 30 in
the cell.

R. MALEMBA S 179
T. PATRICK'S SEC SCHOOL
IDENTIFYING A CELL WITH
A FORMULA ERROR
• A cell that has a formula error can be identified by a
small triangle in its top left corner.

R. MALEMBA S 180
T. PATRICK'S SEC SCHOOL
EXAMPLES OF ERROR
VALUES
i. #DIV! 0
ii. This occurs when a number is divided by zero (0).
The formula may be referencing an empty cell that
does not contain a value or one that has a zero.
• To correct this condition, click the cell that has the
faulty formula. The ! Button appears next to the cell.
Click it and select the Show Calculation Steps
command in the content sensitive menu that
appears. This will display the arguments of the
formula and their values, allowing you to correct.

R. MALEMBA S 181
T. PATRICK'S SEC SCHOOL
ii. #N/A
• This error occurs when a value is not available to a
function or formula and #N/A or N/A() has been entered
in the cell as placeholder text. To resolve this, click the
cell that has the formula, click the ! icon and select the
Show Calculation Step option.
iii. #NAME?
• It occurs when certain text in the formula cannot be
recognised as being valid. Mistakes may include referring
to a named cell or range that does not exist, misspelling a
function name, omitting a colon in a range reference etc.

R. MALEMBA S 182
T. PATRICK'S SEC SCHOOL
• To correct range names:
• Click the cell or select the range referred to by the
formula then,
Click the Name box and type a name for the cell or
range then press enter key to effect the new name.
iv. #NUM!
• The error indicates that there are invalid numeric
entries in a cell. This may also be caused by using a
function that returns a number that is too large or
too small to be represented in Excel
R. MALEMBA S 183
T. PATRICK'S SEC SCHOOL
v. #REF!
• It indicates that a cell reference in the formula is not valid
vi. #VALUE!
• It occurs when a wrong reference to a cell or operand is
used. For example, when text is entered in a cell while a
formula referencing the cell expects a numeric value
vii. #####
• This means that the column width is not wide enough to
display a value. The same occurs when a negative time or
date is entered in a cell

R. MALEMBA S 184
T. PATRICK'S SEC SCHOOL
viii. Circular references
• This occurs when the cell reference in which the
formula is entered is also included as part of the
formula arguments. i.e. the formula refers back to
its own cell either directly or indirectly. Remove
circular references to solve this problem.

R. MALEMBA S 185
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 186
T. PATRICK'S SEC SCHOOL
SOFTWARE
INSTALLATION
• Software installation (program setup) refers to the
process of copying a program into a computer’s
storage in a form that it can be executed.

R. MALEMBA S 187
T. PATRICK'S SEC SCHOOL
• What determine number of programs installed on
the computer are:
i. Processing power
ii. Available disk space

R. MALEMBA S 188
T. PATRICK'S SEC SCHOOL
Common operations performed
during software installation
include:
i. Creation or modification of program folders/sub-
folders
ii. Configuration of windows registry as well as
copying of files
iii. Environment variables
iv. Shortcut icons

R. MALEMBA S 189
T. PATRICK'S SEC SCHOOL
FACTORS TO CONSIDER BEFORE
SOSTWARE INSTALLATION
1. System configuration particularly the type and
speed of processor, amount of Ram and hard disk
space
2. Reading installation manual to get the details on
the
i. System requirements
ii. Warning
iii. User license.
3. Identify the software that will meet the user
specific need to avoid installing unnecessary
software
R. MALEMBA S 190
T. PATRICK'S SEC SCHOOL
INSTALLING OPERATING
SYSTEM
• The two methods of installing operating system e.g.
Windows 7 are:
i. Upgrading from previous version
ii. Fresh installation

R. MALEMBA S 191
T. PATRICK'S SEC SCHOOL
• Fresh installation is done by first creating and
formatting a primary partition before the
installation process starts.
• Upgrading from previous windows version means
the other windows in the computer will not be
formatted but just upgrading it

R. MALEMBA S 192
T. PATRICK'S SEC SCHOOL
HOW TO INSTALL A
FRESH COPY OF
WINDOWS
• To install a fresh copy of windows, the computer
should be setup to boot from a DVD then proceed
as follows:

R. MALEMBA S 193
T. PATRICK'S SEC SCHOOL
1. Insert the disk in optical drive and start the computer.
After the Power On Self-Test (POST) process, the
computer initializes the boot process. After a few minutes,
Windows 7 installation screen shown in figure below is
displayed. Set the language and time zone and click Next.
In our case, choose Central Africa Time (CAT) zone.

R. MALEMBA S 194
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 195
T. PATRICK'S SEC SCHOOL
2. After clicking Install Now, read the Microsoft User-license
agreement terms and click the box against “I Accept the
License Terms” as shown below.

R. MALEMBA S 196
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 197
T. PATRICK'S SEC SCHOOL
3. Choose Custom(advance) to install windows afresh or
select Upgrade to upgrade from previous version.

R. MALEMBA S 198
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 199
T. PATRICK'S SEC SCHOOL
4. Next, partition the drive into two or more drives
(volumes) using NTF file system and then click Format.

R. MALEMBA S 200
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 201
T. PATRICK'S SEC SCHOOL
6. Windows 7 automatically format the first drive usually
labelled Drive C as the primary drive and copies the
installation files onto the partition as shown below.

R. MALEMBA S 202
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 203
T. PATRICK'S SEC SCHOOL
7. After the copy process is complete, it prompts you to
enter username, password and the license key. You
must enter the license key that came with the product
to install a genuine copy of Windows 7.

R. MALEMBA S 204
T. PATRICK'S SEC SCHOOL
8. Follow the windows installation process and provide
all the necessary information. This process is generally
wizard driven and only requires minimal interactions
where necessary.

R. MALEMBA S 205
T. PATRICK'S SEC SCHOOL
9. Once installation is successfully done, connect to the
Internet to install importance updates or skip the update
procedure and enter the password to login to the desktop
as shown below.

R. MALEMBA S 206
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 207
T. PATRICK'S SEC SCHOOL
CONFIGURING WINDOWS
 A part from working with files, folders and drivers, windows provide the user with tools
that can be used to customize the desktop.

 Windows 7 lets the user change desktop appearance and display properties such as
icons, themes and wallpaper.

 Such features include:

1. Arranging multiple application windows on the desktop

2. Changing the desktop appearance

3. Setting resolution

4. Hiding the taskbar

5. Setting screen saver e.t.c.

R. MALEMBA S 208
T. PATRICK'S SEC SCHOOL
 All these features can be set by Right-clicking the
desktop then click Personalized.

 The control panel shown in figure below is


displayed:

R. MALEMBA S 209
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 210
T. PATRICK'S SEC SCHOOL
SETTING THEME AND
BACKGROUND
 To apply a new Theme or Wallpaper, proceed as follows:

i. Make sure you are in Change the visuals and sounds... window

ii. Inside the window, scroll down the list of Themes and select desired
theme

iii. To change desktop background icon, at the bottom left, select


preferred background changes before you close the dialog box.

R. MALEMBA S 211
T. PATRICK'S SEC SCHOOL
SETTING THE SCREEN
SAVER
 If the screen saver is set, moving patterns or
objects are displayed on the screen if the computer
is left idle for a period of time
 To set the screen saver, proceed as follows:

R. MALEMBA S 212
T. PATRICK'S SEC SCHOOL
i. In the Personalization window, click the Screen Saver icon at the
bottom right side.

ii. In the screen saver dialog box, select a Screen Saver from the screen saver
list.

iii. Set the wait time e.g. 10 minutes and click On resume, display logon
screen.

iv. Click Preview to see how the screen saver look like, and then click Apply
button to save the changes before closing the dialog box

v. Click OK to close the dialog box


R. MALEMBA S 213
T. PATRICK'S SEC SCHOOL
SETTING MOUSE POINTER

 For accessibility reasons, you may need to


change the default mouse settings e.g. from
left click to right click.
 To change mouse settings:

R. MALEMBA S 214
T. PATRICK'S SEC SCHOOL
i. In the Personalization window, click Change mouse pointers.

ii. In the dialog box displayed below, click the tab for the settings
you wish to change. For example, to change the default mouse
button from left to right, click the Buttons tab.

iii. Click Apply to see the changes before you close the dialog box.

iv. Click OK to close the dialog box.

R. MALEMBA S 215
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 216
T. PATRICK'S SEC SCHOOL
SETTING COLOUR AND
SCREEN RESOLUTION
 The clarity and size of images on the screen depends on the screen resolution and
orientation.

 To change screen resolution and orientation settings, proceed as follows:

i. Right click on an empty space on the desktop, and then click Screen Resolution.

ii. In the Screen Resolution window, change display properties such as display type,
resolution or orientation.

iii. On the colour list box, select colour quality

iv. Click Apply to view the changes before you close the dialog box.

v. Click OK to close the dialog box.

R. MALEMBA S 217
T. PATRICK'S SEC SCHOOL
HIDING THE TASKBAR
 To hide the taskbar, proceed as follows:

i. Right-click the Taskbar, and then click Properties.

ii. Make sure the Taskbar is selected, then select Auto-hide the taskbar check
box.

iii. Click Apply, and then OK to close the dialog box.

R. MALEMBA S 218
T. PATRICK'S SEC SCHOOL
SETTING DATE AND TIME
 Setting system date and time is very important because some system tasks such
as the scheduler depends on date and time to run.

 To set date and time:

i. Click the Start button and point to the Control Panel. Alternatively click the
Clock in system tray, then click Change date and time settings.

ii. In the control panel, click Date and Time. A dialog box shown below is
displayed.

iii. Change time and date or time zone settings. After making necessary changes
click Apply, and then OK to close the dialog box.

R. MALEMBA S 219
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 220
T. PATRICK'S SEC SCHOOL
INSTALLING UBUNTU
 The word Ubuntu comes from an ancient African word meaning ‘humanity to
others’

 Ubuntu is an open-source operating system that brings the spirit of humanity


to the world of computing.

 It is Linux-based distribution available freely and can be installed in computers


and phones.

 Before installing Ubuntu, read the guide that comes with the software to see
whether the computer meets the specification e.g. processor type, memory
capacity and hard disk space

R. MALEMBA S 221
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 222
T. PATRICK'S SEC SCHOOL
INSTALLING DEVICE
DRIVER
 During installation of these device drivers, a
computer is tested whether it has required
hardware, operating system and device drivers.

R. MALEMBA S 223
T. PATRICK'S SEC SCHOOL
INSTALLING DEVICE
DRIVERS
 Once you installed operating system, you can proceed by installing
device drivers and other utility programs like antivirus.
 A device driver is a utility program that controls a device installed
in a computer
 For devices such as printer, a keyboard, a flash, a mouse and/or a
scanner to work, their drivers must be installed first
 A device driver acts as a translator between a device and the
program that use the device.
 Common devices such as mouse, keyboard, monitor and flash disks
are automatically recognized by most operating system through a
process called plug and play (PnP)
R. MALEMBA S 224
T. PATRICK'S SEC SCHOOL
 There are many ways of installing device drives
but the most common is through installation
wizard.

 For example, to install printer drivers, proceed


as follows:

R. MALEMBA S 225
T. PATRICK'S SEC SCHOOL
1. If the printer drivers are not in
Windows, insert the disk that came
with the device printer. Figure below
shows examples of printer drivers that
are pre-loaded in Windows 7.

R. MALEMBA S 226
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 227
T. PATRICK'S SEC SCHOOL
2. After verifying that the drivers are in windows
device drivers profile, click Devices and Printers
from a Start menu

R. MALEMBA S 228
T. PATRICK'S SEC SCHOOL
3. In the Devices and Printers window
displayed, Click Add Printer and then
choose Add local printer. Click Next
to proceed.

R. MALEMBA S 229
T. PATRICK'S SEC SCHOOL
4. Under choose printer port, specify the
port into which the printer will be
connected to e.g. USB as shown below.
This is very important because
specifying a wrong port e.g. LPTI
instead of USB means the printer will
not work.

R. MALEMBA S 230
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 231
T. PATRICK'S SEC SCHOOL
5. Then specify the manufacturer and printer type,
then click Next to proceed

6. In the dialog box that appears, type the name of


the printer and click Next to start installation
process.

7. Once installation finishes, a test page print


dialog box appears as shown below. It is
important to print a test page to be sure the
drivers are successfully
T. PATRICK'S SEC SCHOOL installed.
R. MALEMBA S 232
R. MALEMBA S 233
T. PATRICK'S SEC SCHOOL
8. Read and agree with the user license
agreements and click Next

9. Follow the instructions as directed by the


wizard

10.Click Restart if the installation requires


computer to restart to finish the
configuration.
R. MALEMBA S 234
T. PATRICK'S SEC SCHOOL
INSTALLING
APPLICATION SOFTWARE
 Most application software available in the
market include: word processor, spreadsheet,
database management system, desktop
publishing software, education software etc.

 In this section, we will learn how to select and


install application software such as Microsoft
Office 2010.

R. MALEMBA S 235
T. PATRICK'S SEC SCHOOL
Factors which determine kind of
application software to install

1. Cost of the software

2. Authenticity

3. User documentation

4. Reliability

5. User-friendliness

6. Compatibility

7. System configuration

8. User need

9. Purpose

R. MALEMBA S 236
T. PATRICK'S SEC SCHOOL
According to purpose, application
software can be categorized into
two:
1. General purpose application software: such as word,
spreadsheet, database and presentation that are packed and
made available for general use.

2. Special purpose application software: these are application


software designed purposely to handle specialized tasks e.g.
desktop publishing software (DTPs), graphic editing software
and anti-virus software.

R. MALEMBA S 237
T. PATRICK'S SEC SCHOOL
INSTALLING MICROSOFT
OFFICE 2010

R. MALEMBA S 238
T. PATRICK'S SEC SCHOOL
THE END OF THE TOPIC!

R. MALEMBA S 239
T. PATRICK'S SEC SCHOOL
GOOD LUCK AS YOU ARE
PREPARING FOR THE END OF
TERM 1 EXAMS!
R. MALEMBA S 240
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 241
T. PATRICK'S SEC SCHOOL
PROGRAMMING
FUNDAMENTALS

R. MALEMBA S 242
T. PATRICK'S SEC SCHOOL
COMPUTER PROGRAM
• Simply called program.
• A computer program is defined as organized list of
instructions, written to perform a specified task
with a computer.
• Computer programs are written using programming
languages
• A collection of computer programs and related data
is referred to as the SOFTWARE

R. MALEMBA S 243
T. PATRICK'S SEC SCHOOL
PROGRAMMING LANGUAGE
• Just like in natural languages, a programming
language is a formal language that specifies the
syntax and semantic rules for writing computer
programs.
• EXAMPLES OF PROGRAMMING LANGUAGES
• C++, Java, BASIC

R. MALEMBA S 244
T. PATRICK'S SEC SCHOOL
COMPUTER PROGRAMMING
• Is a process of writing a computer program using a
programming language.
• The person who writes programs is referred to as a
programmer or software developer or software
engineer.

R. MALEMBA S 245
T. PATRICK'S SEC SCHOOL
SOURCE CODE & OBJECT
CODE
• Source code refers to as a set of instructions or
statements written by a programmer that are not
yet converted into a machine-readable form.
• Once a source code is written, it can be converted
into machine readable form referred to as OBJECT
CODE.

R. MALEMBA S 246
T. PATRICK'S SEC SCHOOL
LANGUAGE PROCESSOR
• Computer understands only machine language.
• A program written in high level language or
assembly language cannot be run on a computer
directly.
• It must be converted into machine language before
execution.
• Language processor or translator is a software that
converts these programs into machine language
• Every computer language has it's own language
translator
R. MALEMBA S 247
T. PATRICK'S SEC SCHOOL
TYPES OF LANGUAGE
TRANSLATORS
• Interpreter
• Compiler
• Assembler

R. MALEMBA S 248
T. PATRICK'S SEC SCHOOL
INTERPRETER
• An interpreter converts the source code to machine
code statement-by-statement allowing CPU to
execute one line at time
• The interpreted line is not stored in the computer
memory.
• This means that every time the program is needed
for execution, each line has to be interpreted.
• This type of interpreting programs was common in
early computers.

R. MALEMBA S 249
T. PATRICK'S SEC SCHOOL
COMPILER
• A compiler converts the entire source code into
object code.

R. MALEMBA S 250
T. PATRICK'S SEC SCHOOL
ASSEMBLER
• A program that translates the instructions of
assembly language into machine language.

R. MALEMBA S 251
T. PATRICK'S SEC SCHOOL
DIFFERENCES BETWEEN
INTERPRETERS AND COMPILERS
INTERPRETER COMPILER

Translates the source program one Translates the entire source code at once
statement at a time. before execution.

Translates the program each time it is run Compiled program (object code) can be
hence slower than compiling. saved on a storage media and run as
required, hence executes faster than
interpreted programs
Interpreted object code takes less memory Compiled programs require more memory
compared to compiled program as the object files are larger.

R. MALEMBA S 252
T. PATRICK'S SEC SCHOOL
GENERATIONS OF
PROGRAMMING
LANGUAGES
• First generation languages (machine language)
• Second generation languages (2GL)
• Third generation languages (3GL)
• Fourth generation languages (4GL)
• Fifth generation languages (5GL)
• Object-Oriented Programming (OOP)
• Web development and Scripting languages

R. MALEMBA S 253
T. PATRICK'S SEC SCHOOL
BROAD CATEGORIES OF
PROGRAMMING
LANGUAGES
• Low- level languages
• High-level languages

R. MALEMBA S 254
T. PATRICK'S SEC SCHOOL
LOW-LEVEL LANGUAGES
• Low-level languages are classified as low because
they can easily be understood by the computer
thus they require minimal effort to convert into
computer object code
• Two types of low-level languages are the MACHINE
and ASSEMBLY languages

R. MALEMBA S 255
T. PATRICK'S SEC SCHOOL
GENERATIONS UNDER
LOW-LEVEL LANGUAGES
• 1 GL
• 2 GL

R. MALEMBA S 256
T. PATRICK'S SEC SCHOOL
FIRST GENERATION
LANGUAGES
• Also called Machine language
• In machine languages, instructions are written
using binary code
• Given that data and instructions are in a binary
form, many lines of code are needed to accomplish
even a simple task like adding two numbers.

R. MALEMBA S 257
T. PATRICK'S SEC SCHOOL
Sample machine language
11100011 00000001 10000011

00011100 10001101 11100111

10001111 11111000 10000001

R. MALEMBA S 258
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF 1 GL
• Fast and efficient as statements are directly written
in binary code
• No translator is required

R. MALEMBA S 259
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF 1 GL
• Difficult to use and learn binary codes
• Difficult to understand -both programs and
correcting errors
• Machine dependent-they are not portable from
one computer to another
• Require highly trained programmers both to
develop and maintain

R. MALEMBA S 260
T. PATRICK'S SEC SCHOOL
SECOND GENERATION
LANGUAGES (2GL)
• Are also called assembler languages
• Assembly language contains human-readable
symbols/notations that can be further converted to
machine language using an assembler
• The set of symbolic operation codes written by a
programmer are called mnemonics
• Mnemonics are basically shortened two or three
letter words

R. MALEMBA S 261
T. PATRICK'S SEC SCHOOL
Sample 2GL code
Mov AX, 15

This moves 15 to register AX

R. MALEMBA S 262
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF 2GL
• It is easier to understand if compared to machine
language
• Modifications are easy
• Correction and location of errors are easy

R. MALEMBA S 263
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF 2GL
• Assembler is required
• This language is a machine-dependent, with a
different instruction set for different machines

R. MALEMBA S 264
T. PATRICK'S SEC SCHOOL
HIGH-LEVEL LANGUAGES
• High-level languages are close to the human
language hence they can be read and understood
even by people who are not experts in
programming
• High-level languages are machine independent -
one program can run in many machines

R. MALEMBA S 265
T. PATRICK'S SEC SCHOOL
GENERATIONS UNDER
HIGH-LEVEL LANGUAGES
• 3GL
• 4GL
• 5GL
• OOP
• Web development and scripting languages

R. MALEMBA S 266
T. PATRICK'S SEC SCHOOL
THIRD GENERATION
LANGUAGES
• Also called structured or procedural languages
• Language allows the breaking down of a program
into components called modules, each module
performing a particular task
• The process of breaking down a program into
modules or sub-programs is referred to as
structured programming.
• Examples: FORTRAN (Formula translator), BASIC
(Biginners All-purpose Symbolic Instructional Code)
and C
R. MALEMBA S 267
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF 3GL
• Flexible - same code can be copied to another
machine and be changed to suit the changing
innovations.
• Easier to read and modify
• Lesser number of lines of code as compared to
above two languages

R. MALEMBA S 268
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF 3GL
• Compiler/interpreter is needed
• Different compilers are needed for different
machines

R. MALEMBA S 269
T. PATRICK'S SEC SCHOOL
FOURTH GENERATION
LANGUAGES
• They are non-procedural languages
• Enables user to access the database, generating
reports and creating Graphical User Interface (GUI)
applications
• They also have application generator that
automatically generates program code
• Examples: Python and Microsoft Visual Basic

R. MALEMBA S 270
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF 4GL
• Easy to understand and learn
• Less time required for application creation
• Its less prone to errors

R. MALEMBA S 271
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF 4GL
• Memory consumption is high
• Has poor control over hardware
• Less flexible

R. MALEMBA S 272
T. PATRICK'S SEC SCHOOL
FIFTH GENERATION
LANGUAGES
• Also called Natural languages
• Used to solve problems using artificial intelligence
• Artificial intelligence refers to computer systems
that mimic human-like intelligence like movement,
visual and speech recognition.
• Examples: Mecury and PROLOG

R. MALEMBA S 273
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF 5GL
• Machines can make decisions
• Programmer effort reduces to solve a problem
• Easier to learn and use than 3GL or 4GL

R. MALEMBA S 274
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF 5GL
• Complex and long code
• More resources are required and they are
expensive too

R. MALEMBA S 275
T. PATRICK'S SEC SCHOOL
OBJECT-ORIENTED
PROGRAMMING
LANGUAGES
• A shift from procedural programming using 3GLs to
OOP
• In OOP, a program may consist of several objects
that interact by sending messages to each other.
• This is similar to the way a person considered as an
object sends a message to another person
requesting for something to be done
• Languages under OOP include Java, Microsoft
Visual Basic and C++

R. MALEMBA S 276
T. PATRICK'S SEC SCHOOL
WEB DEVELOPMENT AND
SCRIPTING LANGUAGES
• Web development and scripting languages are used to
develop or add functionalities to web pages
• Web pages are hypertext document created in a language
called Hypertext Markup Language (HTML)
• HTML consist of tags that are interpreted by the web
browser software to display content when the file is opened
on the browser
• A tag is a word, symbol or character enclosed in angled
brackets <> that a browser can interpret it as a command
• For example, the statement <h1> Hello World </h1> will
display the word “Hello World” as a heading and will be in
big bold text on the screen
R. MALEMBA S 277
T. PATRICK'S SEC SCHOOL
• To enhance interaction and dynamism of HTML
web pages, special types of web programming
languages known as scripting languages are used
• Examples of scripting languages include JavaScript,
VBScript and Hypertext Preprocessor (PHP)

R. MALEMBA S 278
T. PATRICK'S SEC SCHOOL
BENEFITS OF HIGH-LEVEL
LANGUAGES
• High-level languages are portable - can be installed
in more than one computer
• Are user friendly, and easy to use and learn
• Are more flexible
• Easy to correct errors (maintenance)

R. MALEMBA S 279
T. PATRICK'S SEC SCHOOL
LIMITATIONS OF HIGH-
LEVEL LANGUAGES
• Have to be interpreted or compiled to machine
form before the computer can execute them hence
need more hardware and software resources
• Many instructions in a statement hence size of
these instructions cause slower program
processing.

R. MALEMBA S 280
T. PATRICK'S SEC SCHOOL
THE END!
R. MALEMBA S 281
T. PATRICK'S SEC SCHOOL
NEXT LESSON
R. MALEMBA S 282
T. PATRICK'S SEC SCHOOL
PROGRAM DEVELOPMENT
PROCESS
• Below are 5 main phases of program development:
i. Problem definition
ii. Algorithm design
iii. Program coding
iv. Program testing and debugging
v. Program review and maintenance

R. MALEMBA S 283
T. PATRICK'S SEC SCHOOL
1. PROBLEM DEFINITON
• Refers to one’s ability to identify a problem that
need to be solved using a computer program.
• For example, consider a mathematical problem
such as calculating the area of a circle.
• In this case the problem is finding the area of a
circle.
• For such a problem, a programmer must
conceptualize the solution by first understanding
the problem, then identify input, processing logic
and the expected output.
R. MALEMBA S 284
T. PATRICK'S SEC SCHOOL
• INPUT: 1. pie (∏) which is a constant
2. the radius of the circle
• PROCESS: The formula for calculating area of a circle (∏ *
radius * radius )
• OUTPUT: Area of the circle (A)

• The problem definition stage ends with documenting


hardware and software requirements necessary for
solving the problem.
• It is this document that enables a programmer to design
algorithms for implementing the solution.
R. MALEMBA S 285
T. PATRICK'S SEC SCHOOL
2. ALGORITHM DESIGN
• Algorithm is a set of well-defined steps for
performing a task or solving a problem.
• The solution to the problem is expressed using
flowcharts, pseudocode or structured English
statements.
• Before coding, an algorithm should be tested for
logical error, this technique is known as “dry run”.

R. MALEMBA S 286
T. PATRICK'S SEC SCHOOL
SAMPLE PSEUDOCODE
Program: Calculate area of a circle

BEGIN
SET as constant PI=3.142
PRINT “Enter Radius”
READ radius
area = PI * radius * radius
PRINT area
END
R. MALEMBA S 287
T. PATRICK'S SEC SCHOOL
3. PROGRAM CODING
• Programs are written in different programming
languages
• But generally, today programmers use high-level
languages that are easy to learn and understand.
• Generally, most high-level programming languages
have common features such as: reserved words,
operators, identifiers and variables.

R. MALEMBA S 288
T. PATRICK'S SEC SCHOOL
RESERVED WORDS
• Also called keywords
• They have special meaning and can only be used for
intended purpose.
• Examples of reserved words in c++ and Pascal
include; for, if, else, while and do.

R. MALEMBA S 289
T. PATRICK'S SEC SCHOOL
IDENTIFIERS
• Identifiers are programmer defined symbolic names
used to identify elements like variables and
constants in a program.
• E.g. radius.

R. MALEMBA S 290
T. PATRICK'S SEC SCHOOL
VARIABLES
• In programming, a variable is a named location in
computer’s memory for holding data.
• The content of a variable can change during
program execution unlike constants whose content
doesn’t change.

R. MALEMBA S 291
T. PATRICK'S SEC SCHOOL
OPERATORS
• Operators are used to perform arithmetic
operations .
• Five commonly used operators are:
i. Addition (+)
ii. Subtraction (-)
iii. Multiplication (*)
iv. Division (/)
v. Assignment (=)

R. MALEMBA S 292
T. PATRICK'S SEC SCHOOL
4. PROGRAM TESTING AND
DEBUGGING
• Testing is the process of tracing or checking
whether a program has errors (bugs) while
debugging refers to the process of correcting
identified program errors.
• Types of errors (bugs) :
i. Syntax errors
ii. Logical errors

R. MALEMBA S 293
T. PATRICK'S SEC SCHOOL
SYNTAX ERRORS
• These are errors that are made due to improper use
of language rules
• E.g. grammatical mistakes, punctuation, improper
naming of variables and misspelling of identifiers
and reserved words.
• Syntax errors are detectable by a compiler or an
interpreter and must be corrected before the
program runs.

R. MALEMBA S 294
T. PATRICK'S SEC SCHOOL
LOGICAL ERRORS
• They are not detectable by the compiler or
interpreter.
• The program runs but gives a wrong output or halts
during execution.

R. MALEMBA S 295
T. PATRICK'S SEC SCHOOL
TRACING PROGRAM
ERRORS
i. Dry-run (Desk check)
ii. Debugging
iii. Test data

R. MALEMBA S 296
T. PATRICK'S SEC SCHOOL
i. Dry-run
• Involves using a trace table.
• A good practice in using trace table is to go through
an algorithm line by line exactly a computer would.
• This helps the programmer to identify syntax and
logical errors

R. MALEMBA S 297
T. PATRICK'S SEC SCHOOL
ii. debugging
• Happens after writing the program
• The programmer uses debugging utilities to detect
and correct syntax errors before compiling the
source code into object code

R. MALEMBA S 298
T. PATRICK'S SEC SCHOOL
iii. TEST DATA
• After the program compiles successfully, the
programmer carries out trial run using test data to
check for logical and run-time errors.
• The programmer tries to enter valid and invalid
data to check whether the program produces
desired output

R. MALEMBA S 299
T. PATRICK'S SEC SCHOOL
5. PROGRAM REVIEW AND
MAINTENANCE
• Review and maintenance refers to continuous
update and fixing of program errors after
installation.
• You may continue fixing and updating the program
until it reaches a point where the program has to
be replaced.
• At this point, maintenance stops and the program
development life cycle starts all over again.

R. MALEMBA S 300
T. PATRICK'S SEC SCHOOL
CHARACTERISTICS OF A
GOOD PROGRAM
I. SIMPLICITY:- A program should be kept as simple and
easy to understand
II. INTEGRITY:- In programming, integrity refers to reliability
and accuracy of data.
III. EFFICIENCY:- To enhance performance, good program
design should aim at optimizing execution speed and
memory utilization
IV. CLARITY:- For program to be readable, the statements
and comments should be clearly written
V. MODULARITY:- Complex programs should be broken
down into components known as modules, procedures or
sub-programs
R. MALEMBA S 301
T. PATRICK'S SEC SCHOOL
PROGRAMMING IN Visual
BASIC
• BASIC is an acronym for Beginner’s All-purpose
Symbolic Instruction Code
• BASIC has many dialects such as Microsoft Visual
Basic (VB)
• Microsoft Visual Basic is a member of Microsoft
software development suite known as Microsoft
Visual Studio

R. MALEMBA S 302
T. PATRICK'S SEC SCHOOL
MICROSOFT VISUAL
BASIC .NET
• Microsoft Visual Basic .Net, simply referred to as
VB.NET is a GUI-based programming language
mainly for developing applications meant to run on
Microsoft Windows platforms (OS)

R. MALEMBA S 303
T. PATRICK'S SEC SCHOOL
MAIN FEATURES OF VB.NET
i. It is an event driven programming language
 An event is a response generated by the program when the user performs
an action
 E.g. A mouse click
ii. It is a collection of tools that are used by programmers
 These tools are also called controls
 The controls are easily accessed by clicking their icons on the toolbox
iii. It has objects called Forms that have a title bar at the top
 The programmer can add controls such as Menu bar, Status bar and
buttons onto the form when creating an application
iv. It is an object oriented programming language implemented using a
framework known as .NET
 This means that applications developed in VB.NET can also run on internet

R. MALEMBA S 304
T. PATRICK'S SEC SCHOOL
BASIC SYNTAX OF VB.NET
PROGRAM
• VB.NET is an object-oriented programming
language
• In OOP, program consists of various objects that
interact with each other by means of message
passing
• Objects of the same type belong to the same class
just like human beings belong to class called
animals
• The following are the basic concepts relative to
VB.NET programming language
R. MALEMBA S 305
T. PATRICK'S SEC SCHOOL
1. CLASS
• A class is a template or collection of behaviours
(methods) and state (variables) that defines a set of
objects
• For example, let’s consider the “Form3 students”.
We can define a template called “Exam” with
columns student name, marks, and grade in which
you can add or delete students details
• Such a blank template represents the concept
“class” in OOP

R. MALEMBA S 306
T. PATRICK'S SEC SCHOOL
2. OBJECT
• An object is an instance of a class that has state
(data) and behaviour functions
• For example, a particular student in Form 3 is an
object who has state or data such as surname,
marks, and grade
• The student object belongs to a class that has
behaviour or functions such as walking and
speaking that is not in plants class

R. MALEMBA S 307
T. PATRICK'S SEC SCHOOL
3. METHODS
• A method defines the behaviour or function to be
performed by an object to manipulate data
• For example, we can define a method to add,
delete or modify student details in a class
• The class must define methods that are common to
all the objects that belong to the class
• Therefore, it is in methods where the program
statements that manipulate data are written

R. MALEMBA S 308
T. PATRICK'S SEC SCHOOL
4. VARIABLES
• Each object has its unique set of variables that are
used to hold data
• Data values received by methods are assigned to
these variables

R. MALEMBA S 309
T. PATRICK'S SEC SCHOOL
5. COMMENTS
• These are set of statements used in the code to
explain what a program or statement does
• The comments are ignored by the compiler during
execution
• In Visual Basic, a comment starts with a single
apostrophe (‘) followed by the statement

R. MALEMBA S 310
T. PATRICK'S SEC SCHOOL
GETTING STARTED WITH
VB.NET 2010
PROFESSIONAL

R. MALEMBA S 311
T. PATRICK'S SEC SCHOOL
MENU AND STANDARD
TOOLBAR
• The Visual Basic has a menu bar and standard
toolbar at the top
• The menu and the toolbar are used for creating,
editing and manipulating the application objects
• To perform a task using the standard toolbar, simply
point to an icon to display tooltip

R. MALEMBA S 312
T. PATRICK'S SEC SCHOOL
FORMS
• A visual basic form is an object on which you insert
other objects such as text boxes and command
buttons
• A form has state (properties) and behaviour
(methods)
• Properties define the appearance of the form
object while methods are actions that can be set to
execute once you click the mouse button

R. MALEMBA S 313
T. PATRICK'S SEC SCHOOL
TOOLBOX
i. Label
 Label tool is used to place controls that explain the content of other controls on the
form
 For example, if a text box contain surnames, a label against it indicates that
surname should be provided
ii. TextBox
 TextBox tool is one of those frequently used tools to draw text boxes in which the
user provide input
iii. Button
 This tool is used to place command instances on the form
 Such command include OK, SAVE, EXIT, CLOSE etc
 This tool is used to interact with an application
iv. CheckBox
 Check box control provides a way of choosing multiple values by clicking on the
check boxes
R. MALEMBA S 314
T. PATRICK'S SEC SCHOOL
v. DateTimePicker
 This control is used to place a control on the form that a user can click to
display a dropdown calendar from which to choose DAY, MONTH or YEAR
vi. HScrollBar
 This tool is used to place horizontal scroll bar.
vii. ListBox
 The listbox tool is used to draw controls that display list of items the user
can select from.
viii. ComboBox
 A combo box is a type of list box that combines the capabilities of a text box
and a list box.
 A combo box displays a list of items to select from during program
execution.
 Items can also be added into the combo box
R. MALEMBA S 315
T. PATRICK'S SEC SCHOOL
SOLUTION EXPLORER
• The solution explorer is shown on the top right of
the IDE (Integrated Development Environment)
window
• It displays a list of objects associated with the open
project such as forms and modules

R. MALEMBA S 316
T. PATRICK'S SEC SCHOOL
PROPERTIES
• The properties window is used to define properties
of each object in an application
• After you place an instance of an object, you must
define its properties such as name, colour, etc.

R. MALEMBA S 317
T. PATRICK'S SEC SCHOOL
CODE WINDOW
• The code window is displayed once you double click
an object
• This is where we write the source code that
instructs the program what to do .

R. MALEMBA S 318
T. PATRICK'S SEC SCHOOL
EXAMPLE
QUESTION: Create a program that calculates area of
a circle given that PI = 22/7.

R. MALEMBA S 319
T. PATRICK'S SEC SCHOOL
SOLUTION
1. Start Visual Basic and choose New project on the
Start Page. Then Visual Basic then Windows
Application Form
2. From the toolbox, use the label, textbox and
button tools to design the form
3. Change the name and text (caption) properties of
the control to look as shown below;

R. MALEMBA S 320
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 321
T. PATRICK'S SEC SCHOOL
4. Double click the button and insert the code
below between the Private Sub and End Sub

Dim Radius As Integer


Dim Area As Double
Const PI As Double = 22/7
Radius = Val(txtRadius.Text)
Area = PI*Radius*radius
txtCircleArea.Text = Str(Area)
R. MALEMBA S 322
T. PATRICK'S SEC SCHOOL
5. Run the program, enter 7 into Radius textbox and
then click the calculate button. The result of the
calculation is displayed in the Area text box as
shown below;

R. MALEMBA S 323
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 324
T. PATRICK'S SEC SCHOOL
PROGRAM DESCRIPTION

R. MALEMBA S 325
T. PATRICK'S SEC SCHOOL
DECLARATION
• In programming, declaration is an instruction to
the compiler to reserve memory enough to store
input or output from a computer program.
• For a computer to reserve enough memory, you
have to specify the type of data to be held in
specific memory address
• e.g. Dim Radius As Integer

R. MALEMBA S 326
T. PATRICK'S SEC SCHOOL
VARIABLES
• A variable is a name or identifier that is used to
represent a memory location whose content may
change during program execution
• When a variable is declared, the computer sets
aside memory space to hold a value in the variable.

R. MALEMBA S 327
T. PATRICK'S SEC SCHOOL
RULES FOLLOWED WHEN
DECLARING VARIABLES IN
VB
• The variable name must not have more than 255
characters
• The variable name must start with a letter
• The variable may be declared using mixed, lower or
upper case because VB is not a case sensitive
• A variable name must not be a reserved word, e.g.
Case, Else, Dim
• Variable names should not have spaces. If two or more
words are to be used to create a variable, use
underscore or combine them with each word starting in
upper case
R. MALEMBA S 328
T. PATRICK'S SEC SCHOOL
• In VB, a variable is declared using the reserved
word Dim
• Dim is short form of the word dimension
• So, the first line instructs the compiler to reserve
memory location named Radius that stores an
integer.

R. MALEMBA S 329
T. PATRICK'S SEC SCHOOL
VB DATA TYPES
DATA TYPE DESCRIPTION

Integer A whole number with no fraction part.


Integers range from -32768 to 32768
Long integer Numbers which are integers but have a
bigger value and range

Single Real constant that includes a fractional


part
Double It includes a fractional part but has far
much larger range than single real
numbers

String Characters enclosed in quotation marks


Boolean Data types that have only two logical
states i.e true or false

R. MALEMBA S 330
T. PATRICK'S SEC SCHOOL
VARIANTS
• In VB, if a variable type is not explicitly declared,
the compiler uses variant as data type
• In this case, the actual data type is determined by
the value held by the variable

R. MALEMBA S 331
T. PATRICK'S SEC SCHOOL
SCOPE DECLARATION
• Scope refers to the portion of the program that a
variable or a constant is accessible by the program
• The following terms are used to specify the scope
of a variable or constant

R. MALEMBA S 332
T. PATRICK'S SEC SCHOOL
Local variables or
constants
• A variable or a constant that is declared within a
function is said to be local
• This means that the variable can only be accessed
within that function

R. MALEMBA S 333
T. PATRICK'S SEC SCHOOL
Global variables or
constants
• A variable or constant that is declared outside the
function or module but within the same application
is said to be global
• Such variables can be accessed by other methods
within the project

R. MALEMBA S 334
T. PATRICK'S SEC SCHOOL
• In visual basic, variables can also be declared as
either private (local) or public (global)
• e.g. Private Dim X As Integer

R. MALEMBA S 335
T. PATRICK'S SEC SCHOOL
CONSTANTS
• A constant is a value such as PI (3.14) that does not
change during execution of a program
• In VB the key word Const that comes before PI is
used to declare the value as a constant
• e.g. Const PI As Double = 22/7

R. MALEMBA S 336
T. PATRICK'S SEC SCHOOL
ASSIGNMENT
• In VB, assignment is done using an assignment
operator (=)
• e.g Radius = Val(txtRadius.Text)
• In this case, whatever is in the right side is assigned
to the left side (Radius)

R. MALEMBA S 337
T. PATRICK'S SEC SCHOOL
VB. NET OPERATORS
• In order to write correct mathematical expressions,
Visual Basic uses operators.
• These include arithmetic, relational and logical
operators

R. MALEMBA S 338
T. PATRICK'S SEC SCHOOL
ARITHMETIC OPERATORS
• Are special symbols that are used to write
arithmetic expressions

R. MALEMBA S 339
T. PATRICK'S SEC SCHOOL
SYMBOL NAME OPERATION

+ Plus sign Addition


- Minus sign Subtraction

* Asterisk Multipilication
/ Slash Division

^ Caret Raise the number to power of

\ Integer division Integer division

MOD Integer remainder Integer remainder

R. MALEMBA S 340
T. PATRICK'S SEC SCHOOL
• In an integer division using \ operator, each of the
numbers being divided is first rounded to become
an integer then the quotient is truncated to an
integer
• e.g, 2.4\3.5 will result in 2\4 being evaluated
• The MOD operator returns the remainder of an
integer division.
• e.g. 4 MOD 3 returns 1 and 5MOD3 returns 2

R. MALEMBA S 341
T. PATRICK'S SEC SCHOOL
PRECEDENCE OF
ARITHMETIC OPERATORS
• Just like in mathematics, it uses BODMAS
PRECEDENCE SYMBOL EXPLANATION

1 ^ Performed first
2 * and / Caried out from left to
right in an expression

3 \ Caried from left to


right after * and /

4 MOD Evaluated after


integer division

5 + and - Evaluated from left to


right

R. MALEMBA S 342
T. PATRICK'S SEC SCHOOL
RELATIONAL OPERATORS
• A relation operator is used in an expression that
returns a true or false value when evaluated
• The operators can compare numeric variables,
constants or expressions

R. MALEMBA S 343
T. PATRICK'S SEC SCHOOL
OPERATOR NAME

= Equal to

<> Not equal to


> Greater than

< Less than

<= Less than or equal to

>= Greater than or equal to

R. MALEMBA S 344
T. PATRICK'S SEC SCHOOL
• e.g. Y <> 100
• The expression above will evaluate to true if Y is not
equal to 100 otherwise it evaluates to false

R. MALEMBA S 345
T. PATRICK'S SEC SCHOOL
LOGICAL OPERATORS
• Logical operators are special form of relational
operators used to compare simple or complex
relational expressions to form compound
expressions that return true or false

R. MALEMBA S 346
T. PATRICK'S SEC SCHOOL
FOUR MAIN TYPES OF LOGICAL
OPERATORS USED IN VB

OPERATOR OPERATION

And Results in a condition that is true if both


expressions are true

Or Results in a condition that is true if one of the


conditions is true or both are true

Xor Results in a condition that is true if one of the


conditions is true and the other is false

Not Negates the value of a logical expression

R. MALEMBA S 347
T. PATRICK'S SEC SCHOOL
• e.g. (X=20) Or (Y<10)
• This returns true if X is 20 and the value of Y is less
than 10

R. MALEMBA S 348
T. PATRICK'S SEC SCHOOL
CONTROL STRUCTURES
• In programming, control structures are constructs
that determine the logical flow of execution of
program statements
• There are three types of control structures
supported by most programming languages such as
VB, Pascal and C++.
• These are sequence, selection and iteration
(looping)

R. MALEMBA S 349
T. PATRICK'S SEC SCHOOL
SEQUENCE
• In sequence control structure, the computer reads
instructions from a program file starting from the
first statement sequentially moving down to the
last statement
• e.g.
Bigin
Statement 1
Statement 2
.
.
.
Statement n
End

R. MALEMBA S 350
T. PATRICK'S SEC SCHOOL
SELECTION
• Most programs that solve real world problems gives a
computer ability to make a decision or execute statement(s)
given a certain condition is satisfied
• In programming, making decision is referred to as selection.
• For example, consider a program to test if X is greater than
20 (X>20).
• In this case, if a user enters a value of X, it is compared
against 20 and the program returns true or false depending
on the outcome.
• This is known as conditional evaluation where the output is
a Boolean value (true or false)

R. MALEMBA S 351
T. PATRICK'S SEC SCHOOL
TYPES OF SELECTION
STATEMENTS USED IN VB
i. IF … THEN
ii. IF … ELSE
iii. NESTED IF
iv. SELECT … CASE

R. MALEMBA S 352
T. PATRICK'S SEC SCHOOL
IF … THEN SELECTION
• IF … THEN selection evaluates the statement within
the selection body if the Boolean value returned is
true
• The general structure of IF … THEN selection is:

IF <condition> THEN
<statements if true>
END IF

R. MALEMBA S 353
T. PATRICK'S SEC SCHOOL
EXAMPLE
Write a program that prompts a user to enter a score
in Computer Studies exam. If the score is at least
50%, the program should display “PASS”.

R. MALEMBA S 354
T. PATRICK'S SEC SCHOOL
SOLUTION
Dim Score As Integer

Score = Val(txtScore.Text)
Dim Comment As String
Comment = "PASS"

If Score >= 50 Then


txtRemarks.Text = Comment

End If
R. MALEMBA S 355
T. PATRICK'S SEC SCHOOL
IF … ELSE SELECTION
• IF … ELSE selection is suitable when there are two
alternatives to choose from.
• The general structure of IF … ELSE selection is:

IF <condition> THEN
<statements if true>
ELSE
<statements if false>
END IF
R. MALEMBA S 356
T. PATRICK'S SEC SCHOOL
EXAMPLE
Write a program that prompts a user to enter a score
in Computer Studies exam. If the score is at least
50%, the program should display “PASS”, and if it is
below 50% the program should display “FAIL”.

R. MALEMBA S 357
T. PATRICK'S SEC SCHOOL
SOLUTION
Dim Score As Integer

Score = Val(txtScore.Text)
Dim Comment As String
Comment = "PASS"

If Score >= 50 Then


txtRemarks.Text = Comment
Else
txtRemarks.Text = "FAIL“

End If
R. MALEMBA S 358
T. PATRICK'S SEC SCHOOL
NESTED IF SELECTION
• Nested IF or the IF … ELSE …IF selection is used where two or more
options have to be considered to make a selection.
• The general structure is:
IF <condition> THEN
<statements>
ELSE IF <condition> THEN
<statements>
ELSE IF <condition> THEN
<statements>
ELSE <condition> THEN
<statements>
END IF
R. MALEMBA S 359
T. PATRICK'S SEC SCHOOL
EXAMPLE
Write a program that prompts a user to enter a score
in Computer Studies exam. If the score is at least
75%, the program should display “DISTINCTION”, if it
is at least 60%, the program should display “CREDIT”,
if it is at least 50%, the program should display
“PASS”, and if it is below 50% the program should
display “FAIL”.

R. MALEMBA S 360
T. PATRICK'S SEC SCHOOL
SOLUTION
Dim Score As Integer
Score = Val(txtScore.Text)

If Score >= 101 Then


txtRemarks.Text = "INVALID INPUT"
ElseIf Score >= 75 Then
txtRemarks.Text = "DISTINCTION"
ElseIf Score >= 60 Then
txtRemarks.Text = "CREDIT"
ElseIf Score >= 50 Then
txtRemarks.Text = "PASS"
Else
txtRemarks.Text = "FAIL"

End If
R. MALEMBA S 361
T. PATRICK'S SEC SCHOOL
SELECT … CASE
• Similar to nested IF, the select case control is used
in case there are several alternatives to choose
from
• However, unlike nested IF, select case uses ordinal
values only
• An ordinal value is one that has predecessor and
successor such as integers and alphabetic
characters
• For example, the predecessor of 3 is 2 and its
successor is 4.
R. MALEMBA S 362
T. PATRICK'S SEC SCHOOL
GENERAL STRUCTURE OF
SELECT … CASE
SELECT CASE ordinal_value

CASE 1
<statements>
CASE 2
<statements>
CASE 3
<statements>
CASE ELSE
<statements>
END SELECT
R. MALEMBA S 363
T. PATRICK'S SEC SCHOOL
EXAMPLE
• Using Select Case control, write a program that
displays the following remarks depending on the
examination grade awarded:
A: Comment = ‘EXCELLENT’
B: Comment = ‘GOOD’
C: Comment = ‘FAIR’
D: Comment = ‘POOR’

R. MALEMBA S 364
T. PATRICK'S SEC SCHOOL
SOLUTION

R. MALEMBA S 365
T. PATRICK'S SEC SCHOOL
LOOPING (ITERATION)
• A loop is a control structure that causes program
statement(s) to be executed several times
• Visual Basic language has five types of looping
control structures

R. MALEMBA S 366
T. PATRICK'S SEC SCHOOL
TYPES OF LOOPING
CONTROL STRUCTURE
Do While...... Loop
While..... Wend
Do..... Loop While
Do Until....... Loop
For.... Next

R. MALEMBA S 367
T. PATRICK'S SEC SCHOOL
Do While..... Loop
The Do While..... Loop is used if a condition has to
be met before the statements within the loop body
are executed
This type of loop uses a pre-test condition to
determine if statements are to be executed zero or
more times

R. MALEMBA S 368
T. PATRICK'S SEC SCHOOL
Do While.....Loop Syntax
Do While <condition>
<statements>

Loop

R. MALEMBA S 369
T. PATRICK'S SEC SCHOOL
Do While.... Loop Example
• Write a VB program that displays the sum of the
first 4 numbers.

R. MALEMBA S 370
T. PATRICK'S SEC SCHOOL
solution
Dim ControlNum As Integer
Dim sum As Integer
ControlNum = 0
sum = 0
Do While ControlNum <= 4
sum = sum + ControlNum
ControlNum = ControlNum + 1
Loop

txtSum.text = Str(sum)
R. MALEMBA S 371
T. PATRICK'S SEC SCHOOL
While.... Wend Loop
• A While.... Wend Loop structure is similar to the Do
While.... Loop structure
• This loop also continues executing statements
within the body as long as the condition is true

R. MALEMBA S 372
T. PATRICK'S SEC SCHOOL
While.... Wend Loop
SYNTAX
While <condition>
<statements>
Wend

R. MALEMBA S 373
T. PATRICK'S SEC SCHOOL
While.... Wend Loop
EXAMPLE
Dim ControlNum As Integer
Dim sum As Integer
ControlNum = 0
sum = 0
While ControlNum <= 4
sum = sum + ControlNum
ControlNum = ControlNum + 1
Wend

txtSum.text = Str(sum)
R. MALEMBA S 374
T. PATRICK'S SEC SCHOOL
Do Until.... Loop
• Just like the previous loops, Do Until.... Loop
execute the statements in the body of the loop if
the condition is true

R. MALEMBA S 375
T. PATRICK'S SEC SCHOOL
Do Until.... Loop SYNTAX
Do Until <condition>
<statements>
Loop

R. MALEMBA S 376
T. PATRICK'S SEC SCHOOL
Do Until.... Loop EXAMPLE
Dim ControlNum As Integer
Dim sum As Integer
ControlNum = 0
sum = 0
Do Until ControlNum > 4
sum = sum + ControlNum
ControlNum = ControlNum + 1
Loop

txtSum.text = Str(sum)
R. MALEMBA S 377
T. PATRICK'S SEC SCHOOL
Do.... Loop While
• Unlike the previous three loops, Do.... Loop While
loop executes the statements within the loop at
least once
• This is because, this type of loop uses a post-test
condition at the end of the loop block

R. MALEMBA S 378
T. PATRICK'S SEC SCHOOL
Do.... Loop While SYNTAX
Do
<statements>
Loop While <condition>

R. MALEMBA S 379
T. PATRICK'S SEC SCHOOL
Do.... Loop While EXAMPLE
Dim ControlNum As Integer
Dim sum As Integer
ControlNum = 0
sum = 0
Do
sum = sum + ControlNum
ControlNum = ControlNum + 1
Loop While ControlNum <= 5

txtSum.text = Str(sum)
R. MALEMBA S 380
T. PATRICK'S SEC SCHOOL
For...... Next Loop
• For…Next Loop is used to execute a statement or set of
statements for the specified number of times.
• This loop is more useful when it is already known how
many times the loop will be executed.
• This loop depends on the value of a variable to repeat
the statements. This variable is called counter variable
or control variable.
• The loop specifies the starting and ending values of
counter variable.
• The loop terminates when the counter variable reaches
its ending value.
R. MALEMBA S 381
T. PATRICK'S SEC SCHOOL
For.... Next Loop SYNTAX
FOR ControlVar = StartVar TO EndVar [Step n]

<Statements>

NEXT

R. MALEMBA S 382
T. PATRICK'S SEC SCHOOL
For.... Next Loop EXAMPLE

R. MALEMBA S 383
T. PATRICK'S SEC SCHOOL
GROUP ASSIGNMENT
• DUE DATE: 28 July, 2022

R. MALEMBA S 384
T. PATRICK'S SEC SCHOOL
INTRODUCTION TO
COMMUNICATION TECHNOLOGIES

R. MALEMBA S 385
T. PATRICK'S SEC SCHOOL
DEFINITION OF TERMS
USED IN COMMUNICATION

R. MALEMBA S 386
T. PATRICK'S SEC SCHOOL
COMMUNICATION
Communication is the process of using sounds,
words, symbols, signs, pictures or signals to pass a
message or information from one person to another
The orgin of the message is called the source or
sender while the target recipient is the receiver
• Communication may be in a verbal or non-verbal
form

R. MALEMBA S 387
T. PATRICK'S SEC SCHOOL
DATA COMMUNICATION
Data communication is one of the examples of non-
verbal form of communication
Refers to the process of transmitting data signals
from one point to anothe through communication
channel.
• Data is encoded for storage and processing by
computers and other related devices

R. MALEMBA S 388
T. PATRICK'S SEC SCHOOL
TELECOMMUNICATION
Telecommunication is the use of technology to
enable exchange of messages in form of data and
information over a wired or wireles communication
media
• Telecommunications technologies include the use
of telegraph, telephone, radio, television and
computers.

R. MALEMBA S 389
T. PATRICK'S SEC SCHOOL
TELECOMMUNICATION
NETWORK
Telecommunication network is an interconnection of
telecommunication equipments like telephones,
radios and computers using transmission media or
links
• The network enables the flow of data or
information from the source to destination

R. MALEMBA S 390
T. PATRICK'S SEC SCHOOL
COMPUTER NETWORK
• A computer network is an interconnection of
computers using transmission media and
networking devices to enable exchange of data and
information

R. MALEMBA S 391
T. PATRICK'S SEC SCHOOL
INFORMATION AND COMMUNICATION
TECHNOLOGY (ICT)
• Information and Communication Technology (ICT)
refers to the convergence of computer networks
with telecommunication networks like radios and
telephones to provide a communication platform
through which people can share information

R. MALEMBA S 392
T. PATRICK'S SEC SCHOOL
HISTORY OF TELEPHONE
Telephone was inverted after telegraph
Telegraph used a series of dots and dashes (beeps)
coded as electrical signals to transmit text characters
over long distances
• Alexander Graham Bell inverted telephone in 1876

R. MALEMBA S 393
T. PATRICK'S SEC SCHOOL
EVOLUTION OF TELEPHONE
Rotary dial telephone
Touch tone dial telephone
i. Mobile telephone

R. MALEMBA S 394
T. PATRICK'S SEC SCHOOL
ROTARY DIAL TELEPHONE
Rotary dial telephones were the first phones to be
manufactured and were used from around 1919 up
to 1990's
• To use the phone, one had to use a rotary dial

R. MALEMBA S 395
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 396
T. PATRICK'S SEC SCHOOL
TOUCH TONE DIAL
TELEPHONE
Touch tone phones do not have a rotary dial but push
button key pads.
• They are called touch tone dial phones because
each button produces a unique sound when
pressed, a feature which is common in mobile
phones

R. MALEMBA S 397
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 398
T. PATRICK'S SEC SCHOOL
MOBILE TELEPHONES
Mobile phones were designed to fit in the pocket
They communicate through cellular wireless
network that is set up by the government or mobile
service provider
• Each mobile phone has a special component called
a Subscriber Identification Module (SIM) card
which identifies each subscriber on the network

R. MALEMBA S 399
T. PATRICK'S SEC SCHOOL
FOUR MAIN CATEGORIES
OF MOBILE PHONES
Basic/conventional mobile phones
Touch screen feature phones
Smartphones
i. Tablets

R. MALEMBA S 400
T. PATRICK'S SEC SCHOOL
BASIC MOBILE PHONES
These are mobile phones designed just to make calls
and send text messages but it also may have a few
monochrome games
• Some of the advanced basic phones may have
colour screen, low resolution camera, QWERTY
keypad and ability to access internet

R. MALEMBA S 401
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 402
T. PATRICK'S SEC SCHOOL
TOUCH SCREEN FEATURE
PHONES
They have wide touch screen and ability to process
graphics in full colour
They can connect to high speed internet because it
has higher memory capacity, and powerful processor
than basic phones
• Have higher resolution camera

R. MALEMBA S 403
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 404
T. PATRICK'S SEC SCHOOL
SMARTPHONES
Powerful processor and large touch screen
Powerful operating system which makes the phone
operate like computers
Has a high memory capacity
• High resolution cameras

R. MALEMBA S 405
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 406
T. PATRICK'S SEC SCHOOL
TABLETS
A large touch screen, bigger than of a smartphone
Large internal storage
Powerful processor
Ability to run several applications and connect to
high speed internet
• High resolution screen and camera

R. MALEMBA S 407
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 408
T. PATRICK'S SEC SCHOOL
HISTORY OF INTERNET
The idea of the internet started in the 1960's among
a few visionaries at the Massachusets Institute of
Technology (MIT) and University of California, Los
Angeles (UCLA)
• The first message was sent over the ARPANET,
which evolved into the internet from computer
science Professor Leonard Kleinrock's laboratory at
UCLA

R. MALEMBA S 409
T. PATRICK'S SEC SCHOOL
USES/APPLICATIONS OF
NETWORKS
Electronic banking
Internet access at home and work
E-commerce
Point-of-sale (POS) services
Mobile communications
• Electronic government

R. MALEMBA S 410
T. PATRICK'S SEC SCHOOL
ELECTRONIC BANKING
This involves the use of networked computer systems
to offer banking services like cash withdrawals,
deposits, transfers and payments
• Electronic banking involves the following services
and technologies :

R. MALEMBA S 411
T. PATRICK'S SEC SCHOOL
AUTOMATED TELLER
MACHINE
Automated Teller Machines (ATMs) enables a person
to withdraw and deposit money in their bank
accounts as long as they can positively be
authenticated for true identity
• The authentication is done by means of a plastic
card that is inserted in the terminal and the user is
required to provide Personal Identification Number
(PIN)

R. MALEMBA S 412
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 413
T. PATRICK'S SEC SCHOOL
INTERNET BANKING
Customers can perform transactions and view their
statements online
• Usually, the user can register with an organization
like VISA or MasterCard in order to perfom online
transactions on internet

R. MALEMBA S 414
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 415
T. PATRICK'S SEC SCHOOL
MOBILE BANKING
Mobile phones can now be used to access the bank
account of a customer to withdraw, deposit and
transfer cash
• Mobile to mobile cash transfer is also possible
without necessarily having to access the bank
account

R. MALEMBA S 416
T. PATRICK'S SEC SCHOOL
INTERNET ACCESS AT
HOME AND WORK
Computer networks have enabled access to
information held on the internet both at home and
work place
Using computers, tablets and smartphones, more
people are able to access internet using physical and
wireless means
• This suports research and e-health services

R. MALEMBA S 417
T. PATRICK'S SEC SCHOOL
E-COMMERCE
Computer networks and internet has enabled e-
commerce whereby people can buy and sell goods
and services online
• If mobile phone is used to access electronic
commerce services, it is called mobile commerce
(m-commerce)

R. MALEMBA S 418
T. PATRICK'S SEC SCHOOL
POINT-OF-SALE (POS)
SERVICES
Computer networks enable people to pay for goods
purchased in retail stores using electronic money at
the point of sale
• Using mobile cash transfer or bank card like VISA,
cashless transfer can be made by the buyer to pay
for goods and services

R. MALEMBA S 419
T. PATRICK'S SEC SCHOOL
MOBILE COMMUNICATIONS
Mobile networks can be viewed as wireless computer
nertworks
Note that a mobile phone is a special purpose
computer whose task is to enable communication
• Therefore, mobile networks facilitates
communications and delivery of services like voice,
data and money transfers

R. MALEMBA S 420
T. PATRICK'S SEC SCHOOL
ELECTRONIC
GOVERNMENT
• Computer networks are enabling governments to
deliver electronic services to the citizens eg.
Payment of taxes, international trade, electronic
identities and passports

R. MALEMBA S 421
T. PATRICK'S SEC SCHOOL
BENEFITS OF NETWORKS

R. MALEMBA S 422
T. PATRICK'S SEC SCHOOL
RESOURCE SHARING
• A resource in the network environment means
files, printers, modems, communication links,
storage devices, fax machines programs and other
components that can be shared on the network
• Centralized access to data and information leads to
less waste of time and hence greater productivity

R. MALEMBA S 423
T. PATRICK'S SEC SCHOOL
• In computer networks, shared resources may be
attached to a network server.
• The other computers on the network that send
requests to the server are referred to as clients or
workstations
• Network server runs a special program called the
SERVER SOFTWARE which controls computers on the
network and listen to client's request to be served
• For example, a print server gives permission for a
particular client to print documents on the network
printer
R. MALEMBA S 424
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 425
T. PATRICK'S SEC SCHOOL
REMOTE
COMMUNICATIONS
• Remote communication refers to the transmission
of data signals between two communication
devices located in different geographical areas
• A computer that tries to access resources from
another computer on the network is called
REMOTE CLIENT while the computer being
accessed is called a REMOTE SERVER
• Remote communication has been made possible by
use of wireless communication media such as radio
waves, microwave, and satellite.

R. MALEMBA S 426
T. PATRICK'S SEC SCHOOL
DISTRIBUTED PROCESSING
• Distributed processing refers to processing of data by
interconnected computers located in different
geographical locations
• With distributed processing, files reside on the user's
computer rather than on a central server
• This makes it possible for branch offices in a large
organisation have their own servers that store data,
information and other resources required for daily
operations
• This servers would then periodically update the
central computer
R. MALEMBA S 427
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF THIS
MODEL OF DATA
PROCESSING
• The failure of the central computer does not affect
the operation of the other terminals
• Processing load is shared equally hence no time
wastage

R. MALEMBA S 428
T. PATRICK'S SEC SCHOOL
COST-EFFECTIVENESS
• One good thing about a network is that it greatly
increase the efficient use of scarce resources
• Imagine a large organization that has stand alone
computers only. In such a case, the management
has to buy a printer for each computer
• However, with a computer network, only one
printer is sufficient
• The same applies to other resources like fax
machines, optical drives, files and applications

R. MALEMBA S 429
T. PATRICK'S SEC SCHOOL
• Users can send electronic messages and mail to
each other instead of having to bear the cost of
stamp duty or physical delivery charges
• On the same note, company executives may not
need to travel across continents to hold meetings
• They can hold video conferences instead and save
on traveling expenses

R. MALEMBA S 430
T. PATRICK'S SEC SCHOOL
RELIABILITY
• Data can be transferred with minimal or no error
from source to destination
• In case one computer breaks down, the other can
still access data and information from other
computers using other devices

R. MALEMBA S 431
T. PATRICK'S SEC SCHOOL
LIMITATIONS OF
NETWORKS

R. MALEMBA S 432
T. PATRICK'S SEC SCHOOL
SECURITY ISSUES
• Data and information transmitted over a computer
network is prone to illegal access than if the
computer was not on the network
• One of the common methods of data protection in
a networked environment is encryption
• Encrypted data cannot be understood by people
who illegally access it unless they have the
decryption key

R. MALEMBA S 433
T. PATRICK'S SEC SCHOOL
HIGH INITIAL COST
• The initial cost of buying network hardware and
software may be very high.

R. MALEMBA S 434
T. PATRICK'S SEC SCHOOL
SOCIOCULTURAL EFFECTS
• The internet has chatrooms and messaging services
that enable under age children to meet peers and
adults on the internet some of whom may be
morally spoiled
• Access to pornographic and other negative
materials has also made the fight against social
problems such as HIV and AIDS, pre-marital sex as
well as drug and substances abuse more
complicated.

R. MALEMBA S 435
T. PATRICK'S SEC SCHOOL
SPREAD OF TERRORISM
AND DRUG TRAFFICKING
• The easy flow of information from one place to
another make even those who are on the wrong
side of the law communicate easily
• Terrorists and drug traffickers use information
networks for their business communications

R. MALEMBA S 436
T. PATRICK'S SEC SCHOOL
OVER- RELIANCE ON
NETWORK
• Most organisations today have phased out manual
operations, this means that their business
processes depend on computer networks
• The disadvantage of this over reliance is that, if by
any chance the network fails or goes down, all
systems in the organisation are brought to a halt

R. MALEMBA S 437
T. PATRICK'S SEC SCHOOL
ELEMENTS OF
COMMUNICATION SYSTEMS

R. MALEMBA S 438
T. PATRICK'S SEC SCHOOL
MESSAGE SOURCE
• This is the person who wants to send the message
across the communication system
• The message source may want to make a telephone
call, send email, etc

R. MALEMBA S 439
T. PATRICK'S SEC SCHOOL
TRANSMITTER
• Transmitter refers to a terminal equipment that
receives a message from the source and converts it
to a format that can be transmitted on the channel
• A transmitter could be a computer, radio or TV
transmitter station in broadcasting stations

R. MALEMBA S 440
T. PATRICK'S SEC SCHOOL
COMMUNICATION
CHANNEL
• A communication channel is a transmission media
through which data and information flows
• A channel carries the coded message from the
transmitter to the receiver using signals that can
flow through it.
• The channel could be made of one or more
transmission media especially if the message is
traveling over long distances

R. MALEMBA S 441
T. PATRICK'S SEC SCHOOL
RECEIVER
• A receiver is a terminal equipment that gets the
transmitted message from the channel and decodes
it before presenting it to the user
• Receiver could be a computer, mobile phone etc

R. MALEMBA S 442
T. PATRICK'S SEC SCHOOL
MESSAGE USER
• This is the person who is the target recipient of the
message

R. MALEMBA S 443
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 444
T. PATRICK'S SEC SCHOOL
NEXT LESSON

COMPONENTS OF A NETWORK

R. MALEMBA S 445
T. PATRICK'S SEC SCHOOL
THE END!

R. MALEMBA S 446
T. PATRICK'S SEC SCHOOL
THE NETWORK AND ITS
ELEMENTS
• A computer network is made up of several standard
elements (components) which can be classified into
four major categories namely:
1. Communication devices.
2. Data signal.
3. Data communication media.
4. Networking software.

R. MALEMBA S 447
T. PATRICK'S SEC SCHOOL
1. NETWORKING
(COMMUNICATION)
DEVICES
• Networking devices allows the transmission of data
signals from the source to the destination

R. MALEMBA S 448
T. PATRICK'S SEC SCHOOL
CATEGORIES OF
NETWORKING DEVICES
i. Data Terminal Equipment (DTE)
ii. Data Circuit-terminating Equipment (DCE)

R. MALEMBA S 449
T. PATRICK'S SEC SCHOOL
DATA TERMINAL
EQUIPMENT
• DTE is a device at both ends of communication
network that converts user information into signals
at the source or reconverts signals received at the
destination
• Examples of DTEs include, desktop computers,
mobile phones, laptops and tablets

R. MALEMBA S 450
T. PATRICK'S SEC SCHOOL
DATA CIRCUIT-
TERMINATING EQUIPMENT
• Also known as Data Communication Equipment
• Refers to as devices used to establish, maintain and
terminate communication sessions between DTE
(data source) and its destination
• In other words, DCE is an interface between data
terminal equipment and communication media
• Examples include, Network Interface Card (NIC),
Modems and codecs, hubs, routers, switches,
bridges, repeaters, gateways and access points

R. MALEMBA S 451
T. PATRICK'S SEC SCHOOL
WIRED DEVICES

R. MALEMBA S 452
T. PATRICK'S SEC SCHOOL
NETWORK INTERFACE
CARDS
• NIC creates a physical connection between the
computer and the transmission media
• A network interface card is plugged into an empty
expansion slot on the motherboard (others are
embedded on the board)
• The network interface card has ports at the back in
which the terminated end of a network cable can
be plugged

R. MALEMBA S 453
T. PATRICK'S SEC SCHOOL
MODEMS AND CODECS
• Modem converts a signal from digital to analog
form before transmission over analog media while
a codec converts an analog signal to digital form for
transmission via a digital medium
• At the receiving end, terminal devices convert the
signal back to original form (demodulation)
• A modem can be external, an add-on card or built
on the motherboard

R. MALEMBA S 454
T. PATRICK'S SEC SCHOOL
SIGNAL MODULATION AND
DEMODULATION
• This is the process of converting data signals to and
from a form that is suitable for transmission over a
transmission medium

R. MALEMBA S 455
T. PATRICK'S SEC SCHOOL
Figures below: external and
wireless modem
respectively

R. MALEMBA S 456
T. PATRICK'S SEC SCHOOL
HUBS
• A hub also called a concentrator is a component
that connects computers on a local area network
(LAN) and is able to relay (broadcast) signals from
one computer to another.
• A hub usually connect networks that have common
architecture i.e. one that has the same set of
communication software called PROTOCOLS
• Protocols refer to set of rules that govern
communication between devices on a network.

R. MALEMBA S 457
T. PATRICK'S SEC SCHOOL
• A hub transmit the signals by broadcasting them to all
the computers on the network
• After the signal is broadcasted, the computer whose
address is on the message picks the message from the
network
• Some hubs called INTELLIGENT HUBS are able to
monitor the way computers are communicating on the
network and keep the information in a small database of
their own called Management Information Base (MIB)
• Several hubs can be connected together one another to
expand the network
R. MALEMBA S 458
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 459
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 460
T. PATRICK'S SEC SCHOOL
BRIDGES
• A bridge is a network device that determines the
appropriate network segment for which a message
is meant for delivery through address filtering
• A bridge can divide a busy network into segments
to reduce network traffic
• A bridge makes sure that packets (messages or
data) that are not meant for a particular segment
are not broadcasted in that network

R. MALEMBA S 461
T. PATRICK'S SEC SCHOOL
PURPOSE OF USING A
BRIDGE
1. Extend the length and number of stations that a
segment can support
2. Reduce overall traffic flow by allowing broadcasts
only in the data destination segment of the
network

R. MALEMBA S 462
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 463
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 464
T. PATRICK'S SEC SCHOOL
REPEATERS
• A repeater receives data signals from one segment
of a network, cleans it to remove any distortions,
boost it and then sends it to another segment
• Using repeaters is the simplest way to expand a
network because they broadcast the same message
to other network segments

R. MALEMBA S 465
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 466
T. PATRICK'S SEC SCHOOL
ROUTERS
• A router is a device that interconnects different
networks and directs the transfer of data packets from
source to destination .
• Routing depends on network addresses.
• Each network has a unique identifier or address called
the NETWORK ADDRESS .
• All the computers on the same address have the same
network address but different host numbers.
• The router receives a packet from a device on the
network and checks the destination's network address
R. MALEMBA S 467
T. PATRICK'S SEC SCHOOL
• If the address is the same as the one on which the
router is, it passes the data to the destination by
reading the host address otherwise the packet is
routed to the specified network address
• Some devices called BROUTERS combine the
functionality of a bridge and a router

R. MALEMBA S 468
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 469
T. PATRICK'S SEC SCHOOL
GATEWAYS
• A gateway is a device that is configured to provide
access to devices on wide area network (WAN) or
internet.
• One such device is the router in which gateway
software is installed .
• Because of this reason, most people confuse a
gateway with a router but a gateway may not be
necessarily be a router.
• A gateway is the most powerful internetwork device
because of its ability to convert data across different
network architectures and protocols
R. MALEMBA S 470
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 471
T. PATRICK'S SEC SCHOOL
SWITCHES
• A switch is a device that forwards a packet directly
to addressed node without broadcast.
• A node refers to a data terminal equipment such as
a workstation or a computer on the network.
• A switch transmits data by connecting two nodes
point-to-point as if they were linked by a cable
directly .
• Some hubs also incorporate switching mechanism .
• Such a hub is referred to as a SWITCHING HUB

R. MALEMBA S 472
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 473
T. PATRICK'S SEC SCHOOL
WIRELESS
COMMUNICATION DEVICES

R. MALEMBA S 474
T. PATRICK'S SEC SCHOOL
WIRELESS ACCESS POINT
(WAP)
• WAP is used to extend local area network (LAN)
• It is an access point to a wired network for people
who have wireless devices such as smartphones
and laptops
• Access points act as wireless hubs to link multiple
NICs
• WAPs are commonly used in large office buildings
to create one Wireless Local Area Network (WLAN)

R. MALEMBA S 475
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 476
T. PATRICK'S SEC SCHOOL
WIRELESS ANTENNAE
• Wireless antenna such as nano station is a device
mounted indoors or outdoors to extend wireless
network to the surrounding buildings
• It is used to propagate radio wave, microwave or
infrared waves that carry data to be received by
access points in the surrounding

R. MALEMBA S 477
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 478
T. PATRICK'S SEC SCHOOL
PCMCIA CARD
• A Personal Computer Memory Card International
Association (PCMCIA) adapter is an add-on card
inserted into a device such as a laptop in order to
enable wireless communication between the
devices and a wired network server

R. MALEMBA S 479
T. PATRICK'S SEC SCHOOL
DATA SIGNAL
TRANSMISSION

R. MALEMBA S 480
T. PATRICK'S SEC SCHOOL
2. DATA SIGNAL
• Data signal refers to as a voltage level in the circuit
which represents the flow of data
• Data signals can either be ANALOG or DIGITAL
• ANALOG data is made up of continuous waveform
while DIGITAL data is made up of non-continuous
discrete signal.

R. MALEMBA S 481
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 482
T. PATRICK'S SEC SCHOOL
• From figure (a), digital signal rises suddenly to a
peak amplitude of +1, holds for sometime then
suddenly drops to -1 level.
• On the other hand an analog signal rises to +1 and
falls to -1 in a continuous manner
• Both signals repeat themselves at equal time
intervals.
• Electrical signals or waveforms of this nature are
said to be periodic.

R. MALEMBA S 483
T. PATRICK'S SEC SCHOOL
PERIODIC WAVES
• Periodic waves have the following parameters ;
i. Amplitude (A)
ii. Frequency (f)
iii. Periodic Time (T)

R. MALEMBA S 484
T. PATRICK'S SEC SCHOOL
AMPLITUDE (A)
• Amplitude is the maximum displacement that the
waveform of an electrical signal can attain.
• For example, the amplitude of the electrical
signals in figures above (a and b) is 1

R. MALEMBA S 485
T. PATRICK'S SEC SCHOOL
FREQUENCY (f)
• Frequency of an electrical signal is the number of
cycles made by the signal in one second.
• It is measured in units called HERTZ (Hz)
• 1 Hz is equivalent to 1 cycle/second

R. MALEMBA S 486
T. PATRICK'S SEC SCHOOL
PERIODIC TIME (T)
• The time taken by a signal to complete one cycle is
called periodic time
• Periodic time, T, is given by the formula
• T=1/f, where f is the frequency of the wave.

R. MALEMBA S 487
T. PATRICK'S SEC SCHOOL
MULTIPLEXING
• Refers to the process of sending multiple data
signals over the same medium
• A channel can be made to carry several data signals
either simultaneously or at different times
• DEMULTIPLEXING is the process of separating the
multiplexed signals at the receiving end

R. MALEMBA S 488
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 489
T. PATRICK'S SEC SCHOOL
BANDWIDTH
• Bandwidth is the maximum amount of data that a
transmission channel can carry at any one time
• For example, a certain cable transmitting 100 Mbps
(Mega bits per second) is said to have 100 Mbps
bandwidth

R. MALEMBA S 490
T. PATRICK'S SEC SCHOOL
BASEBAND SIGNAL
• Baseband signal is a digital signal that is generated
and fed into a transmission medium without
modulation
• The signal takes the form of voltages of different
magnitudes applied to the medium
• A baseband signal ultilises the full capacity of the
transmission medium.

R. MALEMBA S 491
T. PATRICK'S SEC SCHOOL
BROADBAND
TRANSMISSION
• In broadband transmission, analog signals are
transmitted over the transmission medium using
different frequencies (multiplexing)
• This means that several data signals can
simultaneously be sent through the same medium
at different frequencies

R. MALEMBA S 492
T. PATRICK'S SEC SCHOOL
ATTENUATION
• This is the decrease in magnitude and energy of a
signal as it progressively moves along a
transmission medium. If the signal is not boosted,
it is totally lost along the way and may never reach
the destination
• Attenuation is usually minimised by placing
amplifiers also called REPEATER stations along the
medium at appropriate distances

R. MALEMBA S 493
T. PATRICK'S SEC SCHOOL
CLASSIFICATION OF
COMMUNICATION
NETWORKS
Circuit switched
Packet switched
i. Message switched

R. MALEMBA S 494
T. PATRICK'S SEC SCHOOL
CIRCUIT SWITCHED
NETWORK
Circuit switched network involves a dedicated circuit
that has to be set up before data is sent from source
to destination
All the data is sent through the dedicated connection
• Examples of such networks are the telephone
networks

R. MALEMBA S 495
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 496
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF CIRCUIT
SWITCHING
Communication entities enjoy dedicated connection
• Data is sent through the same path from source to
destination

R. MALEMBA S 497
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
CIRCUIT SWITCHING
Inefficient utilisation of communication channels
since even when the link is under utilized, other
devices cannot use it
Circuit switching communication is expensive in
terms of set-up cost and bandwidth utilization
• Lack of error localization, meaning a broken link
means the entire communication breaks down

R. MALEMBA S 498
T. PATRICK'S SEC SCHOOL
PACKET SWITCHED
NETWORK
In packet switched networks, a message is broken
down into small tokens called packets, serialised then
sent over the network to the destination
• Each packet follows its own route to the destination
and there is no dedicated connection hence many
users can use the same link at a time

R. MALEMBA S 499
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF PACKET
SWITCHING
Efficient utilization of communication channels since
many users can share the same channel
Cheaper communication costs because no setup cost
is required
• Errors to messages are localised i.e. if a packet
becomes damaged only that packet needs to be
resent. Also if a link breaks, the packets can be
rerouted through available channels

R. MALEMBA S 500
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
PACKET SWITCHING
Routing of the packets from source to destination is
required
• Assembling of packets at the destination node
requires computing effort

R. MALEMBA S 501
T. PATRICK'S SEC SCHOOL
MESSAGE SWITCHED
NETWORKS
In message switching, entire message is sent from
one node to the next, then forwarded to the next,
until the message reaches the destination
• Nodes have special memories called buffers for
storing messages then forwarding them

R. MALEMBA S 502
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF MESSAGE
SWITCHING
Transmission efficiency is greater since messages can
share channel
Message priorities can be set on the network
• Since the next route is determined from the current
node, more efficient routing of messages is possible

R. MALEMBA S 503
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
MESSAGE SWITCHING
Long messages can dominate the channel at the
expense of others
• Nodes must have large storage capacities to store
and forward messages

R. MALEMBA S 504
T. PATRICK'S SEC SCHOOL
3. DATA TRANSMISSION
MEDIA
Data signals cannot be sent from one place to
another without medium of communication
A communication medium is a physical or wireless
channel used for transmitting data and information
from one point to another
In networking, data communication media can be
divided into two broad categories :
Communication using cable (physical media)
• Wireless communication (wireless media)
R. MALEMBA S 505
T. PATRICK'S SEC SCHOOL
COMMUNICATION USING
CABLES (PHYSICAL MEDIA)
• The main characteristic of physical media is that
data is transmitted from source to destination
through a physical channel such as copper cables

R. MALEMBA S 506
T. PATRICK'S SEC SCHOOL
TYPES OF PHYSICAL MEDIA
There are several types of physical transmission
media but the most common ones are:
Two-wire open lines cables
Twisted pair cables
Coaxial cables
• Fibre optic cables

R. MALEMBA S 507
T. PATRICK'S SEC SCHOOL
TWO-WIRE OPEN LINE
CABLE
This is a cable made up of two parallel copper wires
separated by a plastic insulator.
• They are mostly used in telecommunication
network to transmit voice signals.

R. MALEMBA S 508
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 509
T. PATRICK'S SEC SCHOOL
Although the plastic insulator is meant to reduce
interference called CROSSTALKS, their linear nature
allows an electromagnetic field to build around them
during heavy data transmission which may cause
interference to the signal.
The wires also capture environmental frequencies
like radiowaves that cause noise in the transmission
channel.
• The word NOISE refers to unwanted signals picked
by the channel.
R. MALEMBA S 510
T. PATRICK'S SEC SCHOOL
TWISTED PAIR CABLES
A twisted pair cable is made up of two solid copper wires
twisted around each other in a double helix manner
The winding of the wires is meant to reduce the build-up
of an electromagnetic field around the two wires as they
transmit data
Twisted pair cables are mostly used to transmit both
voice and data signals.
• The two common types of twisted pair cables are the
UNSHIELDED TWISTED PAIR (UTP) and SHIELDED
TWISTED PAIR (STP)

R. MALEMBA S 511
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 512
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 513
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 514
T. PATRICK'S SEC SCHOOL
Notice that unlike STP, UTP cables do not have a
shield that prevents electromagnetic interference
(EMI) from the environment
The cable is therefore easily affected by noise and
signal interference
Noise may come from lightening sparks or radio
frequency
• Unshielded twisted pair is therefore not suitable for
environments that are electrically noisy, the
alternative is to use STP.
R. MALEMBA S 515
T. PATRICK'S SEC SCHOOL
• Generally, twisted pair cables are categorized into
groups accoding to the type of data transmitted
and maximum rate of transmission, as shown
below;

R. MALEMBA S 516
T. PATRICK'S SEC SCHOOL
CATEGORY SUITABLE FOR SPEED (MAXIMUM
TRANSMITTING LIMIT)

Cat 1 Voice Less than 1 Mbps

Cat 2 Data 1 Mbps

Cat 3 Data 16 Mbps

Cat 4 Data 20 Mbps

Cat 5 Data 100 Mbps

Cat 6 Data 200 Mbps

R. MALEMBA S 517
T. PATRICK'S SEC SCHOOL
Most organizations today use Cat 5 and Cat 6 twisted
pair cables to set up Local Area Networks (LAN)
Although twisted pair cables support high data rates
of up to 200 Mbps, they suffer from attenuation
• For every cable length of 90 metres, a device for
amplifying the signal called REPEATER must be
installed

R. MALEMBA S 518
T. PATRICK'S SEC SCHOOL
EXAMPLE
• A student typed an e-mail to send over the internet
at a speed of 100 Mbps. Calculate the maximum
number of characters that can be sent per second if
each character consists of 8 bits.

R. MALEMBA S 519
T. PATRICK'S SEC SCHOOL
SOLUTION
• 1 Mb = 1,000,000 bit

• Therefore 100 Mb = 100,000,000 bits

• If 8 bits = 1 character
• Then 100,000,000 = (more characters)

• (100,000,000 bits / 8 bits) * 1 character

=12, 500, 000 Characters per second
R. MALEMBA S 520
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF TWISTED
PAIR CABLING
It is easier to set up network media because UTP
cables are widely available
Devices used to setup UTP network are cheap and
readily available
• UTP cables are cheaper because of mass
production for telephone use

R. MALEMBA S 521
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
TWISTED PAIR CABLING
UTP connection suffers high attenuation rate
It is sensitive to electromagnetic interference and
eavesdropping
• It has low data transmission rate as compared to
fibre optic cables.

R. MALEMBA S 522
T. PATRICK'S SEC SCHOOL
COAXIAL CABLES
• Coaxial cable resembles the cable that is used to
connect television antenna to a television set
• It is called coaxial cable because it has a copper core
(coax) which may be of solid wire cable surrounded by a
dielectric material (insulator)
• The dielectric material is then surrounded by mesh
conductor which is covered by a shield making the cable
more resistant to electromagnetic interference than the
twisted pair cable
• The mesh conductor is made of copper or aluminum
and serves as the earthing for the carrier copper core
R. MALEMBA S 523
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 524
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 525
T. PATRICK'S SEC SCHOOL
• Together with the insulation and any foil shield, the
shield protects the core from radio frequency
interference (RFI) and electromagnetic interference
(EMI)
• The diameter of the core determines the
attenuation rate.
• The thinner the core, the higher the attenuation
rate
• Data is carried on coax in form of Direct Current
(DC)
R. MALEMBA S 526
T. PATRICK'S SEC SCHOOL
• Coaxial cables have a bandwidth of up to 1Gbps
(Gigabits per second) hence ,they are used as
network backbone
• A good example where these cables are used is
connecting different networks between buildings
and routing truck calls in telecommunication

R. MALEMBA S 527
T. PATRICK'S SEC SCHOOL
TYPES OF COAXIAL CABLES
1. Thin coaxial cable, also known as thinnet. Has
one dielectric insulator
2. Thick coaxial cable, also known as thicknet. Has
two dielectric insulators around the core and is
thicker than the thinnet.

R. MALEMBA S 528
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 529
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF COAXIAL
CABLES
1. They are stable even under high transmission
loads
2. They have high bandwidth compared to twisted
pair cables
3. They are capable of carrying voice, data and
video signals simultaneously
4. They are more resistant to radio, and
electromagnetic interferences than twisted pair
cables

R. MALEMBA S 530
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
COAXIAL CABLES
1. Thick coaxial cable is hard to work with
2. Coaxial cables are relatively more expensive to
buy and to install as compared to twisted pair
cables
3. Local Area Network (LAN) established using
coaxial cables is difficult to troubleshoot and
maintain.
This has made coaxial cabling unpopular in LAN
hence the wide usage of twisted pair cables.

R. MALEMBA S 531
T. PATRICK'S SEC SCHOOL
FIBRE OPTIC CABLES
• Fibre is one of the latest physical transmission media to
be used in LAN and WAN
• Instead of transmitting data signals using electronic
signals, fibre optic cable uses visible light to transmit data
from one point to another on the network
• The electrical signals from the source are converted to
light signals, then propagated (spread) along the cable
• To convert electrical signals to light, the source has a
transmitter system made up of light emitting diode (LED)
• At the receiving end, a photosensitive device is used to
convert the light back to electric signals
R. MALEMBA S 532
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 533
T. PATRICK'S SEC SCHOOL
COMPONENTS OF FIBRE
OPTIC CABLE
i. Core
ii. Cladding
iii. Buffer
iv. Jacket

R. MALEMBA S 534
T. PATRICK'S SEC SCHOOL
CORE
• The core is the central part of the cable and is made
up of a hollow transparent plastic or glass.

R. MALEMBA S 535
T. PATRICK'S SEC SCHOOL
CLADDING
• This is a single protective layer surrounding the core
• It has some light bending characteristics in that,
when the light tries to travel from the core to
cladding, it is redirected back to the core.
• This is why even if a fibre optic cable is bent into
coils and a light signal is inserted at one end it will
be seen coming out from the other end.

R. MALEMBA S 536
T. PATRICK'S SEC SCHOOL
BUFFER
• The buffer surrounds the cladding and its main
function is to strengthen the cable

R. MALEMBA S 537
T. PATRICK'S SEC SCHOOL
JACKET
• It is the outer covering of the cable

R. MALEMBA S 538
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 539
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 540
T. PATRICK'S SEC SCHOOL
TYPES OF FIBRE OPTIC
CABLES
i. Single mode fibre optic cables
ii. Multimode fibre optic cables

R. MALEMBA S 541
T. PATRICK'S SEC SCHOOL
SINGLE MODE FIBRE OPTIC
CABLES
• Single mode fibre optic cables have a very narrow
center core
• The light in the cable can therefore take only one
path through it. Because of this , it has a very low
attenuation rate and is preferred for long distance
transmission
• It has a bandwidth of 50 Gbps which is higher than
that of the twisted pair cables
• Single mode fibre is very expensive and requires
very careful handling during installation
R. MALEMBA S 542
T. PATRICK'S SEC SCHOOL
MULTIMODE FIBRE OPTIC
CABLES
• Multimode fibre cables have thicker core than the
single mode
• It allows several light rays to be fed in the cable at
an angle
• Because of multiple light signals navigating the
cable at the same time, distortion of signal is
possible.
• Multimode cables have a high attenuation rate and
are usually used for shorter distances than the
single mode
R. MALEMBA S 543
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 544
T. PATRICK'S SEC SCHOOL
HOW DATA SIGNALS
TRAVEL IN FIBRE CABLES
• Data signal travels as the light through the core reflects, due to
total internal reflection
• The total internal reflection occurs when light travels from
optically dense medium such as glass to less optically dense
medium such as air. The process that causes total internal
reflection is called refraction
• When light travels from optically dense medium, it is refracted
away from the normal to a point that the ray deviates so far
away from normal making it reflected rather than refracted.
• Therefore, when light signal is fed into fibre optic cable, it tries
to cross from the core to the cladding but it is bent back into
the core hence propagates along the length of the cable.

R. MALEMBA S 545
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF FIBRE
OPTIC CABLING
i. Fibre optic cable is immune to electromagnetic
interference and eavesdropping
ii. Fibre optic cables support high bandwidth
iii. It can be used as a backbone in wide area
networks because it has low attenuation rate
iv. Can be used in highly flammable places because
they do not generate electrical signals
v. Fibre optic cable is smaller and lighter than
copper cables hence good for space between
ceiling and roof top
R. MALEMBA S 546
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF FIBRE
OPTIC CABLING
i. Installation and configuration of fibre optic
network devices and the media are expensive
ii. Installation is difficult because the cable is
dedicated
iii. Fibre optic network is difficult to troubleshoot
and complex to configure

R. MALEMBA S 547
T. PATRICK'S SEC SCHOOL
THE END!

R. MALEMBA S 548
T. PATRICK'S SEC SCHOOL
WIRELESS
COMMUNICATION
• Wireless transmission medium is used to transmit
data from one point to another through non-
physical channel
• Examples of wireless transmission media include
microwaves, satellite, radiowaves, and infrared all
of which use different frequencies of the
electromagnetic spectrum.

R. MALEMBA S 549
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 550
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 551
T. PATRICK'S SEC SCHOOL
MICROWAVE
TRANSMISSION
• Microwave frequencies range from about 3GHz to 40GHz on
the electromagnetic spectrum
• Due to small wavelength, microwaves easily release energy
in water as heat hence they are also used in microwave
ovens used in domestic appliances
• In networking, microwaves (electric & magnetic) are suitable
for point to point transmission
• This means that, a signal is directed through a sharp beam
from transmitter to receiver station.
• Figure below shows an illustration of point-point
transmission in microwaves connecting two local area
networks in different buildings.
R. MALEMBA S 552
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 553
T. PATRICK'S SEC SCHOOL
SATELLITE
COMMUNICATION
• A satellite is a special type of microwave relay (send
& receive info) station in the space
• The satellite earth stations are microwave dishes
with antenna used for relaying data using
microwaves to the satellite in the space
• A satellite transmission system has three main
components:

R. MALEMBA S 554
T. PATRICK'S SEC SCHOOL
i. Transmitter earth station
Has uplink frequency for transmitting data to the
satellite
ii. Satellite
Is a relay station in the orbit that receives, amplifies
and transmits the signal to a receiver earth station
via a downlink frequency that is different from uplink
frequency
iii. Receiver earth station
Receive data signals from the satellite
R. MALEMBA S 555
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 556
T. PATRICK'S SEC SCHOOL
• Communication satellite used for data transmission is
usually launched into space about 36,000 km above the
earth in such a manner that it's rotation speed is
relatively equal to that of earth.
• An observer on earth will therefore, see as if the satellite
is stationary in space
• These satellites are called GEOSTATIONARY satellites
• The satellite transmits the signal to many earthstations to
form a point to multipoint transmission
• In multipoint transmission, the transmitted signal scatters
in all directions forming a cell of access radius
R. MALEMBA S 557
T. PATRICK'S SEC SCHOOL
• New trends in microwave transmission systems is
seen through the use of Very Small Aperture
Terminal (VSAT) technology
• VSAT refers to a small satellite dish used in data,
radio and TV communication
• In recent times, most organisations have mounted
VSAT in order to access satellite communication
directly instead of having to go through state
owned gateways

R. MALEMBA S 558
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 559
T. PATRICK'S SEC SCHOOL
• In VSAT setup, a satellite produces strong signals
that can be received by a dish of only 2 metres in
diameter
• The signals are decoded using a decoder which is
plugged directly to a television set or a computer

R. MALEMBA S 560
T. PATRICK'S SEC SCHOOL
RADIO COMMUNICATION
• Radio waves travel just like surface water waves, i.e.
they are OMNIDIRECTIONAL
• This means that radiowaves start from a central point
and spread outwards in all directions
• The waves are radiated into the atmosphere by a radio
frequency antenna at constant velocity
• Radio waves are not visible by human eye
• Radio waves are used in radio and television broadcasts
• Data can also be transmitted over radio waves
communication channels
R. MALEMBA S 561
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 562
T. PATRICK'S SEC SCHOOL
• Radio waves can be of High Frequency (HF), Very
High Frequency (VHF) and Ultra-High Frequency
(UHF)

R. MALEMBA S 563
T. PATRICK'S SEC SCHOOL
HIGH FREQUENCY (HF)
• HF radio waves signal is propagated (spread) by
directing it to the ionosphere of the earth
• The ionosphere reflects it back to the earth's surface
and the receiver picks the signal
• Before inversion of satellite communication, HF radio
transmission was preferred mode of communication
in marine transport to direct ships and other
maritime objects
• However, the main drawback in use of HF
communication is the danger of signal interception by
unauthorized parties
R. MALEMBA S 564
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 565
T. PATRICK'S SEC SCHOOL
VERY HIGH FREQUENCY
(VHF)
• VHF radio waves are transmitted along the earth's surface
• Due to shape of the earth, the signal attenuates mostly at the
horizon
• This means that repeater stations have to be placed strategically to
maintain a line of sight in order to receive, amplify and propagate
the signal
• VHF is mostly used on hand held radio devices like walkie-talkie
radios
• To overcome the obstructions by the earth surface like mountains
and buildings, repeater stations are built on high grounds like hills
and mountains
• Repeater stations have to be placed strategically to maintain a line
of sight
R. MALEMBA S 566
T. PATRICK'S SEC SCHOOL
ULTRA HIGH FREQUENCY
(UHF)
• UHF radio waves are like VHF when it comes to the
line of sight principle
• This means that there should be no barrier
between the sending and the receiving stations
• Notice that the television aerial for VHF is bigger
than the one for UHF radio waves
• This is because UHF radiowaves can be made to
follow very narrow and precise path to the receiver
than VHF radiowaves

R. MALEMBA S 567
T. PATRICK'S SEC SCHOOL
BLUETOOTH
TRANSMISSION
• Bluetooth is an example of short range radio
transmission that enables devices located within a
limited geographial location communicate and share
resources such as files
• The main component in Bluetooth is a small LOW
POWER two-way radio transceiver, small enough to
be inserted in small devices
• A network in bluetooth-enabled device is called a
Wireless Personal Area Network (WPAN) or PICONET
because bluetooth networks are best suited for
handheld devices
R. MALEMBA S 568
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 569
T. PATRICK'S SEC SCHOOL
INFRARED
TRANSMISSION
• Infrared waves are not visible to the human eye
• Communication through infrared is achieved by
having transmitters and receivers (transceivers)
within a line of sight because infrared rays do not
penetrate obstacles like walls
• However, the signal can be reflected by surfaces like
walls and ceiling before they are received
• Eg Remote control

R. MALEMBA S 570
T. PATRICK'S SEC SCHOOL
• Another example of an infrared device is the
transceiver installed on some mobile phones
• Once activated, two people in the same room can
send messages to each other using infrared without
going through the mobile service provider hence
saving network charges

R. MALEMBA S 571
T. PATRICK'S SEC SCHOOL
ADVANTAGES AND OF
WIRELESS COMMUNICATIONS
i. Wireless transmission is flexible compared to
physical media i.e. devices can be moved around
without disconnecting them
ii. Wireless networks can span large geographical
areas
iii. Wireless communication can take place via
satellite even in remote areas that do not have
physical infrastructure like telephone lines

R. MALEMBA S 572
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
WIRELESS
COMMUNICATIONS
i. It is relatively difficult to establish or configure
ii. The initial set up cost may be high

R. MALEMBA S 573
T. PATRICK'S SEC SCHOOL
THE END!

NEXT…

R. MALEMBA S 574
T. PATRICK'S SEC SCHOOL
DATA TRANSMISSION
MODES
i. Parallel transmission mode
ii. Serial transmission mode
iii. Simplex transmission mode
iv. Half duplex transmission mode
v. Full duplex transmission mode

R. MALEMBA S 575
T. PATRICK'S SEC SCHOOL
PARALLEL TRANSMISSION
The Parallel data transmission mode is a mode in
which the data bits are sent in a parallel way at a
time.
• In parallel transmission, a set of data lines (buses)
are used to transmit data from one device to
another simultaneously
• The speed of data transmission on the bus is
determined by its width.

R. MALEMBA S 576
T. PATRICK'S SEC SCHOOL
Multiple transmission lines are used in such modes of
transmission.
So, multiple data bytes can be transmitted in a single
system clock.
This mode of transmission is used when a large
amount of data has to be sent in a shorter duration
of time.
• It is mostly used for short-distance communication.

R. MALEMBA S 577
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 578
T. PATRICK'S SEC SCHOOL
EXAMPLES
• Parallel communication is common in the following:
i. Communication between components that are
connected to the motherboard e.g. transfer of
data from the memory to the processor
ii. Transfer of data from the computer to some
peripheral devices e.g. the printer

R. MALEMBA S 579
T. PATRICK'S SEC SCHOOL
SERIAL TRANSMISSION
Is a mode in which the data bits are sent serially one after the
other at a time over the transmission channel
Data is sent as a string of series of 0s and 1s, over the
communication channel
• It needs a single transmission line for communication.
• Once a computer receives data from the network, it usually
converts it from serial to parallel mode
• This is usually achieved using special memories called
buffers which store the data temporally as it arrives
• The data stored in the buffer is then read from these
memories by the computer in parallel mode
R. MALEMBA S 580
T. PATRICK'S SEC SCHOOL
In serial data transmission, the system takes several
clock cycles to transmit the data stream.
• In this mode, the data integrity is maintained, as it
transmits the data bits in a specific order, one after
the other.

R. MALEMBA S 581
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 582
T. PATRICK'S SEC SCHOOL
SIMPLEX TRANSMISSION
• In simplex transmission mode, there is only one
way transmission of data on the communication
channel
• The transmitter sends the data but the recipient
cannot send a response back to the sender over the
link
• Example of simplex communication are the one-
way radio e.g. the typical radio receivers and
television sets

R. MALEMBA S 583
T. PATRICK'S SEC SCHOOL
HALF DUPLEX
TRANSMISSION
• In half duplex transmission, two way communication
is possible over the communication channel but not
simultaneously
• Transmitter send the message then after finishing,
the receiver is allowed to send back response
• One example of half duplex is the two way press to
talk radios e.g. walkie talkies
• The sender speaks and has to give an audio indication
at the end of every message e.g. “over” and press a
button for the recipient to know that the channel is
now free to make response
R. MALEMBA S 584
T. PATRICK'S SEC SCHOOL
FULL DUPLEX
TRANSMISSION
• In this mode, data can travel on the channel in both
directions simultaneously
• Two devices communicating on the system can
send messages to each other simultaneously
• Examples of full duplex transmission include
computer communicating on the network e.g.
sending email, instant messaging and conversion
over a mobile phone

R. MALEMBA S 585
T. PATRICK'S SEC SCHOOL
• In summary, figure below shows differences in
simplex, half duplex and full duplex transmission
systems
• Notice the direction of the arrow (s) between the
transmitter and the reciever

R. MALEMBA S 586
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 587
T. PATRICK'S SEC SCHOOL
THE NETWORK AND ITS
ELEMENTS
• A computer network is made up of several standard
elements (components) which can be classified into
four major categories namely:
1. Communication devices.
2. Data signal.
3. Data communication media.
4. Networking software.

R. MALEMBA S 588
T. PATRICK'S SEC SCHOOL
4. Network software
• This refers to programs that generally manage a
network. They include:
i. Network operating system
ii. Protocols

R. MALEMBA S 589
T. PATRICK'S SEC SCHOOL
NETWORK OPERATING
SYSTEMS
• These are operating systems specifically designed
to optimise the networked computers’ ability to
respond to service requests.
• Servers run on a network operating system.
• In addition to the functions of a normal operating
system, this software performs the following
network related functions:

R. MALEMBA S 590
T. PATRICK'S SEC SCHOOL
FUNCTIONS OF
NETWORK OS
i. Provides access to network resources such as printers and
folders.
ii. Enables nodes on the network to communicate with each
other more efficiently.
iii. Supports interprocess communication, that is; enables the
various processes on the network to communicate with one
another.
iv. Responds to requests from application programs running
on the network.
v. Supports network services like network card drivers and
protocols.
vi. Implements network security features.
R. MALEMBA S 591
T. PATRICK'S SEC SCHOOL
EXAMPLES OF NETWORK
OPERATING SYSTEMS
i. Windows NT/2000/2003
ii. UNIX
iii. Linux
iv. Novell Netware.
NB: Internetworking devices like routers
also have operating systems of their own
and hence they can be managed and
configured for optimum performance. Note
that routers are special purpose
computers on the network.
R. MALEMBA S 592
T. PATRICK'S SEC SCHOOL
2. PROTOCALS
• Network protocols are rules and technical
procedures that govern communication between
different computers.
• Data transmission process is broken into discrete
systematic steps.
• At each step, a certain action takes place and it has
its own rules and procedures

R. MALEMBA S 593
T. PATRICK'S SEC SCHOOL
• The work of these protocols must be coordinated so
that there are no conflicts or incomplete operations.
• This co-ordination is achieved through protocol
layering.
• Network protocols are designed after the Open Systems
Interconnection (OSI) model.
• The open systems interconnection model is not a
protocol as such but is meant to help designers to come
up with high quality layered protocols.
• It has seven layers, each performing distinct functions
as shown in Table below:
R. MALEMBA S 594
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 595
T. PATRICK'S SEC SCHOOL
APPLICATION
PROTOCOLS
• Application protocols work at the highest layer of the OSI
model.
• They provide services to application programs.
• An example of an application protocol is an e-mail program
that enables composing or reading of e-mail messages. Other
examples include:
i. Simple mail transfer protocol (SMTP) - An Internet protocol
for transferring e-mails.
ii. File transfer protocol (FTP) - An Internet protocol for file
transfer.
iii. Apple talk and apple share - Apple computers networking
protocol suit.
R. MALEMBA S 596
T. PATRICK'S SEC SCHOOL
TRANSPORT
PROTOCOLS
• Transport protocols ensure that data is passed between
computers more reliably. Some examples include:
i. Transmission control protocol (TCP): This is responsible for
delivery of sequenced data over the network.
ii. Sequential Packet Exchange (SPX): This part of the Novell’s
internet work packet exchange/sequential packet exchange
(IPX/SPX) for sequenced data.
iii. NetBEUI: A local area network protocol for Microsoft and
IBM networks that establishes communication sessions
between computers.
iv. Apple transaction protocol (ATP): Apple computer’s
communication session and data transport protocol.
R. MALEMBA S 597
T. PATRICK'S SEC SCHOOL
NETWORK PROTOCOLS
• Network protocols provide link services.
• They handle addressing and routing information,
error checking and retransmission of requests.
• Some examples of network layer protocols include:
i. Internet protocol (IP): It does packet forwarding
and routing.
ii. Internetwork packets exchange: Netwares protocol
for packet forwarding and routing.
iii. NetBEUI: Provides data transport services, NetBius
sessions and applications.
R. MALEMBA S 598
T. PATRICK'S SEC SCHOOL
NETWORK TOPOLOGIES
• The term network topology refers to the way in
which computers and other devices have been
arranged or how data is passed from one computer
to another in the network.
• Network topology can be viewed in two ways

R. MALEMBA S 599
T. PATRICK'S SEC SCHOOL
TYPES OF NETWORK
TOPOLOGY
i. Logical topology
ii. Physical topology

R. MALEMBA S 600
T. PATRICK'S SEC SCHOOL
i. LOGICAL TOPOLOGY
• Also called signal topology
• Logical topology deals with the way data passes
from one device to the next on the network.
• Examples of logical topologies are:
i. Ethernet topology
ii. Token ring topology.
• This means that two networks with different
physical layout may have the same logical topology

R. MALEMBA S 601
T. PATRICK'S SEC SCHOOL
ETHERNET TOPOLOGY
• In ethernet topology, all computers listen to the
network media and can only send data when none
of the others is sending.

R. MALEMBA S 602
T. PATRICK'S SEC SCHOOL
TOKEN RING TOPOLOGY
• In token ring topology, a special package for data
called a token goes around the network and only
the computer whose address is on the data held in
the token will take up the token to read the data
and then release the token.
• The token can then be captured by another
computer which needs to transmit data.

R. MALEMBA S 603
T. PATRICK'S SEC SCHOOL
ii. PHYSICAL TOPOLOGY
• Physical topology refers to the physical layout or
arrangement of components on the network.
• Examples of physical topologies include
i. Star topology
ii. Bus topology
iii. Ring topology
iv. Mesh topology
v. Tree/Hierarchical topology

R. MALEMBA S 604
T. PATRICK'S SEC SCHOOL
STAR TOPOLOGY
• In star topology, all devices are connected to a central hub.
• Nodes communicate across the network by passing data
through the hub.
• When the hub receives data from a transmitting computer, it
broadcasts the message to all the other nodes on the
network.
• Until recently, the star topology was common in situations
where central computers like mini’s or mainframes were used
to service other computers on the network.
• The topology consists typically of a system of terminals or
personal computers, each connected to a central computer.
• Figure below shows an illustration of a star topology.
R. MALEMBA S 605
T. PATRICK'S SEC SCHOOL
STAR TOPOLOGY

R. MALEMBA S 606
T. PATRICK'S SEC SCHOOL
THE ADVANTAGES OF
STAR TOPOLOGY
i. It allows centralisation of key networking
resources like concentrators and servers.
ii. It gives the network administrator a focal point
for network management. When something goes
wrong with the network, the administrator can
troubleshoot it from one place, usually a wiring
closet, but possibly from a remote management
terminal.
iii. Star networks are easy to configure.

R. MALEMBA S 607
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
STAR TOPOLOGY
i. The star-based network is costly because it
requires one complete cable per computer. Each
workstation is connected to the central
concentrator by its own dedicated line. In some
star-based network technologies this line is coaxial
cable and it is used to connect each workstation to
an active hub.
ii. If the central hub fails, the entire network will be
down.
iii. Time consuming during installation because each
node forms a segment of its own.
R. MALEMBA S 608
T. PATRICK'S SEC SCHOOL
BUS TOPOLOGY
• All devices are connected to a central cable called
the bus or backbone as shown in Figure below.
• The sharing of the transmission media (or bus) has
several problems.
• Most importantly, it means that the cable can carry
only one message at a time and each workstation
on the network must be capable of knowing when
it can and cannot transmit using this shared
medium.

R. MALEMBA S 609
T. PATRICK'S SEC SCHOOL
BUS TOPOLOGY

R. MALEMBA S 610
T. PATRICK'S SEC SCHOOL
• A terminator is attached to each end of the cable to
avoid signals from bouncing back and forth on the
cable causing signal distortion.
• As the data passes along the cable, each station
checks whether the data is addressed to it.
• If the address matches the machine’s address, it
receives the data otherwise it rejects it.
• The network addresses of computers on a network
is called the Medium Access Control (MAC) address.

R. MALEMBA S 611
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF THE
BUS TOPOLOGY
i. It is easy to install.
ii. It is less costly. Does not require a complete cable
length per computer.

R. MALEMBA S 612
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
BUS TOPOLOGY
i. A cable break in any section brings down the
whole network.
ii. Troubleshooting a cable fault is difficult because
the fault could be anywhere on the cable.
iii. The bus topology limits the number of computers
that can be connected to the cable because each
computer is listening to the cable in order to
transmit. This means that an increase in the
number of computers results in an increased
collision as machines compete for transmission.

R. MALEMBA S 613
T. PATRICK'S SEC SCHOOL
RING TOPOLOGY
• In a ring topology, all devices are connected to one
another in the shape of a closed loop as shown in
Figure below.
• Each station is responsible for regenerating and
retransmitting signals around the network to its
neighbour.
• A token is used to exchange data from one station to
another.
• A token can be viewed as an envelope or a bag where
data is placed for transmission and carried around
the network.
R. MALEMBA S 614
T. PATRICK'S SEC SCHOOL
RING TOPOLOGY

R. MALEMBA S 615
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF RING
TOPOLOGY
i. It uses a short length cable.
ii. Ring topology is simple to install.

R. MALEMBA S 616
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
RING TOPOLOGY
i. Modification may be difficult because adding or
removing a device can disrupt the entire
network.
ii. Troubleshooting can be difficult.
iii. One device or media breakdown may affect the
entire network.
• However, this is not the case with IBM token ring
where a device called Multi Station Access Unit
(MSAU) is used for station bypass in the event a
station fails.
R. MALEMBA S 617
T. PATRICK'S SEC SCHOOL
MESH TOPOLOGY
• This is the most common type of topology used in
wide area network where there are many paths
between different locations.
• Devices are connected with many redundant
interconnections between the nodes.
• In a true mesh topology every node has a
connection to every other node in the network.
• Figure below shows a mesh topology.

R. MALEMBA S 618
T. PATRICK'S SEC SCHOOL
MESH TOPOLOGY

R. MALEMBA S 619
T. PATRICK'S SEC SCHOOL
ADVANTAGES OF MESH
TOPOLOGY
i. The network can still operate even when a node
breaks down or a connection breaks.
ii. The network is reliable.
iii. Point to point connections optimise throughput
of data.

R. MALEMBA S 620
T. PATRICK'S SEC SCHOOL
DISADVANTAGES OF
MESH TOPOLOGY
i. It is expensive on cable due to redundant links.
ii. Administration of the network is difficult because
of the peer to peer connections.

R. MALEMBA S 621
T. PATRICK'S SEC SCHOOL
TREE/HIERARCHICAL
TOPOLOGY
• This is a hybrid topology.
• Groups of star-configured networks are connected
to a linear bus backbone as shown in Figure below.

R. MALEMBA S 622
T. PATRICK'S SEC SCHOOL
TREE/HIERARCHICAL
TOPOLOGY

R. MALEMBA S 623
T. PATRICK'S SEC SCHOOL
NETWORK SECURITY
• Network security is like the security measures we
implement in our homes.
• You do the best you can to protect yourself from
intruders.
• Likewise in networking you should try to protect
your data and information from intruders.
• In networking, there are several ways of enforcing
security one of them is share level and the other is
the user level security.

R. MALEMBA S 624
T. PATRICK'S SEC SCHOOL
SHARE LEVEL SECURITY
• Share level security is a sample network security
used in peer to peer networks.
• The user can decide which resources to give for
sharing.
• Most desktop operating systems such as Window
NT provide such kind of security.

R. MALEMBA S 625
T. PATRICK'S SEC SCHOOL
USER-LEVEL SECURITY
• User level security model is used on
server based networks.
• A network administrator assigns accounts
to users.
• This means that each user is provided
with a unique name and password which
he or she can use to access network
resources.

R. MALEMBA S 626
T. PATRICK'S SEC SCHOOL
TROUBLESHOOTING
COMPUTERS

R. MALEMBA S 627
T. PATRICK'S SEC SCHOOL
TROUBLESHOOTING
COMPUTERS
• Troubleshooting refers to the process of diagnosing
and resolving hardware and software related
problems

R. MALEMBA S 628
T. PATRICK'S SEC SCHOOL
HARDWARE PROBLEMS
• These are problems that you may experience as a
result of failure of basic hardware components

R. MALEMBA S 629
T. PATRICK'S SEC SCHOOL
COMPUTER BOOT FAILURE
When a computer is started, BIOS perform a power on self-test
(POST) to check for the status of basic input and output
components
If any error is found during POST, it is typically indicated using error
messages on the screen or a series of beeps
If the computer produces beep sounds, count the beeps and listen
to whether they are long or short
Typically, one beep indicates that all components have passed the
POST.
• Depending on the type of BIOS, a computer may display error
codes starting with error code such as code 120 that indicates a
problem with the motherboard or code 162 for problems with the
processor
R. MALEMBA S 630
T. PATRICK'S SEC SCHOOL
TROUBLESHOOTING
STARTUP RELATED
PROBLEMS
Start the computer to initialize the POST process
This is usually a dark screen with some scrolling text
At the bottom of the screen is a prompt like "press
F10 to enter BIOS setup"
• Note that the BIOS setup key depends on the type
of BIOS utility chip on your computer

R. MALEMBA S 631
T. PATRICK'S SEC SCHOOL
• Press special key or combination of keys (mostly F1,
F2, F10, DEL, ESC, CTRL + ESC or CTRL + ALT + ESC)
to display the BIOS setup screen as shown below

R. MALEMBA S 632
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 633
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 634
T. PATRICK'S SEC SCHOOL
In the setup screen, make necessary changes. Note
that some changes you make might cause the
computer to malfunction!
Never make or save changes unless you are sure of
the configuration implications!
• Save the configuration changes and restart the
computer.

R. MALEMBA S 635
T. PATRICK'S SEC SCHOOL
FAILURE OF
MOTHERBOARD, MEMORY
OR PROCESSOR
If you turn on the computer and it does not complete
POST or it only displays a red LED light instead of
green, the problems may be due to motherboard,
memory or processor failure
Such errors are rare because most system boards and
processor errors are serious enough to prevent the
computer from displaying error codes or messages
• Some memory related errors are not reported by
the computer at all.

R. MALEMBA S 636
T. PATRICK'S SEC SCHOOL
RESOLVE RAM ERRORS
• Disconnect the computer from power and open up
the system unit and locate the slots where the RAM
modules are plugged in such as shown below

R. MALEMBA S 637
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 638
T. PATRICK'S SEC SCHOOL
Discharge static electricity that might have built up
on your body using a wrist member
Check whether the memory modules are firmly
plugged into the slots. If they are, connect the
computer to power and restart
• If the problem persists, you need to replace the
RAM modules with new ones. The memory
modules may be damaged.

R. MALEMBA S 639
T. PATRICK'S SEC SCHOOL
FAILURE OF POWER SUPPLY
UNIT
The function of power unit is to convert the electrical
power (AC) comes from wall socket to a suitable type
and voltage (DC) so that each component of a
computer works properly.
Luck of proper supply of power will damage a
computer system.
• Power supply unit as shown in the figure below
may fail due to power surge or failure of the cooling
fan inside it.

R. MALEMBA S 640
T. PATRICK'S SEC SCHOOL
SIGNS OF A FAILURE PSU
Computer will not boot
Computer will randomly restart or shutdown
Random Blue Screen of Death (BSoD)
Extra noise coming from the computer case
i. Smoke or a burning smell

R. MALEMBA S 641
T. PATRICK'S SEC SCHOOL
RESOLVE POWER SUPPLY
UNIT PROBLEMS
Check to make sure that the power supply is properly connected
to power socket or Uninterrupted Power Supply (UPS)
Check the power selector to ensure that it has the right power
rating.
For example, in most countries, the rating for domestic power is
240V while in US the rating is 110V
Open the casing and check whether the power cable that
connects to the motherboard is properly attached
i. If the problem persists, replace the power unit with a new
one. Never try to repair a power supply unit because it may
cause serious body harm.

R. MALEMBA S 642
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 643
T. PATRICK'S SEC SCHOOL
FAILURE OF COOLER FANS
• A computer may have several cooling fans such as
that of power supply unit, microprocessor and the
chassis
• The fans protect delicate computer components
from the damage caused by overheating
• When a fan begins to wear out, it makes a whining
or grinding noise

R. MALEMBA S 644
T. PATRICK'S SEC SCHOOL
HOW TO PROTECT FANS
FROM FAILURE
• To protect fans from failure, do one of the
following:
i. Place the computers in a dust free place or if the
computer is in a dusty place, always remember
to cover it
ii. Always use a blower to blow out dust that may
have settled on computer parts
iii. In case one of the fans happens to fail, turn off
the computer, unclip it and replace it with a new
one
R. MALEMBA S 645
T. PATRICK'S SEC SCHOOL
ABNORMAL RESTARTING
OF A COMPUTER
• If a computer is restarting or shutting down
abnormally, the problem might be due to poor
operating system configuration, hardware failure or
virus attack
• If the problem is serious, the computer may display
a blue screen with a message such as “Fatal
exception error has occurred”.

R. MALEMBA S 646
T. PATRICK'S SEC SCHOOL
HOW TO RESOLVE THE
PROBLEM
i. Confirm that all hardware devices and drivers are
properly installed or configured using device
manager shown in the figure below

R. MALEMBA S 647
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 648
T. PATRICK'S SEC SCHOOL
ii. If the problem is related to operating system, follow the
following procedure:
a) Press combination of keys (Ctr+Alt+Del) to restart the computer
b) During the reboot process, and before Windows is loaded, press F8 to
display the Safe mode start-up screen as shown in the figure bellow:
c) Choose safe mode to load Windows with minimal settings. Scan the
drives or check for any hardware or software related problem in device
manager
iii. If the problem persists, the OS may be corrupted by a malware.
In such a case, you may need to use up-to-date antivirus
software to scan the boot sector for viruses
iv. If all above fails, you have to re-install or repair the operating
system using the recovery disk created during installation or
installing OS afresh
R. MALEMBA S 649
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 650
T. PATRICK'S SEC SCHOOL
DAMAGED REMOVABLE
STORAGE MEDIA
• One of the most common symptoms of damaged
removable storage is a message indicating that
there is an error reading from or writing to the
media
• An error message “Error writing to disk” is
displayed
• This type of message typically indicates that the
storage media may be corrupted or physically
damage

R. MALEMBA S 651
T. PATRICK'S SEC SCHOOL
HOW TO SOLVE THE
PROBLEM
i. Open the removable media such as CD or DVD in
a different computer to rule out drive failure as
the cause of the problem
ii. If the problem is not related to the storage
media, clean-up the drive using cleaning tools
available in most computer vendor shops
iii. If the problem persists after cleaning, consider
replacing it with a new one

R. MALEMBA S 652
T. PATRICK'S SEC SCHOOL
HARD DRIVE FAILURE
• If you start a computer and get an error message
starting with 16 error code, it means that the
computer doesn’t recognize or cannot
communicate with the hard disk drive

R. MALEMBA S 653
T. PATRICK'S SEC SCHOOL
TROUBLESHOOTING HARD
DRIVE
i. Enter into the BIOS setup program to ensure that
proper hard drive type is selected
ii. If the error message persists, the disk platter(s)
may have crashed. Consider replacing it with a
new one

R. MALEMBA S 654
T. PATRICK'S SEC SCHOOL
DISPLAY PROBLEMS ON
SCREEN
• Display problems may cause health related
problems such as eyestrain, fatigue and headaches
• To minimise such risks, Cathode Ray Tube (CRT)
monitors have been replaced by Liquid Crystal
Display (LCD) and Thin Film Transistor (TFT) flat
panel displays that are safer and more comfortable
to use

R. MALEMBA S 655
T. PATRICK'S SEC SCHOOL
CONTINUOUS BEEPING
SOUND
• This is an indication of a missing monitor or faulty
video adapter. Check to ensure that the monitor is
properly attached to the video card through the
VGA or HDMI port

R. MALEMBA S 656
T. PATRICK'S SEC SCHOOL
NO DISPLAY OR
FLICKERING MONITOR
• If a monitor fails to display and does not issue an
error code, the first thing you should do is to move
the mouse or press any key on the keyboard
• Most computers use power management modes
that cause the screen to go on standby or sleep
mode
• On the other hand, flickering may be caused by a
poor refresh rate or failing monitor
• The refresh rate determine how often the display
on the screen gets redrawn
R. MALEMBA S 657
T. PATRICK'S SEC SCHOOL
RESOLVE DISPLAY
PROBLEMS
• To resolve such display problems, try one of the following:
i. Make sure the monitor is plugged into power outlet and
turned on. Also, ensure that the brightness is set at
adequate level
ii. If this step does not solve the problem, check whether the
monitor is properly plugged to the VGA or HDMI port
usually at the back of the system unit
iii. If the problem is not related to power or interface, you may
need to test the monitor using another computer before
declaring it dead!
iv. Replace the monitor with a new one, preferably a TFT flat
panel display
R. MALEMBA S 658
T. PATRICK'S SEC SCHOOL
REPEATED DISPLAY ON
SCREEN
• Repeated display of elements is due to poor colour
and resolution settings.
• This setting results in multiple copies of the same
• To resolve this problem, use display setting
properties to change the colour resolution settings

R. MALEMBA S 659
T. PATRICK'S SEC SCHOOL
SOFTWARE PROBLEMS

R. MALEMBA S 660
T. PATRICK'S SEC SCHOOL
MISSING OPERATING
SYSTEM
After POST, a computer searches for the presence of an
Operating System (OS) on the hard drive
If an OS is not installed, the error message "missing
operating system" may be displayed
This means that you have to follow the procedure for
installing the OS.
If you are sure that the operating system is installed, the
problem may be due to boot sector or hard disk related
problems
• A boot sector is where the booting instructions are stored
once you install an operating system.
R. MALEMBA S 661
T. PATRICK'S SEC SCHOOL
HOW TO SOLVE THE
PROBLEM
To solve this problem, do one of the following:
Enter the BIOS setup screen and check whether the
hard disk is visible to the computer
• If the hard disk is okay, reboot the computer using
the system recovery disk and try to repair the
operating system

R. MALEMBA S 662
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 663
T. PATRICK'S SEC SCHOOL
CORRUPTED SYSTEM
REGISTRY
In Windows, registry is the database that keeps
record of all system and application softwares
installed on the computer
If the registry is corrupted, the computer may fail to
boot
• For example, failure to load the desktop may be
due to infection by malware or corrupted system
registry files

R. MALEMBA S 664
T. PATRICK'S SEC SCHOOL
EXAMPLE OF SYSTEM
REGISTRY

R. MALEMBA S 665
T. PATRICK'S SEC SCHOOL
HOW TO SOLVE THE
PROBLEM
To troubleshoot problems relating to corrupted
registry, try the following:
Repair the registry using emergency recovery disk or
restore the registry backup if you created one.
If the system can start in safe mode, locate the
malfunctioning device in the device manager and
disable it
• If all these fail, reinstall the Operating System

R. MALEMBA S 666
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 667
T. PATRICK'S SEC SCHOOL
WINDOWS PROTECTION
ERROR
Windows protection error is displayed during startup
before the desktop is displayed.
• This problem occurs when critical Windows drivers
fail to load

R. MALEMBA S 668
T. PATRICK'S SEC SCHOOL
WINDOWS PROTECTION
ERROR EXAMPLE

R. MALEMBA S 669
T. PATRICK'S SEC SCHOOL
HOW TO SOLVE THE
PROBLEM
To deal with this problem, do the following:
Restart the computer in safe mode. If Windows does
not load, use the recovery disk to repair the
operating system
• Using the recovery disk, repair the operating system
paying attention to the details

R. MALEMBA S 670
T. PATRICK'S SEC SCHOOL
PROBLEM OF NON-
RESPONDING SYSTEM
• Non-responding system commonly referred to as
HANGING refers to as a computer failing to respond
to commands

R. MALEMBA S 671
T. PATRICK'S SEC SCHOOL
EXAMPLES

R. MALEMBA S 672
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 673
T. PATRICK'S SEC SCHOOL
HOW TO SOLVE THE
PROBLEM
Press Ctrl + Alt + Del keys to display the task manager
In the task manager window, click the Process tab,
then select the non-responding process
• Click "End Process" button to terminate the
application

R. MALEMBA S 674
T. PATRICK'S SEC SCHOOL
PRINTER-RELATED
PROBLEMS
A printer is one of the most commonly used
peripheral devices to produce hard copies
• In order to troubleshoot printing-related problems,
you need to understand how a printer works and
how to properly set it up

R. MALEMBA S 675
T. PATRICK'S SEC SCHOOL
I/O PRINT ERROR
The I/O print error indicates that the computer
cannot properly communicate with the printer
Ensure that the correct printer is selected and turned
on
• If this does not work, you may be forced to reinstall
the printer drivers

R. MALEMBA S 676
T. PATRICK'S SEC SCHOOL
PAPER JAM
Paper jam usually stop the current print job until the
jam is completely cleared
If paper jams in the printer, locate the paper and
gently try to remove it
If the printer continues to jam at frequent intervals,
try using different papers
• Printers work best with a particular weight of
paper, hence if you use a paper that is too light or
too heavy, paper jam may occur frequently

R. MALEMBA S 677
T. PATRICK'S SEC SCHOOL
POOR PRINTOUT QUALITY
Quality related problems are easily resolved by
replacing ink, toner, or laser head/drum
However, quality problems may be due to failures
within the device's print process
If a printer produces garbage, this may be due to
communications problem between the computer and
printer.
• Make sure that appropriate drivers are properly
installed

R. MALEMBA S 678
T. PATRICK'S SEC SCHOOL
TONER/INK CARTRIDGE
PROBLEM
Most printers give warning of low toner or ink level
before it is completely used up
In such a case, be ready to replace or refill the
cartridge
• By refilling used cartridge, make sure it is tested to
avoid possibility of using faulty cartridge

R. MALEMBA S 679
T. PATRICK'S SEC SCHOOL
SMUDGED PRINTOUT
If a dot matrix printer produces smudged printouts,
check on the printer head
Stuck pins may cause printouts to have a smudged
appearance as they drag across the page
In laser printers, smudged printouts may be as a
result of the drum failure to fuse the toner onto the
paper
• From inkjet printers, smudges are mostly due to
touching the printout before the ink dries up

R. MALEMBA S 680
T. PATRICK'S SEC SCHOOL
HOW TO TROUBLESHOOT
THE PROBLEM
To troubleshoot this problem, do one of the following:
In case of a dot matrix printer, replace the print head.
If this doesn't solve the problem, it could indicate worn-out
printer head or poor ink ribbon. Simply replace the head or
ribbon
For laser printers, consult the user guide that may be
helpful in locating the problem especially relating to the
fuser
• Because the fuser is a sensitive component that gets very
hot, it is advisable for it to be handled by an experienced
technician.
R. MALEMBA S 681
T. PATRICK'S SEC SCHOOL
USING DESKTOP
PUBLISHING SOFTWARE
Publishing is the process of selecting, collecting,
preparing and producing a printed or electronic work in
the form of books, newspapers, magazines, scientific
papers, pictures, music, movies and documentaries.
In early days, publishing was done by hand artists learnt
that repetitive tasks performed using templates created
from stone and wood
• Today, design and printing of artwork that was done
using offset printers is now done by a personal
computer that has digital printer attached to it hence
the term desktop publishing.
R. MALEMBA S 682
T. PATRICK'S SEC SCHOOL
DESKTOP PUBLISHING
Desktop Publishing (DTP) refers to the process of
designing publications of professional quality such as
newspapers, invitation cards, posters, fliers, journals
and books using a specialised DTP software
Desktop Publishing software popularly known as DTP
is a special purpose software used to create
publications of professional quality.
• Examples of DTPs include Adobe PageMaker,
Microsoft Publisher, QuarkXpress, Apple Page,
Adobe Illustrator and CorelDraw
R. MALEMBA S 683
T. PATRICK'S SEC SCHOOL
BENEFITS OF DESKTOP
PUBLISHING
• Although word processors can be used to create
professional publications, DTP software offers the following
benefits:
• Every item on a page is contained in a frame hence can be
edited and formatted independently
• DTPs provide more control on how text and graphics can be
arranged and formatted
• Frames containing text or graphics need not flow in logical
sequence. e.g. a story on page 1 may be continued on page
8
i. DTPs provide master pages used to set a common layout
which maybe repeated on several pages
R. MALEMBA S 684
T. PATRICK'S SEC SCHOOL
In DTPs, publications can be printed in a form suitable for
commercial digital or offset printing using colour
separations
Most DTPs have predefined templates such as brochures,
booklets, posters and business cards available
Multiple stories from different authors can be handled
with ease
DTP enhances visual communication to different audience
v. DTP ensures files print properly in their true colours,
fonts and measurements
R. MALEMBA S 685
T. PATRICK'S SEC SCHOOL
TYPES OF DTP
SOFTWARE
Graphic-based DTPs
1. Layout-based DTPs

R. MALEMBA S 686
T. PATRICK'S SEC SCHOOL
GRAPHIC-BASED DTPs
These DTPs are specifically used to edit and format
graphic objects such as pictures and vector drawings
Vector drawings are freehand drawings such as those
drawn by fine artists
Examples of graphic-based DTP software include
Adobe Photoshop, Adobe Illustrator and CorelDraw
• Some graphic-based softwares like CorelDraw and
Adobe Illustrator may be also used for page layout

R. MALEMBA S 687
T. PATRICK'S SEC SCHOOL
LAYOUT-BASED DTPs
These types of DTPs are specifically used to design
page layout for text and graphics.
Have you ever wondered how the complicated front
page of a newspaper is developed? It is difficult to
achieve such without a good layout-based DTP
software.
• Examples of layout-based DTP softwares include
Adobe PageMaker, Microsoft Publisher and Adobe
InDesign

R. MALEMBA S 688
T. PATRICK'S SEC SCHOOL
PURPOSE OF DESKTOP
PUBLISHING SOFTWARE
• Desktop Publishing programs are very popular in
publishing, because they give the person designing
publications a lot of control on:
• Graphic design
• Page layout design
i. Printing

R. MALEMBA S 689
T. PATRICK'S SEC SCHOOL
GRAPHIC DESIGN
Using a desktop publishing software such as
CorelDraw or Illustrator, one can design vector
images using the draw tools
• Image editing such as in Adobe Photoshop lets the
user manipulate graphics such as pictures

R. MALEMBA S 690
T. PATRICK'S SEC SCHOOL
PAGE LAYOUT DESIGN
The reason we prefer DTPs to word processors is
because of page design
DTPs are used to design a page layout by setting
consistent picture and object locations, dividing a
page in a number of newspaper columns and adding
layers
• A layer can be viewed as the arrangement of
objects on top of each other with each object being
on its own layer

R. MALEMBA S 691
T. PATRICK'S SEC SCHOOL
PRINTING
Printing is the main goal of publication
• Desktop publishing software therefore offer more
flexibility in printing, like in image colour separation

R. MALEMBA S 692
T. PATRICK'S SEC SCHOOL
EXAMPLES OF
PUBLICATIONS
Newspapers
Magazines
Book
i. Calendar

R. MALEMBA S 693
T. PATRICK'S SEC SCHOOL
FEATURES OF DTP
SOFTWARE
• Most DTPs provide the user with a variety of tools for
designing, manipulating and editing a publication. The
following tools are common in most DTPs:
• SELECT TOOL - Used to select, move and resize image and text
• TEXT TOOL - Used to draw text frames, insert and manipulate
text
• SHAPES TOOLS - For drawing basic shapes like rectangles and
for importing objects
• ZOOM TOOL - This tool is used for magnifying publications
view
i. ROTATE TOOL - This tool is used for rotating text or graphics.

R. MALEMBA S 694
T. PATRICK'S SEC SCHOOL
GETTING STARTED WITH
MICROSOFT PUBLISHER
• To launch Publisher 2013 from start menu, proceed
as follows:
i. On the Start menu, click Microsoft Office, then
Publisher 2013.
ii. Click Built-in to choose a template or click BLANK
to design from a blank page. The Publisher 2013
application window shown in figure below is
displayed.

R. MALEMBA S 695
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 696
T. PATRICK'S SEC SCHOOL
MAIN FEATURES OF
PUBLISHER 2013
APPLICATION
i. MENU TABS
WINDOW
• The Menu tabs are the main components of the user interface that
contains ribbon of commands used to manipulate a publication.
• This include; File tab, Insert, Page Design, Mailings, Review, Add-ins and
View tabs.
ii. PRINTABLE AREA
• The printable area resembles a typical piece of paper surrounded by
margins.
• Objects to be printed must appear in the printable area
iii. RULERS
• Measurement is important in publishing.
• A good DTP must have both horizontal and vertical rulers.
• They are used to perform exact measurements
R. MALEMBA S 697
T. PATRICK'S SEC SCHOOL
iv. MASTER PAGES
• These are the main pages used to design a common
layout for large publication.
• You insert page numbers, headers and footers on the
master pages.
• For a large document such as a book or project, you
need to set up a common layout using master pages.
• To view master pages in Publisher 2013, on View menu,
click Master Page or simply press Ctrl + M. you will see
Edit Master Pages tool bar appear among the task
panes.
R. MALEMBA S 698
T. PATRICK'S SEC SCHOOL
v. DESIGN TOOLS
• Publisher 2013 has a set of tools used to design and
manipulate text and graphical objects.
• Table below gives a summary of important tools
available in the Home, Design and insert ribbons
used to create and manipulate a publication:

R. MALEMBA S 699
T. PATRICK'S SEC SCHOOL
TOOL PURPOSE RIBBON
Draw Text Tool for inserting text within a textbox. In Publisher Home and
Box each textbox is a frame that can be manipulated as Insert
an object
Pictures Tool used for inserting graphical objects such as Home and
pictures and clip arts from local drive or Internet Insert
Table This tool is used for inserting tables into a publication Home and
Insert
Shapes Contains tools for drawing different types of shapes Home and
such as lines, squares, rectangles and circles Insert
Select Tool purposely used for selecting graphical object to Home and
be manipulated Insert
Page This is the first button on Insert ribbon used to add Insert
pages into a publication
Picture Used to draw picture frame that reserves space for a Insert
Placeholder picture to be inserted

R. MALEMBA S 700
T. PATRICK'S SEC SCHOOL
TOOL PURPOSE RIBBON
Page Parts Tool used to insert preformatted content such as Insert
headings and quotes
WordArt Tool used for inserting artistic letters or words in a Insert
publication
Insert File This tool is used for importing content from existing Insert
document files saved on your computer
Object Used for inserting content from an external source and Insert
placing it in your publication as an embedded or linked
object
Page This is the tool to use if you wish to insert page numbers Insert
Number on multi-paged publications such as newsletter and
books
Change This tool is used for changing or applying predefined Page
Template templates on publication Design
Orientation Tool used to change orientation of a publication into Page
portrait or landscape Design
Master Tool used for designing master pages that contain Page
Pages common layout to be applied to other pages of the Design
publication

R. MALEMBA S 701
T. PATRICK'S SEC SCHOOL
CREATING
PUBLICATIONS
• Once Publisher starts, the Startup screen is
displayed.
• It is on this startup window that you can select the
type of publication you wish to create such as
Thank you Cards shown in the figure below:

R. MALEMBA S 702
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 703
T. PATRICK'S SEC SCHOOL
• Notice the Built-in Publication templates Window.
• You can click any of the templates thumbnail to
display available templates in the built-in types
page.

R. MALEMBA S 704
T. PATRICK'S SEC SCHOOL
DESIGNING A
PUBLICATION
• Before entering text and pictures in a publication, it is important
to design it first
• The following are key factors you need to consider when
designing a publication:
1. Decide the type of publication. Is it a newspaper? How many
columns per page? Is it a book? What paper size will be used?
2. Decide the layout of the publication. This will enable you to
select appropriate template or to use master pages to create
common layout
3. Decide on about the colour scheme, fonts, margins,
orientation, graphics e.t.c. and make sure the page is properly
setup.

R. MALEMBA S 705
T. PATRICK'S SEC SCHOOL
SETTING UP NEW
PUBLICATION
• Sometimes, it is necessary to change setup options
of a publication.
• Such options include page size, margins and
orientation.

R. MALEMBA S 706
T. PATRICK'S SEC SCHOOL
TO SET UP A
PUBLICATION PROCEED
AS FOLLOWS:
1. On the File tab, click Page Setup. A dialog box
appears
2. Specify the following page setup options:
a) In the Blank Page Sizes box, select a page size
b) On the right of the dialog box select margin
settings and then adjust them to desired size
c) Click Advanced button to specify more settings
d) Click OK to effect the changes

R. MALEMBA S 707
T. PATRICK'S SEC SCHOOL
SETTING UP A
PUBLICATION USING
MASTER PAGES
• To create a publication that has several pages such as
a book or a report, it is important that you design a
common layout for all pages using a master pages
• With master pages, you can create, modify, and
delete content that appear in the rest of the pages.
• Master page settings apply to all pages in the
publication until you specify otherwise and they
cannot be renamed or deleted from the publication.
• To switch to master pages view click the mater page
icon(s).

R. MALEMBA S 708
T. PATRICK'S SEC SCHOOL
SETTING UP A
PUBLICATION USING
MASTER PAGES
i. On View ribbon, click Master Page button
ii. Use Master Page tools or menu tabs shown in
figure below to edit or define Master Page(s)
layout
iii. Click the Close Master page button to switch
back to other pages of the publication

R. MALEMBA S 709
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 710
T. PATRICK'S SEC SCHOOL
SAVING A PUBLICATION
i. From File tab, click Save As
ii. In the Save as dialog box, select the drive or
folder to save in, enter the file name and select
the file type
iii. Click the OK button

R. MALEMBA S 711
T. PATRICK'S SEC SCHOOL
CLOSING A
PUBLICATION
• Click Close window button at the top-right corner
of the window
• Alternatively, click the Office button, then select
the Close command.

R. MALEMBA S 712
T. PATRICK'S SEC SCHOOL
OPENING A
PUBLICATION
• To open a saved publication, proceed as follows:
i. From File tab, click Open
ii. In the Open dialog box, select the drive or folder
where the publication was saved
iii. Click the OK button

R. MALEMBA S 713
T. PATRICK'S SEC SCHOOL
INSERTING TEXT INTO
PUBLICATION
• To add text using text or frame tool in PageMaker
or Publisher, proceed as follows:
i. Click the Text tool from the tool box
ii. On an empty area on the pasteboard or printable
area, drag to define the text block
iii. Type the text
NOTE: you can create artistic text using the WordArt
frame tool.

R. MALEMBA S 714
T. PATRICK'S SEC SCHOOL
RESIZING AND MOVING
TEXT
• Text may not fit in the defined text frame.
• Publisher displays … on one of the edges of the text
frame when you select it.
• To resize the text block,
i. Click the text block using the pointer tool
ii. Position the pointer on the selection handle and
drag to resize

R. MALEMBA S 715
T. PATRICK'S SEC SCHOOL
To move the text block
i. Click the text block using the pointer tool
ii. Position the pointer on the object and hold down
the left mouse button
iii. Drag the text object to a new location

R. MALEMBA S 716
T. PATRICK'S SEC SCHOOL
IMPORTING TEXT FROM A
WORD DOCUMENT
• Instead of typing, you can import text from an
existing document.
• To import text from a word processor document,
i. On the Insert ribbon, click Insert File
ii. In the dialog box that appears, select the file
then click OK
iii. The text is pasted onto the printable area.

R. MALEMBA S 717
T. PATRICK'S SEC SCHOOL
Linking Text frames
• In publisher, when a text frame spills over to
another page or column, the plus sign appearing at
the bottom or top of the frame means that it is
connected to a previous or next page or column.
This is referred to as a threading.
• Once text is threaded, you can easily redirect he
flow of the text in them than you can with
unthreaded textbox

R. MALEMBA S 718
T. PATRICK'S SEC SCHOOL
• To thread text frames, proceed as follows:

i. Click the first textbox to activate the Text Box


tools tab
ii. On the textbox Tools ribbon, click Create Link
button located in the linking group
iii. Click the textbox you want to connect to the first
one. Text box that will connect will display the
link icon. Use the connected text box to continue
the story.
R. MALEMBA S 719
T. PATRICK'S SEC SCHOOL
CREATING BASIC SHAPES
• Publisher allows the user to create basic shapes
such as lines, ellipses, rectangles and other
polygons using the drawing tools on the insert tab.
• To display shape drawing tools, click Insert tab, then
click the Shapes button in the Illustrations group.
• Once you insert a drawing you can right click it then
select Format Autoshape

R. MALEMBA S 720
T. PATRICK'S SEC SCHOOL
• On the Format Autoshape dialog box, you can apply
the following formats:
i. Set the style and thickness of the shape outline
ii. Set the background colour or pattern
iii. Set the transparency of the autoshape
iv. Set the size and scaling of the drawing
v. Layout, position and wrapping options.

R. MALEMBA S 721
T. PATRICK'S SEC SCHOOL
INSERTING PICTURES
i. On the insert tab, click picture button to display
insert picture box
ii. In the dialog box, select the drive or folder where
the picture file is located
iii. DoubleClick the file or click the File then insert

R. MALEMBA S 722
T. PATRICK'S SEC SCHOOL
OBJECT LINKING
• In desktop publishing, Object Linking and Embedding (OLE)
refers to importing an object or existing file into a publication.
• An OLE can be manipulated as part of the publication or as a
shared image between the source and current document
• If an object is linked to the source publication, ay change
applied to the source object are reflected in lined image
within a publication. This is because the destination file stores
an image or a copy of the source file
• On the other hand, if the object is embedded, no direct ink
exists. The embedded object becomes part of the
publications and updates on the source file do not affect the
embedded object

R. MALEMBA S 723
T. PATRICK'S SEC SCHOOL
To embed or link a file:
i. On the Insert tab, click Object in the text group
ii. In the Insert object dialog box that appears, click
Create from file option
iii. Click the Browse button to select the file you
want to link or embed
iv. To create link, make sure the checkbox labelled
link, is checked as shown in the diagram below.
For embedding, leave the checkbox unchecked
v. Click ok to insert the object.

R. MALEMBA S 724
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 725
T. PATRICK'S SEC SCHOOL
INSERTING TABLES
• A table is used to organize text into rows and
columns. When dealing with a table, the following
terms are used:
1. Row: a horizontal arrangement of a cell
2. Column: a vertical arrangement of a cell
3. Cell: the intersection between a row and a
column
• Rows and columns belonging to one table behave
like one even when the table overflows to other
pages.
R. MALEMBA S 726
T. PATRICK'S SEC SCHOOL
To insert table in
publication,
i. On the Insert tab, click table button in the table
group
ii. On the dropdown menu that appear, drag the
mouse pointer to select the number of rows and
columns
iii. To draw table larger than 10 × 8, click insert table
in the create table dialog box and specify number
of rows and columns

R. MALEMBA S 727
T. PATRICK'S SEC SCHOOL
Editing publication
• Editing a publication involves making changes to
text and graphical objects.
• The procedure for editing publications is similar to
that for editing word document discussed earlier

R. MALEMBA S 728
T. PATRICK'S SEC SCHOOL
Deleting text and
objects
• Select or highlight the text or object then press
Delete button or Backspace button

R. MALEMBA S 729
T. PATRICK'S SEC SCHOOL
Copying and moving
text
• Select the text to copy or move, right click and then
click copy or cut then paste where you want it to
be.

R. MALEMBA S 730
T. PATRICK'S SEC SCHOOL
Spell checking a
publication
• To check spelling mistakes, proceed as follows:
i. Click Review button
ii. Click the spelling button
iii. In the dialog box, make sue check all stories box
checkbox is selected
iv. Replace or ignore the misspelt words
v. Click OK to close the button

R. MALEMBA S 731
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 732
T. PATRICK'S SEC SCHOOL
Find and replace
• To search for a word in a publisher, proceed as
follows:
i. On the Home ribbon, click Find or replace to
display he dialog box
ii. In the search for box, type the word or phrase to
be searched
iii. Click replace option button. In the Replace With
box, type the replacement word or phrase.
iv. Click find next or Replace All button

R. MALEMBA S 733
T. PATRICK'S SEC SCHOOL
Editing publication
layout
• Sometimes you may decide to change he entire
design of your page layout. To do this, use master
page as follows:
i. Switch to Master page
ii. Make the necessary changes then switch back to
other pages

R. MALEMBA S 734
T. PATRICK'S SEC SCHOOL
Editing graphical
objects
• In editing graphical objects, properties such as size,
position, colour and brightness are enhanced or
modified.

R. MALEMBA S 735
T. PATRICK'S SEC SCHOOL
Moving and resizing
object
• Click the object and drag the mouse until to reach
the size you want or move the object

R. MALEMBA S 736
T. PATRICK'S SEC SCHOOL
Changing picture
attribute
• This include changing content, colour and
brightness
i. Select the object to activate the picture
ii. Using picture tools adjust the required picture
properties
iii. Edit the picture using other tools in the picture
style, Arrange, Crop and Size

R. MALEMBA S 737
T. PATRICK'S SEC SCHOOL
Formatting publication
• Formatting refers to enhancing the appearance of a
publication by applying special effects or attributes
to the layout, text and graphical object
• To format text in the publication, select the text and
choose the formatting eg adding superscript and
subscript in the Home ribbon.

R. MALEMBA S 738
T. PATRICK'S SEC SCHOOL
Paragraph and page
formatting
• Paragraph and page formatting involves aligning
text, indenting, adding column guides, inserting
headers and footers

R. MALEMBA S 739
T. PATRICK'S SEC SCHOOL
Text alignment
• You can align the text to left, center, right or
justified by selecting the text and click alignment in
the Home ribbon
• To set tabs and indent
i. On the Home tab, click Paragraph Launcher icon
to display paragraph dialog box
ii. Click tabs and set to required tab stops
iii. To indent, click indents and specify required
indentation

R. MALEMBA S 740
T. PATRICK'S SEC SCHOOL
Inserting column guides
• By default, page is made up of one column. To
divide the page into more columns:
i. On the Home ribbon in the Paragraph group, click
Column button
ii. Select number of columns
iii. Click more columns if you want more than two
columns and specify number of columns in the
dialog box that appears as below

R. MALEMBA S 741
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 742
T. PATRICK'S SEC SCHOOL
Inserting headers and
footers
• Headers are lines of text, page numbers or dates that
appear at the top of every page, footers appear at the
bottom of every page.
• To insert header or footer
i. Click view tab and then Master page button to switch
to master page view
ii. On the master page click Show Header/Footer button
iii. To insert page numbers, click insert page numbers
iv. To insert text, type the content in the header or
footer text frame
R. MALEMBA S 743
T. PATRICK'S SEC SCHOOL
Formatting shapes and
graphical objects

R. MALEMBA S 744
T. PATRICK'S SEC SCHOOL
Fill and stroke
• Filling refers to applying a solid colour or pattern to a drawn shape
while stroke refers to the outline or line style.
• To fill the background colour and change stroke in publisher,
proceed as follows”
i. Select the object to activate the Format ribbon, under drawing
Tools
ii. On the format ribbon, specify the shape style, effects and other
properties
iii. To apply more formatting, click Format Auto Shape Launcher in
the shape style group
iv. Specify more formats in the dialog box that appear
NOTE: to make the fill transparent, slide the transparency button or
press Ctrl + T
R. MALEMBA S 745
T. PATRICK'S SEC SCHOOL
Rotating objects
• To rotate object in publisher:
i. Select the object
ii. Hold down the Ctrl key and drag the rotational
handle that appear above the object
iii. Rotate the handle in clockwise or anticlockwise
• To arrange objects in publisher
i. Select the object while pressing Shift + Tab
ii. On the Format ribbon, click Bring forward or Send
Backward to select arrange option from the list
R. MALEMBA S 746
T. PATRICK'S SEC SCHOOL
Cropping graphical
object
• Cropping is hiding unwanted parts of a graphical
objects particularly a picture. To crop an image
i. Select the object to activate the Format ribbon
under picture tool
ii. From the format ribbon, click crop button under
group
iii. Position the cropping pointer over a placeholder
on the objet and drag inwards to crop Grouping
objects

R. MALEMBA S 747
T. PATRICK'S SEC SCHOOL
• If you have several objects in publication, you may
want to group them together
i. Hold the Shift key as you click each object
ii. Right click the selections then click Group the
context menu
• NOTE: you can Ungroup using the same procedure
only that you select Ungroup command.

R. MALEMBA S 748
T. PATRICK'S SEC SCHOOL
Wrapping the object
• Text may be wrapped around the object as shown
below

R. MALEMBA S 749
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 750
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 751
T. PATRICK'S SEC SCHOOL
• To wrap text around a graphical object
i. Double click the picture to activate Format
ribbon
ii. On the Format ribbon, click Wrap Tet button to
display dropdown list
iii. Select wrapping option such as square, Tight or
through from the list

R. MALEMBA S 752
T. PATRICK'S SEC SCHOOL
Printing publications
• Unlike other application programs discussed earlier
e.g. word processing, printing in DTPs is a much
more technical. This is because you may prefer to
print a picture in a separate colours referred to as
colour separation.
• You can also insert crop marks and other details
required for commercial printing

R. MALEMBA S 753
T. PATRICK'S SEC SCHOOL
• To print publication, proceed as follows:
i. On the File tab, click print
ii. Under printer option, click printer properties
hyperlink to set print option in the dialog box
iii. To specify advanced print properties such as
inserting crop marks, click the arrow on the
right of the printer, then click advanced
option settings
iv. In the dialog box that appear, use tabs such as
Marks and breeds to specify advance option
R. MALEMBA S 754
T. PATRICK'S SEC SCHOOL
THE END

R. MALEMBA S 755
T. PATRICK'S SEC SCHOOL
DATABASES
• A database is a collection of structured and related
data items organized so as to provide a consistent
and controlled access to the items
• A database can be created manually or using
computers
• A traditional database is the one that is created
manually while the one created by a computer is
known as an electronic database.

R. MALEMBA S 756
T. PATRICK'S SEC SCHOOL
• To create and manage databases, we use Database
Management System (DBMS) software.
• These software facilitate the creation, organization
and maintenance of databases.
• Examples of database management software
include Microsoft Access(Ms Access), Microsoft SQL
Server, Oracle, FoxPro, DbaseIV, Lotus Approach
and MySQL.

R. MALEMBA S 757
T. PATRICK'S SEC SCHOOL
CONTENTS OF A
DATABASE
• One of the functions of a database system is to
organize data for easy access, retrieval and
manipulation.
• Data is organized from a simplest form called a field
to a very complex structure called a database.

R. MALEMBA S 758
T. PATRICK'S SEC SCHOOL
FIELDS
• A field is a character or a logical combination of
characters that represents a data item.
• For example, in a class list, the student name is a
field.
• A field runs from top to bottom in a database
(vertically)

R. MALEMBA S 759
T. PATRICK'S SEC SCHOOL
RECORDS
• A record is a collection of related fields that
represent a single entity.
• An example of a record is the student report card
that may contain the student’s name, admission
number, class, total marks and average grade.
• A record runs from left to right (horizontally)

R. MALEMBA S 760
T. PATRICK'S SEC SCHOOL
TABLES
• A table is a collection of related records.
• For example, the students’ file in a school database
contains the details of all the students in the
school.

R. MALEMBA S 761
T. PATRICK'S SEC SCHOOL
DATABASE
• This is the highest in the data organization
hierarchy that holds all related files or tables.
• For example, a school database may contain
students and staff tables/files.

R. MALEMBA S 762
T. PATRICK'S SEC SCHOOL
FILE MANAGEMENT
METHODS
• A file is a collection of related information; with a
name attached to it.
• File management is the process of storing and
organizing files and the data they contain to make it
easy to find and access them.
• The data and information stored in files is considered
the heart of any information system.
• Therefore, there is need to use the most convenient
file management method to store, access and retrieve
required information whether manual or
computerized.
R. MALEMBA S 763
T. PATRICK'S SEC SCHOOL
MANUAL FILE
MANAGEMENT
• In manual file management, data and record are kept
in books, ledgers, card files, manual files and folders.
• There manual files are then stored in file cabinets or
arranged on shelves.
• For convenience and ease of locating and retrieving
manual files, each file should be identified using a
label or a tag.
• A file list should be prepared to serve as a useful tool
in identifying the files and records being maintained
in the area and where they are located.

R. MALEMBA S 764
T. PATRICK'S SEC SCHOOL
WEAKNESSES OF
MANUAL FILE
MANAGEMENT
i. Unnecessary duplication of data
ii. Boredom and time wastage especially when
searching for a particular item
iii. Misleading reports due to poor data entry and
organization
iv. Poor update of records
v. Takes up a lot of space
vi. Higher cost;---- ink and paper costs
vii. Prone to damage and being misplaced
R. MALEMBA S 765
T. PATRICK'S SEC SCHOOL
COMPUTERISED FILE
MANAGEMENT
• Due to limitations of manual file management,
there is need for computerized file management
methods
• There are two methods of data storage in a
computer namely flat files and databases.

R. MALEMBA S 766
T. PATRICK'S SEC SCHOOL
FLAT FILE
MANAGEMENT
• In a flat management, records are stored in separate
files each with particular details.
• The use of such separate files means that the same
data is often stored in more than one file.
• For example, to maintain student’s information in a
school, the student registration file, examination file
and account file are kept as three separate files. Each
file is updated separately which may lead to
inconsistency.
• Microsoft Excel is an example of flat file management
software
R. MALEMBA S 767
T. PATRICK'S SEC SCHOOL
DATABASE FILE
MANAGEMENT
• A database is a centrally controlled store of data
where data elements and records are integrated
and shared among different files and users
• This method of storage eliminates the inconsistency
problems experienced in manual and flat file
management.

R. MALEMBA S 768
T. PATRICK'S SEC SCHOOL
SOME FUNCTIONS OF A DATABASE
MANAGEMENT SOFTWARE

i. Allows the user to add or delete records


ii. Allows the user to update or modify existing records
iii. To organize data for easy access, retrieval and
manipulation of records
iv. Acts as an interface between the database and
other application programs
v. To ensure security for the data in the database by
safeguarding it against unauthorized access and
corruption (damage)
vi. To keep statistics of data items in a database.
R. MALEMBA S 769
T. PATRICK'S SEC SCHOOL
DATABASE MODELS
• Database can be classified according to the method
used to organize data.
1. Hierarchical
2. Network
3. Relational

R. MALEMBA S 770
T. PATRICK'S SEC SCHOOL
HIERARCHICAL MODEL

R. MALEMBA S 771
T. PATRICK'S SEC SCHOOL
NETWORK MODEL

R. MALEMBA S 772
T. PATRICK'S SEC SCHOOL
RELATIONAL MODEL

R. MALEMBA S 773
T. PATRICK'S SEC SCHOOL
OBJECT ORIENTED MODEL

R. MALEMBA S 774
T. PATRICK'S SEC SCHOOL
DATABASE DESIGN
1. Requirement analysis (need finding)
2. Conceptual database design (ER-diagram)
3. Logical database design (tables, normalization)
4. Physical database design (tables, table indexing)
5. Implementation (target database, testing)

R. MALEMBA S 775
T. PATRICK'S SEC SCHOOL
REQUIREMENT
ANALYSIS

R. MALEMBA S 776
T. PATRICK'S SEC SCHOOL
CONCEPTUAL DATABASE
DESIGN

R. MALEMBA S 777
T. PATRICK'S SEC SCHOOL
LOGICAL DATABASE
DESIGN

R. MALEMBA S 778
T. PATRICK'S SEC SCHOOL
PHYSICAL DATABASE
DESIGN

R. MALEMBA S 779
T. PATRICK'S SEC SCHOOL
IMPLEMENTATION

R. MALEMBA S 780
T. PATRICK'S SEC SCHOOL
GUIDELINES ON
DESIGNING A GOOD
DATABASE

R. MALEMBA S 781
T. PATRICK'S SEC SCHOOL
FEATURES OF
MICROSOFT ACCESS
1. Tables/file structure
2. Forms/input screen
3. Queries
4. Reports
5. Macros
6. Programming module

R. MALEMBA S 782
T. PATRICK'S SEC SCHOOL
STARTING MICROSOFT
ACCESS
• To create a new database;
i. Click Start, point to Programs, Microsoft Office, then Access 2003
or 2016.
ii. On the New File, click Create New
iii. On the New File pane click Blank database
iv. Select the location where the database will be created, type the
database name then click Create
v. The New Database dialog box appears. This lets you specify the
name and location where your database will be stored. Click
Create.
vi. Microsoft Access database objects window is displayed, from
which you can choose the type of object you wish to create such
as tables, forms and queries.
R. MALEMBA S 783
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 784
T. PATRICK'S SEC SCHOOL
MICROSOFT ACCESS
SCREEN LAYOUT
• Like in other packages discussed earlier, Access
application window has a title bar, menu bar,
toolbar and status bar.
• However, instead of having a work area like that of
Ms Word or Excel, it provides the user with an
object window from which you choose the type of
an object to work with such as tables, forms and
reports.
• See figure below….;

R. MALEMBA S 785
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 786
T. PATRICK'S SEC SCHOOL
EXITING FROM ACCESS
• Like any other application discussed earlier, you exit
from Ms Access by pressing Alt + F4 or on File
menu click Exit.

R. MALEMBA S 787
T. PATRICK'S SEC SCHOOL
DATABASE STRUCTURE

R. MALEMBA S 788
T. PATRICK'S SEC SCHOOL
CREATING A TABLE
STRUCTURE
• To define a table structure:
i. In Ms Access objects window, click the Tables tab then New
ii. In the New Table dialog box, select Design View
iii. Using the grid displayed, enter a unique name for each field in
the table. A field name must start with a letter and can be up to
a maximum of 64 characters including letters, numbers, spaces
and punctuation
iv. Choose appropriate data type before adding the text field. By
default, Ms Access inserts Text as a data type.
v. To save the table, click the Save button on the standard toolbar
or save from the File menu
vi. Access will then ask you whether to create a Primary Key, click
Yes.
R. MALEMBA S 789
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 790
T. PATRICK'S SEC SCHOOL
DESCRIPTION OF FIELD
TYPE
• The type of data to be used in database must be
clearly defined for the purpose of manipulation and
storage.
• For example, if a field is to be used for calculation,
it must be defined as number.
• The following are the data types that are allowed in
Ms Access:

R. MALEMBA S 791
T. PATRICK'S SEC SCHOOL
1. TEXT
• This type includes alphabetic letters, numbers,
spaces and punctuation.
• Use this datatype for the fields that do not need to
be used for calculations such as names, places and
identification numbers.
• This type of field accommodates a maximum of 255
characters.

R. MALEMBA S 792
T. PATRICK'S SEC SCHOOL
2. NUMBER
• These are fields made up of numeric numbers (0 to
9) that are to be manipulated mathematically.

R. MALEMBA S 793
T. PATRICK'S SEC SCHOOL
3. MEMO
• This is a field made up of alphanumeric (both
alphabetic and numeric) data.
• Instead of using Text, use this data type if you need
to enter several paragraphs of text as it
accommodates a maximum of 32 000 characters.

R. MALEMBA S 794
T. PATRICK'S SEC SCHOOL
4. DATE/TIME
• This data type is used to identify a field as either a
date or time.
• This is because date/time values can be
manipulated mathematically in a database.
• For example, you can calculate the age of a person
from the date of birth to the current date.

R. MALEMBA S 795
T. PATRICK'S SEC SCHOOL
5. CURRENCY
• This data type is used to identify numeric values
that have decimals or fractions. Use this data type
especially when dealing with monetary values such
as fees balance and amount sold.

R. MALEMBA S 796
T. PATRICK'S SEC SCHOOL
6. AUTONUMBER
• This is a numeric value used if you wish Ms Access
to automatically increase the values in a field.
• For example, when entering a list of forty students
and you have a field labelled StudNumber, the
numbers will increase by one every time you enter
a new record

R. MALEMBA S 797
T. PATRICK'S SEC SCHOOL
7. YES/NO
• This is a logical field where an entry is either yes or
no, true or false.
• For example, a field may require you to answer
whether you are male or female.

R. MALEMBA S 798
T. PATRICK'S SEC SCHOOL
8. OLE OBJECT
• OLE stands for Object Linking and Embedding.
• This type of field is mostly used with graphical user
interface applications for inserting graphical objects
such as pictures, drawings and charts.

R. MALEMBA S 799
T. PATRICK'S SEC SCHOOL
FIELD PROPERTIES
• As you create more and more complex tables, you
will find a need to use field properties to specify
finer details related to fields and table entries
expected
• Field properties depend on the type of the field
selected
• For example, when you click on a Text field, then
the General tab, you will see properties associated
to text data type as shown below:

R. MALEMBA S 800
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 801
T. PATRICK'S SEC SCHOOL
1. FIELD WIDTH (SIZE)
• Field width property allows the user to insert the number
of characters in a field instead of the default 50.
• For example, field size can be set to 10 characters.
• For numeric fields, we use properties such as integer, long
integer, byte, single and double.
• Integer and long integer, accepts numbers with no
decimals
• Byte, only accepts numbers between 0 and 255
• Single and double, accepts numbers with decimals. Single
accommodates up to 38 decimal places while double
accommodates up to 308 decimal places.
R. MALEMBA S 802
T. PATRICK'S SEC SCHOOL
2. FORMAT
• Determines how information appears on the screen
when printed
• For example, you can format a number to scientific,
currency, percentage or general format

R. MALEMBA S 803
T. PATRICK'S SEC SCHOOL
3. DECIMAL PLACES
• For number and currency fields, you can specify the
number of decimal places

R. MALEMBA S 804
T. PATRICK'S SEC SCHOOL
4. INPUT MASK
• Input mask automatically formats the field entry
into a specific format.
• For example, if you enter a number such as
02000100409874 and the input mask is set as 000-
(00000)-000000, it is automatically displayed as
020-(00100)-409874.
• This property is mostly used to format phone and
address entries.

R. MALEMBA S 805
T. PATRICK'S SEC SCHOOL
5. CAPTION
• This is more descriptive name for a field to be used
in a table or a form displayed
• For example, the caption for StuName could be
Student Name

R. MALEMBA S 806
T. PATRICK'S SEC SCHOOL
6. DEFAULT VALUES
• This is a value that appears automatically in the
datasheet or form if nothing is entered by the user
to change it.
• For example, = Date() automatically displays the
current date in a date field

R. MALEMBA S 807
T. PATRICK'S SEC SCHOOL
7. VALIDATION RULE
• Logical expression that restricts the values to be
entered in a field
• For example, if you want to restrict marks entered
in a field to values between zero and a hundred,
type >=0 And <=100.

R. MALEMBA S 808
T. PATRICK'S SEC SCHOOL
8. VALIDATION TEXT
• This is a message that appears once the validation
rule is violated.
• For example, you may create a validation text for
the above validation rule to display “enter a
number between 0 and 100” whenever the user
enters a value outside this range

R. MALEMBA S 809
T. PATRICK'S SEC SCHOOL
9. REQUIRED
• Determines if an entry must be made in the field
before you proceed to the next field or record.
• For example, if a primary key is required, you must
enter it before you proceed.

R. MALEMBA S 810
T. PATRICK'S SEC SCHOOL
10. ALLOW ZERO
LENGTH
• This allows the user to proceed without making any
entry in the field set as Zero length.

R. MALEMBA S 811
T. PATRICK'S SEC SCHOOL
11. INDEXED
• An Index facilitates the organization of records for
easy search.
• A primary key is an example of an index set to No
duplicates.

R. MALEMBA S 812
T. PATRICK'S SEC SCHOOL
PRIMARY KEY AND
INDEXES
• An index is a key(s) used to speed up searching and
sorting records in a table, while primary key is an
index that uniquely identifies each record stored in
the table
• A primary key prevents the user from making null or
double entries into a table.
• Access uses the primary key to order records, and
control redundancy
• Once a field is set as primary key, the datasheet is
automatically indexed or sorted using the primary
key.
R. MALEMBA S 813
T. PATRICK'S SEC SCHOOL
TO SET A PRIMARY KEY
i. Open the table in design view
ii. Select the field you want to set as the primary
key by clicking in the row header to the left of
the Field Name
iii. Click Set Primary Key button on the tools bar as
shown below:

R. MALEMBA S 814
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 815
T. PATRICK'S SEC SCHOOL
TO SET ANOTHER FIELD AS AN
INDEX OTHER THAN THE PRIMARY
KEY
i. Open the table in design view
ii. Click the Indexes button next to the primary key.
The index design grid is displayed on the screen.
iii. In the Index Name column, type the name of the
index
iv. In the Field Name column, select the
corresponding field name
v. In the Sort Order column, select Ascending or
Descending, and then Close the window.

R. MALEMBA S 816
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 817
T. PATRICK'S SEC SCHOOL
WORKING WITH DATABASE
TABLES

R. MALEMBA S 818
T. PATRICK'S SEC SCHOOL
ADDING NEW RECORDS
• In Access, a record entry into a table is
automatically saved once you move to a new row
• To enter records into a table:
i. Double click the table icon. The table is displayed
in datasheet view.
ii. On Insert menu, click New Record. The following
symbols will be displayed at the row header:

R. MALEMBA S 819
T. PATRICK'S SEC SCHOOL
• An arrowhead indicates that no new data entry or
edit is pending
• Pencil symbol indicates that the current record
entry is not yet saved
• Asterisk symbol marks a blank record below the
current entry
• Record locked indicates that the current record is
being edited by another user in a multi-user or
networked environment

R. MALEMBA S 820
T. PATRICK'S SEC SCHOOL
DELETING RECORDS
• To delete a record:
i. Click the record you want to delete
ii. On the Edit menu, click Delete. A message
appears, click Yes to confirm deletion.

R. MALEMBA S 821
T. PATRICK'S SEC SCHOOL
EDITING FIELDS
• To edit a field:
i. Double click the field you want to edit
ii. Replace the cell content.

R. MALEMBA S 822
T. PATRICK'S SEC SCHOOL
SEARCHING FOR
RECORDS
• To find and replace a field:
i. On the Edit menu, click Find or Replace
ii. In the “Find What” and “Replace With” boxes,
type the field to search for and replace with
respectively.
NB: You can use wildcards like asterisks (*) if you are
not sure of the search phrase. For example, if you
wish to search for all names that start with the letter
“J” in a Students table, type J*. All names that start
with letter J such as John, and James will be displayed
R. MALEMBA S 823
T. PATRICK'S SEC SCHOOL
COPYING AND MOVING
RECORDS
i. Select the record(s) to be copied or moved
ii. On the Edit menu, click Copy to create a copy or
cut to move
iii. Open the target datasheet. On the Edit menu,
click Paste.

R. MALEMBA S 824
T. PATRICK'S SEC SCHOOL
SORTING RECORDS
i. In datasheet view, select the records to be
sorted
ii. On the Records menu, click Ascending or
Descending

R. MALEMBA S 825
T. PATRICK'S SEC SCHOOL
FILTERING RECORDS
• Filtering is an operation that allows the user to view
only those records that meet a certain criteria
i. In datasheet view, click a specific field that will be
used as the filter key
ii. On the Records menu, point to Filter
iii. On the menu, click Filter by selection
iv. The filtered records are displayed as shown below:
NB: To remove the filter, press the button that looks like
a funnel on the standard toolbar or “remove sort tab”.

R. MALEMBA S 826
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 827
T. PATRICK'S SEC SCHOOL
EDITING A DATABASE

R. MALEMBA S 828
T. PATRICK'S SEC SCHOOL
MODIFYING DATASHEET
• To adjust the column size:
i. Point to the column holder between the field’s header, then
drag to the required size
• To adjust row height:
i. Point to the border between two rows in the row header and
then drag
ii. Alternatively, use the Format menu, then row height
• To reorder fields:
i. Select the column of the field you wish to move by pointing to
the desired file name
ii. Drag the column right or left to the top of the field where you
want your field to appear and then drop
R. MALEMBA S 829
T. PATRICK'S SEC SCHOOL
MODIFYING TABLE
STRUCTURE
• Once you create a table, you may need to add more
fields, remove some fields, reorder the fields or
change field’s data types and properties.
• Before you modify the table it is important to save
a copy to avoid loosing everything in case you make
a mistake.

R. MALEMBA S 830
T. PATRICK'S SEC SCHOOL
To modify the table:
i. Open the table in design view
ii. Select the field or fields to be modified and make the
necessary changes
iii. Click the Save button to save the changes

NB: If a table contains data and you make changes to field


data type, Ms Access may refuse to implement the
changes. To avoid this problem, delete all the concerned
records from the table then return to the design view.
You can then import a copy or copies of tables if you
backed them up.
R. MALEMBA S 831
T. PATRICK'S SEC SCHOOL
FORM DESIGN
• A form is an interface that enables the user to view
and make data entries into an underlying table or
query more easily.
• In Ms Access, a form is designed using graphical
objects called controls.
• A control is a visual object such as a text box, check
box, command button or shapes that you place on
a form design grid to display data or perform
actions.

R. MALEMBA S 832
T. PATRICK'S SEC SCHOOL
TYPES OF CONTROLS
i. BOUND CONTROL
A bound control is the one whose source of data is a
field in a table or query. (eg text field that gets
information inserted in the table or query)
ii. UNBOUND CONTROL
Unbound control is the one that is not connected to
any data source (eg a label)

• You design or modify a form layout by dragging these


controls to the required position.
R. MALEMBA S 833
T. PATRICK'S SEC SCHOOL
CREATING A FORM
USING A WIZARD
• To create a form layout, you can either use the form
wizard or start from scratch
• Using the form wizard you can create either a
columnar, a tabular, a datasheet or a justified form
layout

R. MALEMBA S 834
T. PATRICK'S SEC SCHOOL
COLUMNAR FORM
• The fields for each record are displayed down a
column, that is each value displays on separate line
with field labels to the left

R. MALEMBA S 835
T. PATRICK'S SEC SCHOOL
TABULAR FORM
• Records are displayed from left to right across the
page and labels appear at the top of each column.
• Each row represents a new record

R. MALEMBA S 836
T. PATRICK'S SEC SCHOOL
DATASHEET FORM
• The form resembles a table datasheet view

R. MALEMBA S 837
T. PATRICK'S SEC SCHOOL
JUSTIFIED FORM
• One record occupies the whole form

R. MALEMBA S 838
T. PATRICK'S SEC SCHOOL
SAMPLE FORM VIEW

R. MALEMBA S 839
T. PATRICK'S SEC SCHOOL
SAMPLE FORM
DESIGNER VIEW

R. MALEMBA S 840
T. PATRICK'S SEC SCHOOL
To create a form using
the form wizard:
i. Open the database for which the form is to be created
ii. Click the Form tab then, New. From the New form dialog box that
appears, click Form Wizard
iii. Select the table you want to create a form for, then New. A dialog
box appears
iv. Click the name of the table or query that includes the data you
want to add into the form, then click OK
v. From the field list window, select the fields to add into the form by
clicking the > button or click >> to add all fields, then Next.
vi. From the layout dialog box, select the layout you wish to use for
example, Standard, then click Next.
vii. In the Form title dialog box, select the name of the form then click
Finish. Ms Access will automatically display form on the screen.
R. MALEMBA S 841
T. PATRICK'S SEC SCHOOL
CREATING A FORM
USING AUTOFORM
WIZARD
• You can easily create a form using the Autoform
wizard.
• This wizard creates a form for you automatically by
asking you a every minimal questions.
• The form includes all the fields from the selected
table.

R. MALEMBA S 842
T. PATRICK'S SEC SCHOOL
To construct an
autoform
i. Make sure your database is open
ii. Click the Form tab, then New
iii. In the New form dialog box, select an autoform
layout like columnar
iv. In “Choose the table or query where the object
data comes,” select the table you wish to create
a form for, then click OK. The form with all fields
will be displayed
v. Click the Save button to save the form

R. MALEMBA S 843
T. PATRICK'S SEC SCHOOL
CREATING A FORM
FROM DESIGN VIEW
i. Open your database
ii. In the database window, click the Form tab then
New
iii. From the New form dialog box, select Design
view.
iv. In the “Choose the table or query where the
object data comes” select the table you wish to
create a form for, then click OK. A form with
controls form all fields is displayed.

R. MALEMBA S 844
T. PATRICK'S SEC SCHOOL
To add control onto a
form:
i. Click the View menu, then Field list command.
The field of the table you selected is displayed.
ii. Drag and drop each field and arrange them on
the grid
iii. Save the form by clicking on the Save button.

R. MALEMBA S 845
T. PATRICK'S SEC SCHOOL
ADDING AND
DISPLAYING RECORDS
ON A FORM
• The form provides the user with the navigation
buttons located at the bottom that can be used to
navigate the form as shown below:

R. MALEMBA S 846
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 847
T. PATRICK'S SEC SCHOOL
The functions of the buttons can
be summarized from left to right
as follows:
1. Displays the first record in the table
2. Displays the previous record
3. Displays the next record
4. Displays the last record
5. Used to add a new record

R. MALEMBA S 848
T. PATRICK'S SEC SCHOOL
EDITING FORM
CONTROLS
• To format controls on a form:
i. Open the form design view
ii. To resize, click the controls then position the
pointer on the outline of the control then drag to
the required size
iii. To move, click control and position the pointer
onto the place holder or inside control, then drag
to the required location.

R. MALEMBA S 849
T. PATRICK'S SEC SCHOOL
Printing the form
• A form can be printed either in design View or form
View
• Click the form tap to make it current
• Select either design View or Form View
• Click the Print menu

R. MALEMBA S 850
T. PATRICK'S SEC SCHOOL
CREATING DATABASE
QUERIES
Queries are the fastest way to search for information
in a database
A query is a database feature that enables the user
to display specific records as well as perform
calculations on fields from one or multiple tables.
• You can analyse a table or tables by using either a
select query or an action query.

R. MALEMBA S 851
T. PATRICK'S SEC SCHOOL
1. SELECT QUERY
This is the most common type of query used for
searching and analysing data in one or more tables
• Select query lets the user specify the search
criteria, and the records which meet that criteria
are displayed in a dynaset (subdata) or analysed
depending on the user requirement.

R. MALEMBA S 852
T. PATRICK'S SEC SCHOOL
2. ACTION QUERY
These are queries that are used to make changes to
many records at once
• They are mostly used to delete, update, add a
group of records from one table to another, or
create a new table from another table.

R. MALEMBA S 853
T. PATRICK'S SEC SCHOOL
4 TYPES OF ACTION
QUERIES FOUND IN MS
ACCESS
Update- updates data in a table
Append query- adds data in a table from one or
more tables
Make table query- creates a new table from a
dynaset
• Delete query- deletes specified records from one or
more tables

R. MALEMBA S 854
T. PATRICK'S SEC SCHOOL
CREATING A SELECT
QUERY
Ensure that the database you want to create a query for is open
Click the Query tab, then New.
In the New query dialog box, choose either to create a query
from Design view or using a Wizard.
To design from scratch, click Design view. The Show Table dialog
box appears from which you can add a table or tables you wish to
create a query from.
Click the table from the table/query list and then click Add.
Click Close to close the Show Table dialog box
i. The query design grid opens. In Ms Access it is called Query-
By-Example (QBE). This lets the user to design a query.
R. MALEMBA S 855
T. PATRICK'S SEC SCHOOL
Click “query Design”

R. MALEMBA S 856
T. PATRICK'S SEC SCHOOL
Select the table you want
to create a query from,
then Close

R. MALEMBA S 857
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 858
T. PATRICK'S SEC SCHOOL
Choose the field to query
from

R. MALEMBA S 859
T. PATRICK'S SEC SCHOOL
Design the query using
the QUERY GRID

R. MALEMBA S 860
T. PATRICK'S SEC SCHOOL
PARTS OF THE QUERY
GRID
FIELD ROW- Fields from a table or tables to be used are
arranged in this row. Each field should occupy its column
TABLE ROW- Indicates the table providing the fields
SORT ROW- By clicking the down arrow in the sort cell,
you can specify the sort order; ascending, descending or
no sort
• SHOW ROW- By clicking the Show box, you specify
whether to display the field in the query results. When
the box is not checked, the field will not be displayed

R. MALEMBA S 861
T. PATRICK'S SEC SCHOOL
CRITERIA ROW- This is where you type conditional
statements that will be used by the query to display
specific records
• OR ROW- Used to specify an alternative condition.
If you want to display records with fields called City
with items Nairobi or Embu for instance, type
Nairobi in criteria cell and Embu in the Or cell.

R. MALEMBA S 862
T. PATRICK'S SEC SCHOOL
To add fields into the
query
Open the query in design view
• From the field list of the underlying table, drag
each field and place it in the field row.

R. MALEMBA S 863
T. PATRICK'S SEC SCHOOL
SEARCHING FOR
RECORDS USING
QUERIES
In order to search for a particular set of records, you
have to enter a conditional statement or statements
in the criteria row.
• For example, if you have a table called Students
with one of the fields as Scores, you can display all
the students with score more than 50%, by typing
>50 in the criteria row, Score column.

R. MALEMBA S 864
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 865
T. PATRICK'S SEC SCHOOL
How to define criteria
Use either relational or logical operators.
Relational operators include less than (<), greater
than (>), greater than or equal to (>=), less than or
equal to (<=), not equal to (<>) and equal to (=).
• Logical operators include AND, OR and NOT

R. MALEMBA S 866
T. PATRICK'S SEC SCHOOL
AND
Use AND to display values in a specific range.
For example, to display records from the Students
table with scores above 50% but less than 60%, type,
>50 AND <60 on the criteria row in the scores
column.
• All the students who meet this condition will be
displayed.

R. MALEMBA S 867
T. PATRICK'S SEC SCHOOL
OR
Use OR if you wish to get either one of the two
values.
• For example, if you wish to get those employees
either in Nairobi OR Embu

R. MALEMBA S 868
T. PATRICK'S SEC SCHOOL
BETWEEN
If you want to display data in a particular range, use
the word Between.
• For example, instead of typing, >50 AND <60, type
Between 50 And 60.

R. MALEMBA S 869
T. PATRICK'S SEC SCHOOL
NOT
If you want to list all the records except those that
you do not want to see, use NOT.
• For example, if you type NOT 80 in the scores
column of the student table, all students records
will be displayed except those with their score as
80.

R. MALEMBA S 870
T. PATRICK'S SEC SCHOOL
LIKE
To display records which you are not sure of the field
name but at least you can remember a few
characters, use LIKE and the wildcards.
Wildcards are special symbols mostly an asterisk and
a question mark used in place of other characters.
For example, to display all names starting with "Sm"
followed by any other character, type, Like Sm?
• Like */*/1993 lists records created in 1993
regardless of the day or month.

R. MALEMBA S 871
T. PATRICK'S SEC SCHOOL
SAVING AND RUNNING
THE QUERY
Click the Save button on the standard tool bar or
save command from the file menu
i. In the name box that appears, type in the name
of the query then click OK
ii. To run the query in design view, click the Run
button on the toolbar as shown in the figure
below or Run command from the Query menu.
• You can also view the results from your query any
other time by selecting the query, then clicking the
Open button from the database window.
R. MALEMBA S 872
T. PATRICK'S SEC SCHOOL
Run button

R. MALEMBA S 873
T. PATRICK'S SEC SCHOOL
SORTING THE QUERY
RESULTS
To sort a query result;
In the sort row, click the down arrow that appears to
specify the sort order; ascending or descending order
of the desired field
• Display the dynaset.

R. MALEMBA S 874
T. PATRICK'S SEC SCHOOL
EDIT A QUERY
• To delete fields from the query grid:
i. Open the desired Query in design view
ii. Select the field column you want to delete
iii. Choose Delete from the Edit menu
iv. Click the Save button to save the changes

R. MALEMBA S 875
T. PATRICK'S SEC SCHOOL
To adjust the column
size in a query
i. Open the desired query in design view
ii. Position the mouse pointer at the boundary that
separates columns, then drag it to the required
size. Alternatively, double click the boundary to
auto fit cell content
iii. Click the Save button to save the changes

R. MALEMBA S 876
T. PATRICK'S SEC SCHOOL
To modify a criteria
statement:
i. Open the desired query in design view
ii. Modify the criteria statements as desired
iii. Click the Save button to save changes
iv. To test whether the changes have been effective,
click the Run button to display the results of the
query

R. MALEMBA S 877
T. PATRICK'S SEC SCHOOL
PERFORMING
CALCULATIONS IN A
QUERY
• Unlike tables, queries let the user to perform
mathematical calculations on numeric data
• You can perform calculations in a query by using
the Total functions or by creating basic formulas

R. MALEMBA S 878
T. PATRICK'S SEC SCHOOL
CREATING BASIC
FORMULAS
• To create a formula that calculates the total marks in an
underlying table such as ORDERS table, proceed as follows:
i. Open the query in design view
ii. In an empty cell, type an expression that includes a field
name such as Amount: [Quality] * [Unit Price]
iii. You can then set the criteria, and other query options
iv. Save the query and run it. The results of the
calculations will be displayed in the dynaset as shown
below. However, this field is not added to the
underlying table(s) because query results must always
be based on the most current data in the database.

R. MALEMBA S 879
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 880
T. PATRICK'S SEC SCHOOL
USING TOTAL
FUNCTIONS
• With a query, you can analyse all record fields using the inbuilt
functions such as Sum, Average, Minimum and Maximum etc.
• To use the Total function:
i. Open your query in design view
ii. Click the Totals button on the query toolbar
iii. Select the field you want to analyse
iv. For each field to be analysed, click its cell in the Total row,
and then select any of the functions. E.G. Sum
v. Set criteria ant other options, then click run to Preview the
results
vi. Save the query
R. MALEMBA S 881
T. PATRICK'S SEC SCHOOL
PRINTING A QUERY
i. Open the database window of the database
containing the query you want to print
ii. Click the Query tab then the query you want to
print
iii. On the File menu, click Print. Set the printing
options then click the OK button

R. MALEMBA S 882
T. PATRICK'S SEC SCHOOL
CREATING QUERIES
BASED ON MULTIPLE
TABLES
• When you use fields more than one table query,
there should be a common link or relationship
between tables

R. MALEMBA S 883
T. PATRICK'S SEC SCHOOL
TYPES OF
RELATIONSHIPS
1. One –to –one relationship
2. One-to-many relationship
3. Many-to-many relationship

R. MALEMBA S 884
T. PATRICK'S SEC SCHOOL
One – to – one
relationship
• In one – to – one relationship, for a particular field
in one table (the main table), there is only one
matching record in the related table and vice versa

R. MALEMBA S 885
T. PATRICK'S SEC SCHOOL
One-to-many
relationship
• In a one-to-many relationship, for a particular field
in one table, there are several matching records in
another table.
• This is the most common type of relationship
• For example, a person may make one or several
orders.
• For this instance, there is only one record with that
person’s details say in Customers’ table, yet there
are several records related to the same person in
the Orders table.
R. MALEMBA S 886
T. PATRICK'S SEC SCHOOL
Many-to-many
relationship
• In a many-to-many relationship, for particular
records in one table, there are several matching
records in the other table and vice versa.
• This is not very common.

R. MALEMBA S 887
T. PATRICK'S SEC SCHOOL
DEFINING
RELATIONSHIP
BETWEEN TABLES
i. Make sure your database is open
ii. From Tools menu, choose Relationships. The relationships dialog
box appears
iii. Select the tables to add, then click the Add button
iv. To create a relationship, click on the common field and drag it to
the second table. The fields used to create the relationship must
be of the same type and properties
v. To Enforce Referential Integrity, right click the line joining the two
tables, then click Edit. An Edit relationships dialog box such as the
one in figure below will be displayed
vi. Make sure Enforce Referential Integrity is checked to ensure that
all records entered in the related table exist in the primary table
vii. Click OK to close the Edit relationships dialog box
R. MALEMBA S 888
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 889
T. PATRICK'S SEC SCHOOL
TO CREATE A QUERY
BASED ON RELATED
TABLES
i. Start the database window and click the Queries
tab
ii. Select Design view and click OK
iii. From the Show table dialog box, click the tables
you want to base your query on and then click
Add.
iv. Relationship between various tables will be
displayed as shown in figure below. Add the
fields from both tables into QBE grid
v. Save and Run the query
R. MALEMBA S 890
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 891
T. PATRICK'S SEC SCHOOL
CREATING REPORTS
AND LABELS
• Reports are used to summarise and present
information from a database while labels are used
for identity purpose.
• A good database software should enable the user
to generate reports and labels

R. MALEMBA S 892
T. PATRICK'S SEC SCHOOL
CREATING REPORTS
• Like forms, a report layout is also designed by
placing controls on to the report designer.

R. MALEMBA S 893
T. PATRICK'S SEC SCHOOL
PARTS OF A REPORT
• Report Header –this contains unbound controls that display
the title of the report
• Page Header –contains heading or labels data items to be
displayed in every column
• Detail –holds bound controls that display data items for the
table or query it was created from
• Page Footer –holds a control that is to be displayed on every
page such as the page number and date. For example =Now()
displays the current date and time as set in the system clock
• Report Footer –used to display summary from a report such as
the grand total for numerical data in a particular field column

R. MALEMBA S 894
T. PATRICK'S SEC SCHOOL
CREATING A REPORT
USING A REPORT
WIZARD
• To create a report layout:
i. Ensure that the database is open
ii. Click the Report tab, then New
iii. In the New Report dialog box, click Report Wizard then OK
iv. Select a table or a query, then the fields to be added to the
report, then click Next
v. The wizard asks you whether you wish to add grouping.
Grouping is used to classify records using a particular field.
For example, to categorise books in a library database
according to ISBN Number, double click the field, then click
Next

R. MALEMBA S 895
T. PATRICK'S SEC SCHOOL
vi. In the dialog box that appears, select the Sort option if you
want to sort the records. You can also click the Summary
option button in case you want Ms Access to perform
calculations on numerical fields
• In the summary options dialog box, select the Summary option
you want to perform such as Sum and Average. Click OK to close
the summary options dialog box, then click Next.
vii. In the Layout dialog box, select the type of layout such as
stepped and click Next
viii. In the Style dialog box, specify the report style by selecting
either bold, casual or any other styles
ix. Finally enter the name of your report, then click Finish. The
report will be displayed on the screen in print preview mode.
R. MALEMBA S 896
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 897
T. PATRICK'S SEC SCHOOL
CREATING A REPORT IN
DESIGN VIEW
• To design a report in design view:
i. In the database window, click the Report tab then New
ii. In the New Report dialog box, click Design view
iii. Click the name of the table or query you want to generate a report from
iv. Click the OK button. You will get a report design grid where you can
place data controls
v. From the view menu, click Field List
vi. To design the layout, drag each field from the field list to the layout grid
and drop it where you want the data column to appear
vii. Once you finish placing controls, click the Save button
viii. In the Save As dialog box, enter the name of the report and click OK
ix. To view the report, click the Print View button. Alternatively, click Print
Preview from the File menu

R. MALEMBA S 898
T. PATRICK'S SEC SCHOOL
MODIFYING A REPORT
LAYOUT
• To modify headers and footers:
i. Open the report in design view
ii. Click the report header or footer you want to
modify
iii. Make the necessary changes and then click the
Save button
iv. Click the Print Preview button to view the
changes

R. MALEMBA S 899
T. PATRICK'S SEC SCHOOL
To add more controls
onto the report layout:
i. Open a report in design view
ii. Display the field list by clicking the Field list
button or using the View menu
iii. Select one or more fields in the field list and drag
view to the Report design grid

R. MALEMBA S 900
T. PATRICK'S SEC SCHOOL
To resize or move a
control:
i. Click the control to select it. Position the mouse
pointer on to the place holder, until the mouse
pointer changes to a double-sided arrow
ii. Drag the pointer to resize the control
iii. To move a control, select it and place the mouse
pointer on the place holder until it changes to a
hand then drag

R. MALEMBA S 901
T. PATRICK'S SEC SCHOOL
CREATING LABELS
• A label is an identity or piece of paper put on an
item for the purpose of identification.
• Examples of stickers are mailing labels, label on the
floppy disk where you write your name among
others.
• Using the report label wizard, Ms Access lets you
easily create labels of different sizes.

R. MALEMBA S 902
T. PATRICK'S SEC SCHOOL
TO CREATE A LABEL
USING THE REPORT
WIZARD:
i. Open your database.
ii. On the database window, click the Report tab, then
New
iii. On the New Report dialog box, select Label Wizard
then the table or query from which the labels are to
be generated from
iv. Label wizard start running as shown below:
v. From a series of dialog boxes displayed, specify the
label size, font, fields to be included in the label,
whether to sort the labels, the name of the label,
then click Finish.
R. MALEMBA S 903
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 904
T. PATRICK'S SEC SCHOOL
MODIFYING LABELS
• Just as you modify a report or a form, you can also
modify a label by manipulating the layout controls
• To modify a label, proceed as follows:
i. On the database window, click the Report tab
then the Design View button
ii. The label design grid is displayed. Edit the layout
as desired, save and close the design grid
iii. To view the modified label, click the Preview
button from the database window.

R. MALEMBA S 905
T. PATRICK'S SEC SCHOOL
PRINTING REPORTS AND
LABELS
• Before you print a report or a label, you should first set
the page options.
i.e. the margins, paper size and orientation
i. Open the database that contains the report you want to
print
ii. Click the Report tab, select the page report you want to
print, then click the Preview button
iii. On the File menu, click Print
iv. Set the printer options; the printer type, print range
and number of copies
v. Click OK to print.
R. MALEMBA S 906
T. PATRICK'S SEC SCHOOL
USING ADVANCED
MICROSOFT ACCESS
FEATURES

R. MALEMBA S 907
T. PATRICK'S SEC SCHOOL
CREATING MACROS
• A macro is a set of one or more actions used to
automatically perform particular operations such as
opening a form or printing a report
• Macros are used to automate database applications

R. MALEMBA S 908
T. PATRICK'S SEC SCHOOL
To create a macro,
proceed as follows:
i. In the Database window, click the Macros button
then New
ii. In action column, click to add an action, like,
OpenForm
iii. In the lower part, specify arguments for the action
in the Action Argument box
iv. Type an option comment for the action
v. Add more actions to the macro. Actions are
executed in the order you list them
vi. Save the macro and run it
R. MALEMBA S 909
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 910
T. PATRICK'S SEC SCHOOL
ENFORCING DATABASE
SECURITY
• Ms Access provides the user with several data
security tools such as encryption, password
protection, hiding database objects and user level
security

R. MALEMBA S 911
T. PATRICK'S SEC SCHOOL
PASSWORD
PROTECTING A
DATABASE
• A password protected database displays a dialog
box that requests the password for opening
• To set a password:
i. Open the database in exclusive mode
ii. On the Tools menu, point to Security, then click
Set Database Password
iii. In the Password box, type in a password.

R. MALEMBA S 912
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 913
T. PATRICK'S SEC SCHOOL
iv. Re-enter the password in the Verify box, then
click OK

R. MALEMBA S 914
T. PATRICK'S SEC SCHOOL
ENCRYPTING A
DATABASE
• Encryption compacts a database files and makes it
indecipherable by a utility program or word
processor especially on a networked environment.
• Encrypting a database doesn’t restrict access to
objects by users

R. MALEMBA S 915
T. PATRICK'S SEC SCHOOL
TO ENCRYPT A
DATABASE:
i. Start Ms Access without opening a database
because you can not encrypt or decrypt a database
when it is open
ii. On the Tools menu, point to Security then click
Encode/Decode Database
iii. In the dialog box that appears, select the database
you want to encode or decode, and then click Ok
iv. In the Encrypt database dialog box that appears,
specify the location and type the file name for the
encrypted or decrypted database and then click OK

R. MALEMBA S 916
T. PATRICK'S SEC SCHOOL
HIDING DATABASE
OBJECTS
• You can hide tables, queries, forms and reports and
macros from casual user.
• This method of protection is the least secure
because it is possible to unhide the objects

R. MALEMBA S 917
T. PATRICK'S SEC SCHOOL
To hide objects, proceed
as follows:
i. On the View menu click Properties
ii. In the dialog box that appears, check Hidden
iii. Click Apply, then OK

R. MALEMBA S 918
T. PATRICK'S SEC SCHOOL
USER-LEVEL SECURITY
• This is the most extensive security method
especially on a multi-user environment
• A database administrator can grant specific users or
groups specific permissions and privileges to tables,
queries, forms, reports and macros

R. MALEMBA S 919
T. PATRICK'S SEC SCHOOL
To assign user rights
and privileges:
i. Open the database
ii. On the Tools menu, point to Security then click
User-Level Security Wizard
iii. The wizard guides you through the process

R. MALEMBA S 920
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 921
T. PATRICK'S SEC SCHOOL
SETTING UP STARTUP
OPTIONS
• To customize your database application workplace,
there is need to specify how the database is to be
loaded

R. MALEMBA S 922
T. PATRICK'S SEC SCHOOL
To set the startup
options:
i. On the Tools menu, click Startup
ii. In the Startup dialog box, set startup options like,
application title, startup object and other
application window options, and then click OK.

R. MALEMBA S 923
T. PATRICK'S SEC SCHOOL
R. MALEMBA S 924
T. PATRICK'S SEC SCHOOL

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy