Elementary Programming (Part 1)
Elementary Programming (Part 1)
Programming; also known as coding, is the process of writing a program to solve a given problem, testing it to ensure it is
accurate or correct and preparing documents to support it.
DEFINITION OF TERMINOLOGIES
o A program; also known as a code, is a set of instructions that perform a specific processing task
o A computer programmer; is a person who uses a programming language like C, C ++, Java, VB to write programs that solve
computer related problems
o A programming language; is a set of words and rules governing the use of computers employed in constructing programs. It
is the only language that a computer understands.
o Algorithm; this is a sequence of precise instructions for solving a problem in a finite amount of time.
o Syntax; refers to the rules that govern the use of a particular programming language
o Semantics; refers to the meaning of a valid statement in a given programming language.
o A module; is an algorithm or program developed to solve sub problems
o Constants; are declarations in a program that store values that do not change during program execution
o Documentation; is the process of writing an explanation of how the program works and how to use it.
o Comments; are simply texts that are ignored by the compiler but inform the reader of what the programmer is doing at any
particular point in the program.
o Integers; are either positive or negative whole numbers, e.g. +12, -34, -1, 3, 8
o Real/float; are numbers that correspond to values with decimal points, e.g. -3.4, 6.8, 0.7, 3.8, -9.0
o Characters; are any symbols available on the keyboard. A, a, ..., z, Z, 0, ..., 9, +, -, /, ?, %, >, <, :, {, }, [, ]
o Boolean/logical; this type is used to process the logical data, which may evaluate to TRUE or FALSE. Boolean values are
obtained using comparison operators like; =, <, >, <>
2
VARIABLES
A variable is a location in your computer memory in which you can store a value and from which you can later retrieve that value.
Variables are created, defined or declared by giving them names and data types.
PROGRAMMING ERRORS
A bug also known as a software bug is an error in the software program that causes it to malfunction.
Debuggers are programs used to identify and correct errors or bugs found during the testing of a program.
Debugging is the process of tracing and eliminating all errors in a program by testing for the logical flow
IMPORTANCE OF PROGRAMMING
1. Programming is used to develop new programs and software systems
2. Programming helps in improving existing software systems
3. Programming helps the user to interact with the hardware
4. Programming is used as a research tool
LIMITATIONS OF PROGRAMMING
1. Programming requires an expert in a given programming language
2. The basic logical flow of the program is difficult to follow
3. Communication of the program algorithm logic is restricted to those persons who understand the particular programming
language which is used.
4. It is not always possible to eliminate all errors from the software during programming
5. Developing a good software system requires one to know and use more than one programming language.
6. Programming has also enabled the development of malicious software like viruses.
SYSTEM DEVELOPMENT
A system, or an information system, is a set of interrelated components working together to access, manipulate, store and transmit
information for effective and efficient management of operations in business organisations.
Management Information Systems (MIS). These are used for planning, controlling and monitoring business operations and
decision making, by providing managers with reports about the organisation’s performance. Examples include: Total annual sales
figures for specific products, total amount of fuel used this quarter, etc.
Decision Support Systems (DSS). These are interactive computer-based systems intended to help decision makers utilise data
and models to identify and solve problems and make decisions. Examples include:
o Clinical Decision Support Systems (CDSS). Are interactive computer programs, which directly assist physicians and other
health professionals with decision-making tasks like diagnosis
3
o Geographical Information Systems (GIS). Are system software that can analyse and display data using digitised maps to
enhance planning and decision making, etc.
Executive Support Systems (ESS). These are designed to help senior management make strategic decisions. ESS gathers,
analyses and summarises the key internal and external information, used in the business.
Expert Systems (ES). These are problem-solving software packages, which can reach a level of performance comparable to or
even exceeding that of a human expert in some specialised and usually narrow problem area.
Expertise is transferred from the expert to a computer. This knowledge is then stored in the computer and users call on the computer for
specific advice as needed. The ES can make inferences and arrive at a specific conclusion, then like a human consultant, it advises none
experts and explains, if necessary, the logic behind the advice
Office Automation Systems (OAS). These are software systems such as word processing, electronic spreadsheets, presentation
programs and desktop publishing programs, which are designed to increase the productivity of data workers in the office.
1. System Survey
2. Feasibility Study
3. System Analysis
4. System Design & Development
5. System Implementation
6. System Maintenance
SYSTEM SURVEY
This is the initial stage that involves identification of the
various factors that are leading the organisation into proposing
a new information system. Usually managers in an
organisation are the ones who identify such factors. This stage
involves the identification of the purpose and objectives of the
proposed system
FEASIBILITY STUDY
Here, the proposed system is investigated in depth, the various system options are sought and the pros and cons of each debated
upon by both the managers and the specialists. When the managers approve the report from this stage, the system development
proceeds to the next stage.
SYSTEM ANALYSIS
This deals with identifying the logical aspects of the proposed system, i.e. what it will do. It is the most important stage in the
SDLC because errors in this stage can lead to wasted resources.
System analysis begins with a detailed study of the old system, where the various shortcomings of the old system are noted and
then, an appropriate specification for a new and improved system is derived.
System specification is a detailed documentation of the logical and physical aspects of the system. The processes, hardware and
software platforms, data files, network configurations, etc, of the system are specified. After all that, developers now start the
actual coding of the program in any suitable programming language.
4
System specification is a detailed documentation of the logical and physical aspects of the system. The processes, hardware and
software platforms, data files, network configurations, etc., of the system are specified. After all that, developers now start the actual
coding of the program in any suitable programming language.
Methods that can be used to design and develop the system include;
o Waterfall development. Here analysts and users proceed sequentially from one phase to the next. Once the work produced in one
phase is approved, the phase ends and the next phase begins.
o Rapid application development (RAD). This incorporates special techniques and computer tools like JAD, CASE, to speed up the
analysis, design and implementation phases.
o Iterative development. In this method, the overall project is broken into a series of versions that are developed sequentially
o Prototyping. Is the process of building a working model of a system. A prototype is a working model that does not normally have
all the required features and functionality of the final system.
SYSTEM IMPLEMENTATION
Here, the physical installation of the system in the organisation is carried out, followed by testing to confirm that it actually works as
intended. Before the final conversion from the old system to the new system is carried out, users are trained in how to use the new
system and the security procedures. This phase includes the following;
o Physical installation. This involves the actual placing of the various hardware equipment in place and setting them up and
installation of the software components of the system
o System testing. This is the process of ensuring that the system operates as outlined in the system specification. The types of
testing include:
(a) Unit testing. This is divided into: white box testing, where the testers access and examine the actual code of the unit; and, black
box testing, which is done to show that the unit works when confronted by typical input
(b) Integration testing. Finds out whether the different units of the system work as expected when integrated
(c) System testing. When the unit and integration testing are successful, the next step is to put the entire system together and see if it
works as a whole.
o User training. This is the preparation of the users to handle and use the new system. This can be carried out before, during, or
after the physical installation
o Conversion. This is the switching from the old system to the new system. This can be done in one of the three ways below:
(a) Parallel conversion. Here the old system and the new system are run concurrently for a given period before the new system can
be fully employed
(b) Phased conversion. Here the new system is introduced in parts while the old system is phased out gradually
(c) Instant conversion. Here the new system is immediately used once installed
SYSTEM MAINTENANCE
This is the final activity, and also the activity that is carried out routinely throughout the life time of the system. The developers
monitor and see if the users are getting any troubles using the system or more bugs are showing up, and these are dealt with
accordingly. Types of system maintenance include:
o Corrective maintenance. This refers to the process of fixing errors in the system.
o Preventive maintenance. This refers to regular servicing and maintenance of the system, including backup
o Adaptive maintenance. Refers to changing the system to adapt to a changing environment
o Perfective maintenance. This refers to taking a system that works and modifying it to be better.