Form 5 & 6 Notes PDF
Form 5 & 6 Notes PDF
Modern society has come to depend very heavily on the use of computer
systems. Banks, businesses, government departments, industries, shops,
people at home and school all rely on computer to play a vital role in
their daily activities. These activities are centered on information.
In business, the computer system has been used a lot and replaced filing
cabinets as means of storing information, and clerical workers as a
means of processing it. By storing and processing information on a
computer system, these businesses can function more quickly and
efficiently, because information can be found and collated much faster.
Discovery Learning:
Discovery Learning:
a c h i d
j f
Flexible keyboards fold or roll up for easy packing or storage. They are
designed to provide mobile users with a full-sized keyboard with
minimal storage requirements.
Wireless keyboards transmit input to the system unit through the air. By
eliminating connecting wires to the system unit, these keyboards provide
greater flexibility and convenience.
PDA keyboards are miniature keyboards for PDA used to send e-mail,
create documents, and play games.
Dumb terminal can be used to input and receive data but it cannot
process data independently. It is used to gain access to information from
a computer usually a server.
Intelligent terminal includes the processing unit, memory and secondary
storage. It can process data independently.
Network terminal also known as a thin client or network computer, is a
low-cost alternative to an intelligent terminal.
Internet terminal also known as a web terminal provide access to the
internet and display Web pages on a standard television set.
Direct Entry does not require data to be keyed by someone. Instead the
direct entry devices create machine-readable data and feed it directly into
the CPU. This reduces the possibility of human error and is an
economical means of data entry. Direct entry devices may be categorized
into these categories.
a. Pointing devices
b. Scanning devices
c. Image capturing devices
d. Audio-input devices
Pointing device is a device with which you can control the movement of
the pointer to select items on a display screen.
Figure 1.2c from left to right – optical, wireless and mechanical mouse
Joystick is the most popular input device for computer games. You
control game actions by varying the pressure, speed, and direction of the
joystick
Light pen is a light sensitive pen like device. The light pen is placed
against the monitor. This closes a photoelectric circuit and identifies the
spot for entering or modifying data. Engineers use light pens, for
example, designing anything from microprocessor chips to airplane
parts.
Stylus is a pen-like device commonly used with tablet PCs and PDAs. A
stylus uses pressure to draw images on a screen. A stylus interacts with
the computer through handwritten recognition software. Handwritten
recognition software translates handwritten notes into a form that the
system unit can process.
Figure 1.2e left to right – light pen, stylus, and tablet digitizer
Bar code readers are photo electric scanners that read the bar codes or
vertical zebra stripped marks printed on a product container.
Supermarkets use a bar code called the Universal Product Code (UPC),
which identifies the product to the supermarket computer. The computer
has a description and the latest price of the product. It automatically tells
the Point of Sale (POS) terminals the price and prints the price and
product name on the receipt.
Character and mark recognition devices are scanners that are able to
recognize special characters and marks. They are specialty devices that
are essential tools for certain applications. Three types are
Monitors
CRT (cathode ray tube) is the most common type of monitor for the
office and the home. The monitors are typically placed directly on the
system unit or on the desktop. CRT offers an inexpensive and
dependable computer display. They are bulky, however, and consume a
fair amount of power.
Printers
Discovery Learning:
Figure 1.2j Top: ink jet printer (left) & laser printer (right)
Bottom: Thermal printers (both)
Plotters
A plotter uses pens to draw an image on paper. Architects and engineers
who produce multicolor line drawings often use plotters. It is ideally
suited for Computer Aided Design (CAD) application.
Pen Plotter creates plots by moving a pen or pencil over a drafting paper.
These plotters are the least expensive and easiest to maintain. The major
limitation is speed and the inability to produce solid fills and shadings.
The Richter scale uses pen plotting technology to draw seismic activity.
Voice-Output Device
This device produces sound like human
speech, but is actually prerecorded
vocalized sounds. Voice output is used
in the telephone information system,
where the requested number is reported
using a voice output system. For
example, when a student enrolls courses
using a telephone registration system, he
or she hears voice output upon your
request. Voice output is becoming
common in voice messaging systems. Figure 1.2l Speakers
True/False
a) Input devices translate symbols that people understand into symbols
that computer can process.
b) A plotter is a device that can be used to trace or copy a drawing or
photograph.
c) Banks use a method called magnetic-ink character recognition
(MICR) to automatically read and sort checks.
d) Laser printers are highly reliable, but the quality of their output
limits their use to rough drafts and in-house communications
e) Plotters are special-purpose drawing device.
Fill in the blank
a) ____________ machines are popular office machines that can scan
the image of a document to be sent.
b) The ____________ printer is a reliable, inexpensive printer that
forms letters by a series of small pins on a print head.
c) The ___________ printer is the most widely used.
d) ____________ a device makes sounds that resemble human speech.
e) The number of dots that form an image on a monitor or printer is
referred to as ______________
Motherboard
Microprocessor
Memory Chips
System Clock
Buses
Ports/Sockets
Expansion Slots and Cards
Discovery Learning:
Discovery Learning:
Control Unit is the functional unit of the CPU that is responsible for
retrieving instructions from memory, determining their type and breaking
each instruction into a series of simple, small steps or actions. It tells the
computer system how to carry out the program instructions by directing
the movement of electronic signal between memory (which temporarily
holds data, and processed information) and the ALU. It also directs this
control signals between CPU, input, output and communication devices.
The Arithmetic Logic Unit (ALU) is the component of the CPU that is
responsible for performing arithmetic (+,-, /,*) and logic (comparisons
such as <,>, =) operations.
Memory
A memory chip is a chip that holds programs and data either temporarily
or permanently. Three major types of memory chips are RAM ROM and
CMOS.
Random access memory (RAM)
Random access memory holds the data or instructions that the CPU is
presently processing. RAM is called temporary or volatile storage
because everything in most types of RAM is lost as soon as the
microcomputer is turned off or the power disrupted.
Whenever a CPU writes data or instructions to RAM, it wipes out the
previous contents of RAM replacing it with the current content it is
processing or processed but needs to be saved.
System Clock
The clock is a device that generates periodic, accurately spaced signals
used for several purposes such as regulation of the operations of a
processor or generation of interrupts. The clock circuit uses the fixed
vibrations generated from a quartz crystal to deliver a steady stream of
pulses to the processor. The system clock controls the speed of all the
operations within a computer. The clock speed is the internal speed of a
computer and is expressed in Hertz. 33 MHz means approximately 33
million cycles per second can be processed. A computer processor's
speed is faster if it has higher clock speed. For example, a 2.5 GHz
processor is capable of processing approximately 2.5 billion instructions
per second.
Buses
A bus is a data pathway between several hardware components inside or
outside a computer. It not only connects the parts of the CPU to each
other, but also links the CPU with other important hardware. The other
important hardware includes memory, a disk control unit, a terminal
control unit, a printer control unit, and a communications control unit.
The capacity of a bus is expressed as bits. A larger capacity bus is faster
in data transfer. For example, a 32-bit bus is faster than an 8-bit bus.
Ports
A port is an external connecting socket on the outside the computer. This
is a pathway into and out of the computer. A port lets users plug in
outside peripherals, such as monitors, keyboards, mouse, scanners and
printers.
Standard Ports
Serial ports are external I/O connectors used to attach modems, scanners
or other serial interface devices to the computer. The typical serial ports
use a 9-pin DB-9 or a 25-pin DB-25 connector. Serial ports transmit bits
one after another on a single communications line. Serial lines frequently
are used to link equipment that is not located close by.
Parallel ports are external I/O connectors on a computer used to hook up
printers or other parallel interface devices. The parallel port uses a DB-25
connector. This port transmits several bits simultaneously. Parallel lines
move information faster than serial lines do.
Universal serial bus (USB) ports are gradually replacing serial and
parallel ports. They are faster, and one USB port can be used to connect
several devices to the system unit.
FireWire ports also known as high performance serial bus (HPSB), are
as fast as USB 2.0 ports and provide connections to specialized FireWire
devices such as camcorders.
Specialized Ports
There are numerous specialty ports including MIDI, SCSI, and IrDA
ports.
Musical instrument digital interface (MIDI) ports are a special type of
serial port for connecting musical instruments like an electronic
Small computer system interface (SCSI) ports are a special type of high
speed parallel port for connecting a series of input and/or output SCSI
devices to a single SCSI controller card. This arrangement allows several
devices to communicate with the system unit through a single slot on the
system board.
Infrared Data Association (IrDA) ports are also known as fast infrared
(FIR) ports. IrDA ports provide a wireless mechanism for transferring
data between devices. Instead of cables, the IrDA ports from each device
are directly aligned and infrared light waves are used to transmit data.
Open/Closed architectures
Open Architecture is a system whose specifications are made public to
encourage third-party vendors to develop add-on products for it. Most
microcomputers adopt open architecture. They allow users to expand
their systems using optional expansion boards. Closed Architecture is a
system whose technical specifications are not made public. With a
machine that has closed architecture, users cannot easily add new
peripherals.
Expansion Slots
Expansion slots are receptacles inside a system unit on which printed
circuit boards (expansion boards) are plugged into. Computer buyers
need to look at the number of expansion slots when they buy a computer,
because the number of expansion slots decides future expansion. In
microcomputers, the expansion slots are directly connected to the bus.
Review Exercise1.2.3
True/False
Hard disk packs are removable storage devices to store massive amounts
of information. Hard-disk packs have multiple recording platters aligned
one above the other. Their capacity far exceeds the other types of hard
disks.
Figure 1.2t from left to right – hard disk pack, hard disk cartridge and
external hard drive
Optical Disks
Optical disk is a disk written and read by laser beam. This optical disk
has a great impact on today's storage technology. Optical disk does not
need to move access arms and read/write heads, because a laser beam
can be moved electronically.
Discovery Learning:
A CD is the one of the most widely used optical discs which is available
in a variety of formats such as:
Read-only optical disks also known as CD-ROMs or Compact Disk
Read-Only Memory and cannot be written on. The most common
applications of CDROM are in the storage and retrieval of multimedia
images and sound along with text. It can store up to 650MB on a single
side and up to 72minutes of VHS-quality video.
Write-once and read many optical disks also called WORMs or CD-R
(CD-Recordable) and are blank disks that are recorded by the user. To
write data, a powerful beam of laser light burns tiny spots into the
DVD discs and DVD disc drives are very similar to CDs except that
more data can be packed into the same amount of space. The DVD
drives can store 4.7 gigabytes on one side of a DVD disk – more than
seven times the capacity of a CD. Many DVD drives can store data on
both sides of the disk, thereby doubling the capacity.
Digital Versatile Disk- Read Only Memory can provide over two hours
of very high quality video and sound comparable to that found in motion
picture theaters.
Solid state storage is portable, provides fast access to data, and uses very
little power, so it is an ideal solution for storing data on mobile devices
and transporting data from one device to another. It is widely used in
consumer devices, such as digital cameras, MP3 music players, notebook
computers, PDAs and cell phones.
There are several types of solid state storage devices. A USB flash drive
is a portable storage device featuring a built-in connector that plugs
directly into a computer‟s USB port. A USB flash drive requires no card
reader, making it easily transportable from one computer to another.
Compact Flash (CF) cards are about the size of a matchbook and provide
high storage capabilities and access speeds. Compact Flash cards include
a built-in controller that reads and writes data within the solid state grid.
Multimedia cards (MMC) offer solid state storage in a package about the
size of a postage stamp. Initially used in mobile phones, use of
Multimedia cards has spread to digital cameras and MP3 players.
Magnetic Tape
A magnetic tape is a tape coated with a magnetic material on which data
can be stored. This is a sequential storage device that is usually used for
a backup purpose. A magnetic tape is slower than direct access storage
such as disk, because it is sequential access storage. The biggest
advantage of magnetic tape is the cost. It is much cheaper than magnetic
disk and optical disk. An advanced tape backup technology (DAT) is
available these days.
True/False
Handheld computers are the smallest and are designed to fit into the
palm of one hand. It is also known as palmtop computer.
Personal digital assistants (PDA) are the most widely used handheld
computer.
Discovery Learning:
Shared access to resources and programs will require controls. It may not
be appropriate for everyone on the network to have access to all the files
on the network, for example, and many users accessing the same
database or files can pose security risks. Users need to know that
sensitive files cannot be accessed or altered by unauthorized users.
A mail server controls the transmission and receipt of mail. The server
will collect mail from users on the network and distribute it to others on
the network. Users can use the mail service from anywhere on the
network.
An internet server will provide many of the network functions that are
required for access to the internet.
Peak speed
Year Supercomputer Location
(Rmax)
National Supercomputing
2010 Tianhe-IA 2.566 PFLOPS
Center, Tianjin, China
Fujitsu K
2011 8.162 PFLOPS RIKEN, Kobe, Japan
computer
Fujitsu K
2011 10.51 PFLOPS RIKEN, Kobe, Japan
computer
Table 1.3 List of Supercomputers in ascending order of speed
True/False
Avoiding eyestrain and headache: Our eyes were made for most
efficient seeing at a distance. However, monitors require using the eyes
at closer range for a long time, which can create eyestrain, headaches,
and double vision. To make the computer easier for the eyes, take a 15
minutes break every hour or two. Avoid computers screens that flicker.
Keep computer screens away from windows and other sources of bright
light to minimize reflected glare on the screen. Special antiglare screen
coating and glare shields could be used. Keep everything you‟re focusing
on at about the same distance. Clean the screen of dust from time to time.
Avoiding back and neck pain: Work at monitors and keyboards that are
in improper position can result in the pains in the back and neck. To
avoid these problems, make sure equipment is adjustable and flexible.
a) What is ergonomics?
b) Why ergonomics is important?
1.5 Summary
Key Terms
17) Keyboard keys, such as caps lock, that turns a feature on or off is
called a ________ key.
a. power c. control
b. toggle d. function
Software 55
2.0 Introduction to Software
Software
System Application
Software Software
Operating
General Purpose
System
Utility
Language
Translator
56 Software
2.1 System Software
Software 57
2.1.1 Operating System (OS)
The provision of the user interface that allows users to interact with
the computer systems for example Microsoft Windows provides
menus, toolbars, dialog boxes and icons that are used for a variety of
tasks.
Running applications. In a multitasking operating system where
multiple programs can be running at the same time, the operating
system determines which applications should run in what order and
how much time should be allowed for each application before giving
another application a turn.
Managing internal resources. It manages the sharing of internal
memory among multiple applications. It handles and monitors input
and output to and from attached hardware devices, such as hard
disks, printers, and dial-up ports. It sends messages to each
application or interactive user (or to a system operator) about the
status of operation and any errors that may have occurred. It can
offload the management of what are called batch jobs (for example,
printing) so that the initiating application is freed from this work. On
computers that can provide parallel processing, an operating system
can manage how to divide the program so that it runs on more than
one processor at a time. File management including the creation,
deletion, copying, naming and storing of files. Navigation through
disks, folders and files and switching between applications. Printing
and installing printers. Font management and use. Control the
display of the monitor, including the resolution and size and starting,
restarting and shutting down the computer and networking.
58 Software
Operating System Features
Users interact with the operating systems through either a command line
interface (CLI) or graphical user interface (GUI). Most provide a place,
called the desktop, which provides mean of access to computer
resources. Operating systems interfaces have several features in common
with application programs as shown in the table below.
Features Function
Icons Graphics representations for a program or function.
Pointer Controlled by a mouse and changes shape depending
upon its current function.
Windows Rectangular areas for displaying information and
running programs.
Menus Provide a list of options or commands.
Dialog boxes Provide information or request input.
Help Provides online assistance for operating system
functions and procedures.
Command line Prompts users to enter command to perform an action.
Table 2.1.1a Operating System Features
Software 59
Menus
Desktop
Folder
Icons
File
Command dir
entered at the prompt
60 Software
The three basic categories of operating system are stand-alone, network
and embedded.
Categories Function Examples
Stand-alone It is a complete operating Windows 3.x, Windows
operating system that works on 95, Windows NT,
systems desktop or notebook Windows 98, Windows
computer. Some stand-alone 2000 Professional,
operating systems, called Windows XP , Windows
client operating systems, Vista, Window 7, Mac
also work in conjunction OS X, UNIX, Linux
with a network operating
system.
Network Are used to control and Netware, Windows NT
operating coordinate computer that are Server, Windows 2000
systems networked or linked Server, Windows NET
(NOS) together. Server, UNIX, Linux,
Solaris, Cisco IOS,
JuNOS.
Embedded Are used for handheld Windows CE, Pocket PC
operating computers and small 2002, Palm OS,
systems devices like PDAs and Symbian, Android,
Mobile phones. Apple iphone,
Blackberry.
Table 2.1.1b OS categories
Discovery Learning:
Software 61
2.1.2 Utilities
Windows utilities
62 Software
Discovery Learning:
5
1
Utility Suites
Utility suites combine several programs into one package. Buying the
packages is less expensive than buying the programs separately. The
three best-known utility suites are McAfee Office, Norton System-
Works, and V Communications System Suite. These suites provide a
variety of utilities, including programs that will protect your system from
dangerous programs called computer viruses.
Software 63
Discovery Learning:
Discovery Learning:
64 Software
2.1.4 Language Translators
True or False
Software 65
Applications software is created to perform either specific or general
task which is not related to the computer system itself. Application
software can be bought off-the-shelf. There are two broad categories of
application software: special-purpose and general-purpose (refer to
Figure 2.0). Special-purpose programs are designed to perform specific
tasks for example inventory, payroll, accounting, point of sales, virtual
reality, artificial intelligence and games. This software is in most cases
customized to suit a particular business need. General-purpose
programs are designed to be used by many people to do the most
common kinds of tasks such as typing, preparing budgets, presentations
and small databases. This is why they are also known as basic
application. Word processors, spreadsheets, database management
system and presentation graphics are general-purpose applications.
66 Software
Feature Description
Tabs Presents tools/buttons available for selection
from the ribbon.
Shortcut keys Special-purpose keys for frequently used
commands.
Ribbon Presents graphic objects/buttons for commands
Help Presents explanations of various commands.
Dialog Box Used to specify additional command options.
Insertion Point Shows where data can be entered.
Scroll Bars Used to display additional information.
Quick Access Tools that are frequently used can be set here. Eg
Save, undo, print and print preview.
Groups Provide categorized tools options under specific
headings.
Table 2.2a Features of application software
WYSIWYG: stands for “What You See Is What You Get”. This means that
the image on the screen display looks the same as the final printed
document. The WYSIWYG feature allows the user to preview the
document‟s appearance before it is printed out.
Software 67
Some important features of word processing are given in Table 2.2.1b.
Feature Description
Word wrap Automatically moves the word to the next
line once the current line is full. To begin a
new paragraph or leave a blank line, you
press the Enter key.
Spelling and Spelling can be checked by running a
Grammar spelling checker program. Incorrectly
spelled words are identified and alternative
spelling suggested. In a similar manner,
grammar checkers can be run that will
Editing Features
68 Software
Feature Description
Paragraph Numbering, bullet points,
indentation, alignment, line/character
spacing and borders & shading
allows better organization of the
contents in a document.
Software 69
2.2.2 Spreadsheet
Formatting cells
The same font and paragraph formatting features can be applied to the
contents of a cell as in a word processor. Labels are often used to identify
information in a worksheet. Usually a label is a word or symbol, such as
hash sign (#). A number in a cell is called a value. Labels and values can
be displayed or formatted in different ways. For example, a label can be
centered in the cell or positioned to the left or right or indented. A value
can be displayed to show decimal places, dollars, or percent. The number
of decimal positions (if any) can be altered, and the width of columns
can be adjusted.
70 Software
Row numbers
Column
letters
Range from
G6 to G9
Cell
Software 71
Figure 2.2.2b Assessment result Chart
2.2.3 Database
72 Software
information about some specific item. Some of the database programs
include Microsoft Access, Corel Paradox, Lotus Approach, dBase IV.
Some features of database are as follows:
Sorting
Database administrators make it easy to change the order of records in a
file. Normally, records are displayed in the order they are entered or by
key field such as social security number. Rearranging or sorting of
records is a common feature utilized by database administrators.
Most programs include features that help you organize the content of
your presentation such design layout and schemes that includes
preformatted text for many different types of presentations from selling a
product to reporting on progress.
Software 73
Professionally designed templates or models are provided. They include
selected combination of text layouts with features such as title placement
and size. Additionally, various bullet styles, background colors, patterns,
borders and other enhancements are provided.
Discovery Learning:
Basic Applications
74 Software
Word processors Microsoft Word, Lotus Word Pro, Corel
WordPerfect
Spreadsheets Microsoft Excel, Corel Quattro Pro,
Lotus 1-2-3
Database Managers Microsoft Access, Corel Paradox, Lotus
Approach
Presentation graphics Microsoft PowerPoint, Corel
Presentations, Lotus Freehand
Integrated packages Microsoft Works, Lotus Works
Software suites Microsoft Office 2007/2010, Open Office
Software 75
2.3 Advanced Application
Graphics programs
Image editors, also known as paint programs, are used to create and to
modify bitmap images files. In a bitmap file, the image is made up of
thousands of dots or pixels to represent images. Popular professional
image editor programs include Adobe Photoshop, Corel PhotoPaint, and
Paint Shop Pro.
76 Software
Graphic suites
Using audio and video editing software enables user to compile movies.
Video editing software allows one to reorganize, add effects and more to
the digital video footage. Audio editing software allows user to create
and edit audio clips. Most audio editing software has features that allow
you to add audio effects, like filters, to your tracks.
Multimedia
Web Authoring
Discovery Learning:
Software 77
The field of computer science known as artificial intelligence attempts to
develop computer systems that can mimic or simulate human senses,
thought processes and actions. These include reasoning, learning from
past actions and using senses such as vision and touch.
Three areas which human talents and abilities have been enhanced with
computerized intelligence: robotics, knowledge-based systems, and
virtual reality.
78 Software
2.4 Summary
4. Application software are program which are written for specific and
general tasks which are not related to the computer system itself.
Contrast must be drawn between application software and operating
system software.
Key Terms
Software 79
application software basic application
booting device driver
dialog box embedded operating system
general-purpose application help
icons language translator
Macintosh operating system menus
Multiprogramming multitasking
network operating system operating system
presentation file program
service program software
special-purpose application standalone operating system
systems system software
utility program virtual memory
warm boot windows
80 Software
4. A _______________ combines several utility programs into a single
package.
a. utility service c. disk scanner
b. zipped file d. utility suite
Software 81
9. Database management system are c comprised of tables that are
made up of rows called _____________ and columns called
____________
a. records, fields c. address, fields
b. fields, records d. records, ranges
11. Which of the following terms best describes people who gain
unauthorized access to computers for the purpose of doing damage?
a. hackers c. crackers
b. criminals d. employees
14. Every time the computer system is started, the operating system
loads these into memory
a. driver updates c. device managers
b. device drivers d. windows updates
15. The software that would be most suitable to include special visual,
sound effects and audio as well as video clips is
a. MS-Excel c. MS-Word
82 Software
b. MS-Powerpoint d. Desktop Publishing
16. The multimedia component that required the least amount of storage
is
a. graphics c. sound
b. video d. text
Software 83
8. Explain what is meant by integrated software and give
examples?
9. What are the three areas of artificial intelligence?
10. Define desktop publishing?
Additional Readings
References
Peter Ware, Phillip Cooke, Dieter Opfer & June Wall, Information and
Software Technology 7-10, Jacaranda, ISBN: 0-7314-0168-9
Carole Wilson, Exploring Computing Studies, Second Edition,Ca,bridge
University Press, ISBN: 0-521-78714-9
Gary B. Shelly, Thomas J. Cashman, & Misty E. Vermaat, Discoverign
Computers 2003, Concepts for a Digital World, Thomson Course
Technology, ISBN:0-7895-6514-5.
84 Software
Chapter 3
There has always been a misconception between the terms internet and
the World Wide Web (WWW). Most people think it is the same thing.
This chapter will clearly show the major difference between the internet
and the WWW. Internet today can support various kinds of applications
and communications. Searching information over the internet has
become ever so easier with the search tools that are available. People all
over the globe are connected via the internet. Communication over the
internet now is as easy as talking to your friend sitting beside you. This
is explained further with use of web utilities and social networking. Web
utilites provide users a convinient way to interact with internet whether
for business or personal use.
The World Wide Web (WWW) simply provides means and ways to
access the internet‟s resources. It gives a multimedia interface whereby
we can easily interact with the resources that are available on the
For this URL, http stands for Hypertext Transfer Protocol, the protocol
used to accessing most web sites. www, the subdomain, is the network
consisting of millions of internet sites that offer hypermedia resources.
usp.ac.fj is the known as the domain name and .fj is known as the
country code and for some URLs it called the top level domain. .ac
means academic.
Discovery Learning:
Apart from the browser, you must also have access to the internet in
order to utilize the web services. Internet access is usually granted by
Internet Service Providers (ISP). Some common ISPs in Fiji are
Connect Fiji, Unwired Fiji, Vodafone, Kidanet by Fintel and USP
through AARNET for USP students/staff only.
True/False
Completion
Communication
There are several types of communication possible over the internet. The
most common form of communication is electronic mail (e-mail). E-mail
is the sending and receiving of electronic messages over the internet.
There are two main types of e-mail. Web-based e-mail enables you to
access your email account from any computer and usually store your e-
mails on a Web server. Google‟s G-mail, MSN‟s Hotmail and Yahoo
Mail are typical examples of these. The other type is the client based e-
mail, which consists of an email program you install on your computer
where the e-mail downloaded and stored locally on your computer. In
order to send and receive and email, you need an email account and
internet access. The most commonly used client based e-mail programs
for email are: Microsoft Outlook, Mozilla Thunderbird and Apple Mail.
A typical email message has three basic elements: header, message and
signature. The header is typically made of three sections: Address,
Subject and Attachment. Address: This is the section where you type the
email address of the person you are sending the message to. Subject:
gives and brief topic/heading as to what the message is about.
Attachment: any other item that is not directly part of the message can be
tagged together with the message, for example images, small videos,
music and other files.
The message comes after the header, this is where you simple type the
message you want to send the other party. The final part is the signature
which is simple the additional information of the person sending the
message. This signature is set once only and is tagged automatically with
the message every time you compose a new email message.
Signature Message
In addition to text messages, IM also allows file transfer, voice and video
communication. Some common examples of IM are Skype, MSN live
messenger and Yahoo messenger. You must note that at present there is
no cross communication possible between different IMs. For example
and yahoo messenger user cannot communicate with a Skype user.
Chat on the other hand offers only text based messaging. However, this
is far more favored and utilized simply because it costs less. Sending
plain text messages over the internet is much cheaper than
communicating via live video.
Discovery Learning:
True/False
Completion
Web Utilities
Web Utilities are specialized programs that make using the internet and
Web easier and safer while search tools make searching for appropriate
information on the Web much easier.
File transfer utilities such as file transfer protocol (FTP) enable the user
to upload and download files. Uploading is the process of saving files
from your local computer to the internet for example, saving your photo
on the Facebook website. Downloading is the process of saving files
such as music, video, images or any other information from the internet
to your local computer. Most websites these days enable users to upload
and download files, for example USP‟s Moodle website allows USP
Social Networks
The fastest growing use of the internet today is social networking. This
simply allows people all over the world to be connected to each other
through the internet. Social networking also offers people gaming and
file sharing possibilities. The most common application used is chat.
Through chat people communicate direct and live with their friends,
family and colleagues. Social networking can be categorized as follows:
reuniting sites, friend of a friend sites and common interest sites.
Examples of free social networking sites are given in Figure 3.3b.
Discovery Learning:
Blogs
Wikis
A wiki is a type of website that allows users to add, modify and delete
contents. Wikipedia, the online encyclopedia is the best know example
of this. The only problem with wikis is the quality and accuracy of the
content added by users. Some open source software such as Media Wiki
and TWiki are available for creating wikis.
Discovery Learning:
RSS Feeds
RSS (Really Simple Syndication) feeds provide a more convenient and
fast way to distribute information. RSS pulls the latest updates from
news, sports, entertainment, blogs, wikis and social network websites
that you have subscribed to and brings these updates at one convenient
place. Most people usually activate RSS feeds into their e-mails. Using
Outlook to subscribe to an RSS Feed is quick and easy and does not
involve a registration process or fee. After you subscribe to an RSS Feed,
headlines will appear in your RSS folders. RSS items appear similar to
mail messages. When you see a headline that interests you, just click or
open the item.
Discovery Learning:
True/False
Completion
3.4 Summary
1. Internet is the actual actual physical network that spans the entire
globe. It is made up of computers, handheld devices, cables,
switches, routers, satellites and wireless devices. WWW is the
multimedia interface to the resources available on the internet.
2. The most widely used communication tool over the internet is email.
An email is made up of three parts, header, message and signature.
The header has further three elements, address, subject and
attachment.
3. Search engines allow people to search for their desired information
on the WWW easily. Different categories allow search to be more
refined and subject focused.
4. Web utilities allow safe and convenient ways to surf the net.
5. Social networks connect people, friends and colleagues all over the
world.
6. Blogging allow people to express their opinions on certain social,
political, and ICT related issues.
7. Wikis allow people to add, delete and modify contents posted on a
website.
8. Podcasting enables people to download music to their mobile
devices.
e-mail wikis
search engine RSS
plug-in blogs
chat instant messaging
ergonomics podcasting
filters
3) The extensions, .com, .edu, .mil, .net and .gov all refer to
a. Protocols.
b. Domain codes.
c. Domain names.
d. Subdomain names.
Additional Readings
While computer affect our lives in many ways, what they do basically is
solve problems. They are therefore problem-solving tools providing
computer solutions to many repetitive tasks that normally would require
a lot of time and manual labour.
There are seemingly endless amounts of information in our society. Each
day, as scholars and professionals ponder new ideas and ask questions, or
as events unfold, more new information is created. These information are
an be described as processed or meaningful data, data context or any
collection of words, numbers and symbols, organized so that it is
meaningful to the person using it.
Have you performed the any of the following tasks in the past few weeks?
You definitely must have used the internet to do one of the following
tasks:
iii. Used the MOE exams website for information or your results.
All these efficient means of data access and data management has been
made possible by a database. Databases are designed to offer an
organized mechanism for storing, managing and retrieving information.
Discovery Learning:
Here, the individual marks are data but the total mark that calculated is
information. Processing helps transform data into information.
Data Organization
1. If you are applying for an interview, give some examples of data and
information you will furnish to your potential employer.
(Differentiate between what data and information you will provide)
2. Suppose you are using Facebook. Give some examples of data and
information displayed on the social networking site.
Collecting Data
Data may be collected from a number of sources. The most common
form of data collection is data entry from source documents. For
example, collecting test marks for Form six students. These marks are
written on a sheet of paper and then can be entered into a database or
spreadsheet for manipulation
Organizing Data
Data must be arranged into relevant categories so that the relationships
between various facts can be seen as shown in Table 4.2a.
Combining Data
This involves the combination of similar data to reduce the number of
data items to be processed. For example:
Sorting Data
This involves the arrangement of data in the order that is needed e.g.
alphabetical, ascending/descending, chronological (SEQUENCIAL) etc.
Manipulating Data
This involves performing calculations on the data e.g. finding the
average of a set of numbers, calculating the percentage of a quantity etc.
Summarizing
Data is summarized based on the contents of the relevant categories as
shown in the tables below.
This section will focus on databases which is the most widely used data
storage, manipulation and retrieval tool.
A key field is a field that can be used to locate one particular record. In
the above example, the students‟ ID No. can be used as a key field
Advantages of a Database
The four advantages of having databases are
1. Sharing
2. Security
3. Fewer Files
4. Data Integrity
Discovery Learning:
Security enables users proper and authorised access to only the kind of
information they need to know. For example the payroll department may
have access to employees pay rate but other departments may not.
Access is restricted to authorized users only.
Disadvantages of Databases
Create records A DBMS provides a structure for the data and identifies
the relationships among the data.
Update records - A DBMS allows for the updating of files in the entry of
new data and it sees that new data conform to the defined structures
already existing.
Control the integrity and security of data - Most systems perform the
following to control the integrity and security of files
a. Maintain conformity to the database definition eg. By comparing
new entries to the database definitions to see that no errors are made.
b. Control updating particularly when many users use the database
simultaneously. Problems may arise when two users are trying to
update the same data at the same time.
c. Assure the existence of data in the case of technical problems which
may cause the loss of data. This may require complicated techniques
in restoring the data.
Discovery Learning:
Data Dictionary
Query Language
One of the most widely used query language is called the Structured
Query Language (SQL). SQL uses commands such as ADD,
COMPARE, and DISPLAY, SELECT, JOIN, UPDATE, etc to select
relevant and specific information only.
Report Generation
This part of the DBMS software enables a user to design and format
reports for presentation and decision making. Reports are normally
generated on form the results of the queries but organized in a very neat
and presentable way so that it is easily understood by everyone reading
the report.
Discovery Learning:
Key Terms
data database
DBMS SQL
record resource locking
data integrity batch processing
real-time processing information
field data dictionary
4. You are making your own database so you can organize information
about your „Top 100' movies. You want to include information like
Title, Actor(s), Director, Year, Genre, etc. Each record in your
database will represent:
a. an actor
b. a director
c. a year
d. a movie
Additional Readings
Computers in Society
"There are several reasons why computers have become so
important. They operate at extremely high speeds, have the ability
to store and retrieve vast quantities of information, and can make
decisions based on the results of previous operations. With just
these primitive functions, a generation of programmers has
created a body of software that can control a missile, intercept a
message, and predict the results of an election, or automates a
factory."
The dawn of the new computer era glows before us with the new
innovative ideas, ways of thinking and living. The amount of information
and technology is said to be changing every 6 months from Mobile
phones, I-pad, and computers (notebooks to desktop PC). The only way
to keep up with these is to understand, how technology works and the
ability to control them so that human interaction would be able to accept
and live with the changes.
5. 1 Computers in Society
Discovery Learning:
Paper Work – The extensive use of computer systems in most public and
private companies or even schools, and universities, eventually reduce
the amount of paper work. In the past most business organization
preferred paper work, however, not realizing that it was making the
administration work more tedious and error prone. Computer makes their
work easier, faster and more effective than the manual system.
Education - It has been proven that with the use of computers, learning
becomes more successful which is why numerous forms of teaching
methods have been introduced involving the use of computers. It
enhances the student‟s knowledge at a faster pace compared to the
traditional methods of teaching and learning. Figure 5.1c shows USP‟s e-
learning management system – Moodle.
True or False
Discovery Learning:
Mobile Robots are those which act as transports and are widely used for a
variety of tasks. For example, the police and the military use them to
locate and disarm explosive devices.
True/False
Short Answer
Discovery Learning:
Discovery Learning:
Computer crime it involves the use of computer and software for illegal
purpose. Computer crime takes many forms, from unintentional
disruption to vengeful acts to fraud. A computer crime is an illegal action
in which the person responsible uses special knowledge of computer
technology for illegal purposes.
There are five types of computer crimes.
The largest category of computer criminals consists of those with the
easiest access to computer namely the Employees. Sometimes the
employee is simply trying to steal something from the employer whether
it is the equipment, software, electronic funds, proprietary information,
or computer time. Sometimes the employee may be acting out
resentment and is trying to “get back” at the company. Not only
employees but also some suppliers or clients may have access to a
company‟s computer system known as the Outside Users. For example
bank customers who use an automatic teller machine. Like employees,
these authorized users may obtain confidential passwords or find other
ways of committing computer crimes.
Organized crime has discovered that computers can be used just like
legitimate business people use them, but for illegal purposes. For
example, computers are useful for keeping track of stolen goods or
illegal gambling debts. In addition, counterfeiters and forgers use
microcomputers and printer to produce sophisticated-looking documents
such as checks and driver‟s licenses and currency.
Discovery Learning:
Short Answer
Encryption
A firewall is a security
system consisting of
hardware or software that
prevents unauthorized
access to data, information,
and storage media on a
network. Most companies
use firewalls to deny
network access to outsiders
and to restrict employees‟
access to sensitive data
such as payroll or
personnel records. Figure 5.5e Firewall
Backing up Data
Equipments can be replaced. A company‟s data however may be
irreplaceable therefore it is a very important procedure is to back-up data,
that is, to make frequent back-ups or copies of data and to store them in
safe remote places.
The harmless intrusion of a hacker into an organizations computer
system can help the organization by identifying the weaknesses or
loopholes in its security system.
Today the most common way which computers become infected with
viruses is through e-mail attachments. Some viruses are harmless pranks
that simply freeze a computer temporarily or display sounds or messages.
Other viruses destroy or corrupt data stored on the hard disk. The
following signs might indicate that your computer has a virus.
Short Answer
Key Terms
1. The standard of moral conduct that control how computer are used
are called
a. Ethics.
b. Laws.
c. Security requirements.
d. Business demands.
2. The issues that deal with the collection and use of data about
individuals is
a. Access.
b. Property.
c. Accuracy.
d. Privacy.
7. People who gain unauthorized access for the fun of it, but do not
intentionally do damage, are
a. employees.
b. hackers.
c. outside users.
d. members of organized crime.
11. Which of the following would best fir the following description –
software is copied and given to a friend without the permission of the
copy right owner?
a. Freeware
b. Piracy
c. Shareware
d. Public domain.
1. Give reasons why the cybercriminal in the above case study was on
the rise.
2. Is there any proactive measure to address the increase of cybercrimes
in Fiji?
3. List at least 2 resources that Fiji should equip them with to combat
the increase in cybercrimes. Suggest how these resources can be
obtained.
Programming
Programming 161
6.0 Introduction
What is a Program?
A program is a set of instructions for the computer to follow to
accomplish the task of processing data into information. It is prepared by
first formulating a task and then expressing it in an appropriate computer
language that is suited to the application. The specification is translated,
into a coded program directly executable by the computer on which the
task is to be run. The coded program is said to be in machine language,
while languages suitable for original formulation are called problem-
oriented languages. A wide array of problem-oriented languages has
been developed, some of the common ones being BASIC (Beginner‟s
All-Purpose Symbolic Instruction Code), Pascal, C++, Java, HTML and
XML.
BASIC is suited to both beginners and experienced programmers. Users
and the computer communicate with each other directly during the
writing and running of the program.
Pascal is a popular language in science and educational programs.
Encourage the use of structured programming techniques. Also provides
for data lengths of any length and size and works well with graphics.
C/C++ is general-purpose program that works with all types of
computers. Used in writing operating systems and databases as well as
some scientific applications.
162 Programming
6.1 Generations of Programming Languages
Programming 163
ADD 210 (8, 13), 028 (4, 7)
People are able to understand languages that are more like their own
(e.g., English) than machine languages or assembly languages. These
more English-like programming languages are called "high-level"
languages. However, most people still require some training in order to
use higher-level languages. This is particularly true of procedural
languages.
164 Programming
Compilers and Interpreters
Programming 165
Natural languages are still being developed. They are designed to give
people a more human (“natural”) connection with computers. The
languages are human languages: such as English, Hindi, Japanese etc.
Researchers also hope that natural languages will enable a computer to
learn “remember” information, as people do, and to improve upon it.
Clearly, this area is extremely challenging.
Discovery Learning:
What are the advantages of high level language over low level
language?
http://en.wikipedia.org/wiki/List_of_programming_languages_by_catego
ry gives a list of all programming languages by category.
166 Programming
6.2 Program Planning
Once you have identified the programming language you will use to
develop your software, you must create a plan. There are six major steps
in creating software.
Task Description
1 Specify objectives
2 Specify outputs
3 Determine the required inputs
4 Define processing requirements
5 Document Specifications
Programming 167
An algorithm can be expressed in different ways for example; the above
example is expressed in English.
Program Flowcharts
Write the steps for making Noodles and cakes. Basically you will be
writing two separate algorithms. Construct a flow chart for each of
these algorithms.
168 Programming
Flowchart Symbols Explanation
Indicated the beginning and end of a
Begin/End program.
Flowlines
Table 6.1a Flow chart symbols
Programming 169
Logic Structures
a. Sequence Structure
b. Selection Structure
c. Iteration (Loop) Structure
Sequence Structure
In the sequence structure one program statement follows another. There
are no decisions to be made the boxes logically follow one another.
Enter 3 numbers
Display average
Figure 6.2b Sequence structure
Selection Structure
The selection structure represents a choice. It occurs when a choice must
be made. The outcome of this structure offers two (2) paths to follow
when a decision must be made by a program. If…then…else structure is
used to determine which of the two available actions to chose depending
on whether a condition evaluates to true or false.
170 Programming
Is it
Raining
y ? n
e o
s
Watch Movie Play Netball
For (statement)
Statement to be
executed
(CONDITION)
Programming 171
START
A=9
B=7
C=A+B
Display C
END
172 Programming
2. A logical error occurs when a programmer uses an incorrect
calculation or leaves out an important programming process.
Example a payroll program that does not compute overtime
hours has a logical error.
Testing Process
Several methods have been devised for finding and removing syntax and
logical errors. They are as follows:
a. Desk checking
b. Manual Testing with sample data
c. Attempt at translation
d. Testing sample data on the computer
e. Testing by a select group of potential users (skilled)
Manual Testing with Sample Data is where both correct and incorrect
data is run through the program manually to test for correct processing
results.
Programming 173
Testing Sample Data on the Computer is done when all syntax errors
have been corrected, the program is tested for logic errors. Sample data
is used to test the correct execution of each program statement to check if
the correct outputs are delivered by the program. With sample data, you
have the output/results calculated manually before it is fed into the
program and then compare with what the program gives as output.
User manual describes how to use the program to the novice user.
174 Programming
Step 6 Program Maintenance
Programming 175
6.3 QBASIC Language
176 Programming
Rules for writing codes in QBASIC
QBASIC Commands
Commands Description
Delete Is simply used to erase a line number.
Edit Allows the user to modify certain line written in a BASIC
program.
Files LIST BASIC program files stored on disk.
List Display a BASIC program on the screen.
LList Print a BASIC program using a printer.
Load Retrieve a specified BASIC program from the disk.
Renum Renumber certain lines within BASIC program.
Run Execute a BASIC program.
Save To save a BASIC program into disk.
System Allows the user to get out of the BASIC programming
environment and BASIC to DOS or to a menu system.
Table 6.3a QBASIC commands
Programming 177
QBASIC Keywords (used when writing programs)
Keywords Description
CLS Clears the screen and positions the cursor in the upper
left hand corner.
END Terminates the execution of the program, and tells the
computer system that there are no more statements in the
program.
FOR Used together to create loops in a program.
NEXT
GOSUB... Used to branch to a subroutine then return the control to
RETURN the point in the program where the branch was executed.
GOTO To branch to any part of the program during execution.
READ This will contain a list of variables.
DATA Contains a list of data elements.
IF... Causes the program to branch to another line number
THEN only if certain conditions are true, otherwise the
ELSE computer ignores the statement and proceeds to the next
statement in the program.
INPUT Accepts data directly from the terminal during execution.
LET Used to assign or define a variable to be equal to an
expression.
PRINT Used to display output.
REM Permits a programmer to document a program by
including remarks.
DIM The DIM (for Dimension) statement instructs the
compiler or interpreter to set aside a certain amount of
memory space for array. The DIM statement must
appear at the beginning of the program and may allocate
space for several arrays. An array is a sequence or list of
items arranged in some meaningful ordered pattern. An
array can be visualised as a row of numbered boxes, each
holding a value.
Table 6.3b QBASIC keywords
178 Programming
Review Exercise 6.3
Programming 179
6.4 Data Types, Variables and Operators
Data Types
Integer Numbers are whole numbers, such as 1, 250, -17, etc. They do not
have a decimal point and may be preceded by a '+' or '-' sign. In Basic,
integers are never written in commas.
Real Numbers are numbers that have a decimal point, such as 1.5, 2.334, -
17.324 and maybe preceded by a '+', or '-' sign.
Exponential format is a way of expressing numbers that are very large or
very small. In general, numbers in may contain up to 7 to 9 significant
digits.
A constant may be a character. Character constants or strings are letters,
numbers, spaces and special characters (such as $, %, &, ?, (, ), <, >).
Character strings are often used for titles, labels and printed reports.
Character strings are enclosed in quotation marks.
"ABC" "Hello James, how are you?"
"1.23" "10%"
A character string may contain from 0 to 255 characters.
A double quote is represented in a character string.
Variables
A variable is a space created in the memory to hold a value that is used by
the program and is likely to change.
Numeric variable holds numeric values, such as numbers. When you refer
to a program but do not assign it a value, Q BASIC will set the value of the
variable to 0.
180 Programming
String Variable hold character string values, such as letters and words. A
typical string variable can hold from 0 to 255 characters, depending upon
the particular versions of Basic.
Variables are named and constructed according to simple rules.
The name of a numeric variable must always start with an alphabet
(can be just one alphabet) and then followed by other letters or even
numbers. For example: SUM, NUM, AGE, X, Y, A1, B5, STREET6.
The name of a string variable is the same as a numeric variable but a
dollar sign ($) must be included at the end of the name. For example:
LName$, FName$, Status$, PO$, Z9$, L3$.
You may use a period (.) inside a name to make easier to read or use an
underscore (_), for example: L_Name$, F.Name$.
Operators
Arithmetic Operators in QBASIC
^ Exponentiation 6^2 62
* Multiplication 3*4 3x4
/ Division 36/4 36÷4
+ Addition 7+3 7+3
- Subtraction 10-5 10-5
Table 6.4a Order of Operation follow BEDMAS
Relational and Logical Operators have a specific order of Precedence.
Programming 181
QBASIC evaluates relational and logical operators in a specific order.
The following table shows the priorities (order of precedence) of these
operators.
182 Programming
6.5 Keywords in QBASIC
100
10 PRINT 100
213
20 PRINT 213
30 PRINT -314, 56 -314 56
40 END
10 LET Num1 = 45 45 21
20 LET Num2 = 21
30 PRINT Num1, Num2
40 END
Figure 6.5.1c Program (left) & output (right)
Programming 183
Take note of the following:
10 LET Num = 6
20 LET Num1 = Num * Num
30 PRINT “Number IS ”, Num
40 PRINT “Number SQUARED IS: ”, Num1
50 END
184 Programming
6.5.2 The LET statement
The LET statement can also be used to assign the result of a calculation to
a variable.
e.g 30 LET Total = Num1 + Num2
This statement will pull the values stored and variables Num1 and Num2
from the memory; add it and then store the result in the variable Total.
Therefore, value 10 is now stored in the variable Total.
1. Write a LET statement that will assign your first name to a variable.
2. Using LET Statement, write a program that finds the average of the
numbers 3, 7, 10.
Programming 185
3. Draw the flowchart and write a program that calculates the volume of
the box given below.
6 cm
3cm
4cm
10 LET X = 7
20 LET Y = 3
30 LET Sum = X + Y
40 PRINT Sum
50 LET Product = Y * Z
60 PRINT Product
70 PRINT X – Y
80 END
186 Programming
6.5.3 The INPUT Statement
10 INPUT Variable_Name
The following program accepts input values for A, B and C and then
displays the values and their sum.
10 INPUT A
20 INPUT B
30 INPUT C
40 PRINT A,B,C
50 PRINT “The Sum of these numbers = ”; A + B + C
60 END
Programming 187
10 PRINT “Please Enter Your Name”
20 Input N$
30 PRINT “Hello”, N$
40 END
Prompt
Please Enter Your Name
Zaheer
User supplied input data
Hello Zaheer
Figure 6.5.3b Using prompt with PRINT – program (top) & output
(bottom)
It is also possible to include a prompt in an INPUT Statement. The
message is separated from the Variable_Name by a semicolon. The
inclusion of the prompt in the INPUT Statement reduces the number of
lines in the program. The form of the prompt used with the INPUT
statement is shown below.
Figure 6.5.3c Using prompt with INPUT– program (top) & output
(bottom)
Take note of the space
188 Programming
Review Exercise 6.5.3
1. Write a program that asks the user to enter three values. The program
should then determine the sum, average and product of the three
numbers entered and displays them with appropriate labels.
2. Write a program that asks the user to enter his/her name, and
marks to English, Mathematics, and Computer. The program
should then calculate the total and the mean mark and displays
them with appropriate labels
NOTE: Both programs should be user friendly.
Programming 189
6.6 Flow Control and Decision Making
A QBASIC program is read from left to right and top to bottom when
each line is executed after the previous one in numerical order.
However, this sequence of execution can be altered or stopped by
creating a branch or a loop. In QBASIC, the two statements that can do
this are the GOTO statement and the IF statement.
This is line 20
This is line 60
This is line 40
Figure 6.6.1a Using GOTO to jump between lines program (top) &
output (bottom)
190 Programming
Creating Loops with GOTO Statement
This program accepts input and calculates squares unless the user
terminates the procedure, by adding a GOTO statement a loop is created.
10 INPUT I
20 J = I * I
30 PRINT I, “SQUARED IS”; J
40 GOTO 10
50 END
Figure 6.6.1b Loop with the GOTO statement
10 INPUT I 10 INPUT X
20 PRINT I 20 LET Y = X = 1
30 I = I * I 30 PRINT X, Y
40 PRINT I 40 GOTO 20
50 GOTO 30 50 END
60 END
Programming 191
Review Exercise 6.6.1
Examine the following programs then answer the questions that follow.
1.
192 Programming
a) What are the starting values of A, B, and C?
b) Explain the purpose of statement 35 and statement 40?
c) Write down the first 10 values of output as instructed by the print
statement?
d) Can you observe a pattern in the output? If so, what is it?
The program given below in Figure 6.6.2a will display either one of the
following depending on what number the user enters.
If the number is greater than zero it only displays VALUE IS POSITVE.
If the number is less than zero it only displays VALUE IS NEGATIVE.
If the number is equal to zero it only displays VALUE IS ZERO.
Programming 193
10 INPUT “ENTER A NUMBER”; VALUE
20 IF VALUE > 0 THEN
PRINT “VALUE IS POSITIVE”
30 IF VALUE < 0 THEN
PRINT “VALUE IS NEGATIVE”
40 IF VALUE = 0 THEN
PRINT “VALUE IS ZERO”
50 END
Consider this example: All people who are eligible to vote have to be
twenty one years or older otherwise they cannot vote.
The otherwise part is always handled by the ELSE statement and is only
executed if the IF condition evaluates to false. If the IF condition
194 Programming
evaluates to true, the ELSE statement is completely ignored. You do not
have to specify a condition for the ELSE statement.
Boolean Expressions
The table below describes the relational operators that can be used in
QBASIC programming.
Operator Description
> greater than
< less than
>= greater than or equal to
<= less than or equal to
<> not equal to
= equal to
Table 6.6.2a Relational Operators
Programming 195
40 IF(Total_mark > 350) AND (Eng_mark >=60) THEN
PRINT “Scholarship Granted”
Now in this case, the program will display Scholarship Granted for
every English mark that is greater than or equal to 60 even if the total
mark is less than 350. Likewise, it will display the same result if the
Total mark is greater than equal to 350 but failed English. You can
clearly see that only one expression needs to be true for the entire
Boolean expression to be evaluated as true. It will only evaluate to
false if both marks are less than the set criteria.
196 Programming
Review Exercise 6.6.2
1. Draw the flowchart and determine the output for the two programs
given below.
10 INPUT “ENTER A 10 I = 10
NUMBER”; X 20 I = I + 1
20 IF X > = 18 THEN 60 30 PRINT I
30 IF X <= 7 THEN 70 40 IF I < = 15 THEN 20
40 LET X = X + 3 50 END
50 GOTO 70
60 LET X = X + 1
70 LET D = 2 * X
80 END
3. The Principal of a school needs a program that would help the school
Librarian to easily locate books in the Library. Draw a flowchart and
write a program that will enable a user to enter a book number and
get the location of the book displayed. Use the contents of the table
given to draw the flowchart and write the program.
Programming 197
Book Number Location
1 – 200 Row 1 Top shelve
198 Programming
6.7 Iteration (Loops) and Subroutine
6.7.1 Iteration
NEXT Loop_variable
The table given below shows how the FOR loop variable‟s (I) value is
controlled with the increment and decrement using the STEP keyword.
FOR I = 1 TO 10 STEP 3 1, 4, 7, 10
Programming 199
The FOR Statement is always used in conjunction with a NEXT
Statement. The NEXT statement indicates the number of statements
before it as part of the loop structure.
Loop Repetition 1
10 FOR I = 1 to 5 Loop Repetition 2
20 PRINT “LOOP REPETITION”; I
30 NEXT I Loop Repetition 3
40 PRINT “LOOP COMPLETED” Loop Repetition 4
50 END Loop Repetition 5
Loop Completed
200 Programming
c.
10 FOR I = 1 TO 5
15 PRINT "*";
20 NEXT I
25 FOR J = 1 TO 7
30 PRINT "*";
35 NEXT J
40 FOR K = 1 TO 4
45 PRINT "*";
50 NEXT K
RUN
FAHRENHEIT CELSIUS
32 1
36 ...
40 ...
... ...
... ...
64 17
Programming 201
6.7.2 Subroutine
202 Programming
Review Exercise 6.7.2
10 GOSUB 600
20 PRINT “SUBMIT MY ASSIGNMENT”
30 GOSUB 800
40 GOTO 900
600 PRINT “I WILL”
610 RETURN
800 PRINT “TOMORROW MORNING”
810 RETURN
900 END
Programming 203
6.8 Data, Library and Arrays
The RESTORE statement pulls the data from the DATA list and assigns it
to any other variables declared after the RESTORE statement as shown in
line 20 and line 30 of Figure 6.8.1b.
204 Programming
10 READ A, S$, N$ 12 K JAWEED
20 RESTORE 12 K JAWEED
30 READ A1. S1$, N1$
100 DATA 12, K, JAWEED
200 PRINT A, S$, N$
210 PRINT A1, S1$, N1$
500 END
Figure 6.8.1b READ/DATA & RESTORE program (right) & output (left)
10 READ A, B, C$
20 DATA 2, 3, “EXAM”
30 PRINT A, B, C$
40 END
10 DATA 2, 3, 5, BASIC
20 READ B1, B2, B3, B1$, B2$
30 DATA “PROGRAMMING PRACTICE”
40 PRINT B1, B2, B3
50 PRINT B1$; “ “; B2$
100 END
Programming 205
3. Determine the output and draw a flowchart for the following program.
10 READ A, B, C
20 IF A = 0 THEN 90
30 IF A > B THEN 50
40 GOTO 10
50 IF B > C THEN 70
60 GOTO 10
70 PRINT A; B; C
80 GOTO 10
90 DATA 5, 6, 7, 3, 3, 3, 3, 9, 8, 7, 0, 1
100 END
RUN
10 READ X, Y, Z
20 DATA 2, 4, 6, 8, 10
30 RESTORE
40 READ A, B
50 PRINT X, Y, Z
60 PRINT A, B
70 END
206 Programming
6.8.2 Library Functions
Programming 207
LEFT$(G$, N) Returns the leftmost N characters of G$.
RIGHT$(G$, N) Returns the right most N characters of G$.
MID$(G$, R, N) Returns N characters starting at position R (from left)
in G$.
ASC(G$) Returns the ASCII code for the first character of G$.
CHR$(N) Returns the character with ASCII code N.
STR$(N) Converts the value of N to a string:
B$ = STR(N).
VAL(G$) Converts a string of digits (possibly with a decimal
point, a plus or minus sign, and an exponent) to a
numeric value: N = VAL(C$)
Table 6.8.2b String functions
The Figures given next shows how a mathematical and a string function
is used.
16
10 NUM = 256
20 ROOT_NUM = SQR(NUM)
30 PRINT ROOT_NUM
40 END
Figure 6.8.2a SQR function - program (left) & output (right)
6.8.3 Arrays
208 Programming
ordered pattern. It can be a list of class marks, height of students in a
class, temperature of each day in a month. The simplest form of an array
consists of items of data arranged in rows and columns. We assign a
variable name to an array just as we do for any other variables (numeric
or string). A simple form for assigning a value to an array is given
below.
10 Array_name (subscript)= value or string
Consider an array as table with one row and many columns. Now each
cell in this table will have a label (subscript) as shown below in Figure
6.8.3a.
Mark 15 25 30 12 1 50
Mark(0) Mark(1) Mark(2) Mark(3) Mark(4) Mark(5)
Programming 209
abbreviation for DIMENSION meaning the magnitude or size. The DIM
statement instructs the program to reserve memory space for all the
elements specified in the array. This is called dimensioning. For arrays
with less than 10 elements, the DIM statement is not needed as the
program automatically caters for this. The form for dimensioning an
array is given below.
10 DIM Array_name(subscript)
210 Programming
10 REM ARRAYS WITH FOR…NEXT & USER INPUT
20 DIM Height(14)
30 FOR I = 1 TO 14
40 INPUT Height(I)
50 NEXT I
60 REM PRINT OUT AN ARRAY
70 FOR N = 1 TO 14
80 PRINT Height(N)
90 NEXT N
100 END
Figure 6.8.3b For Loops to fill an array by user input and display its
elements
Figure 6.8.3c For Loops to fill an array from a DATA list and display its
elements
Programming 211
Review Exercise 6.8.3
b.
10 REM ARRAY FROM DATA LIST
20 DIM NUM(15)
30 FOR N = 0 TO 15
40 READ NUM(N)
50 NEXT I
60 PRINT NUM(6), NUM(10), NUM(13)
70 PRINT NUM(1) + NUM(12)
80 PRINT NUM(14)
90 REM PRINT NUM(N) IN REVERSE
100 FOR T = 15 TO 1 STEP –1
110 PRINT NUM(N);
120 NEXT N
130 DATA 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32
140 END
212 Programming
c.
2. Write a program that allows the user to enter names of five of friends
into an array and displays them.
3. Modify the program in Question 2 to allow the user to enter the
name as well as the age and the best food and display them
accordingly.
6.9 Summary
Programming 213
Key Terms
Coding Compiler
Debugging Desk checking
Documentation Interpreter
Logic error Loop structure
Machine language Problem oriented language
Procedural language Selection structure
Sequence structure Syntax error
214 Programming
3. Which of the following types of error occurs as a result of wrong
input or misspellings?
a. input error
b. syntax error
c. content error
d. software error
Programming 215
10 FOR L = 1 TO 50 STEP 2
20 LET SUM = SUM + L
30 LET NUM = NUM + 1
40 LET COUNT = COUNT + 1
50 NEXT L
60 LET AVG = SUM/COUNT
70 PRINT “AVERAGE = ”,AVG
80 END
216 Programming
Additional Readings
Programming 217
Chapter 7
Data Communications and Networks
Discovery Learning:
Describe how a switch and a router work. Check the internet if your
computer lab does not have these devices.
Types of Modems
Discovery Learning:
Figure 5 does not show the capacity of fiber-optic cable. Find the
different categories of fiber-optic cables and their respective
bandwidth capacity.
True/False
Completion
When the receiver of a signal carrying information has to derive how that
signal is organized without consulting the transmitting device, it is called
asynchronous communication. In short, the two ends do not always
negotiate or work out the connection parameters before communicating.
Asynchronous communication is more efficient when there is low loss
and low error rates over the transmission medium because data is not
retransmitted and no time is spent setting negotiating the connection
parameters at the beginning of transmission. Asynchronous systems just
transmit and let the far end station figure it out. Asynchronous is
sometimes called "best effort" transmission because one side simply
transmits, and the other does its best to receive and any lost data is
recovered by a higher level protocol. For example:
Discovery Learning:
The message source is the transmitter, and the destination is the receiver.
A channel whose direction of transmission is unchanging is referred to as
a simplex channel. For example, a radio station is a simplex channel
because it always transmits the signal to its listeners and never allows
them to transmit back.
True/False
Completion
Local Area Network (LAN) – are networks that connect nodes which are
usually within the same room, offices, rooms within the same building
and even homes. LANs can be spread within a radius of one hundred
metres from the main building. LAN is typically owned or controlled by
a single organization.
Discovery Learning:
True/False
Completion
True/False
Discovery Learning:
The client/server model has become one of the central ideas of network
computing. Most business applications being written today use the
client/server model. So does the Internet's main program, TCP/IP. In the
usual client/server model, one server, sometimes called a daemon, is
activated and awaits client requests. Typically, multiple client programs
share the services of a common server program. Both client programs
and server programs are often part of a larger program or application.
Relative to the Internet, your Web browser is a client program that
requests services (the sending of Web pages or files) from a Web server
(which technically is called a Hypertext Transport Protocol or HTTP
server) in another computer somewhere on the Internet. Similarly, your
computer with TCP/IP installed allows you to make client requests for
files from File Transfer Protocol (FTP) servers in other computers on the
Internet. This model is most often used in middle to large organizations.
In larger organizations there may be several servers on the network, each
one dedicated to a particular service or task. For example, there could be:
Discovery Learning:
Select any organization and find out how the client/server model
works for this organization. You may draw a diagram like figure 14
to explain.
Select one example of a P2P model and describe how it works. You
may do your lab first to be able to fully understand how it works.
Note: you cannot have a network setup without either of the network
type, topology and strategy. If one is not implemented correctly, the
entire network will collapse. So when designing networks, you must first
describe the network type to be used, then the topology and finally the
strategy. In most cases, the topology in fact indirectly clarifies which
strategy and type is appropriate for a particular setup so choosing the
topology first helps.
True/False
Completion
Strategy Description
Terminal Centralized processing power, location and control;
underutilized processing power of microcomputers.
Client/server Clients request services; severs provide services and
coordination; efficient network management
software; expensive.
Peer-to-peer All nodes act as client and server; easy and
inexpensive; lacks security
Distributed Nodes share resources from different locations;
used in decentralized organizations.
Research Question
http://www.bookrags.com/research/asynchronous-and-synchronous-
transm-csci-02/
http://www.inetdaemon.com/tutorials/basic_concepts/communication/as
ynchronous_vs_synchronous.shtml
The computer software industry includes all the developers and distributers
of applications and system software. Thousands of companies provide a
wide range of software from operating systems to complete business
systems. The personal computer boom in the early 1980's provided
numerous opportunities in the software industry. Thousands of individuals
went into business for themselves by creating useful programs for the new
microcomputers. Many of these people started by working out of their
homes, developing their first software product in their own time while
holding other jobs.
Discovery Learning:
Information processing professionals are the people who put the equipment
and software to work to produce information for the end user. This
includes people such as programmers and system analysts who are hired by
companies to work in an information systems department.
Discovery Learning:
Consulting
After building experience in one or more areas of computing, some
individuals become consultants, people who draw upon their experience to
give advice to others. Consultants must have not only strong technical
skills in their area of expertise, but must also have the people skills to
effectively communicate their suggestions to their clients. Qualified
consultants are in high demand for such tasks as computer system selection,
system design and communications network design, and installation.
Discovery Learning:
To prepare for a career in the ICT industry, individuals must decide what
computer field they are interested in and obtain education in the field they
chose.
Understanding the differences among the three fields will help you to find
the career you want. For example, in a university, courses relating to the
information systems may be listed with the business courses. Computer
science courses may be linked with mathematics and physics courses, and
computer engineering may be linked with electronic technology or
With the wide variety of career opportunities that exist in ICT, it is difficult
to make anything other than broad general statements when it comes to
discussing degree requirement for employment in the industry. As in most
other industries the more advanced degree an individual has in a chosen
field, the better that individual's chances are for success.
Additional Readings
Discovery Learning:
Many publications mostly books and magazines for instance are created
by professionals trained in graphic arts and typesetting. They use
equipment that often cost several thousand of dollars.
Typeface (or type style) describes the design and the sizes of a character
type.
Real estate agents may use DTP for sales sheets; travel agents may use it
for advertisements, architects for proposals, government officials for
presentation etc.
Features of DTP
Style sheets automate the selection of size and styles for headings and
captions as well as graphics. It enables you to make design decisions and
record them in a file. The same style can then be used over again. Their
use promotes consistency throughout a publication. They are sometimes
referred to as templates.
With a single mouse click, you can select the entire formatting and
design you need in a publication. Graphic images can be placed
anywhere on a page and text will automatically realign itself or overwrite
the image. Microsoft Publisher offers over 200 style sheets, which can be
modified and used for books, brochures newsletters etc. A user can even
create his/her own style sheet.
Headings are strategically placed titles that intend to catch the eye of the
reader to the publication. It also indicates the start of a new story.
Columns can be created to fit entire blocks of text onto an area or the
entire page.
DTP lets you place various kinds of text and graphics together in a
publication design in almost any way you want. E.g. you are designing a
presentation for a new product. First you would type the text in a word
The DTP program allows you to integrate and look at your work on the
monitor on the same page i.e. you can import (copy) text and graphics
from different application programs, integrate them on the same
publication and view them together on the same page. You can also
make the necessary alterations you want (typesetting).
You can also look at two facing pages in reduced size of enlarged view
of a partial page. You can rearrange text in columns. You can enlarge or
reduce any columns and chose from all kinds of typestyles and sizes.
DTP programs also lets you decide how many columns of text can be
placed on a page.
You can place a graphic image anywhere in the page and text will
automatically re-align (wrap around) or flow over the image. You can
choose the setting yourself. Wrapping concerns the behavior of text
around a graphic image, auto shape or text box; text can wrap around,
square, behind or over the graphic.
2. DTP uses style sheets that have predefined formatting features and
layout including graphics. The user only has to fill in the appropriate
texts.
Key Terms
Additional Readings