SlideShare a Scribd company logo
1 of 20
Download to read offline
DFC1023
PROBLEM SOLVING & PROGRAM DESIGN
C H A P T E R 1
I N T R O D U C T I O N T O P R O G R A M M I N G
L A N G U A G E ( 1 W E E K )
AT THE END OF THIS CHAPTER, STUDENTS SHOULD
BE ABLE TO:
1. Discuss the Evolution of programming language
 History of programming languages
 Various categories of programming languages
2. Describe fundamentals of programming languages
 Terminologies in programming: programmer, program and
programming.
 Language translator : Assembler, compiler and translator.
 Relate the programming language application in real life.
HISTORY OF PROGRAMMING LANGUAGE
 Programming Language - A set of rules and reserved
words (keywords) that can be used to tell a computer
what are the operations to be done.
 Artificial language composed by a fixed vocabulary and
set of rules is used to create instructions for the
computer to follow.
 Now, there are over 200 programming languages in
the world.
 For example: Cobol, Pascal, C, C++, JAVA and Fortran.
HISTORY OF PROGRAMMING LANGUAGE
CATEGORIES OF PROGRAMMING LANGUAGE
First Generation Language (Machine Languages)
The lowest level of language.
Uses 1s and Os / binary digits to represents data and instructions
Examples: 0 represents “off” and 1 represents “on”.
The only language that the computer could understand (does not
require translator).
Advantage
• The computer processes the instructions in
machine language very quickly.
Disadvantages
• Programmers must have knowledge of the machine
hardware and its configuration.
• Programmer needs to remember a number of
binary codes to write machine language programs.
• Machine language programs are very difficult to
debug.
CATEGORIES OF PROGRAMMING LANGUAGE
• First Generation Language (Machine Languages)
CATEGORIES OF PROGRAMMING LANGUAGE
Second Generation Language (Assembly Languages)
Known as symbolic language.
It uses mnemonic codes - a symbol chosen to help user to remember
replace “0” and “1”
For example, A represented ADD and S represented SUM
Computer does not understand the language so it needs an assembler to
translate the program to machine language.
Advantages
• It is easy for programmers to remember the
alphanumeric codes than the binary codes.
• Debugging is very easier when compared to
machine language.
Disadvantage
The major disadvantage is that, it is machine
dependent.
CATEGORIES OF PROGRAMMING LANGUAGE
Second Generation Language (Assembly Languages)
CATEGORIES OF PROGRAMMING LANGUAGE
3rd Generation Languages
 It is called a procedural language.
 Translation is done by compiler / interpreter.
 Example: C, C++, FORTRAN, COBOL and BASIC.
Example: Program in
Basic to compute
the average of three
numbers.
‘BASIC PROGRAM
‘AVERAGING THREE INTEGERS
PRINT “Mengira Purata”
PRINT “---------------------“
PRINT “Nilai A = “; 20
PRINT “Nilai B = “; 30
PRINT “Nilai C = “; 40
PRINT “Purata tiga nombor ialah “;
(20+30+40)/3
END
Advantages
•Easier to learn and understand than an assembler
language as instructions (statements) that resemble
human language or the standard notation of
mathematics.
•Have less-rigid rules, forms, and syntaxes, so the potential
for error is reduced.
Disadvantages
Less efficient than assembler language programs
and require a greater amount of computer time for
translation into machine instructions.
CATEGORIES OF PROGRAMMING LANGUAGE
3rd Generation Language (Assembly Languages)
CATEGORIES OF PROGRAMMING LANGUAGE
4th Generation Languages
 Program is written in English-like statements.
 It is a short programming language where the operation needs a
few lines instead of hundreds of lines.
 It is a non-procedural language.
 Known as query language, which can be used to retrieve data
from database.
 Example: PROLOG, FOCUS, LISP and SQL.
Advantages:
a. Result-oriented where they emphasize on
what instead of how.
b. It is simpler and easier, so programmers
and non-programmers can use this
language with minimum training.
Create table order
( OWNERID INTEGER NOT NULL,
ITEM CHAR (40) NOT NULL);
SQL Language
CATEGORIES OF PROGRAMMING LANGUAGE
 5th Generation Languages
 A programming language that resembles human language.
 Known as knowledge-based language.
 Translates human instructions into code (machine
language) where a computer can understand.
 The use of a natural language to
access knowledge base is called
knowledge-based system.
 Example: Expert system that stores
knowledge of an expert. For
example, expertise of a doctor or
engineer.
Advantages
• Programs are almost machine-independent.
• It is not necessary for the programmer to have
knowledge about computer hardware.
• It is very easy to learn and write programs in high-
level languages.
Disadvantages
Programs written in high-level languages are
slower in execution than the programs written
using low-level languages.
CATEGORIES OF PROGRAMMING LANGUAGE
5th Generation Language
TERMINOLOGIES IN PROGRAMMING
 Programmer is a person who writes the
program.
 Program is a set of step-by-step instructions that
directs a computer to perform a specific task
and to produce the required results.
 Programming is a process of designing /
