PROGRAMMING LANGUAGES NOTES ICT and COMPUTER
PROGRAMMING LANGUAGES NOTES ICT and COMPUTER
Computer Programming
A program – is an organized list of statements (instructions) that when
executed, cause the computer to behave in a pre-determined manner or carry
out a defined task.
Object code
This refers to the program code that is in machine –readable i.e a source code
that has been translated into machine language.
Translators
These are programming tools that translates /convert the source program into
object code. E.g. Assemblers, compilers, interpreters etc.
Assembler
An assembler translates a program written in assembly language into machine
language.
Interpreter
This translates the source programs line-by-line, allowing the CPU to execute
one line before translating the next. The translated line is not stored in the
computer memory, hence every time the program is executed, it has to be
translated.
Compiler
This translates the entire source program into object code. The compiler
translates each high level instruction into several machine code instructions in
a process called COMPILATION and produces a complete independent program
that can be run by the computer as often as required without the original
source program being present.
1. Low-level languages.
- These languages are classified as low because they can be directly, or
easily understood by the computer with little effort to translate into
computer understandable form.
- These languages are hardware oriented and therefore they are not
portable. I.e. a program written for one computer cannot be installed
and used on other.
-
Types of low level languages
A . Machine language: First generation (languages)
- In this language, instructions are written using binary logic. Given that
data and instructions are in binary form, many lines of codes are
needed to accomplish even a simple task like adding two numbers i.e.
program written in this language look like this.
111000110 0000011 10000001
0001111 10001101
10001111 1111111 1000011
The program code is hard for humans to understand but it’s easily understood
by computers.
2. High-level languages.
These languages are very close to the human language (English –like) and
they can be read and understood even by people who are not experts in
programming. These languages are machine independent. This means that a
programmer concentrates on problem solving during a programming session
rather than how a machine operates.
This generation make programming an even easier task than the third
generation language because they present the programmer with more
programming tools. Examples of such tools are command buttons, forms etc.
the 4 GLs are easy to learn and understand because they are user based. The
languages syntax (grammar) is natural , near English language and use
menus to prompts to guide a non-specilist or retrieve data with ease.
Examples of 4GLs
a) Visual Basic
b) Delphi Pascal
c) Visual cobol
d) C + +
iii) Fifth generation languages ( 5 G’s)
These languages are designed around the concept of solving problems by
enabling the computer to depict human like intelligence. These programs are
designed to make the computer solve the problem programmer rather than
programmer spending a lot of time to come up with the solution.
Examples of 5GL’s
a) PROLOG
b) MERCURY
c) LISP
d) OCCAM.
iv) Object oriented programming languages. (OOP)
The concept behind OOP languages is to look at a program as having various
objects instructing to make up a whole. Each object has a specific data
values that are unique to it (called state) and a set of the things it can
accomplish called (functions or behavior). This process of having data and
functions that operate on the data within an object is called Encapsulation.
Several objects can then be linked together to form a complete program OOP
has greatly contributed to development of Graphical user interface
operating systems and application programs.
Examples of OOP
a) Java
b) Simula
c) Small talk.
d) Python
e) C++
f) Visual basic.net
g) Sea sharp.
Program development
There are six stages of program development. They include
Problem Documentation
recognition
Problem definition
Program design
Program coding
Program testing
Program implementation
i) Program recognition
There are two types of errors (bugs) that can be encountered when testing
i) Syntax errors – They occur as a result of improper use of language rules. e.g.
grammar mistakes , punctuation , improper naming of the variables etc.
These errors are detectable by translator and must be corrected before the
program runs.
ii) Logical errors- They are not detectable by the translator. The program rules
but gives wrong output or halts during execution.
Development of algorithms.
Algorithms – Refers to a limited number of logical steps that a program follows
in order to solve a problem.
Pseudo code – Refers to a set of statements written in a readable language
(English – like) but expressing the processing logic of program.
Guidelines for designing a good pseudo code.
1. The statements must be short, clear and readable.
2. Pseudo code lines should be clearly outlined and indented clearly.
3. It should show clearly the start and stop of executable statements and
control structures.
4. Statements must not have more than one meaning.
Solution
START
Print “Enter two numbers”
Input x,y
Sum – x+y
Average = sum /2
PRINT sum
PRINT Average
STOP
Program flowcharts.
A flowchart is a diagrammatic representation of a program in algorithms. It
uses statements and symbols that have specific meaning. The symbols are of
different standard shapes linked to show the order of processing. Each shape
contains note stating what the operation is.
Guidelines for drawing a flowchart
1. There should be only one entry and one exit point of a program algorithm.
2. Use correct symbol at each stage in the flowchart.
3. Avoid a crossd flow lines.
4. Be as neat and tidy in drawing as possible.
5. Genearal direction of flow in any flowchart is from top to bottom , left to
right.
Examples of flowchart
Draw a flowchart for a program used to prompt the user to enter two number s.
the
program should find the sum, and average then display the output
Start
In put
XY
Sum = x+y
Average = z+y/2
Print
Sum,
Average
STOP
Types of flowchart
System flowchart
It’s a chart that depicts the systems as a whole with only subsystems or a major elements shown.
Program flowchart
This chart shows the sequence of operations as carried out by a computer program.
Advantages of flowchart.
1. Gives programmer good visual reference of what the program will do.
2. Serves as program or system documentation.
3. Its easy to trace through from the start to find the action resulting from a set of condition .
4.Allows programmer to test alternative solutions to a problem without over coding the program.
Disadvantages.
1. There are so many different ways to draw them.
2. Its difficult to remain neat and uncluttered if the logic is complex.
1. Constructing a flowchart is time consuming.
2. They take up considerable space.
3. They are difficult to amend without redrawing
ii) Selection/decision
This structure is used to branch, depending on whether the condition returns a value of True or
False (yes or no)
For example
If < condition >
Then Action 1
Else Action 2
Endif.
General format
If < condition > Then
Statements :
Endif
General Format
If < condition >THEN
Statements 1,
ELSE
Statement 2
EndIF
3. Nested IF
This is used where two or more options have to be considered to make a selection. For
example, to award grade according to the marks as follows
a) 80 marks Grade A
b) 60 marks Grade B
c) 50 marks Grade C
d) 40 marks Grade D
General format
If < conditions >Then
Statement
ELSE
If < condition >Then
Statement
ELSE
If < condition >Then
Statement
ELSE
Statement
EndIf
EndIf
End
CASE SELECTION
Its an alternative to the nested IF. This selection is preffered to the Nested if in order to reduce
the many lines of codes . case selection can only be expressed using integers and alphabetic
characters only. The Boolean expression should be CASE interger OF or CASE char OF.
General format
CASE x of
Label 1: statement 1
Label 2: statement 2
:
label n: statement n-1
ELSE
Statement n
End case
Example
CASE average OF
80…100: Grade = “A”
70-79 Grade= “B”
60-69 Grade = “C”
40-49 Grade =” E”
ELSE
Grade = “F”
End case.
iii) Iteration (coping) repetition
This is designed to execute the same block of code again and again until a certain condition is
fulfilled . Itelaration is important in situations where the same operation has to be carried out
on a set of data many times.
There are three main looping controls.
i) THE – WHILE-DO LOOP
This repetitive structure tests the condition first before executing the successful code if and
only if the Boolean expression returns a true value.
Example
To withdraw money using an ATM a customer must have a balance in his/her account.
General format
While <condition >Do
Statement
End while.
Flowchart
Bal yes
>o?
End loop
no
Example
Pseudo code segment
REPEAT
Withdraw cash
Update account
Until balance <0:
General format
REPEAT
Statement
UNTIL <condition>
Flowchart
Withdraw cash
update account
Yes
Bal
>o?
No
Exit loop
iii) The FOR LOOP
This structure is used where execution of the chosen statements has to be repeated a
predetermined number of times. For example if a program is to calculate the sum of ten numbers
provided by the user. The FOR LOOP can be used to prompt the user to enter the 10 numbers at
most ten times. Once the numbers are entered the program calculates and displays the sum.
Pseudo code
FOR count = 1 to 10 Do
Writeln “Enter a number (N)”
Readln N
Sum = sum +N
End FOR.
Display sum
The counter has to be set to a start value and sometimes to an end value.
Pseudo code
Start
Input Name, share,Deposit
If share> 10000 THEN
Intrest = 0.05 x shares
ELSE
Interest = 0.03 x shares
EndIf
Total savings = Deposit Interest + shares
Print Name., Totalsaving , Interest
Stop
Flowchart
Diagram
2. Botswana has a population of 3,000,000 but thi si filling by 4% each year . The island of
Reunion has a population of 95,000 but this is increasing by 95 each year.
a) Draw a flowchart that predicts the year in which the population of reunion will be grater than
that of Botswana if the trend continues.
Solution
Pseudo code
Start
Bts: 3,000
IR: = 95,000
Year : = 0
REPEAT
Bts = Bts – (Bts * (4/100)
IR = IR + (IR (9/100))
Year = year +1
UNTIL IR > Bts
Print year
Stop
3. Write a program that will allow the input of name of student marks obtained in 5 subjects
(Math, Engllish, Computer, Biology) .
The program should calculate the total and evearge marks for each student and assign the
grades depending on the average marks obtained as follows.
80- 100 A
70- 79 B
60- 69 C
50-59 D
Below 50 –E
The program should then display each students name , total marks and average .
Pseudo code
START
REPEAT
Print “ Enter name and subject marks”
Input Name, maths,English , Kiswahil , Computer , Biology
Sum = maths,English , Kiswahil , Computer , Biology
AVG = sum/5
If (AVG > 80) AND (AVG < 100) THEN
Grade = “A”
If (AVG > 70) AND (AVG <79) THEN
Grade = “B”
If (AVG >60) AND (AVG <69 THEN
Grade = “c”
If (AVG > 50) AND (AVG <59) THEN
Grade = “D”
ELSE
Grade = “E”
Endif
Endif
Endif
Endif
Print name, sum, AVG, Grade
Until count = Number of students.
Stop
Flowchart
1. Diagram
a) write a program segment for the flowchart using a high language (7 marks)
b) What would be the output from the flowchart if the statement in the decision box is changed to
(3 marks)
2003
1 a) Distinguish between Machine and Assembly language (2 marks)
b) State the type of translator necessary for a program written in
i) High level language
ii) Assembly language
2. Briefly explain the purpose of the following types of a program documentation ( 2marks)
i) User manual
ii) Reference guide
3. State any two features of user-friendly program (2 marks)
2. Study the flowchart below and the question that follow.
a) Write a high level language program for the above flowchart ( 7 marks)
b) List the outputs of the flow chart above (5 marks)
KCSE 2004
1. Distinguish between a compiler and an interpreter ( 2 marks)
2. What is meant by the term DRY Running as used in program development (2 marks)
3. Differentiate between source program and object program (2 marks)
4. Bidii wholesaler has two categories of customers for order processing. Category “A” obtains
10% discount on all orders up to Ksh 10,000. Otherwise the discount is 20% on the entire order.
Category “B” obtains 30% discount on all orders if the debt repayment is “good” otherwise the
discount is 15% . Draw a flowchart for the order processing (15 marks)
KCSE 2005
1. Distinguish between Real, Integer and character data types a used in programming (3 marks)
Diagram
CHAPTER FOUR
SYSTEM DEVELOPMENT
A system
Is a set of items linked together to carry out a given task in order to achieve one or more
objectives . a system is described as being either soft or hard.
i) Soft system
Human activity are said to be soft systems. They are said to be soft because:
a) Their boundaries may be fluid or keep on changing
b) Their goals and objectives conflict.
c) Its difficult to precise define exact measures of performance for them.
ii) Hard systems
These are systems whose goals and objectives are clearly defined and the outcomes from the
systems processes are predictable and can be modeled accurately.
Systems classification
i) Deterministic system
These are systems whose outputs are known precisely by their input e.g a computer.
Characteristic of systems
1. Holistic thinking
In this, a system is considered as a whole. A combination of various components that makes up
a system creates a complex whole whose overall goals are more sophisticated than those of the
individual components.
2. Sub systems.
A system is made up of different components (subsystem) . Therefore a system does not exist
in solitude but it may be a component of large system.
3. Processor
This is an element of a system that does the actual transformation of input into output.
4. Objectives / purposes
Objectives of the system may be real or stated. An organisation should state objective and
operate to achieve another user must know the major objective of a system.
5. Environment
The environment is the system within an organization operates. Environment provides a reason
for the existence of the system.
6. Boundaries
System boundaries are external element whose changes in attitudes, behavior and property
affect their state and are affected respectively. Ie it’s the limit of system.
7. Independence
For a system to be effective and efficient, its components or subsystems must be co-ordinate
and linked together.
8. Feedback
A feedback is a check within a system to see whether predetermined goals are being met. The
checks are conducted on a system to determine deviation.
9. Control
This is the process by which the system adapts to changes in the environment in order to give
the expected level.
10. System Entropy
Entropy means decay. System decay naturally over time, hence it slowly becomes useless to
the user either due to improvement in technology, new management or change in user
requirements. Therefore it must be reviewed in order to improve it or develop a new one.
11. Inputs and out puts
A system communicates with its environment by receiving inputs and giving outputs.
12. Open and closed system
An open system receives input from and gives output to the environment while a closed system
does not interact with the environment so that good quality reports are produced for easy
understandings.
b) Input specification.
The input to the system is necessary because the content of their input are used to maintain the
master files. The following should be considered in input specification .
i) The contents and volume of input
ii) The mode and devices of input selected.
iii) Layout and sequence of input.
4. System design
This involves detailing the physical design of the system, it’s the how of the process. Once the
logical design is outlined during the system analysis , the analyst determines the physical
design, which describes the hardware, software and operating procedures required to make a
system operational. Several tools are used for designing an information system. . Examples are
flowchart, data flow diagram, structured charts. Etc.
5. System construction.
This refers to coding, installation and testing of the molecules and their components such as
outputs, inputs and files. The purpose of the construction is to develop and test a functional
system that fulfils the business and design requirements.
6. System implementation
This involves installing the system in the user’s computers. Testing the installed system,
converting from old system to the new one an d training the users.
System implementation involves;-
i) File creation and conversion
ii) Chang eover
iii) Staff training.
Methods of Training
Demonstration
Manual reference
Group discussion
Visits
iii) Changeover
This is the process of changing over from old system to rthe new system.
Types of changeover
a) Direct changeover
In this approach the new system commence live operation and immediately the old system is
abandoned.
b) Parallel changeover
In this changeover the operation of the old system and the new system run alongside each
other.
Advantages
Provides a method of training in the new system
Personnel become familiar with the new system prior to actual changeover.
Disadvantages
Costly to run two systems
Cross checking is difficult
Requires more staff hence more training required for additional staff.
c) Phase changeover.
In this approach implementation is done only one part of the new system at one time or a step
by step.
Advantages
Allow the system to be implemented quickly
Less costly
Failure of the system are limited
Causes minimal disruption.
Disadvantages
Problem on ensuring that the first phase is implemented and converted.
8. System documentation
This is written graphical record of the steps taken during the system development process.
System documentation consists of
i) Report of fact-finding which outlines methods used to collect data, weakness of the current
system and recommendation of the current system.
ii) Requirements specification, which entails the output requirements, input, hardware and
software required for the new system.
iii) System flowchart, which shows the overall functionality of the proposed information system.
iv) Tables or file structures depending on the approach used in system construction.
v) Sample test data to test whether the new computerized information system is working as
expected.
vi) User manual, which helps the user work with the new system minimal guidance . The manual
contains information like.
How to install, start the system
The interface of the system
How to carry out various tasks
Error collection and how to get help.
SYSTEMS THEORY and DEVELOPMENT
A System:
A system is a set of inter-relate components/Elements set together to
perform a given task.
Information Systems (IS):
These are interrelated elements (hardware, software, users, data and
information) working together to collect, process, store, and disseminate
information for:
Decision making
Coordination
Control
Analysis
And visualization (conceptualization/seeing complex subjects for org’nal
survival.
Self–organizing/Adaptive/Cybernetic systems.
Systems which are highly complex. i.e. system which continuous adapt
to changes in the environment.
Computer based information systems (CBIS): these rely on computer HW
and SW
Formal systems: These are systems that rest on clearly fixed and
accepted data and procedures with predefined rules.
Management Information System (MIS):
Focuses on computer based information systems aimed at organizational
management provide reports and on-line access to the orgn’s records
Are system that convert data from internal and external source into
information to be used by managers if effective decision making for planning,
Directing and control of original activities.
They include:
Executive information system (EIS) or Executive
Support system ESS.
Systems used at the strategic level of management to facilitate non-routine
decision making through illustrations and communication. They are at highest
levels of control.
EIS/ESS usually provides summarized reports.
Decision support Systems (DSS)
MISs at the organization’s mgt level combining data and complex models or
tools to facilitate decision making. Used to help manager in effective decision-
making where data is unstructured.
Unstructured data is one with very high level of uncertainty and difficulty to
making the right decision using it.
Expert System:
Systems designed to provide specialized information/data for specialized areas
or fields. E.g.
Accounting/Finance expert system.
Marketing expert system.
Human resource expert system.
Health applications
Systems can also be classified as;
Data processing systems.
Transaction system.
Knowledge based system
Data processing systems (DPS):
These are systems that automate many of the routine clerical and
administrative procedures in organisation. For document processing, order
mgt, Stock control, and Routine billing of clients.
Management can not base on them for tactical and strategic decisions.
On-line Analytical Processing Systems (OLAPS):
These are real-time Interactive systems with direct connectivity between the
data source and the users.
Benefits of ISs
Making organisational structures flatter.
Separation of work from location is minimised. eliminated the physical
distance
Slowly doing away with manual work procedures as workflows get
reorganised
Orgns are becoming increasing flexibility as they can now easily sense
and respond to challenges and changes in the work and market place.
Redefinition of org’nal boundaries: as businesses get conducted across
boundaries.
Managers can now coordinate, plan, supervise and control organisational
functions better on implementation of MIS
SYSTEM DEVELOPMENT
This (SD) defines the activities an organization should go through to come up with a properly
functioning information system. The most common approaches to SD are;
System life cycle methodology
Application software packages
Prototyping approach
1. System life cycle: This is an approach that parcels the SD process into formal stages that
must be followed sequentially.
Logical stages:
System/situational analysis
System project definition
Feasibility study
Needs assessment or problem identify and definition.
Specify solution
Establishment of information system requirements
System study. Looks at the problems of the existing system, defines the
objectives the new system is to attain, and evaluates the various alternative
solutions. Writes a system proposal report
System design – Details how the new system is going to meat the information
requirements of the organization. It creates design specifications for the system solution.
Designs include inputs, outputs, user interface, databases, electronic processing and
manual procedures designs.
Programming – usually done by a technical/professional programmer who translates
design specifications into program codes
Testing: Is a thorough and exhaustive process aimed at determining as to whether the
system gives the desired results. It involves unit testing, system testing, and acceptance
testing. It also involves drawing conscious test plans.
Installation and documentation: involves actual installation, re-testing, training of users
and writing of user’s manuals. Documentation involves a descriptive write-up about how
the new system works. It is both technical and end-user oriented
Conversion stage: Involves switching from the old IS to the new one.
Parallel conversion strategy
Direct cutover
Pilot study strategy. Where the new system is introduce to a limited
area
Phased approach. Introduce in stages either by function or unit.
Production: The system is being put to actual use, while being evaluated by end-users
and technical specialists.
Maintenance stage: This is a post implementation phase involving servicing and
repair of the system, while making changes in hardware, software and documentation.
3. Prototyping:
A Prototype is a preliminary working version of an information system for demonstration and
evaluation. It is an original functional model of a new product (software) that a developer can
put into the hands of potential users or customers, so that they can see it, test it and use it.
Prototyping is one the most effective ways of gauging the viability of a product (an information
system).
Dimensions of Prototypes
Horizontal Prototype. This provides a broad view of an entire system or subsystem,
focusing on user interaction more than low-level system functionality, such as database
access. It is a common term for a User Interface Prototype
Vertical Prototype: This is a more complete elaboration of a single subsystem or
function. It is useful for obtaining detailed requirements for a given function, with the
following benefits:
Types of Prototyping
1. Throwaway Prototyping also called close ended prototyping or Rapid Prototyping: refers
to the creation of a model that will eventually be discarded rather than becoming part of the
final delivered software.
2. Improved and Increased User Involvement: Prototyping requires user involvement and
allows them to see and interact with a prototype allowing them to provide better and more
complete feedback and specifications.
Disadvantages of Prototyping
1. Insufficient Analysis: The focus on a limited prototype can distract developers from properly
analyzing the complete project.
2. User Confusion of Prototype and Finished System: Users can begin to think that a
prototype, intended to be thrown away, is actually a final system that merely needs to be finished
or polished.
3. Developer Misunderstanding of User Objectives: Developers may assume that users
share their objectives (e.g. to deliver core functionality on time and within budget), without
understanding wider commercial issues. For example, user representatives attending Enterprise
software (e.g. PeopleSoft) events may have seen demonstrations of "transaction auditing" (where
changes are logged and displayed in a difference grid view) without being told that this feature
demands additional coding and often requires more hardware to handle extra database accesses.
5. Excessive Development Time of the Prototype: A key property to prototyping is the fact that
it is supposed to be done quickly.
6. Expense of Implementing Prototyping: the start up costs for building a development team
focused on prototyping may be high. Many companies have development methodologies in
place, and changing them can mean retraining, retooling, or both.
TROUBLE SHOOTING
PC CONFIGURATIONS
• The hardware and software specifications required for PC or any other type of
computer is term as the computer configurations. A typical configuration is given
below;
– Micro Processor Pentium series.
– Hard disk in the range of gigabytes.
– Floppy disk drive (3.5, 1.44mb)
– 104 keyboard
– 14” or 17” colour digital monitor.
– Desktop version of an inkjet printer.
– Multimedia kit which consists of: CD ROM drive, DVD drive , Speakers,
sound card e.t.c
– 3 button mouse with a rolling button.
– System software with the latest version.
– Application software with the latest Ms Office version.
Questions
1(a) Define the term disk formatting
• Disk formatting is the process of preparing a data storage device such as a hard
disk drive, solid-state drive, floppy disk or USB flash drive for initial use.
(b) Describe the process of formatting a newly bought flash disk
(c) Briefly state the steps taken by the computer to load an operating system into
memory.
• The first step is powering of the computer
• Power-on self test-where a computer checks all connected devices if they are
functioning well.
• From BIOS-Then a boot device is located to the I/O system which helps to
coordinate communication between hardware and software(BIOS)
• Operating system is loaded into memory.
• Now the boot process relinquishes control to the os.
(b) State the steps that can be taken to solve the following problems on a computer.
(i) The computer has frozen and the program is not responding.
• You can click alt + ctrl + Del to restart the computer.
• Press the power button without releasing it until the computer goes off and then
start it again.
• Replace the operating system with a new one.
Security threats
• Use of mobile devices; such as laptops or handheld devices, smart phones outside
organizations.
• Cloud computing (delegating the task of protection to a third party usually through
shared resources, or remote storage and host.
• Removable media: provide a pathway for malware to move between networks or hosts.
• Botnets. Botnets are networks of compromised computers used by hackers for malicious
purposes, usually criminal in nature.
Non-Technical Threats
• Insider: an insider is defined as someone with legitimate access to the network.
• Improper Destruction. Paper documents, such as reports and catalogs, may contain
sensitive data.
• Social Media. Using organization’s devices and network resources to access social
media websites poses a high data security threat. They are target for spam
• Social Engineering. Breaking into a network does not require technical skills. Caution
should be advised when communicating any account or network information
Common Threats
Errors and Omissions
It becomes difficult to protect our systems from the people who need to use it day in and day out.
Fraud and Theft
Employees are responsible for more successful intrusions than outsiders. It becomes very
difficult to find the source of internal attacks without alerting the attacker that you suspect him of
wrong-doing.
Malicious Hackers
Several groups of Internet users out there that will attack information systems.
They are hackers, Crackers or phreaks.
Hacking is the process of gaining unauthorized access into a computer system, or group
of computer systems. This is done through cracking of passwords and codes which gives
access to the systems.
A cracker is someone who breaks into someone else's computer system, often on a
network; bypasses passwords or licenses in computer programs; or in other ways
intentionally breaches computer security. A cracker can be doing this for profit,
maliciously, for some altruistic purpose or cause, or because the challenge is there.
A phreak is someone who breaks into the telephone network illegally, typically to make
free long-distance phone calls or to tap phone lines. The term is now sometimes used to
include anyone who breaks or tries to break the security of any network.
Malicious Code is software/code that is designed to make a system perform any operation
without the knowledge of the system owner.
Denial-of-Service Attacks is an attempt to make a machine or network resource
unavailable to its intended users.
Social Engineering is the name given to a category of security attacks in which someone
manipulates others into revealing information, that can be used to steal data, access to
systems, access to cellular phones, money, or even your own identity.
Computer crimes also commonly referred to as cybercrimes refers to any crime that
involves a computer and a network.
To commit a cyber crime a user takes advantage of a computer to take or alter data, or to gain
unlawful use of computer services.
The crimes include but not limited to;
a) Tracking
b) Trespass
c) Tapping
d) Cracking
f) Sabotage
g) Spam
h) Alterations
Explanation:
a) Tracking: Monitoring computer usage in a real time environment. This is either done
remotely or during a physical session, usually used on internet users.
b) Trespass: when someone is able to access your computer and able to see or use your files
illegally.
c) Tapping: when someone gains access to information that is being transmitted via a
transmission/communication link. Users should note that any information passed over a
network is vulnerable provided security measures are not appropriate.
Protection Measures
Educate users
Encrypt all important data
Use secure passwords
Implement additional security checks (fingerprint, Eye scanners)
Encrypt all important data
Restrict Plug and Play
How to buy online safely
a) Research retailers online to make sure they’re legitimate.
b) Make sure the website is secure.(https)
c) Know your rights and the company’s returns policy.
d) Keep software and virus protection up-to-date and use strong passwords for online
accounts.
e) Don’t use public Wi-Fi. Your standard data connection is more secure.
f) Pay using a credit card. You will have more protection. Alternatively, online services like
PayPal mean scammers will not be able to get hold of your bank details.
g) Be smart. If a deal looks too good to be true, it probably is not worth taking.
• Email spoofing is when the sender address of an email is forged for the purposes of
social engineering
• Spear phishing is targeted phishing using spoof emails to persuade people within a
company to reveal sensitive information or credentials.
• Social networking websites allow you to communicate and share information. But they
can also be used to spread malware and to steal personal information.
• Social engineering refers to the tricks attackers use to fool victims into performing an
action. Typically, these actions are opening a malicious webpage or running an unwanted
file attachment.
• A root kit is a piece of software that hides programs or processes running on a computer.
It can be used to conceal computer misuse or data theft.
• Ransom ware is software that denies you access to your files until you pay a ransom
• Phishing refers to the process of tricking recipients into sharing sensitive information
with an unknown third party.
• Key logging is when keystrokes are secretly recorded by an unauthorized third party.
• Worms are viruses that create copies of themselves across the Internet or local networks.
• Hoaxes are reports of non-existent viruses or threats are software add-ons designed to fix
software bugs, including security.
• Cookies are files placed on your computer that allow websites to remember details.
• Boot sector malware spreads by modifying the program that enables your computer to
start up.
• Auto run worms are malicious programs that take advantage of the Windows Auto Run
feature. They execute automatically when the device on which they are stored is plugged
into a computer.
COMPUTER ETHICS
Computer ethics are the moral guidelines that govern the use of computers and information
systems. Frequently concerned areas of computer ethics are;
- Unauthorized use and access of computer systems.
- Software piracy
- Information privacy
- Intellectual property rights
- Codes of conduct
(a) Unauthorized access and use of computer systems. Unauthorized access is the use
of a computer or a network without permission.
A cracker or a hacker is someone who tries to access a computer or a network
illegally. Some hackers break into a computer for the challenge. However, others use or
steal computer resources or corrupt a computers’ data.
Unauthorized use is the use of a computer or its data for un approved or possibly
illegal activities. Examples of unauthorized use of computers include;
An employee using a company computer to send personal e-mail.
Someone gaining access to a bank computer and performing an
unauthorized transfer.
One way to prevent unauthorized access and unauthorized use of computers is to utilise
access controls.
(b) Software piracy. Software piracy refers to the unauthorized and illegal duplication of
copyrighted software. Software piracy is the most common form of software theft.
Purchasing software only provides a consumer with a license agreement or the right
to use the software.
A single user license agreement or end-user license agreement is the most common
type of license included with software packages purchased by individual users. It
usually permits a consumer to;
- Install the software only once on the computer and make one copy for back up.
However, the consumer is usually not permitted to;
- Install the software on a network
- Give away copies of the software to others or
- rent or lease the software
A software site license gives the buyer the right to install the software on multiple
computers at a single site. (e.g a school computer laboratory)
A network site license allows network users to share a single copy of the software
which resides on the network server.
Risks of software piracy
Increase the chance of spreading computer viruses.
No technical support for the software can be received.
Drive up the software cost for all legal users.
(c) Information piracy. Information piracy refers to the right of individuals or
organizations to deny or restrict the collection and use of information about them.
(d)
Information accuracy becomes an important issue when it is necessary to access
information by other people or companies such as that one on the internet.
Inaccurate input can result in erroneous information and incorrect decisions made
based on that information. Never assume that information provided on the web is
always correct.
(e) Intellectual property rights. Intellectual property (IP) refers to work created by
inventors, authors and artists.
Intellectual property rights are the rights to which creators are entitled for their
work.
A copyright© gives authors and artists exclusive rights to duplicate, publish and sell
their materials.
A trade mark ™ protects a company’s logos and brand names
(f) Codes of conduct. A code of conduct is a written guideline that helps determine
whether a specific action is ethical or unethical.
The study of computer studies has become too rich that it is now getting had to draw a difference
between Computer Studies and “ICT”.
Computers and communication have brought and still bringing changes in our lives. Therefore,
the following concepts are more or less becoming family names.
Information technology
The communication revolution/Telephone revolution
Internet revolution
Multimedia (data, sound & video)
The Binary Age
Information society
The information super high way/ “Information” or I-way or Data-Way.
The digital Age or Dot Age.
The need for better and best ways of doing things has triggered more and more research in the
best technologies, more reliable information, and the best communication means.
Therefore, ICT/IT relates to all means, which facilitates information or data capture, processing,
storage, and communication or output.
Old Technologies
Newspaper Paper Printed Photographs
Recordings Film
Radio Televisions
New Technologies
Satellites Fiber optic cables (for communication media)
Cellular phones Fax machines
Compact disk Computers
E-mail
Internet
Data warehouses or data bases
Video conferencing
NB;
ICT/IT concept is quite different from Computer Studies. Computer studies are simply a small
section of IT.
Qn.
(a) Define a telecommunication system, and list its components.
(b) Explain the functions of a telecommunication system.
Mobile Platform
The growth of telecom industry especially in mobile sector has been incredible over last
few years. The service providers upgraded the mobile networks with next-Generation
services like 3G, WAP and GPRS.
The banks are trying to capitalize this growth in the telecom sector and provide the
services to the customers through mobile. The main advantage of mobile banking over
the Internet banking is that it offers ‘Anywhere Anytime Banking’. Customers can check
their accounts, transfer funds, balance statements etc during travel without the access to a
computer. The limitations of Internet Banking are overcome in mobile banking since it
requires only a mobile which can be accessed by people of developing countries also.
Grid Computing
The basic idea of Grid computing is that the computers are connected as a grid and the software
running in the grid gives more priority to local users, but when they become idle these computers
are used over the grid.
Providing remote access to IT resources
Some technological advancements and trends are recognisable and can be predicted. It is easy to
predict that the computers and related equipment will get faster in memory, smaller and cheaper.
Computer technology will find new application and manufacturers will strive to make computing
easier and cheaper. As costs decline and performance and ease of use rises, LAN’s play a bigger
role in corporate information systems.
Possible future trends in computer capabilities, physical size, price and software.
(a) Future computer capabilities. On the capabilities fronts, computers are going to
evolve. They;
o are going to have more powerful, smaller processor and faster access to memory.
o Will have operating systems that will handle real time data analysis and object
oriented.
o Will have improved user interfaces that offer users easier and more intuitive
access to information.
o Will have multi-media applications that will be fully incorporated into some
information systems because data is easy to interprete when presented as a
combination of sight, sound and motion.
(b) Physical size. Most hardware components will get smaller and faster. This means
computers will become smaller and do more.
(c) Price. As technology advances, the price of computers will go down. Every sphere
of ife will be permeated by computers, which will be common even among people of
average earning.
(d) Software. Software development will also develop to allow users easily operate
computer systems. To facilitate document, the best programming and operating
systems are moving towards object-oriented system. OS will play an integral part in
giving the user more control over how data are linked and shared. New operating
systems will focus on object linking, message passing and data sharing.
N.B
1. JOB REPLACEMENT. This is a situation where by certain jobs disappears in an
organization but reappears in another form requiring more and high skilled man power e.g copy
typists using typewriters are still needed in organizations but now use computers word
processors instead of typewriters. Computerization brings about elimination of jobs in most
cases but these jobs are replaced with those that have greater responsibility requiring high level
of training.
2. JOB DISPLACEMENT. This is the process of replacing man power with computerized
machines either their own or with the help of a few skilled and highly trained people. In most
cases, the eliminated jobs are those involving monotonous and unskilled labour for example
factory jobs can be displaced by machines called robots.
SYSTEM ANALYSIS
This is the first stage of the system analysis. Here the analysist makes a survey by gathering
information needed for the system and the allocation of the requirements to the software.
Here the analysist understands the nature of the information and the function of the software
which is required for the system. The analysist makes a brief survey of the requirements and tries
to analyze the performance of the system which is to be developed. He also makes sure that he
gets enough information and resources for building the appropriate system.
Here the analysist actually makes number of designs of the system on paper or on computer and
sees to it that the rough image made of the system comprises of all the requirements or not. Once
this is done, the analysis selects and finalizes a best suited design for the development of the
system.
The analysist translates the code or the programmes in such a way that they become in machine
readable form. The coding step is very time consuming and involves number of rooms for errors.
Once the analysist is through with the coding stage, he tests the system and sees to it that is
working as per the expectations. He corrects the false in the system if any.
This is one of the most vital phase. In this phase the analysist actually gives the system to the
customer and experts for a positive feed back.
This is the last stage of the system analysis. Here the analysist need s to maintain the system and
sees to it that it is working with in the standards set. He needs to maintain the system by
removing the defects of errors occurred.
Information and communications technology (ICT) has created new job tittles such as;
Computer operators.
Computer technicians.
System analysts
Computer programmers
Software engineers
Information system manager
Database administrator
Computer trainer
Website administrator
Computer graphics designer
Network administrators
This section explains some responsibilities of these professionals who are generally called
information technology workers.
a) Computer technician. Given that all computers regular maintenance, upgrading as well
emergency repairs, demand for computer technicians continue to grow as more and more
computerize their work place and homes.
b) System analyst. The is a person who is responsible for analyzing a company’s needs or
problems then designs and develops a computer based information system. A good
information systems analyst is one who has the following attributes.
o Good problem solving skills, creativity i.e must have experience in solving
problems.
o Good communication skills; the analyst must be able to communicate clearly and
precisely both in writing and in speech.
o He/she must be able to talk to different groups of people e.g managers, operators,
attendant and general public.
o Must have business knowledge; the analyst must be well trained in relevant areas
of computer science such as hardware, software and programming knowledge.
Responsibilities
Reviewing the current manual or redundant information system and
making recommendations on how to replace it with a more efficient one.
Working with programmers to construct and test the system.
Coordinating training for users of the new system.
e) Computer engineer. Computer and electronic engineers are coming up with more
efficient and communication technology almost daily. Since computers are electronic
devices, hardware designers must be good in electronic engineering in order to be able to;
f) Information system manager. The information system manger controls, plans, staffs,
schedules and monitors all activities of the ICT department in the organization. Using
computerized management information systems (MIS), the manger can test the impact
that an alternative course of action might have on the business.
Other responsibilities
Making sure that all tasks in the IT department are done correctly and on
time in order to support business planning, control and decision making
processes.
Preparing budgets for the department.
Keeping the department inventory records up-to-date.
Managing the human resource with in the department.
i) Website administrator/ Web master. Internet is one of the areas of information and
communication technology that has drawn the interests of most people. These people are
able to exchange messages, search for information and business through the internet.
Responsibilities
Developing and testing websites.
Maintaining, updating and modifying information on the websites to meet
new demands by the users.
Monitoring the access and use of internet connection by enforcing security
measures
Downloading information needed by an organization or institution from
internet websites.
The internet will continue to expand and change in several ways; faster
connections, more users, new multimedia and virtual reality services.
More interactive services such as multimedia newspapers, livestock market
tickers, automatic notification of when pre-destinated events take place
anywhere on the internet.
Internet as universal as a radio and television today.
Learning will become any time anywhere.
Impact of information technology to the society, morally unemployment
vision, laxity and entertainment.
DATABASES
Think of an address book you might buy in a bookshop. In it, you will write all your important
contacts; friends, family, relatives, companies, and other people in your circles. The address
book contains all names, addresses, location, phone numbers and whatever you need to contact
anyone at any time.
INTRODUCTION TO DATABASES
What is Data?
Data is made up of text, numbers, symbols, images, sounds, etc. that can be processed into
information or stored by a computer.
Information (Info) – Refers to the meaningful and processed data.
What is a Database?
A structured collection of logically related data that is stored so that it can easily be accessed.
Logically related data comprises entities, attributes, and relationships of an organization’s
information.
In normal daily life we make frequent use of databases, and probably don’t realize it. Here are a
number of simple examples:
Filing Cabinet
Personal Address Book
The Telephone Directory
Customer Lists
Membership Lists
Purchases from the supermarket
Purchases using your credit card
Booking a holiday at the travel agents
Using the local library
Renting a video
Using the Internet (Client - Server architecture involved).
Examples of Database Management software (Programs)
The following are some of the examples of Database Programs:
Microsoft Access
Oracle
dBASE
FoxPro
Paradox
FoxBase
FileMaker Pro
Lotus Approach
Microsoft Access
3. Data: Perhaps the most important component of the DBMS environment, certainly from the
end-users’ point of view, is the data. The database contains both the operational data and the
metadata, the ‘data about data’.
4. Procedures: Instructions and rules that should be applied to the design and use of the
database and DBMS.
5. People: The users of the database including:
a) Data Administrators (DA) (responsible for the management of the data resource and
maintenance of standards, policies and procedures)
b) Database Administrators (DBA) (responsible for the physical realization of the database,
including physical database design and implementation, security and integrity control,
maintenance of the operational system, and ensuring satisfactory performance of the applications
for users. The role of the DBA is more technically oriented than the role of the DA).
c) Database Designers (Logical and Physical) The logical database designer is concerned with
identifying the data (that is, the entities and attributes), the relationships between the data, and
the constraints on the data that is to be stored in the database. The logical database designer must
have a thorough and complete understanding of the organization’s data and any constraints on
this data (the constraints are sometimes called business rules). The physical database designer
decides how the logical database design is to be physically realized.
d) Application Programmers (Responsible for implementing the application programs that
provide the required functionality for the end-users. Typically, the application developers work
from a specification produced by systems analysts. Each application contains statements that
request the DBMS to perform some operation on the database. This includes retrieving data,
inserting, updating, and deleting data.
e) End Users (naive and sophisticated) The end-users are the ‘clients’ for the database. Naïve
users are typically unaware of the DBMS. They access the database through specially written
application programs that attempt to make the operations as simple as possible. Sophisticated
end-users are familiar with the structure of the database and the facilities offered by the DBMS.
Sophisticated end-users may use a high-level query language such as SQL to perform the
required operations.
The table structure
Figure showing Domains in some attributes of the Branch and Staff tables (relations).
The table structure is composed of the following:
Data table / relation: The fundamental structure in Ms- access database. These contain the
data that is arranged in rows and columns ie fields and records.
Degree: The degree of a relation is the number of attributes it contains.
Field / Attribute. The entire named column that contains similar data items in a table.
Record / tuple: One complete set of fields relating to the same item. Or set of entire data items
in a row.
Cardinality The cardinality of a relation is the number of tuples it contains.
Field name: this the title of particular column (field)
Domain: A domain is the set of allowable values for one or more attributes.
Data Type: This determines the kind of data you can store in a field, and tells Access how to
handle it.
Field properties: This is the specific characteristic of a particular field
Sort: An operation that you carry out on a table to change the order in which the records are
displayed.
Sort Order: A way of ordering records based on field values. A sort order can be in
ascending (1 to 9, A to Z) or descending (9 to 1, Z to A) sequence.
Primary Key: This is a field that identifies record uniquely within a table.
Foreign Key: A field, within one table that matches the primary key of some other related
table in the database.
DATABASE TERMINOLOGIES
Table: A collection of records that contain the same fields.
Form :Forms are used to add, modify or even view the data in underlying data tables
Query: Queries are used to repeatedly retrieve database records that match specific criteria
and to display them in a specific order. A Query: Is a question you ask about your data.
Report: A document (printed or on screen) that presents information in a structured way.
Datasheet View: A view of a database table where you see information presented in rows and
columns, with several records visible at the same time.
Design View: A view in which you can change the organizational structure of your table. You
create an index in Design View
Relationships: in database, a relationship is an association defined between fields in two or
more data tables
Filtering: Is a process of reducing the amount of information displayed by Access, either by
showing fewer fields in each record, or by showing only those records that match certain criteria.
Form View: A view in a database table that presents all or selected information from a single
record only.
Grouped Report: A report in which information is grouped by the values in one or more
fields. Calculations may be performed on the data within each group
Schema: The general structure (or plan) of the database.
Alternative terminology
The terminology for the relational model can be quite confusing. The table below shows
alternative terminology for database terms:
Alternative 1 Alternative 2 Alternative 3
File Table Relation
Record Row Tuple
Field Column Attribute
Flat File Databases (FFD) – These are basically used for simple lists and may have
duplications of data much like a simple record card system. FFDs consist of only one table.
File based systems include Collection of application programs that perform services for the
end users (e.g. reports). Each program defines and manages its own data.
ADVANTAGES OF DBMS
Control of data redundancy: The database approach attempts to eliminate the redundancy by
integrating the files so that multiple copies of the same data are not stored. For example: In case
of college database, there may be the number of applications like General Office, Library,
Account Office, Hostel etc. Each of these applications may maintain the following information
into own private file applications:
It is clear from the above file systems, that there is some common data of the student which has
to be mentioned in each application, like Rollno, Name, Class, Phone_No~ Address etc. This
will cause the problem of redundancy which results in wastage of storage space and difficult to
maintain, but in case of centralized database, data can be shared by number of applications and
the whole college can maintain its computerized data with the following database:
It is clear in the above database that Rollno, Name, Class, Father_Name, Address, Phone_No,
Date_of_birth which are stored repeatedly in file system in each application, need not be stored
repeatedly in case of database, because every other application can access this information by
joining of relations on the basis of common column i.e. Rollno. Suppose any user of Library
system need the Name, Address of any particular student and by joining of Library and General
Office relations on the basis of column Rollno he/she can easily retrieve this information. Thus,
we can say that centralized system of DBMS reduces the redundancy of data to great extent but
cannot eliminate the redundancy because RollNo is still repeated in all the relations.
Data consistency: If a data item is stored only once in the database, any update to its value has
to be performed only once and the new value is available immediately to all users. If a data item
is stored more than once and the system is aware of this, the system can ensure that all copies of
the item are kept consistent.
More information from the same amount of data: With the integration of the operational data,
it may be possible for the organization to derive additional information from the same data. For
example, in the file-based system illustrated in Figure 1, in this chapter, the Contracts
Department does not know who owns a leased property. Similarly, the Sales Department has no
knowledge of lease details. When we integrate these files, the Contracts Department has access
to owner details and the Sales Department has access to lease details.
Sharing of data: Typically, files are owned by the people or departments that use them. On the
other hand, the database belongs to the entire organization and can be shared by all authorized
users. In this way, more users share more of the data.
Improved data integrity: Database integrity refers to the validity and consistency of stored
data. Integrity is usually expressed in terms of constraints, which are consistency rules that the
database is not permitted to violate.
Improved security: Database security is the protection of the database from unauthorized users.
Without suitable security measures, integration makes the data more vulnerable than file-based
systems. However, integration allows the DBA to define, and the DBMS to enforce, database
security. This may take the form of user names and passwords to identify people authorized to
use the database.
Economy of scale: Combining all the organization’s operational data into one database, and
creating a set of applications that work on this one source of data, can result in cost savings.
Improved data accessibility and responsiveness: Again, as a result of integration, data that
crosses departmental boundaries is directly accessible to the end-users. This provides a system
with potentially much more functionality that can, for example, be used to provide better services
to the end-user or the organization’s clients.
Improved maintenance through data independence
Increased concurrency: Many DBMSs manage concurrent database access, ensuring that two
or more users are allowed to access the same file simultaneously, without interfering with each
other, or resulting in loss of information or its integrity.
Improved backup and recovery services: modern DBMSs provide facilities to minimize the
amount of processing that is lost following a failure.
Complexity: The provision of the functionality we expect of a good DBMS makes the DBMS an
extremely complex piece of software. Database designers and developers, the data and database
administrators, and end-users must understand this functionality to take full advantage of it.
Failure to understand the system can lead to bad design decisions, which can have serious
consequences for an organization.
Size: The complexity and breadth of functionality makes the DBMS an extremely large piece of
software, occupying many megabytes of disk space and requiring substantial amounts of
memory to run efficiently.
Cost of DBMS: The cost of setting up DBMSs varies significantly, depending on the
environment and functionality provided.
Additional hardware costs: The disk storage requirements for the DBMS and the database may
necessitate the purchase of additional storage space, perhaps even a machine dedicated to
running the DBMS. The procurement of additional hardware results in further expenditure
Cost of conversion: This includes the cost of converting existing applications to run on the new
DBMS and hardware plus the cost of training staff to use these new systems, and possibly the
employment of specialist staff to help with the conversion and running of the system.
Higher impact of a failure: The centralization of resources increases the vulnerability of the
system. Since all users and applications rely on the availability of the DBMS, the failure of
certain components can bring operations to a halt.
DATABASE OBJECTS
Tables Data is stored in tables.
Queries You use queries to retrieve specific data from your
database and to answer questions about your data.
Forms Forms give you the ability to choose the format and
arrangement of fields. You can use a form to enter, edit,
and display data.
Reports Reports organize or summarize your data so you can print
it or view it onscreen. You often use reports when you
want to analyze your data or present your data to others.
Macros Macros give you the ability to automate tasks. You can
use a macro to add functionality to a form, report, or
control.
Modules Like macros, modules give you the ability to automate
tasks and add functionality to a form, report, or control.