Programming Concepts
Programming Concepts
COMPUTER PROGRAM
• First step in defining the problem begins with recognizing the need for information
• To fully analyze the problem, there is a need to define what are outputs are required of the
program.
• The programmer must determine what data are needed, what form they are to be in, what
information is to be outputted and how the data are to be manipulated to produce this output.
2. DESIGNING A SOLUTION
• This sequence of steps, a strategy for solving the problem is called algorithm.
• After the programmer has define the problem and designed a solution, the next
step is to write the program in a specific programming language.
• Types of programming statements in common.
o Comments – are statements that have no effect on the program
o Declaration – define items used in the program
o Input/Output (I/O) – statements transfer data to and from the primary storage for
use by the program, as well as to and from other I/O devices.
o Computational instructions – perform arithmetic operations
o Transferring control – another type of instruction allows the sequence of
execution to be altered.
o Comparison – allow two items to be compared.
3. WRITING THE PROGRAM
• The programmer should try to incorporate the following qualities into any program:
• Documentations consists of written descriptions and explanations of program and other materials
associated with an organization’s data processing system.
• Proper program documentation serves as a guide for programmers and analysts who must
modify or update existing programs and system procedures.
TYPES OF PROGRAMMING LANGUAGE
1. Machine language – it is the only language that the computer understand. It consist only
numbers.
2. Low-level Language – are also called Assembly language and are similar to machine language.
But in contrast is much easier to understand.
3. High-level Language – enable the programmer to write programs that are more or less
independent of a particular type of computer.
EXAMPLE OF HIGH-LEVEL PROGRAMMING
LANGUAGE
• BASIC (Beginner’ All-Purpose Symbolic instruction code)
• Developed by John Kemeny and Thomas Kurts in the early 1960’s
• FORTRAN (Formula Translator)
• Oldest high-level language. Developed in mid 1960’s by John Backus
• COBOL (Common Business-Oriented language)
• Most frequently used business programming.
• PASCAL
• Language named after 17th century French mathematician Blaise Pascal
• Developed by Nicklaus Wirth of Zurich Switzerland in the late 1960’s
EXAMPLE OF HIGH-LEVEL PROGRAMMING
LANGUAGE
• C Language
• Developed by Dennis Ritchie at the Bell laboratories in 1972.
• C++ language
• During the late 1980’s until early 1990’s object-oriented programming started to become popular
• Is a powerful language and efficient programming languages today.
• Developed by Bjarned Stroustrup.
• Java
• Is the popular programming for creating applications on the Web.
• Original name was Oak, developed in December 1990 by Sun Microsystems.
INTERPRETERS AND COMPILER
• Compiler
• Is a program that translate a program written in a high-vel language (source code) and translate it into
machine language (object code).
• Interpreter
• Most common way to translate a high-level language to machine language is to compile the program; other method
is to pass the program through an interpreter.
QUESTIONS???