You are on page 1of 10
CHAPTER 5 : PROGRAMMING 1.0 BASIC PROGRAMMING CONCEPTS 4a 1.2 Define PROGRAM and PROGRAMMING LANGUAGE. State the definition of PROGRAM. ‘A computer program is a series of step by step instructions telling the computer what to do. ‘State the definition of PROGRAMMING LANGUAGE. ‘A programming language is a set of words, symbols and codes that enables humans to communicate with computers. Programming languages are used to write computer program or develop software. Examples of programming languages are COBOL, Java, Javscript, HTML, FORTRAN, Deiphi, Visual Basic, Ada, C, C++, C#, Pascal, Ruby, Perl, BASIC, Visual Basic, Prolog and Smalltalk. LEVELS and GENERATIONS of programming languages Identify the GENERATIONS UNDER LOW-LEVEL of programming languages WITH EXAMPLES. Explanation Examples. First Machine language is a set of | Machine Generation | instructions and data that a| Language. computer's central processing unit can execute directly. Machine languages instructions use a series of binary digits (1s and Os) or ‘a combination of numbers and letters that represent binary digits. ‘Second Generation ‘Assembly language is the human- readable notation for the machine language used to control specific computer operations. An assembly language programmer writes instructions using symbolic instruction codes that are meaningful abbreviations or mnemonics. With this language, a programmer write abbreviations such an ADD for addition, CMP for compare, MUL for multiply. An assembler is a program that translates assembly language into machine language. ‘Assembly Language. Identify the GENERATIONS UNDER HIGH-LEVEL of programming languages WITH EXAMPLES, Generation Explanation Examples Third Generation The third generation of programming 3GL or procedural language uses 2 series of English-like words that are closer to human language to write instructions, h-level programming languages make complex programming simpler and easier to read, write and maintain. Program written in a high level programming language must be translated into machine language by a compiler or interpreter. BASIC LOGO ‘Smalltalk CH Pascal Java Fourth Generation The fourth generation programming nguage or = nion_ procedural Tanguage, often abbreviated as 4GL, enables users to access data in a database. SQL can be used to query data. A very high-level programming language is usually limited to a very specific application that might use syntax which is never used in other programming languages. SQL NOMAD Focus Intellect Fifth The fifth generation programming Generation | language or visual programming language is also known as natural language. Provides a visual or graphical interface, called a visual programming environment, for creating source codes. Fifth generation programming language allows people to interact with without needing any specialize knowledge. Prolog Mercury PROGRAMMING LANGUAGE APPROACHES _———— ‘Object-Oriented Approach Structured Approach 1.3 (a) Define STRUCTURED APPROACH in programming. subroutine and procedure, ‘Structured Approach is 2 computer programming techni In which the program is divided into modules like function, Examples of structured programming languages include Pascal, C (b) Define o1 ORIENTED APPROACH in programming. data and the function into a single unit, ‘Object Oriented Approach is a computer programming techniques based on the concept of an “object” that combine both Examples of object oriented programming languages include C++, Java, Visual Basic 2008, C# (©) Differentiate _ between 1 APPROACH and PROACH IN PI Structured ‘Object-Oriented down design model. paca Differences approach Structured programming rientes