ELEMENTARY COMPUTER PROGRAMMING

 

ELEMENTARY COMPUTER PROGRAMMING

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.

Characteristics of Programming Languages

1.       They have rules governing the structure of the language referred to as syntax

2.       They have vocabulary, i.e. list of words accepted within a language

3.       Each key word in a language has only one meaning attached to it (semantic)

TYPES OF PROGRAMMING LANGUAGES

1.       Low level languages, which include; machine code and assembly language

2.       High level languages, which include; BASIC, COBOL, FORTRAN, ALGOL, PASCAL, PROLOG, C

3.       Very high level languages, which include; C#, C++, Java, VB, HTML, SQL

Factors to Consider When Choosing a Programming Language

1.       Availability of an appropriate compiler that can translate it

2.       Type of computer to handle the task. Is it compatible with the computer system

3.       Type of language. High level languages are preferred

4.       Speed of execution of the language

5.       Nature of work to be done. PASCAL, COBOL are suitable for commercial use; C, Java are for  general use

6.       Portability of the language. Ensure that the language is not machine dependent

Advantages of Programming Languages

1.       They are unambiguous. Statements can be interpreted by humans

2.       Statement are not cumbersome

3.       They can be processed by the computer

Disadvantages of Programming Languages

1.       Programming languages have led to the development of malicious software like viruses.

2.       The basic logical flow is difficult to follow because computer programming languages are essentially serial in nature, i.e. executing one step is normally followed by execution of the next step in the program

3.       Communication of the program algorithm logic is restricted to those persons who understand the particular programming language which is used

DATA TYPES

Most computer high-level programming languages like C, C++and Java provide the following types of data.

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; =, <, >, <>

 

 

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.

Rules for Declaring Variables

1.       Every variable must have only one type

2.       The type of each variable must be declared before the variable is used in an executable statement

3.       A variable name should preferably start with a letter

4.       Special characters like spaces, ?, [, ], {, }, &, %, etc are not allowed in a variable name.

5.       It is advisable to use variable names that describe or carry a meaning of the data they store

6.       Some programming languages are case sensitive, e.g. for: C, C++, letter a and A are not the same

7.       Keywords and special identifiers are not allowed (they are reserved for special use by the compiler)

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

Types of Programming Errors

o    Compilation errors. These are errors that prevent your program from running. They are also known as syntax errors. These errors are caused by wrong syntax of the statements being used in the program

o    Run-Time errors. Are errors that occur while your program runs. These typically occur when your program attempts to perform an operation that is impossible to carry out. e.g. dividing by zero.

o    Logical errors. Are errors that prevent your program from doing what you intended it to do. Your code may compile and run without errors, but the result of the operation is not what you expect

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.

CATEGORIES OF INFORMATION SYSTEMS

Transaction Processing Systems (TPS). These are computerised systems that perform and record the daily routine transactions necessary to conduct the business. E.g. Sales order processing, payrolls system, etc.

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

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.

SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)

Is the process by which systems analysts, software engineers and programmers build systems. It is a project management tool, used to plan, execute and control systems development projects. The SDLC is divided into the following discrete stages.

 

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 DESIGN & DEVELOPMENT

Here, the functional specification is determined. This gives the details of all the data flow through the system and the various processing it undergoes. The design stage deals with “how the system will function”

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.


SYSTEM DESIGN & DEVELOPMENT

Here, the functional specification is determined. This gives the details of all the data flow through the system and the various processing it undergoes. The design stage deals with “how the system will function”

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.

The design strategies include;

o    Custom development, i.e. building the system from scratch in-house

o    Purchasing software and customising it

o    Outsourcing development to a third party

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.

Comments

Popular posts from this blog

Privacy policy

English to Runyankole speech translation app

English to Runyankole translation app