1 / 19

Unit 05 – Programming Concepts

Unit 05 – Programming Concepts. 5.1 Introduction to Programming 5.2 Algorithms 5.3 Introduction to VB 5.4 Data types and Operators 5.5 Control Structures 5.6 Data input / output 5.7 Arrays 5.8 Sub Routines 5.9 Database Handling. End Show. IT Department - National Institute of Education.

quant
Download Presentation

Unit 05 – Programming Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unit 05 – Programming Concepts 5.1 Introduction to Programming5.2 Algorithms5.3 Introduction to VB5.4 Data types and Operators5.5 Control Structures5.6 Data input / output5.7 Arrays5.8 Sub Routines5.9 Database Handling End Show IT Department - National Institute of Education

  2. Introduction to Programming End Show IT Department - National Institute of Education

  3. IT Department - National Institute of Education R.P Ranjan-Lecturer, SPICTEC, Galle. W.M.A.S . Wijesekara-Centre manager,CRC Hali-Ela H.P.U.S Indra Kumara-Instructor,CRC Hanguranketha R.M.P Bandara-Lecturer,CPICTEC Gurudeniya K.M.P.U Wimalaweera-Instructor,CRC Polonnaruwa Resource Team End Show IT Department - National Institute of Education

  4. What is a computer program? • A computer program is a set of instructions or commands, which tell the computer what to do. • A computer language is a set of symbols and rules used in constructing programs. • Computer languages are used to develop application programs IT Department - National Institute of Education

  5. Cont…. • The machine can understand only the machine language. • Assembly and other high level languages are not machine language. • To transform these languages into machine language, translators are needed. Translator Source Code Object Code IT Department - National Institute of Education

  6. 1st Generation Low Level Language 2nd Generation Computer Language 3rd Generation High Level Language 4th Generation 5th Generation Classification of Programming Languages End Show IT Department - National Institute of Education

  7. Generation of programming languages • 1st Generation language ( 1GL ) • 2nd Generation languages( 2GL ) • 3rd Generation languages ( 3GL ) • 4th Generation languages ( 4GL ) • 5th Generation languages ( 5GL ) IT Department - National Institute of Education

  8. 1st Generation language ( 1GL ) • Machine level programming language • Machine code is the binary digit language • It consists of 1s and 0s. • The machine can directly execute the machine code • Execution is speedy because no translators are used. • It is very difficult to write and modify programs. • It is machine dependant, because machine-language instructions vary according to computer architecture. • It is a low level language IT Department - National Institute of Education

  9. 2nd Generation languages( 2GL ) • Assembly language is used • Assembler is used to convert assembly language to machine language • Mnemonics and variables are used to write codes • It is a machine dependant language • Difficult to write and modify programs • It is a low level language • Execution is fast IT Department - National Institute of Education

  10. 3rd Generation languages ( 3GL ) • It is easy to understand, because it is similar to human languages • Translators are used to convert high level language to machine language • Compilers or interpreters are used as translators. • Some of the 3rd generation languages are unstructured languages such as Basic • It is easy write and modify programs IT Department - National Institute of Education

  11. 3rd Generation languages ( 3GL ) • many of the third generation languages are procedural languages because the program instructions comprise a list of steps or procedures • They are not machine dependent languages • One instruction in a third generation language can replace many assembly language instructions • programmer has to describe how it should be done. • Ex : Basic, Fortran, Cobol, Pascal IT Department - National Institute of Education

  12. 4th Generation languages ( 4GL ) • Introduced in the late 1980s • They are designed to reduce programming effort • It consumes less time to write a program • They are non procedural languages • Very easy to write and modify • One instruction in 4GL can replace a number of 3GL instructions • Programmer has to describe what is to be done. • 4GL languages reduce software development cost. • They are described as application development without programmers • Ex : FOCUS, IDEAL, dbase III plus IT Department - National Institute of Education

  13. 5th Generation languages ( 5GL ) • Introduced in the early 1990s • User-friendly Graphical User Interfaces are facilitated. • Very easy to write and modify program • Execution speed is low • Event driven programs were introduced • Ex: Visual basic, Visual C++, Small Talk IT Department - National Institute of Education

  14. Low Level Languages • First and second generation languages are considered low level languages. • They are machine dependant languages • These languages are close to the hardware • The programmer should have hardware knowledge to write a program • Productivity is low IT Department - National Institute of Education

  15. High Level Languages • 3GL,4GL and 5GL are considered high level languages • They are machine independent languages • It is easy to write and modify • The programmer does not need knowledge of hardware to write programs • Productivity is high • Consume less time to write programs • 5GL allow user-friendly facilities • Translators need to be used to convert to machine language IT Department - National Institute of Education

  16. Translators Translator is used to convert source code into object code. these are of three types 1.Assembler 2.Interpreter 3.Compiler Translator Source Code Object Code IT Department - National Institute of Education

  17. Assembler • is a low-level language Translator. • is a software program that converts assembly language into machine language. • converts mnemonics into machine code IT Department - National Institute of Education

  18. Interpreter • is a translator that goes through the process of translation every time the program is run. • is found running some versions of BASIC, where it translates one line of the program at a time. IT Department - National Institute of Education

  19. Compiler • is a translator of high level languages • converts a whole program into machine language at once • translates source code into Object Code. This Object code is used to execute whenever it is run • Recompiling required if any changes of source code IT Department - National Institute of Education

More Related