Every programming language provides means for combining simple ideas to form more complex ideas. These are

Primitive expressions

Means of combination

Means of abstraction

Primitive Expressions represents the simplest entities of language. Means of Combination allows combining simple ideas to form complex ideas. Naming compound elements and use them as single units can be achieved by Means of Abstraction.

Abstraction

Abstraction is an essential principle of object oriented programming. It allows programmer to hide all but relevant data about an object in order to increase efficiency and reduce complexity. In programming we deal with two kinds of elements: data and procedures. Data is the entity that we wish to manipulate and procedures are the description of the rules for manipulating the data.

Procedure Abstraction

Procedure definition is an abstraction technique by which a compound operation can be given a name and then referred to as a unit.

Consider a problem for finding the square of (a + b), where a,b are integers. Expansion of algebraic identity is

To evaluate above expression for two integers a and b mathematical operation is required to be applied is “(+ (* a a) ( * 2 a b) (* b b))” . Following program defines two procedure named ‘square’ to find square of a number and ‘eval’ to evaluate the above algebraic expression for numbers a and b .

(define (square a)

(* a a)

) (define (eval a b)(

if(and (number? a) (number? b))

(+ (square a) (* 2 a b) (square b))

(display “Enter any two integers”)

))

(eval 4 5) ; call to method

source code

So the user only need to refer to ‘eval’ with two integers instead of looking into mathematical operation to evaluate the expression. Procedure is like a black box, we just need to feed the inputs and get result as output of the procedure.