creating a program.
LANGUAGE TRANSLATORS
A translator is a program that:
 Checks syntax of a program to ensure the programming
language is used correctly, by giving you the syntax-error
messages, which is known as diagnostics.
 Produces descriptive error messages known as syntax-
error to programmer if there are errors in the programs.
 Translates a program into language that the computer can
understand.
LANGUAGE TRANSLATORS
 Syntax – set of rules to be followed when writing a
program, these rules are similar to the grammatical rules
in English.
 Syntax Error – error in the use of a programming
language.
 Example in C: Statement: clrscr()
If semicolon (;) is not placed after statement, a
message will display:
“Error DIT103.CPP: Declaration syntax- error”
 The correct syntax is: clrscr();
TYPES OF TRANSLATOR
1. Assembler
•Translates the whole program at one time.
•Also called assembler program.
•A program, which is used to convert assembly language to
machine language.
TYPES OF TRANSLATOR
2. Compiler
Translate the whole program at one time.
Translates the source code, for example COBOL language to
machine language.
Used to translate C, COBOL and other language.
TYPES OF TRANSLATOR
3. Interpreter
o Program that translates a high level language to machine
language.
o It translates one line at a time and executes each line
after it is translated.
o Displays feedback as the error occurred.
o Used to translate BASIC and SQL language.
POLITEKNIK MALAYSIA

More Related Content

What's hot

Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' program
Sahithi Naraparaju
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
Vasavi College of Engg
 

What's hot (20)

00 Prontuario inge 3016
00 Prontuario inge 301600 Prontuario inge 3016
00 Prontuario inge 3016
 
Week10 final
Week10 finalWeek10 final
Week10 final
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
 
introduction to programming
introduction to programmingintroduction to programming
introduction to programming
 
An introduction-to-programming
An introduction-to-programmingAn introduction-to-programming
An introduction-to-programming
 
Graphical programming
Graphical programmingGraphical programming
Graphical programming
 
Mcs lec2
Mcs lec2Mcs lec2
Mcs lec2
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
 
18CSS101J PROGRAMMING FOR PROBLEM SOLVING
18CSS101J PROGRAMMING FOR PROBLEM SOLVING18CSS101J PROGRAMMING FOR PROBLEM SOLVING
18CSS101J PROGRAMMING FOR PROBLEM SOLVING
 
Programming for problem solving ppts unit 1
Programming for problem solving ppts unit 1Programming for problem solving ppts unit 1
Programming for problem solving ppts unit 1
 
Code: from Procedural to Object Oriented
Code: from Procedural to Object OrientedCode: from Procedural to Object Oriented
Code: from Procedural to Object Oriented
 
Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' program
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 

Similar to POLITEKNIK MALAYSIA

Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
Suneel Dogra
 

Similar to POLITEKNIK MALAYSIA (20)

Lec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there studyLec21&22.pptx programing language and there study
Lec21&22.pptx programing language and there study
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacion
 
Lecture_1_Introduction_to_Programming.pptx
Lecture_1_Introduction_to_Programming.pptxLecture_1_Introduction_to_Programming.pptx
Lecture_1_Introduction_to_Programming.pptx
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
computer languages
computer languagescomputer languages
computer languages
 
Introduction Programming Languages
Introduction Programming LanguagesIntroduction Programming Languages
Introduction Programming Languages
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
 
INTRO. TO PROG.pptx
INTRO. TO PROG.pptxINTRO. TO PROG.pptx
INTRO. TO PROG.pptx
 
Computer languages 11
Computer languages 11Computer languages 11
Computer languages 11
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
 
Rajesh ppt
Rajesh pptRajesh ppt
Rajesh ppt
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
rajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdfrajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdf
 
Computer languages
Computer languagesComputer languages
Computer languages
 
10 lesson7
10 lesson710 lesson7
10 lesson7
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 

More from Aiman Hud

More from Aiman Hud (20)

POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 

Recently uploaded

Recently uploaded (20)

WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 

