ARE - 510 - 6 - Programming and Languages
ARE - 510 - 6 - Programming and Languages
ARE - 510 - 6 - Programming and Languages
D. Ouis
1st semester 2015
Programs and Programming
What exactly is programming?
Many people think of it as simply typing words into a
computer.
What Is a Program?
A program is a list of instructions for the computer to follow
to accomplish the task of processing data into information.
Programming
1. Program specification:
Determine the program‟s
objectives, outputs, inputs,
and processing requirements. are determined.
Programming
5 items:
(1) the program‟s objectives, (2) the desired output, (3) the
input data required, (4) the processing requirements, and (5)
the documentation.
Step 1: Program Specification
Variables
Commands/Syntax (the way commands are
structured)
Loops
Decisions
Functions
ACTIVITY
g.c.d.
(30, 72)
=
2∙3=6
Here are some examples of an instruction to print the
word HI:
o Logo PR [HI]
o JavaScript alert(“HI”);
o FORTRAN PRINT “HI”
o BASIC PRINT “HI”
o COBOL DISPLAY „HI‟.
o C++ printf(“HI”);
o Pascal WRITELN(„HI‟);
o Assembly XPRNT MESSAGE1
Language MESSAGE1 DC „HI‟
Set of commands that a computer has been “taught” to
understand.
Example of a code
written in 2 different
versions of FORTRAN
Some programming languages (like Java or C++)
require the code to be compiled (translated to binary)
before it can be started.
Operations
Operations activities concern locating and correcting
operational errors, making programs easier to use.
Changing Needs
Programs must change following needs. E.g. new tax laws,
new maps, and new company policies.
CASE and OOP
E.g. C++
Generations of Programming Languages