Programming Fundamentals
Programming Fundamentals
• Although the code can be written using any text editor, the file must be
saved with .html extension.
BENEFITS OF HIGH LEVEL
LANGUAGES
• Are portable i.e. can be installed in more than one computer.
• Are user friendly and easy to use and learn
• Are more flexible. They enhance creativity and innovation of the
programmer and increase productivity in the workplace.
• It is easier to correct programs written in high level languages.
LIMITATIONS OF HIGH LEVEL
LANGUAGES
• They require large computer memory to be executed.
• High level language programs have to be interpreted or compiled to
machine form before the computer can execute them hence need
more hardware and software resources.
• Their nature encourages use of many instructions in a statement
hence the size of these instructions cause slower program processing
Program development Process
• Guidelines on how to solve a programming problem are;
1. Clearly define what a program is to do (problem definition)
2. Close your eyes and visualize the program running on the computer
3. Write a pseudocode version (algorithm design) of the program
4. Desk-check (dry-run) the pseudocode for any logical flow errors
5. Write the program code on a paper using a programming language
6. Test the program on paper for any syntax and logical errors
7. Write the source code using a programming language such as Basic,
C++ etc
Program development Process
Cont…
8. Compile the program and correct any errors displayed by the
compiler
9. Run the program with test data for input to test for any logic errors
10. Validate the results of the program
Summary of the guidelines
• The guidelines outlined above can be summarized into five main
phases of program development life-cycle. (PDLC)
1. Problem definition
2. Algorithm design
3. Program coding
4. Program testing and debugging
5. Program review and maintenance
Problem Definition
• Refers to one’s ability to identify a problem that need to be solved
using a computer program.
• The following three situations may motivate a programmer to develop
a computer program.
a. Problem or undesirable situations that prevent an individual or
organization from achieving their objectives.
b. Opportunity to improve the current system of service.
c. New directive given by the management or government requiring
change in the status quo.
Sample Problem
• Consider a mathematical problem such as calculating the area of a
circle. In this case, the problem is finding the area of a circle. As a
programmer, it is your responsibility to develop a program that can be
used to calculate the area of any circle. For such a problem, a
programmer must conceptualize the solution by first understanding
the problem, then identify input, processing logic and the expected
output.