POLITEKNIK MALAYSIA

  • 1. DFC1023 PROBLEM SOLVING & PROGRAM DESIGN C H A P T E R 1 I N T R O D U C T I O N T O P R O G R A M M I N G L A N G U A G E ( 1 W E E K )
  • 2. AT THE END OF THIS CHAPTER, STUDENTS SHOULD BE ABLE TO: 1. Discuss the Evolution of programming language  History of programming languages  Various categories of programming languages 2. Describe fundamentals of programming languages  Terminologies in programming: programmer, program and programming.  Language translator : Assembler, compiler and translator.  Relate the programming language application in real life.
  • 3. HISTORY OF PROGRAMMING LANGUAGE  Programming Language - A set of rules and reserved words (keywords) that can be used to tell a computer what are the operations to be done.  Artificial language composed by a fixed vocabulary and set of rules is used to create instructions for the computer to follow.  Now, there are over 200 programming languages in the world.  For example: Cobol, Pascal, C, C++, JAVA and Fortran.
  • 5. CATEGORIES OF PROGRAMMING LANGUAGE First Generation Language (Machine Languages) The lowest level of language. Uses 1s and Os / binary digits to represents data and instructions Examples: 0 represents “off” and 1 represents “on”. The only language that the computer could understand (does not require translator).
  • 6. Advantage • The computer processes the instructions in machine language very quickly. Disadvantages • Programmers must have knowledge of the machine hardware and its configuration. • Programmer needs to remember a number of binary codes to write machine language programs. • Machine language programs are very difficult to debug. CATEGORIES OF PROGRAMMING LANGUAGE • First Generation Language (Machine Languages)
  • 7. CATEGORIES OF PROGRAMMING LANGUAGE Second Generation Language (Assembly Languages) Known as symbolic language. It uses mnemonic codes - a symbol chosen to help user to remember replace “0” and “1” For example, A represented ADD and S represented SUM Computer does not understand the language so it needs an assembler to translate the program to machine language.
  • 8. Advantages • It is easy for programmers to remember the alphanumeric codes than the binary codes. • Debugging is very easier when compared to machine language. Disadvantage The major disadvantage is that, it is machine dependent. CATEGORIES OF PROGRAMMING LANGUAGE Second Generation Language (Assembly Languages)
  • 9. CATEGORIES OF PROGRAMMING LANGUAGE 3rd Generation Languages  It is called a procedural language.  Translation is done by compiler / interpreter.  Example: C, C++, FORTRAN, COBOL and BASIC. Example: Program in Basic to compute the average of three numbers. ‘BASIC PROGRAM ‘AVERAGING THREE INTEGERS PRINT “Mengira Purata” PRINT “---------------------“ PRINT “Nilai A = “; 20 PRINT “Nilai B = “; 30 PRINT “Nilai C = “; 40 PRINT “Purata tiga nombor ialah “; (20+30+40)/3 END
  • 10. Advantages •Easier to learn and understand than an assembler language as instructions (statements) that resemble human language or the standard notation of mathematics. •Have less-rigid rules, forms, and syntaxes, so the potential for error is reduced. Disadvantages Less efficient than assembler language programs and require a greater amount of computer time for translation into machine instructions. CATEGORIES OF PROGRAMMING LANGUAGE 3rd Generation Language (Assembly Languages)
  • 11. CATEGORIES OF PROGRAMMING LANGUAGE 4th Generation Languages  Program is written in English-like statements.  It is a short programming language where the operation needs a few lines instead of hundreds of lines.  It is a non-procedural language.  Known as query language, which can be used to retrieve data from database.  Example: PROLOG, FOCUS, LISP and SQL. Advantages: a. Result-oriented where they emphasize on what instead of how. b. It is simpler and easier, so programmers and non-programmers can use this language with minimum training. Create table order ( OWNERID INTEGER NOT NULL, ITEM CHAR (40) NOT NULL); SQL Language
  • 12. CATEGORIES OF PROGRAMMING LANGUAGE  5th Generation Languages  A programming language that resembles human language.  Known as knowledge-based language.  Translates human instructions into code (machine language) where a computer can understand.  The use of a natural language to access knowledge base is called knowledge-based system.  Example: Expert system that stores knowledge of an expert. For example, expertise of a doctor or engineer.
  • 13. Advantages • Programs are almost machine-independent. • It is not necessary for the programmer to have knowledge about computer hardware. • It is very easy to learn and write programs in high- level languages. Disadvantages Programs written in high-level languages are slower in execution than the programs written using low-level languages. CATEGORIES OF PROGRAMMING LANGUAGE 5th Generation Language
  • 14. TERMINOLOGIES IN PROGRAMMING  Programmer is a person who writes the program.  Program is a set of step-by-step instructions that directs a computer to perform a specific task and to produce the required results.  Programming is a process of designing / creating a program.
  • 15. LANGUAGE TRANSLATORS A translator is a program that:  Checks syntax of a program to ensure the programming language is used correctly, by giving you the syntax-error messages, which is known as diagnostics.  Produces descriptive error messages known as syntax- error to programmer if there are errors in the programs.  Translates a program into language that the computer can understand.
  • 16. LANGUAGE TRANSLATORS  Syntax – set of rules to be followed when writing a program, these rules are similar to the grammatical rules in English.  Syntax Error – error in the use of a programming language.  Example in C: Statement: clrscr() If semicolon (;) is not placed after statement, a message will display: “Error DIT103.CPP: Declaration syntax- error”  The correct syntax is: clrscr();
  • 17. TYPES OF TRANSLATOR 1. Assembler •Translates the whole program at one time. •Also called assembler program. •A program, which is used to convert assembly language to machine language.
  • 18. TYPES OF TRANSLATOR 2. Compiler Translate the whole program at one time. Translates the source code, for example COBOL language to machine language. Used to translate C, COBOL and other language.
  • 19. TYPES OF TRANSLATOR 3. Interpreter o Program that translates a high level language to machine language. o It translates one line at a time and executes each line after it is translated. o Displays feedback as the error occurred. o Used to translate BASIC and SQL language.