Age 202 Body
Age 202 Body
COURSE
AGE 202
GUIDE
ii
AGE 202 COURSE GUIDE
Abuja Office:
NOUN Building
5, Dar es Salaam Street
Off Aminu Kano Crescent
Wuse II, Abuja
Nigeria.
e-mail: centralinfo@nou.edu.ng
URL: www.nou.edu.ng
Published by
National Open University of Nigeria
Printed 2008
ISBN: 978-058-258-4
iii
AGE 202 COURSE GUIDE
CONTENTS PAGE
Introduction …………………………………………..…… 1
Course Contents………………………………………..…. 1
Course Aims……………………………………………..… 1
Course Objectives……………………………………..…… 2
Working through the Course…………………………….… 2
Course Materials…………………………………………… 2
Study Units………………………………………………….. 3
Textbooks and References……………………………….… 5
Assessment …………………………….…………………… 7
Tutor-Marked Assignment…………………………………... 7
Final Examination and Grading……………………………... 7
Summary…………………………………………………..…. 7
iv
Introduction
Also, early computers were designed to accept numeric data, but over
the years computers have been developed to accept not only numeric
data, but we also able to process multimedia data – text, audio and
video. The combination of computer technology and communications
technology gave birth to what is now widely known as Information and
Communication Technologies (ICT). ICT has changed the face of
virtually all fields of human endeavour, ranging from science to
engineering, commerce and industry, international trade, transportation,
culture and tourism, education and research, among others. Nowadays,
literacy is not only measured by the ability to read and write, but also
includes computer literacy. The wave of globlisation which has been
largely propelled by the collapse of barriers of distance between nations
and peoples in the world as a result of ICT, makes it imperative for the
modern man to have at least the basic knowledge of computers. This
course is meant to introduce students to the historical evolution of
computers, the basic components of computers, and some of its
applications in society.
Course Contents
This Course Guide tells you what to expect from reading this material.
The study of computers is not only of academic importance but is also a
universal tool of the twenty-first century. This course, therefore, is a
systematic approach to the understanding of computers and their
applications.
Course Aims
Course Objectives
This course requires that you spend a lot of time to read. The material
though presented in simple language, coherent and in logical sequence,
requires diligent study. The material is comprehensive and would
require full commitment and dedication to study on the part of the
student. You are, therefore, advised to avail yourself the opportunity of
attending the tutorial sessions where you would have the opportunity of
comparing knowledge with your peers.
Course Materials
• Course Guide
• Modules
• Study units
• List of recommended textbooks which will serve as compliments to
the course material
ii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Study Units
iii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
iv
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Module 5 Unit 2: In this unit you will learn about the visual basic
project window. This will enable you to gain more mastery of the visual
basic programming environment.
Module 5 Unit 3: In this unit you will learn how to create menu
applications. The menu system is one of the high points of object
oriented programming languages. It makes the application user-friendly
and interactive. This unit, therefore, equips you with the principles and
steps involved in creating visual basic applications with menu.
v
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Module 6 Unit 2: This unit takes further the discussion on the areas of
application of computers by presenting in greater detail its application in
business and industry. It discusses the application of computer in the
development and operations of payroll, inventory control, auditing
operations, personnel record keeping, preparation of customer utility
bills and payment orders, management information systems, high quality
production control, point of sale service, financial market and the
publishing industry.
Oliver E.C. and Chapman R.J. (1986). Data Processing (7th ed). ELBS/
DP Publications.
vi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Assessment
There are two components of assessment for this course. The Tutor
-Marked Assignment (TMA), and the end of course examination.
Tutor-Marked Assignment
Summary
vii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
We wish you success in this course. We do hope that this course will
give you a good head start in the understanding and use of computers.
viii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
COURS
E
GUIDE C
AGE 202
INTRODUCTION TO COMPUTER SCIENCE
ix
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Abuja Office:
NOUN Building
5, Dar es Salaam Street
Off Aminu Kano Crescent
Wuse II, Abuja
Nigeria.
e-mail: centralinfo@nou.edu.ng
URL: www.nou.edu.ng
Published by
National Open University of Nigeria
Printed 2008
ISBN: 978-058-258-4
x
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS PAGE
Introduction …………………………………………..…… 1
Course Contents………………………………………..…. 1
Course Aims……………………………………………..… 1
Course Objectives……………………………………..…… 2
Working through the Course…………………………….… 2
Course Materials…………………………………………… 2
Study Units………………………………………………….. 3
Textbooks and References……………………………….… 5
Assessment …………………………….…………………… 7
Tutor-Marked Assignment…………………………………... 7
Final Examination and Grading……………………………... 7
Summary…………………………………………………..…. 7
Introduction
Also, early computers were designed to accept numeric data, but over
the years computers have been developed to accept not only numeric
data, but we also able to process multimedia data – text, audio and
video. The combination of computer technology and communications
technology gave birth to what is now widely known as Information and
Communication Technologies (ICT). ICT has changed the face of
virtually all fields of human endeavour, ranging from science to
engineering, commerce and industry, international trade, transportation,
culture and tourism, education and research, among others. Nowadays,
literacy is not only measured by the ability to read and write, but also
includes computer literacy. The wave of globlisation which has been
largely propelled by the collapse of barriers of distance between nations
and peoples in the world as a result of ICT, makes it imperative for the
xi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Course Contents
This Course Guide tells you what to expect from reading this material.
The study of computers is not only of academic importance but is also a
universal tool of the twenty-first century. This course, therefore, is a
systematic approach to the understanding of computers and their
applications.
Course Aims
Course Objectives
This course requires that you spend a lot of time to read. The material
though presented in simple language, coherent and in logical sequence,
requires diligent study. The material is comprehensive and would
require full commitment and dedication to study on the part of the
xii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Course Materials
• Course Guide
• Modules
• Study units
• List of recommended textbooks which will serve as compliments to
the course material
Study Units
xiii
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
xiv
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
unit will give you a guide on the type of input and output units suitable
to a particular computing environment.
Module 5 Unit 2: In this unit you will learn about the visual basic
project window. This will enable you to gain more mastery of the visual
basic programming environment.
xv
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Module 5 Unit 3: In this unit you will learn how to create menu
applications. The menu system is one of the high points of object
oriented programming languages. It makes the application user-friendly
and interactive. This unit, therefore, equips you with the principles and
steps involved in creating visual basic applications with menu.
Module 6 Unit 2: This unit takes further the discussion on the areas of
application of computers by presenting in greater detail its application in
business and industry. It discusses the application of computer in the
development and operations of payroll, inventory control, auditing
operations, personnel record keeping, preparation of customer utility
bills and payment orders, management information systems, high quality
production control, point of sale service, financial market and the
publishing industry.
xvi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Oliver E.C. and Chapman R.J. (1986). Data Processing (7th ed). ELBS/
DP Publications.
Assessment
There are two components of assessment for this course. The Tutor
-Marked Assignment (TMA), and the end of course examination.
Tutor-Marked Assignment
xvi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Summary
We wish you success in this course. We do hope that this course will
give you a good head start in the understanding and use of computers.
xvi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
xix
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Abuja Office:
NOUN Building
5, Dar es Salaam Street
Off Aminu Kano Crescent
Wuse II, Abuja
Nigeria.
e-mail: centralinfo@nou.edu.ng
URL: www.nou.edu.ng
Published by
National Open University of Nigeria
Printed 2008
ISBN: 978-058-258-4
xx
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS PAGE
xxi
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Definitions
3.2 Methods of Data Processing
3.3 Characteristics of a Computer
3.4 The Computer System
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
The computer is fast becoming the universal machine of the 21st century.
Early computers were large in size and too expensive to be owned by
individuals. Thus they were confined to the laboratories and few
research institutes. They could only be programmed by computer
engineers. The basic applications were confined to undertaking complex
calculations in science and engineering. Today, the computer is no
longer confined to the laboratory. Computers and, indeed, computing
have become embedded in almost every item we use. Computing is fast
becoming ubiquitous. Its application transcends science, engineering,
communication, space science, aviation, financial institutions, social
sciences, humanities, the military, transportation, manufacturing, and
extractive industries to mention but a few. This unit presents the
background information about computers.
1
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
2.0 OBJECTIVES
3.1 Definitions
(DATA) (INFORMATION)
The following are the three major methods that have been widely used
for data processing over the years:
2
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The manual method of data processing involves the use of chalk, wall,
pen, pencil and the like. These devices, machines or tools facilitate
human efforts in recording, classifying, manipulating, sorting and
presenting data or information. The manual data processing operations
entail considerable manual efforts. Thus, the manual method is
cumbersome, tiresome, boring, frustrating and time consuming.
Furthermore, the processing of data by the manual method is likely to be
affected by human errors. When there are errors, then the reliability,
accuracy, neatness, tidiness, and validity of the data would be in doubt.
The manual method does not allow for the processing of large volumes
of data on a regular and timely basis.
The computer method of carrying out data processing has the following
major features:
3
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The computing system is made up of the computer system, the user and
the environment in which the computer is operated.
The Hardware
The computer hardware comprises the input unit, the processing unit
and the output unit.
The input unit comprises those media through which data is fed into the
computer. Examples include the keyboard, mouse, joystick, trackball
and scanner.
The processing unit is made up of the Arithmetic and Logic Unit (ALU),
the control unit and the main memory. The main memory also known as
the primary memory is made up of the Read Only Memory (ROM) and
the Random Access Memory (RAM).
4
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Software
Computer Users
Computer users are the different categories of personnel that operate the
computer. We have expert users and casual users. The expert users
could be further categorised into computer engineers, computer
programmers and computer operators.
The computing
Hardware Software Users
environment
5
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Software
Computer users
6
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Computing environment
Furniture
Building Auxiliary devices
and fittings
Air Voltage
UPS
conditioner stabilizer
4.0 CONCLUSION
5.0 SUMMARY
• The computer is any electronic device that can accept data, process it
and produce an output
• The computer method of data processing is superior to the manual
and mechanical methods of data processing
• The computing system is made up of the computer system, the users
and the computing environment.
7
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
1 a. What is a computer?
b. What are the advantages of the computer method of data
processing over the manual and mechanical methods of
data processing.
8
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 A Brief History of Computer Technology
3.2 First Generation Electronic Computers (1937-1953)
3.3 Second Generation (1954-1972)
3.4 Third Generation (1903-1972)
3.5 Fourth Generation (1972-1984)
3.6 Fifth Generation (1984-1990)
3.7 Sixth Generation (1990-Date)
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
9
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
10
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
There is some controversy over who deserves the credit for this idea,
but no one knows how important the idea was to the future of general
purpose computers. ENIAC was controlled by a set of external switches
and dials; to change the program required physically altering the settings
on these controls. These controls also limited the speed of the internal
electronic operations. Through the use of a memory that was large
enough to hold both instructions and data, and using the program stored
in memory to control the order of arithmetic operations, EDVAC was
able to run orders of magnitude faster than ENIAC. By storing
instructions in the same medium as data, designers could concentrate on
improving the internal structure of the machine without worrying about
matching it to the speed of an external control.
Regardless of who deserves the credit for the stored program idea, the
EDVAC project is significant as an example of the power of
interdisciplinary projects that characterise modern computational
science. By recognising that functions, in the form of a sequence of
instructions for a computer, can be encoded as numbers, the EDVAC
group knew the instructions could be stored in the computer’s memory
along with numerical data. The notion of using numbers to represent
functions was a key step used by Goedel in his incompleteness theorem
in 1937, work which Von Neumann, as a logician, was quite familiar
with. Von Neumann’s background in logic, combined with Eckert and
11
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Software technology during this period was very primitive. The first
programs were written out in machine code, i.e. programmers directly
wrote down the numbers that corresponded to the instructions they
wanted to store in memory. By the 1950s programmers were using a
symbolic notation, known as assembly language, then hand-translating
the symbolic notation into machine code. Later programs known as
assemblers performed the translation task.
12
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The second generation also saw the first two supercomputers designed
specifically for numeric processing in scientific applications. The term
“supercomputer” is generally reserved for a machine that is an order of
magnitude more powerful than other machines of its era. Two machines
of the 1950s deserve this title. The Livermore Atomic Research
Computer (LARC) and the IBM 7030 (aka Stretch) were early examples
of machines that overlapped memory operations with processor
operations and had primitive forms of parallel processing.
The first ICs were based on small-scale integration (SSI) circuits, which
had around 10 devices per circuit (or “chip”), and evolved to the use of
medium-scale integrated (MSI) circuits, which had up to 100 devices
per chip. Multilayered printed circuits were developed and core
memory was replaced by faster, solid state memories. Computer
designers began to take advantage of parallelism by using multiple
functional units, overlapping CPU and I/O operations, and pipelining
(internal parallelism) in both the instruction stream and the data stream.
In 1964, Seymour Cray developed the CDC 6600, which was the first
architecture to use functional parallelism. By using 10 separate
functional units that could operate simultaneously and 32 independent
memory banks, the CDC 6600 was able to attain a computation rate of 1
million floating point operations per second (1 Mflops). Five years later
13
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CDC released the 7600, also developed by Seymour Cray. The CDC
7600, with its pipelined functional units, is considered to be the first
vector processor and was capable of executing at 10 Mflops. The IBM
360/91, released during the same period, was roughly twice as fast as the
CDC 6600. It employed instruction look ahead, separate floating point
and integer functional units and pipelined instruction stream. The IBM
360-195 was comparable to the CDC 7600, deriving much of its
performance from a very fast cache memory. The SOLOMON
computer, developed by Westinghouse Corporation, and the ILLIAC IV,
jointly developed by Burroughs, the Department of Defence and the
University of Illinois, was representative of the first parallel computers.
The Texas Instrument Advanced Scientific Computer (TI-ASC) and the
STAR-100 of CDC were pipelined vector processors that demonstrated
the viability of that design and set the standards for subsequent vector
processors.
The next generation of computer systems saw the use of large scale
integration (LSI –1000 devices per chip) and very large scale integration
(VLSI –100,000 devices per chip) in the construction of computing
elements. At this scale entire processors will fit onto a single chip, and
for simple systems the entire computer (processor, main memory, and I/
O controllers) can fit on one chip. Gate delays dropped to about Ins per
gate.
14
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Two important events marked the early part of the third generation: the
development of the C programming language and the UNIX operating
system, both at Bell Labs. In 1972, Dennis Ritchie, seeking to meet the
design goals of CPL and generalise Thompson’s B, developed the C
language. Thompson and Ritchie then used C to write a version of
UNIX for the DEC PDP-11. This C-based UNIX was soon ported to
many different computers, relieving users from having to learn a new
operating system each time they change computer hardware. UNIX or a
derivative of UNIX is now a de facto standard on virtually every
computer system.
15
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
16
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
17
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
5.0 SUMMARY
This unit teaches that the development of the computer has spanned
through six generations.
18
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
19
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Categories of Computers
3.2 Classification Based on Signal Type
3.3 Classification by Purpose
3.4 Classification by Capacity
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
The computer has passed through many stages of evolution from the
days of the mainframe computers to the era of microcomputers.
Computers have been classified based on different criteria. In this unit,
we shall classify computers based on three popular methods.
2.0 OBJECTIVES
There are basically three types of electronic computers. These are the
Digital, Analog and Hybrid computers.
20
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
This represents its variables in the form of digits. The data it deals with,
whether representing numbers, letters or other symbols, are converted
into binary form on input to the computer. The data undergoes a
processing after which the binary digits are converted back to alpha
numeric form for output for human use. Because of the fact that
business applications like inventory control, invoicing and payroll deal
with discrete values (separate, disunited, discontinuous), they are best
processed with digital computers. As a result of this, digital computers
are mostly used in commercial and business places today.
In some cases, the computer user may wish to obtain the output from an
analog computer as processed by a digital computer or vice versa. To
achieve this, he set up a hybrid machine where the two are connected
and the analog computer may be regarded as a peripheral of the digital
computer. In such a situation, a hybrid system attempts to gain the
advantage of both the digital and the analog elements in the same
machine. This kind of machine is usually a special-purpose device
21
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Special-Purpose Computers
Special-purpose computers are usually very efficient for the tasks for
which they are specially designed.
They are very much less complex than the general-purpose computers.
The simplicity of the circuiting stems from the fact that provision is
made only for limited facilities.
They are very much cheaper than the general-purpose type since they
involve fewer components and are less complex.
General-Purpose Computers
22
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Payroll
• Banking
• Billing
• Sales analysis
• Cost accounting
• Manufacturing scheduling
• Inventory control
23
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Microcomputers
• Medium/mini/small computers
• Large computer/mainframes.
Microcomputers
Normally, personal computers are placed on the desk; hence they are
referred to as desktop personal computers. Still other types are available
under the categories of personal computers. They are:
• Laptop Computers: These are small size types that are battery-
operated. The screen is used to cover the system while the keyboard
is installed flat on the system unit. They could be carried about like
a box when closed after operation and can be operated in vehicles
while on a journey.
24
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Mini Computers
Mini computers have memory capacity in the range ‘128- 256 Kbytes’
and are also not expensive but reliable and smaller in size compare to
mainframe. They were first introduced in 1965; when DEC (Digital
Equipment Corporation) built the PDP – 8.Other mini computers are
WANG VS.
Mainframe Computers
4.0 CONCLUSION
25
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Computers are classified based on three major criteria namely size, type
of signal being processed, and purpose. The classification adopted at any
point in time depends on the issues involved. For instance, if our goal is
to process different kinds of signals or to accept one type of signal and
convert to another form of signal, we should look in the realm of analog
or digital or even the hybrid computers. This, of course, calls for a
converter such as analog to digital converter or digital to analog
converter as the case may be.
5.0 SUMMARY
26
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
27
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 The System Unit
3.2 The Front of the System Unit
3.3 The Back of the System Unit
3.4 Inside the System Unit
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
The system unit is the main unit of a PC. It is the computer itself while
other units attached to it are regarded as peripherals. It could be viewed
as the master conductor orchestrating your PC’s operation. It is made
up of several components like the motherboard, processor, buses,
memory, power supply unit, etc. This unit (the system unit) has been
28
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
confused over the years by novices as the CPU. This is not true. The
CPU (Central Processing Unit) or simply processor is a component
within the system unit and is not the only thing that makes up the system
unit. Hence, it will be wrong to equate the system unit with the CPU.
Lights
Your unit may display a variety of coloured lights on the front panel,
including power and turbo signals, and light to indicate if the hard or
floppy disk is being read or written to.
Key Lock
You can stop intruders from tampering with your PC by using the lock
on the front panel. Turning the key prevents the keyboard from working.
Turbo Button
Some PCs offer a choice of speeds at which they can run. A turbo
switch is usually left so the computer runs at its fastest speed.
Reset Button
Power On/Off
All PCs have main power switch on the system unit. Sometimes this
control is placed on the outside back panel.
Either, or both, of two standard types of floppy disk drive may be found
at the front of the system unit. Some systems also have internal CD-
ROM or tape drives.
29
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Cables plugged into these sockets carry power from the electrical outlet
to the system unit and from the system unit to the monitor.
Serial Ports
Serial ports often connect the PC to the modem or mouse. Most PCs are
fitted with two serial ports that may be labeled “S101” and “S102”,
“Serial 1” and “Serial 2”, or “COM 1” and “COM 2”.
Sound Jacks
If you have a sound fitted inside your system unit, you will see a jack or
jacks at the back. These can be used to connect your PC to speakers, a
microphone, or an external sound source.
30
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The cable from your keyboard ends with a round connector, which plugs
into the keyboard port.
A cable from your monitor plugs into this port and carries display
information to the monitor.
31
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The Battery
A small battery powers a clock to keep track of the time when the PC is
turned off. It also maintains low electricity to certain RAM chips that
record which components are installed.
This card controls the PC’s disk drive motors and transfers data. The
serial and parallel ports at the back of the card link internal PC
components with external devices such as mouse and printer.
All the information your computer will display is stored in its memory.
To be useful, you need to see the information. The display adapter card
is the link between the PC’s memory and the monitor.
Expansion Slots
ROM Chips
RAM Chips
These slots let you expand your computer’s memory by adding extra
RAM chips or modules. Some PCs work even faster because they come
equipped with Cache Memory. Cache memory consists of expensive
and very fast memory chips that store the data or instructions that the
CPU will look at next. Cache memory can speed up work on your
computer enormously.
32
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
These chips help the CPU manage all the other parts of the computer.
33
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The Speaker
The hard disk is your computer’s main permanent storage unit, holding
large amount of data and programs. Unlike data held in RAM, the
information on the hard disk is not affected when the PC is turned off –
it remains there unless you instruct the PC to overwrite it or the hard
disk is damaged.
34
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The Motherboard
35
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Intel CPUs
The earliest PCs were equipped with a CPU from Intel Corporation
called the 8088. The next generation of PCs used CPU known by the
number “80286” and were called “PC/AT” computers. Subsequently,
PCs have been supplied with more and more powerful CPUs – the
80386, the 80486, and the more recent and impressive of all, the Intel
Pentium (I, II, III, IV& M).
The CPU is certainly the most important PC component. CPU stands for
Central Processing Unit. Let us briefly study that name:
36
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Without the CPU, there would be no PC. Like all other hardware
components, CPUs are continually undergoing further development.
You can see the explosive technological development in data processing
most clearly in the development of newer and faster CPUs. The CPUs
have for years doubled their performance about every 18 months and
there are no indications that this trend will stop.
When we now look at all the CPUs from a broader perspective, we can
see that:
Generations of CPUs
There are CPUs of many brand names (IBM, Texas, Cyrix, AMD), and
often they make models which overlap two generations. This can make
it difficult to keep track of CPUs. Here is an attempt to identify the
various CPUs according to generations:
History of CPUs
37
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
38
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
An Intel processor
DISKS
Floppy Disks
Treat floppy disks carefully, and you can take them almost anywhere
safely. Don’t leave the disks in your PC when you finish a session.
Also avoid putting anything heavy on top of your disks or leaving them
in extremes of hot or cold temperature. Try not to carry disks loose in
pockets or handbags where dust and dirt may get inside the containers.
Take care to store them vertically, preferably in a special storage box.
Remember too that you should keep floppy disks away from magnetic
fields, including hidden magnets such as those in telephone, radio and
television speakers, amplifiers, desk fans, and photocopiers. If you do
leave floppy disks near a magnetic field, your data may become
corrupted and will no longer be usable.
4.0 CONCLUSION
39
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The system unit is a box housing many components. It is, in fact, the
most important part of the computer because it houses the processor
(CPU) and other essential components that enables the computer to
function.
5.0 SUMMARY
We have studied the components of the system unit which include the
components in the front, the back and those that are inside the unit.
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A.. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publications.
40
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Input Devices
3.1.1 The Computer Keyboard
3.1.2 The Mouse and Joystick
3.2 Output Devices
3.2.1 Printers
3.2.2 Monitors
3.2.3 Scanners
3.2.4 Speakers and Sound
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
The computer peripheral devices are those devices which are attached to
the system unit. The devices are necessary to ensure that the computer is
able to accept input and display the result for the user. This section
therefore discusses the input unit and the output unit.
2.0 OBJECTIVES
• identify those components that make up the input unit and the output
unit of the computer
• explain the functions of the input and the output units of the
computer
• identify and explain the type of input unit and output unit suitable to
a particular computing environment.
41
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
In addition to the four types of keys, there are some special or important
keys such as the following:
Function Keys
The effects of the functions keys are software package dependent. That
is, they mean different translations depending on which software
package one is running on the computer. The function keys are
traditionally labeled F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 and
F12. The function keys are often arranged to the left of the main
keyboard in two columns or they are arranged in a row above the main
keyboard. In most software packages, the function key F1 is used to run
the HELP program. Word perfect, for example, uses F3 for HELP
program and F1 to cancel the last command issued on the computer.
The function keys F7 and F12 are used to save a text and block a section
of a text respectively in word perfect. Function keys can be
programmed to carry out the functions desired by a programmer. For
42
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Alphanumeric Keys
43
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Other cursor control keys are Home, Page Up, Page Down, and End.
These keys may be part of the numeric keypad or separated from the
numeric keypad. Moving the cursor around on the screen is one of the
most common tasks in an application program. In fact, cursor movement
is so important in an application such as word processing that it can
usually be accomplished by additional key-driven commands. The
control keys and their functions are documented in Table 5.1.
When the shift key is pressed, the capital letters on the alphanumeric
keys are activated. It also serves as the activator of characters that are at
the upper part of each alphanumeric key. The Shift key has no effects on
itself; its effect are realised when some other keys are pressed. Thus, if
one presses the shift key and then ‘equals’ sign key, the ‘plus’ sign
which is at the upper part of the ‘equal’ sign is activated, and it then
appears on the screen.
The Caps Lock shifts all alphabetic characters into the upper case
(capital letters). Thus all characters typed are in lower case (small
letters) when not pressed.
44
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The Num Lock key activates the numeric keypad. Neither the Num
Lock key nor the Caps Lock key affects the function keys.
The control key is often used in most text mode to perform block
operations like mass deletion, insertion and so on. For example, Ctrl + Y
deletes a line in most text documents. It can also be used in combination
with other keys to move the cursor to different locations in a text or
document. In some application packages, the Alt, Ctrl and Shift keys are
used in combination with the function keys to perform several
operations. For example, in the Word Perfect word processing package,
to centre a text, press Shift and F6; to print a text, press Shift and F7.
The escape key cancels an operation in progress. For example, when one
is editing a file or issuing a command, Esc cancels any changes one
might have made or terminates the command.
The return key serves as one of the most important keys on most
keyboards. It is actually used to inform the computer of the end of an
input or command. It performs two functions depending on the program
on which it is used. For example, suppose you are asked to respond to an
operating system command at the prompt or other entries, the operating
system will wait until the return key is pressed before continuing.
Pressing the return key also positions the cursor at the beginning of the
next line (in text mode), which is the equivalent of pressing the carriage
return on a typewriter.
Pressing the insert key puts one’s keyboard in the insert mode, pressing
it again returns to the overstrike (type over) mode. In the insert mode,
the characters one types are inserted at the cursor position, the character
at the cursor position and all characters to the right shift to make room
for them. In overstrike or type over mode, newly typed characters
overwrite the characters at the current cursor position. In most
applications, the insert mode is indicated by a symbol in the status line.
45
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The delete key deletes the character at the cursor position when pressed
and the remaining text moves to the left while the cursor remains at the
same position.
The back space key deletes the characters to the left of the cursor when
pressed and all other characters to the right of the cursor are shifted one
space to the left.
The Spacebar
The tab key moves the cursor by five spaces to the right when pressed.
The number of positions moved depends on the software or the Tab Set
by the operator. The Tab is normally pressed to insert paragraphs during
typing. In some programs, when this key is pressed in combination with
shift the key, the same number of positions is moved backwards.
When the print screen key is pressed in combination with the shift key,
whatever in is on the screen will be printed on a printer. The same
effect can be achieved by pressing the key alone on some keyboards.
Never spill liquids on your keyboard. Coffee, soda, and other beverage
spills can ruin your keyboard. Liquid spills on the keyboard have even
been known to cause electrical damage to the PC itself. With that in
mind, though you may not stop drinking coffee around your computer,
you should at least get a spill-proof mug or keep the coffee on the other
side of the desk.
46
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
in a room with dry air, avoid touching the PC or the keyboard until you
have touched something metal to discharge any static electricity. If you
don't have a metal desk or bookcase in your work area, consider buying
an anti-static mat and keeping it where you can touch it before touching
the PC.
Dust, dirt, food crumbs, and hair are other enemies of the keyboard. Try
to avoid eating over the keyboard and if your computer is in a dirty,
dusty area, keep the keyboard covered when not in use.
Some dirt and dust is unavoidable. To keep the keyboard working well,
you should occasionally clean it.
A mouse is the primary input device for modern computers that feature
operating systems with a graphical user interface, such as Windows 98
or Windows XP. While keyboards obviously excel at entering text,
numbers, and symbols, your mouse is the tool you'll use to tell your
computer what to do with all the data you've entered.
Joysticks are almost exclusively used with game software and help the
user more effectively control the actions of computer-simulated
airplanes or arcade-style games.
All modern PC operating systems (Windows 98, Windows XP, and the
Macintosh) rely on an on-screen pointer to select and execute
commands. A mouse is simply an input device built to help the user
control this on-screen pointer in as natural and efficient a manner as
possible.
47
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The pointer on the screen mimics the movements of your mouse. As you
move your mouse, a ball encased in the bottom of your mouse rolls on
the desk and in turn sends signals to the computer as to which direction
to move the pointer on the screen. Move the mouse side to side, or up
and down, and the on-screen pointer moves in a similar manner.
Once you have the mouse positioned to select the command or data you
want to act on, you use the mouse buttons to execute the command. The
mouse controls the on-screen pointer and lets you select program icons,
manipulate property sheets, and access data.
3.2.1 Printers
A printer is the computer component that lets you create copies of the
information stored in your computer on paper. The printed material is
often called the hard copy, to differentiate it from the data stored on a
disk, or held in the computer's memory.
There are three basic types of printers available for use with personal
computers:
Inkjet Printers: These have small nozzles that actually spray fast-
drying ink onto the page to form characters or images. Inkjet printers
spray a fine, quick-drying ink through small nozzles to produce
characters and images on paper. Although the results are not quite as
sharp as those of laser printers, inkjet printers provide very good quality
output at a lower cost.
48
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The type of printer you choose depends on your budget and the type of
output you need. For example, if all you need to print are grocery lists,
you may be happy with a dot-matrix printer. In general, dot-matrix
printers are noisier, slower, and produce a poorer-quality image than do
laser or inkjet printers, but they are also less expensive. If you need to
print newsletters, brochures, or illustrated reports, you will probably
want a high-quality laser printer. Laser printers cost more than other
printers, but they may be worth the price because they are fast, quiet,
and produce high-quality text and graphics.
3.2.2 Monitors
The monitor does not do any processing itself. It only displays the
information that the video card tells it to display.
Monitor Sizes
The two most common monitor sizes are 15-inch and 17-inch. If you
have an older, hand-me-down PC or a very inexpensive starter PC, you
may have a smaller 14-inch monitor. 21-inch monitors are also available
but mostly used by graphics professionals.
The two most common acronyms you will see on current monitors are
VGA or SVGA. Both of these terms generally refer to how many dots
(or pixels) in each direction the monitor can display. VGA is 640x480
(width by height) and SVGA is 800x600. This measurement is called the
monitor's resolution, and more is better! Most new monitors are capable
of displaying at least SVGA quality. In fact, 1,024x768 is somewhat of a
minimum to look for.
Almost any VGA or SGVA monitor made in the last few years is
capable of displaying any of these resolutions. However, it's actually the
video card that determines what resolution your monitor displays at any
time. The monitor is capable of switching from one resolution to another
on command from the video card.
3.2.3 Scanners
49
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
converts them to digital data that travel to and are interpreted by the
computer.
Types of Scanners
Flatbed Scanners
Flatbed scanners look and behave a lot like a photocopier. You lay the
item to be scanned on a glass plate and the scanning head passes below
the glass.
Flatbed scanners are very versatile: you can scan objects in a variety of
sizes and shapes, including pages from a book, without damaging the
original. While flatbed scanners are the best choice for a wide variety of
uses, if you plan to do a lot of text scanning (called OCR for Optical
Character Recognition) work, keep in mind that flatbeds only
accommodate one page at a time. Scanning multi-page documents can
be a slow, tedious process, because you have to manually remove one
page and insert the next.
Sheet fed scanners look and act more like fax machines. The page or
item is fed into the machine, scanned, then spat out on the other end. A
sheet fed scanner is a good choice for large volumes of text, but not for
handling delicate original photographs. Scanning directly from a book or
other three-dimensional objects is impossible.
Hand Scanners
50
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The hand scanner’s advantages are many, but so are its disadvantages.
Generally, hand scanners work best for small, uncomplicated images
such as company logos or small black-and-white photographs. You
might want a hand scanner if you do not plan to use it on a regular basis,
because it usually does not require adding internal cards to your CPU,
and it's easily disconnected and stored away. Most hand scanners can
only scan a four-inch wide image at one time and require a steady hand.
You're usually provided with software that helps you “sew up” a series
of these 4-inch, side-by-side scans into one image, but this is obviously
not as convenient as getting the full image at once.
The built-in speakers in most PC cases are used just for making system
sounds, such as warning beeps and action indicators. To play more
sophisticated sounds on your PC, you need a set of external speakers.
Usually speakers come in pairs, and there is a plug that connects them to
your sound card. Arrange the speakers with one on the left and one on
the right of your desk or work area to get a stereo effect.
Everyone has their own uses for sound. You may just want to play a few
music CDs with your CD-ROM drive while you are working, or you
may use multimedia applications for presentations or educational
programs. You may just like the sound of your jet engines roaring as
you punch the throttle in a flight simulator.
To produce sound on your PC, you need a sound card and speakers. The
sound card is an expansion card that plugs into one of the slots on your
motherboard. This card processes all of the instructions that have to do
with sound, and then sends the sounds to the speakers to be played.
Sound Cards
Sound cards plug into an expansion slot in your PC. The card has a set
of connectors that are exposed on the back of the PC; you can plug a
microphone and speakers into the connectors. Some cards include an
optional connector for a line input, which is used to connect another
51
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
input source such as the output from a tape player or portable CD player.
Other optional connectors can include a joystick connector and a MIDI
connector (for connecting a MIDI keyboard). The card may include a
volume control, which controls the volume of the speakers and/or
headphones.
4.0 CONCLUSION
The system unit cannot function without the peripheral devices. The
input and the output units are very important peripheral devices that
must be taken care of in setting up a computer system.
5.0 SUMMARY
(i) monitor
(ii) the printer and
(iii) the speakers.
1. Justify the need for the input and output units in a computer
system.
2. Describe the functions of the following keys: the numeric keys,
control keys, shift keys and the function keys.
3. In what situation would you recommend the laser jet printer and
the dot matrix printer?
52
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
53
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 The Air Conditioner
3.2 The Voltage Stabiliser
3.3 The Line Voltage Transformer
3.4 The Uninterruptible Power Supply System (UPS)
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
The free air is, basically, dust laden. Dust is metallic in nature and, as
such, capable of conducting electricity. If dust is allowed to settle on a
computer, particularly the electronic circuits, the dust can bridge two
54
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
A computer when switched on, takes off in a cold state, warms up and
gradually gets to a hot state. In a hot state, a computer is always
roaming in an attempt to find something to do. In a situation where the
public electricity, such as that of PHCN in Nigeria, is cut suddenly, the
computer would suddenly be brought to a halt. The sudden power cut
may cause the computer to lose the memory of some basic house
keeping operations when power eventually returns and the computer is
switched on. The sudden power cut may also cause irreparable damage
to the file the computer was processing at the time the power was
suddenly cut.
55
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Converting the public electricity raw line into fine line, that is,
conditioning the voltage that is fed into the computer.
• Storing electrical energy when the public electricity line is live
• Releasing the stored electrical energy to the computer when the
public electricity line is dead.
4.0 CONCLUSION
5.0 SUMMARY
56
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
57
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Computer Software
3.2 Classification of Computer Software
3.2.1 System Software
3.2.2 Operating System
3.3 Types of Operating Systems
3.3.1 Batch Operating System
3.3.2 Time Sharing Operating System
3.3.3 Real Time Operating System
3.3.4 Multiprogramming Operating System
3.3.5 Distributed Operating System
3.3.6 Network Operating System
3.4 Operating System Components
3.4.1 Process Management
3.4.2 Memory Management
3.4.3 Secondary Storage Management
3.4.4 I/O System
3.4.5 File Management
3.4.6 Protecting System
3.4.7 Networking
3.4.8 Command Interpreter System
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
58
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The physical components of the computer are called the hardware while
all the other resources or parts of the computer that are not hardware, are
referred to as the software. The software is the set of programs that
make the computer system active. In essence, the software is the set of
programs that run on the computer.
The computer software could be divided into two major groups, namely
system software (programs), and application software (programs).
This refers to the suits of programs that facilitate the optimal use of the
hardware systems and/or provide a suitable environment for the writing,
editing, debugging, testing and running of user programs. Usually,
every computer system comes with a collection of these suits of
programs which are provided by the hardware manufacturer.
59
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Operating systems exist because they are a reasonable way to solve the
problem of creating a usable computing system. The fundamental goal
of a computer system is to execute user programs and solve user
problems.
60
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Though systems programs such as editor and translators and the various
utility programs (such as sort and file transfer program) are not usually
considered part of the operating system, the operating system is
responsible for providing access to these system resources.
61
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The third class of operating systems, the real time operating systems, are
designed to service those applications where response time is of the
essence in order to prevent error, misrepresentation or even disaster.
Examples of real time operating systems are those which handle airlines
reservations, machine tool control, and monitoring of a nuclear power
station. The systems, in this case, are designed to be interrupted by
external signal that require the immediate attention of the computer
system.
62
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
63
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
True distributed operating systems require more than just adding a little
code to a uniprocessor operating system, because distributed and
centralised systems differ in critical ways. Distributed systems, for
example, often allow programs to run on several processors at the same
time, thus requiring more complex processor scheduling algorithms in
order to optimize the amount of parallelism achieved.
64
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
65
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
routines, editors, formatters, and so on, are stored on the disk until
loaded into memory, and then use the disk as both the source and
destination of their processing. Hence the proper management of disk
storage is of central importance to a computer system.
For the convenient use of the computer system, the operating system
provides a uniform logical view of information storage. The operating
system abstracts from the physical properties of its storage devices to
define a logical storage unit, the file. Files are mapped, by the operating
system, onto physical devices.
66
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
3.4.7 Networking
67
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
network design must consider routing and connection strategies, and the
problems of connection and security.
4.0 CONCLUSION
68
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
5.0 SUMMARY
69
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Language Translator
3.2 Utility Software
3.3 Application Software
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
70
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Lexical analysis
• Syntax analysis
• Semantic analysis
• Code generation
71
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
72
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Graphic Packages: These are packages that enable you to bring out
images, diagrams and pictures. Examples are PM, PM Plus, Graphic
Writer, Photoshop.
• Game Packages: These are packages that contain a lot of games for
children and adults. Examples are Chess, Scrabble, Monopoly, Tune
Trivia, Star Trek 2, California Game, Soccer Game, War Game, Spy
Catcher and Dracula in London.
There are so many packages around, virtually for every field of study
but these are just to mention a few of them. Advantages of these
packages include that they are quicker to and cheaper implement, time
saving, minimum time for its design, they have been tested and proven
to be correct, they are usually accompanied by full documentation, and
are also very portable.
User Programs
73
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
5.0 SUMMARY
74
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
75
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 An Overview of Computer- Programming Language
3.2 Types of Programmes, Language
3.2.1 Machine Language
3.2.2 Assembly (Low Level) Language
3.2.3 High Level Language
3.2.4 High Level Language
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
76
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• An operation code
• Some operands.
The operation code tells the computer what to do such as add, subtract,
multiply and divide. The operands tell the computer the data items
involved in the operations. The operands in an instruction may consist
of the actual data that the computer may use to perform an operation, or
the storage address of data. Consider for example the instruction: a = b
+ 5. The ‘=’ and ‘+’ are operation codes while ‘a’, ‘b’ and ‘5’ are
operands. The ‘a’ and ‘b’ are storage addresses of actual data while ‘5’
is an actual data.
77
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
78
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
79
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Low Level
Language Assembler Machine Language Operating System
Program Program
Store
Fig.11: The assembly language program translation process
Low Level
Language Compiler Machine Language
Operating System
Program Program
80
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Store
Machine
Code
Link
Loader
Library Subroutines
Subroutines
81
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
82
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
5.0 SUMMARY
83
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publications.
84
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Problem Solving with the Computer
3.2 Programming Methodology
3.3 Stages of Programming
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
Computer programming is both an art and a science. In this unit you wil
be exposed to some arts and science of computer programming,
including principles of programming and stages of programming.
2.0 OBJECTIVES
85
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
86
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The second stage involved is spelling out the detailed algorithm. The
use of a computer to solve problems (be it scientific or business data
processing problems) requires that a procedure or an algorithm be
developed for the computer to follow in solving the problem.
During translation, the translator carries out syntax check on the source
program to detect errors that may arise from wrong use of the
programming language.
87
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The program is then read (or loaded) into the computer and processed by
a language translator. The function of the translator is to convert the
program statements into the binary code of the computer called the
object code. As part of the translation process, the program statements
are examined to verify that they have been coded correctly, if errors are
detected, a series of diagnostics referred to as an error message list is
generated by the language translator. With this list in the hand of the
programmer, the second level of debugging is reached.
The error message list helps the programmer to find the cause of errors
and make the necessary corrections. At this point, the program may
contain entering errors, as well as clerical errors or logic errors. The
programming language manual will be very useful at this stage of
program development.
After corrections have been made, the program is again read into the
computer and again processed by the language translator. This is
repeated over and over again until the program is error-free.
88
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
a. The program is tested with inputs that one would normally expect
for an execution of the program.
89
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
5.0 SUMMARY
90
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
91
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 Flowcharts
3.2 Flowchart Symbols
3.3 Guidelines for Drawing
3.4 Flowcharting the Problem
3.5 Algorithms
3.6 Pseudo Codes
3.7 Decision Tables
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVE
3.1 Flowcharts
3.2Flowchart Symbols
92
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Flowcharts are drawn with the help of symbols. The following are the
most commonly used flowchart symbols and their functions:
Symbols Function
Used to show the START or STOP
May show exit to a closed subroutine.
Terminator
Used for arithmetic calculations of process.
E.g. Sum = X + Y + Z
93
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The digital computer does not do any thinking and cannot make
unplanned decisions. Every step of the problem has to be taken care of
by the program. A problem which can be solved by a digital computer
need not be described by an exact mathematical equation, but it does
need a certain set of rules that the computer can follow. If a problem
needs intuition or guessing, or is so badly defined that it is hard to put
into words, the computer cannot solve it. You have to define the
problem and set it up for the computer in such a way that every possible
alternative is taken care of. A typical flowchart consists of special
boxes, in which are written the activities or operations for the solution of
the problem. The boxes, linked by means of arrows, show the sequence
of operations. The flowchart acts as an aid to the programmer, who
follows the flowchart design to write his programs.
3.5 Algorithms
Before a computer can be put to any meaningful use, the user must be
able to come out with or define a unit sequence of operations or
activities (logically ordered) which gives an unambiguous method of
solving a problem or finding out that no solution exists. Such a set of
operations is known as an ALGORITHM.
The most famous algorithm in history dates well before the time of the
ancient Greeks: this is Euclids algorithm for calculating the greatest
common divisor of two integers. Before we go into some otherwise
complex algorithms, let us consider one of the simplest but common
algorithms that we encounter everyday.
94
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
For example to multiply 981 by 1234, this can be done using two
methods (algorithms) viz:
3924
2943
1962
981
1210554
981
1962
2943
3924
1210554
Examples
95
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Solution
Algorithm
Flowchart
START
INPUT U,V,W
RESULT U+(V^2)/V
PRINT RESULT
STOP
Solution
Algorithm
• Set up a Counter (1) which counts the number of times the loop is
executed. Initialise Counter (1) to 1.
• Initialize sum to zero.
• Input value and add to sum.
• Increment the counter (1) by 1.
96
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Check how many times you have added up the number, if it is not up
to the required number of times, to step (iii).
• Compute the average of the numbers.
• Print the average.
• Stop.
START
1 1, SUM 0
INPUT 1
SUM SUM +1
1 1+1
IS
1<
AVE SUM/
PRINT AVE
STOP
97
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
3. Prepare an algorithm that indicates the logic for printing the name
and telephone number for each female in a file (Code field is 2
for female). Draw the flowchart.
Solution
Algorithm
Flowchart
START
NO
IS
CODE = 2
YES
4. Prepare an algorithm that prints name and weekly wages for each
employee out of 10 where name, hours worked, and hourly rate
are read in. Draw the flowchart.
98
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Solution
Algorithm
Flowchart
ST ART
A 1
A A+1
YES
IS
A < = 10
NO
STOP
99
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
3.6 Pseudocodes
Example
BEGIN
STORE 0 TO SUM
STORE 1 TO COUNT
DO WHILE COUNT not greater than 10
ADD COUNT to SUM
INCREMENT COUNT by 1
ENDWILE
END
100
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
(χ) Action Stub: This section contains a list of the possible actions
which could apply for any given combinations of conditions.
(d) Action Entry: This section shows the actions to be taken for
each combination of conditions. Writing the instructions in a
programming language (program coding)
4.0 CONCLUSION
5.0 SUMMARY
101
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
102
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Learning to Run Visual Basic Applications
3.2 How to Design a Project from the Application Wizard
3.3 How to Create a Project from the New Project Window
3.4 Using the Toolbox
3.5 The Form Window
3.5.1 The Form Window Layout
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
103
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
These sessions will include learning how to work with graphical objects
in the visual basic environment and using general visual basic
programming concepts.
The application wizard can be selected from the New Project dialog box.
If you cancel the New Project dialog box, and then later want to start the
Application wizard, select File, New Project to display the New Project
dialog box once again. The screen you see looks like that in Figure 16.
Fig.16
When you select the icon labelled VB Application Wizard on the new
tab, the wizard begins its work. The interface type you select will
determine how your application will process multiple windows. See
Fig.17.
104
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig. 17
Fig.18
You can select the options you want your application’s menu to contain
as shown in Fig.18. The options are common Windows options found
on most Windows programs. The ampersand (&) next to a letter in a
menu name indicates the underscored accelerator key letter; in other
words, & New indicates that New appears on the menu and that the user
can select the option by pressing Alt+N.
105
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The next wizard screen, shown in Fig.19, lets you select the toolbar
buttons that your application will have. Click next to accept all the
default toolbar settings.
Fig. 19
The next wizard screen to appear is the Resource screen from which you
can select to use resources in your program. The next one is the Internet
Connectivity screen from which you can add an Internet interface to
your program if you want one. The next screen gives the option of
adding one of these standard screens to your application:
You can also select a form template from here. A form template is a
model of a form that you can customise.
Click Next to get to the last screen and click the button labelled Finish to
instruct Visual Basic to complete your initial application.
106
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The New Project Window appears when you first start Visual Basic or
when you select File, New Project. You will always need toolbars in
your project. Visual Basic has a total of four toolbars:
• Debug. This toolbar appears when you use the interactive debugging
tools to trace and correct problems.
• Edit. This toolbar aids your editing of Visual Basic codes.
• Form Editor. This toolbar helps you adjust objects on forms.
• Standard. This toolbar is the default toolbar that appears beneath
the menu bar.
You can display and hide these toolbars from the View, Toolbars menu.
Shape Line
Image Data
OLE
Fig.20
107
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Most of your work goes on inside the Form window. You’ll design all
your application’s forms, which are the background windows that your
users see, in the central editing area where the Form window appears.
You can resize the Form window to make the windows you create in
your application as large or small as needed.
An application may contain multiple forms: you can display one or more
of those forms in their own Form window editing areas. Activate a form
by clicking a form by clicking anywhere within the window, or on the
title bar.
4.0 CONCLUSION
5.0 SUMMARY
108
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A.. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publications.
109
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 The Project Window
3.2 The Properties Window
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References /Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVE
• Projects
• Forms
• Modules
• Class modules
• User controls
110
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• User documents
• Property pages
A form can hold many controls. As you add controls to a form, you can
select a control by clicking the control. When you select a control, the
Properties window changes to list every property related to that control.
When you add a control to a Visual Basic application, Visual Basic sets
the control’s initial property values. When you display the Properties
window for a control, you can modify its values. You can do that by
selecting the view option and then Properties window.
Fig.21
Example 1
111
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig. 22
112
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
While writing your application, you can run the application to see what
you have done by pressing F5.
You need to add some codes to finalise the application. Double click
the form somewhere on the grid inside the Form window to display the
code window. Add the codes shown in Fig.23.
To return to the Form window, click the Project window’s View Object
button.
Fig.23
Run your program and click the command button. An image like that
shown in Figure 13.2 appears. Save your project and click the Close
window to terminate the program. To save, Select File, Save Project.
The Save Project option saves every file inside your project as well as a
project description file with the filename extension, VBP. Visual Basic
asks first for the filename you want to assign to your form. Visual Basic
then asks for a project for the project description file. Answer No if
Visual Basic asks to add the project to the Source Safe library.
113
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Example 2
Fig. 24
114
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Add the following code seen on the screen in Fig.25 to activate the
password-based form:
Fig. 25
After running the application, you have what is shown in Fig.26 below:
115
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.26
4.0 CONCLUSION
The Project window and the properties window are very important to
features of the Visual Basic programming environment that are of
immense importance to the programmer.
5.0 SUMMARY
We have studied the importance of the project window and the property
window.
.Create an application with three multiline text boxes. Make the text
boxes tall enough to display three or four lines of text. Give the first one
a vertical scrollbar, the second a horizontal scrollbar, and the third both
kinds of scrollbars. In all the three text boxes, supply the default text,
“Type here”. In addition to the text boxes, include an Exit command
button, so the user can press Alt+X to terminate the program.
116
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
117
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Creating Menu Applications
3.2 Adding a Pull-Down Menu
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References /Further Readings
1.0 INTRODUCTION
One of the basic features of the Graphical User Interface (GUI) is that it
enables the user to select the operations to be performed through menus
with the aid of the mouse. In this unit the student is introduced to the
rudiments of creating a menu application.
2.0 OBJECTIVES
At the end of this unit you should be able to identify the steps involved
in creating visual basic applications with menu.
You can generate menus for your applications using the application
wizard. After you click the menu options and submenus you want in
your applications, the Application wizard generates the appropriate
menu controls and places them in the generated application.
The Menu Editor helps you design menus for your applications. In a
way, the Menu Editor acts as a Properties window for the menu bar
because you will designate the names of the menu controls as well as the
captions that the users see on the menus and other related information
from within the Menu Editor.
118
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Menu properties
Fig.27
A menu bar offers a special kind of control that lets your select options
Menu bar
and issue commands.
Disabled options
Enabled options
Shortcut
Separator
Selected option
Checked Submenu
option
Fig.28
119
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
SELF-ASSESSMENT EXERCISE 1
Create an application with three menu options and a label. Your screen
should look like what you have in Fig. 29.
Fig.29
Guide to solution
To create the menu bar, click the form and press Ctrl+E to display the
Menu Editor.
• Type &File for the Caption field. As with all other Visual Basic
values, the ampersand indicates that the F will be the accelerator key
for the menu selection. As you type the caption, Visual Basic
displays the caption in the Menu control list box in the bottom half
of the Menu Editor.
• Press Tab to move to the Name field. Tab and Shift+Tab shift the
focus between the Menu Editor fields.
• Type mnuFile for the name of the first menu option.
• Leave all other fields alone and click the Next button to prepare for
the remaining menu bar options. The Next button lets the Menu
Editor know that you are through with the first option and want to
enter another.
• Type &Color for the next menu bar caption and type menuColor for
the name.
• Click Next to add the next item.
120
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Type &Message for the third and final menu bar caption and type
menu Message for the caption. Your Menu Editor should look like
the one in Fig.30.
Fig.30
You can either create pull-down menus as you build the menu bar or add
the menus later. If you create the complete menu bar first, however, as
you’ve done in this exercise, you’ll have to insert the menu options in
their respective locations when you are ready to add them. The Menu
Editor’s Insert button lets you do just that.
SELF-ASSESSMENT EXERCISE 2
.Add three checked options: Blue, Green, and Red, to the second menu,
Colour. These colors will be mutually exclusive; the label will not be
able to be all three colours at once, but only one colour at a time. Such
colours make perfect candidates for checked menu options. Your
application should like Figure 14.5 after running. Also, include a
submenu to the Message menu. Let it contain the checked messages
displayed in Figure 14.6 and include a separator bar as shown.
121
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.31
122
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.32
123
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• The Red option is to be checked when the user first starts the
program. Therefore, click the Checked field to place the check mark
next to Red.
• Close the Menu Editor and run your application.
• To add the Message menu, display the Menu Editor and click the
row beneath &Message in the lower half of the Menu Editor to
prepare the Menu editor to receive the next option.
• Follow the steps as for the Color menu.
• To create the separator bar, after entering the first item, clicks Next
and type a single hyphen (-) for the caption (all separator bars have
this caption). Type mnuMessageSep1 as the separator bar’s name.
• Fix the other options appropriately and run the application.
• Open the code window and type the code shown in Figures 33 &34.
The code controls the label’s colour and contents.
Fig.33
124
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.34
When the application is run, the screens look likethose in Figures 35 &
36. For Figure 35, colour blue was selected with the second message
“VB is Simple”.
Fig.35
125
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.36
4.0 CONCLUSION
5.0 SUMMARY
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
126
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 Analysing Visual Basic Data
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
Here, you should learn more about the Code window, and practise your
programming skills on declaration of data, use of variables of different
data types, and the use of operators.
2.0 OBJECTIVE
Figure 15.1 shows the declarations sections in the first set of codes.
After the first wrapper line, there is an event procedure, followed by
another one. General-purpose procedures can be meant to perform any
kind of function like computing some data, while event procedures will
be executed after the clicking of a mouse once or twice, the loading of a
form, or any other event.
127
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.37
The output of the code displayed in Figure 37is shown in Figure 38.
Fig.38
128
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
SELF-ASSESSMENT EXERCISE 1
Write and run a Visual Basic Program to solve the Quadratic Equation
Problem, ax2+bx+c.
Solution
The code that provides the solution to the problem using the IF-THEN
statement, is shown in Figures 39 and 40. This contains statements
explaining most of the basic concepts a beginning VB Programmer
needs to know. The output of the program is displayed in Figure 41. As
can be seen, key words are in blue, comments are in green, while the
other codes are in black.
Fig.39
129
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.40
Fig.41
Solving the same problem using SELECT CASE statement, we have the
codes displayed in Figure 42.
130
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.42
SELF-ASSESSMENT EXERCISE 2
131
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.43
132
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.44
133
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Fig.45
4.0 CONCLUSION
The Code window is very important to visual basic programming. The
ability to write good programs depends to a large extent on its mastery.
5.0 SUMMARY
Using the code window, write a program to display the current time.
134
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A.. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publications.
135
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 Application of Computers in Education
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
The computer has become a universal tool for modern men and women.
Literacy today is not defined only in terms of the ability to read and/or
write but in addition, it includes the ability to use and communicate with
the aid of the computer. In the education sector, computers are being
used to promote teaching and learning.
2.0 OBJECTIVE
136
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
attention from educationists and policy makers since the late 1960s,
when computers were introduced into the classroom. The entry of the
computer into the classroom has now offered opportunities and
possibilities for students to develop their potential with computer-aided
instruction packages. A considerable number of fascinating and
entertaining educational computer software packages are now available
in almost every subject. These self-tutor instruction packages are well
designed to enable the user to learn at their own time, speed and
convenience. The role of the teacher here is that of a guide so that the
student can think more logically and can gain meaningful experience in
such structured situations, role playing and other well programmed
exercises so that the student can have a better understanding of the
interrelationships of variables to real life situations.
Apart from the use of the computer as an instructional aid, it is also used
in the execution of routine and administrative tasks such as the keeping
of academic and administrative records on admissions, examinations,
staffing and other routine functions.
Furthermore, optical character reading devices are used to scan the bar
codes on readers’ library cards to offer a computer based issuing of
books to readers. A computer based security system is used to maintain
security services in libraries as well. In educational institutions such as
nursery schools, primary schools, secondary schools, polytechnics,
colleges of education and universities, the computer can be used for the
following:
137
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
Computers have been applied in virtually all fields of human endeavour.
This unit presents an overview of some of the key areas of its
application. The application of computers in education has been
discussed in detail.
5.0 SUMMARY
This unit gives detailed information on how the computer can be used to
advantage in the field of education.
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A.. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publication.
138
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Oliver E.C. and Chapman R.J. (1986). Data Processing,(7th ed). ELBS/
DP Publications.
UNIT 2 COMPUTER APPLICATIONS IN BUSINESS
AND INDUSTRY
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 Business and Industry
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVE
• Payroll
• Inventory Control
• Auditing Operations
• Personnel Record Keeping
139
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
(i) Payroll
140
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
141
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
With the aid of these support systems, data can be retrieved and
analysed on a continuous and timely basis to aid management decision
making and other management functions about sales, finances,
purchases, acquisition of plant and equipment, research, market analysis
and so on.
142
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
143
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Creative writing.
• Typesetting manuscripts.
• Drawing illustrations.
• Generating the table of contents and the index of a book
automatically.
• Generating the page size of a book and cut and paste illustrations
automatically.
• Processing images such as the scanning of pictures, and recording
them automatically in the computer store for future retrieval or
printing.
• Verification and validation of spellings.
• Assisting the writer of an article to identify words that have similar
meaning.
144
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
4.0 CONCLUSION
5.0 SUMMARY
• Payroll.
• Inventory Control.
• Auditing Operations.
• Personnel Record Keeping.
• Preparation of Customer Utility Bills and Payment Orders.
• Management Information System.
• High Quality Production Controls.
• Point of Sale Service.
• Financial Market Transactions.
• The Publishing Industry.
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
Oliver E.C. and Chapman R.J. (1986). Data Processing, (7th ed). ELBS/
DP Publications.
145
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
146
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objective
3.0 Main Content
3.1 Science and Engineering
3.2 Marketing Departments
3.3 Agriculture
3.4 Law and Justice
3.5 Health Care
3.6 Transport and Communication
3.7 Government
3.8 The Military
3.9 Recreation, Amusement and Gaming
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVE
147
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
over a period of time. Such accurate predictions help the farmers, airline
operators, navigators and other activities which depend on the weather
for their operations. Computer aided critical path study is used to
monitor the optimum and efficient use of time, money, material and
human resources in the execution and implementation of projects. Such
critical path study is used successfully in various projects, for example,
the construction of roads, bridges, buildings, manufacturing, the conduct
of elections and sales campaigns.
148
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
3.3 Agriculture
(a) Keeping records of soil, rainfall, weather conditions, land size,
crops, and chemicals and ultimately processing the records to
estimate soil fertility and yield per hectare over a number of
years.
(b) Keeping records, of poultry and animal husbandry farm with a
view to estimating the feed mix and environmental conditions
desirable for optimal yield.
(c) Assessing the behaviour patterns of farmers in a cooperative
venture, and assisting in matching the farmers that have identical
behaviour with a view to optimizing their productivity.
149
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The delivery of health care facilities has been one of the notable areas in
which computer applications have proved most beneficial to mankind.
The computer is used to conduct fast and accurate laboratory tests for
blood, urine, stool and so on. The computer is used in the diagnosis and
physiological monitoring of patients’ life during surgical operation and
intensive care programmes. There is also a wide range of application
packages for the scientific preparation and administration of drugs, x-ray
techniques, blood bank management and so on. An equally important
application of the computer is the computer simulation provided in the
training of medical and paramedical staff and students.
The summary that can be drawn about the use of computers in hospitals
is as follows:
150
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
3.7 Government
151
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
(a) Planning
(b) Decision marking
(c) Policy formulation
(d) Monitoring and control of operations
The availability of data, timely access to the data and timely reporting
on the data are very crucial to the above listed business of government.
Computers can be used to:
One of the areas in which the computer has been applied intensively and
extensively is the military. The first generation of the modern computers
were designed and used during the First and Second World Wars. The
use of computers for processing data became more popular during these
periods due to the need to procure, store and process large volumes of
data. Over the years, the use of computers has transcended the
traditional role of “crunching numbers” to sophisticated applications.
Specifically, computers are being used in the following ways, in military
operations:
152
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
One of the major areas in which the computer has affected society
positively is in the area of recreation, amusement and gaming. “Allwork
and no play makes Jack a dull boy”. With increasing civilisation and
urbanisation, there is the need for people to relax and keep their mind
off the tension that is associated with daily activities.
4.0 CONCLUSION
153
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
5.0 SUMMARY
Balogun, V.F., Daramola, O.A., Obe, O.O. Ojokoh, B.A. and Oluwadare
S.A., (2006). Introduction to Computing: A Practical Approach.
Akure: Tom-Ray Publications.
154
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Computer Virus
3.2 Mode of Transmission of Computer Virus
3.3 Virus Properties
3.4 How Viruses May Infect Files
3.5 What Viruses May Do
3.6 Detecting Viruses
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Readings
1.0 INTRODUCTION
2.0 OBJECTIVES
155
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Your computer can be infected even if files are just copied: Because
some viruses are memory resident, as soon as a diskette or program is
loaded into memory, the virus attaches itself into memory.
156
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Viruses can carry other viruses and infect a system, and infect with
the other viruses as well: Because viruses are generally written by
different individuals and do not infect the same locations of memory and
or files, this could mean that multiple viruses can be stored in one file,
diskette or computer.
Viruses can make the system never show outward signs: Some
viruses will hide changes made, such as when infecting a file, the file
will stay the same size.
Viruses can infect any files, however they usually attack .com, .exe,
.sys, .bin, .pif or any data files. Viruses have the capability of infecting
any file. However they will generally infect executable files or data files
such as Word or Excel documents which are opened frequently.
Viruses can increase the file’s size; however this can be hidden:
When infecting files, viruses will generally increase the size of the file.
However with more sophisticated viruses, these changes can be hidden.
Viruses can delete files as the files are run: Because most files are
loaded into memory and then run once the program is in memory, the
virus can delete the file.
Viruses can corrupt files randomly: Some destructive viruses are not
designed to destroy random data but instead randomly delete or corrupt
files.
Viruses can cause write protect errors when executing .exe files
from a write protected disk: Viruses may need to write themselves to
files which are executed. Because of this, if a diskette is write protected,
you may receive a write protection error.
Viruses can convert .exe files to .com files: Viruses may use a separate
file to run the program and rename the original file to another extension,
so the .exe is run before the .com.
157
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
The following are possibilities you may experience when you are
infected with a virus. Remember that you also may be experiencing any
of the following problems and not have a virus.
Once the hard drive is infected, any disk that is non-write protected that
is accessed can be infected.
A virus may:
• Deleted files.
• Insert various messages in files or on programs
• Changes volume label
• Mark clusters as bad in the FAT.
• Randomly overwrite sectors on the hard disk
• Replace the MBR with own code
• Create more than one partition
• Attempt to access the hard disk drive which can result in error
messages such as invalid drive specification.
• Cause cross linked files
• Cause a “sector not found” error
• Cause the system to run slowly
• Create logical partitions created. Partitions decrease in size
• Display directory as garbage
• Modify order, so files such as Com will start at the beginning of the
directory
• Cause hardware problems such as keyboard keys not working,
printer problems and modem problems
• Disable ports such as LPT or COM ports
• Cause keyboard to be remapped
• Alter the system time/date
• Cause the system to hang or freeze randomly
• Cause activity on HDD or FDD randomly
• Increase file size
• Increase or decrease memory size
• Randomly change file or memory size
• Extend boot times
• Increase disk access times
• Cause the computer to make strange noises, make music, clicking
noises or beeps
158
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
• Display pictures
• Cause different types of error messages
4.0 CONCLUSION
Computer viruses are perhaps the greatest threats to the computer. If not
detected and promptly cured, a computer virus attack could lead to the
total breakdown of the computer. With the aid of our discussion in this
unit, you should be able to prevent, detect and clean viruses in a
computer installation.
5.0 SUMMARY
(a) Computer viruses are programs written by programmers with the aim
of causing havoc to the computer.
(b) Computer viruses could lead to malfunctioning and total breakdown
of the computer.
(c) Computer viruses are transferred from one computer to another
through the use of infected storage media such as diskette, flash
drive, CDROM, or across a computer network.
(d) There are antivirus packages specially written to prevent, detect and
clean viruses.
159
AGE 202 INTRODUCTION TO COMPUTER SCIENCE
Balogun, V.F., Daramola, O.A. Obe, O.O. Ojokoh, B.A., and Oluwadare
S.A. (2006). Introduction to Computing: A Practical Approach.
Akure: Tom- Ray Publications.
160