Summary 1
Summary 1
CHAPTER 1: Introduction
1. Main objective :
present different development processes
present language designs and systems.
2. Key concepts
presesntation of development models such as waterfall model ,
development approacges such as the incremental and iterative
approaches.
3. Language design
imperative languages : A program written in an imperative language
achieves its effect by changing the value of variables or the attributes of
objects by means of assignment state. Examples are COBOL, C++, C,
PASCAL, ADA and JAVA.
Procedural languages : centered around the definition of procedures and
many have been extended to support Object oriented programming.
Functional languages : PURE, MISP, ML
Logic languages : PROLOG
The factors that affect the development of a broad category of languages
include:
Expressive power: it includes the number of types and their associated
operations, the readability of the language. A laguage with high
expressive power enables solutions to be expressed in terms of the
problem being solved rather than in terms of computer.
Simplicity and orthogonality: allows programs to be expresses in a
concisely written manner.
Implementation : use of interpreters, compilers and virtual machines.
Error detection and correction: done through program testing ussually
not an easy task
Correctness and Standards: proving that the program satisfies the
originalspecification.
4. lexical elements : character set, identifiers and reserved words, comments,
space and line termination
The following Algol 60 program solves the problem of findlng the mean of
numbers and how many numbers are greater than the mean.
begin
comment this program finds the mean of n numbers
and the number of values greater than the mean;
integer n;
read(n);
begin
real array a [l:nl ;
integer i, number;
real sum, mean;
for i := 1 step 1 until n do
read (a[il);
sum : = 0.0;
for i : = 1 step 1 until n do
sum : = sum + alil;
mean : = sum / n;
number : = 0;
for i : = 1 step 1 until n do
if a[il > mean then
number : = number + 1;
write ("MEAN= " , mean, "NUMBER OVER MEAN =
"
, number)
end
end
1. Data items have names, references or addresses and the stored value
2.variables do have a scope which can be global or local
3. interger numbers are represented exactly in a computer while the
representation of floating point numbers is only approximate
4. most high level languages use built in character types with character
operations. Some languages treat characters as scalars eg PERL, others
manipulate them using Arrays of characters such languages are C, C+
+,PASCAL, ADA still others have whole string library class for the
manipulation of characters like JAVA.
5.Enumeration types are user-defined types used to make programs more
readable.
6.reference variables have an adress as their value, in C, C++ pointers are
used in arithmetic operations involving variables.
1. Definition
expressions are composed of two or more operands combined by an
operator.
boolean expressions are those who contain boolean type variables and
boolean type operators.
statements are the commands in a language which perform actions and
change the state.