You are on page 1of 16

CHAPTER 6

PROGRAMMING LANGUAGE

-What is Programming Language


- Generation of Programming
Language
-Example of Programming
Language

Ahmad Mujahid Ubaidillah Bin Zakaria


FIS
mujahid@mahsa.edu.my
LEARNING OBJECTIVES
Explain how programmers define a
problem, plan the solution, and then code,
test, and document the program
List and describe the levels of
programming languages, machine,
assembly, high level, very high level and
natural
Describe the major programming
languages that are use today
Explain the concepts of object-oriented
programming
WHAT IS PROGRAMMING LANGUAGE

A computer program is a series of instructions that


directs a computer to perform tasks. A computer
programmer, sometimes called a developer, writes and
modifies computer programs.
To write a programs instructions, programmers often
use a programming language is a set of words,
symbols, and codes that enables a programmer to
communicate instructions to a computer. Just as
humans speak a variety of languages, programmers
use a variety of programming languages and tools to
write, or code, a program.
A vocabulary and set of grammatical rules for
instructing a computer to perform specific tasks. The
term programming language usually refers to high-
level languages, such as BASIC, C, C++, COBOL,
FORTRAN, Ada, and Pascal. Each language has a
unique set of keywords (words that it understands)
and a special syntax for organizing program
instructions. High-level programming languages,
while simple compared to human languages, are more
complex than the languages the computer actually
understands, called machine language. Each different
type of CPU has its own unique machine language.
Lying between machine languages and high-level
languages are languages called assembly languages.
Assembly languages are similar to machine
languages, but they are much easier to program in
because they allow a programmer to substitute names
for numbers. Machine languages consist of numbers
only.
Lying above high-level languages are
languages called fourth-generation languagess
(usually abbreviated 4GL). 4GLs are far
removed from machine languages and
represent the class of computer languages
closest to human languages.
Regardless of what language you use, you
eventually need to convert your program into
machine language so that the computer can
understand it. There are two ways to do this:
-compile the program
-interpret the program
The process of developing a program is
similar to any problem-solving task.
There are five main steps in the
programming process.
1. Defining the problem
2. Planning the solution
3. Coding the program
4. Testing the program
5. Documenting the program
1ST GENERATION LANGUAGE
(1GL) MACHINE-LEVEL
Low level language
Use concept 1 and 0
is a Originally, no translator was used to
compile or assemble
The main benefit of programming in a first-
generation programming language is that the
code a user writes can run very fast and
efficiently, since it is directly executed by the
CPU
However, machine language is a lot more
difficult to learn than higher generational
programming languages, and it is far more
difficult to edit if errors occur.
2ND GENERATION LANGUAGE
(2GL)ASSEMBLY LANGUAGE
Low level language
Use mnemonic code eg: A-ADD, C-
COMPARE and MP-MULTIPLY
Need converter to transfer from 2nd GL to
1st GL
To run on a computer it must be converted
into a machine readable form, a process
called assembly.
The language is specific to a particular
processor family and environment.
sometimes used in kernels and device
drivers
3RD GENERATION LANGUAGE
(3GL) HIGH LEVEL LANGUAGE
is a refinement of a 2nd GL
aims to refine the usability of the language in
such a way to make it more user friendly.
This could mean restructuring categories of
possible functions to make it more efficient,
condensing the overall bulk of code via classes
(eg. Visual Basic).
First introduced in the late 1950s, Fortran,
ALGOL and COBOL are early examples of this
sort of language.
Most "modern" languages (BASIC, C, C++, C#,
Pascal, and Java) are also third-generation
languages.
Most 3GLs support structured programming.
4TH GENERATION LANGUAGE
(4GLS) HIGH LEVEL LANGUAGE
very high level language
was first used formally by James Martin in his 1982 book to refer
to non-procedural, high-level specification languages
Use SQL, having pathname
are designed to build specific programs,
The motivations for the '4GL' inception and continued interest are
several. The term can apply to a large set of software products. It
can also apply to an approach that looks for greater semantic
properties and implementation power.
In a sense, the 4GL is an example of black box' processing, each
generation is further from the machine
It is this latter nature that is directly associated with 4GL having
errors that are harder, in many cases, to debug. In terms of
applications, a 4GL could be business oriented or it could deal
with some technical domain. Being further from the machine
implies being closer to domain.
5TH GENERATION LANGUAGE
(5GL) LANGUAGE
based around solving problems using constraints given to the program,
rather than using an algorithm written by a programmer.
Most constraint-based and logic programming languages and some
declarative languages
designed to make the computer solve a given problem without the
programmer. This way, the programmer only needs to worry about what
problems need to be solved and what conditions need to be met, without
worrying about how to implement a routine or algorithm to solve them.
mainly used in artificial intelligence research. eg: Prolog, OPS5, and
Mercury
These types of languages were also built upon Lisp, many originating on the
Lisp, such as ICAD. Then, there are many frame languages, such as KL-
ONE.
In the 1990s, fifth-generation languages were considered to be the wave of
the future, and some predicted that they would replace all other languages
for system development, with the exception of low-level languages.Most
notably, from 1982 to 1993 Japan put much research and money into their
5GL computer systems project, hoping to design a massive computer
network of machines using these tools.
Today, fifth-generation languages have lost part of their initial appeal and
are mostly used in academic circles.
Example programming languages

COBOL
Common Business-Oriented Language.
Designed for business applications.

Especially is useful for processing transactions, such


as payroll and billing, on mainframe computers.
C PROGRAMMING
Was designed for writing system software.
Includes operating systems and application
software such as word processing and
spreadsheet programs
Powerful languages that requires professional
programming skills.
Use for business and scientific problems
Runs on almost any type of computer with
any operating system, but it is used most
often with the UNIX operating system.
OBJECT-ORIENTED PROGRAMMING
Known as OOP
Implement an object-oriented design
Provides a user-friendly environment for
building programs often is called a program
development tool.
Benefit of OOP is the ability to reuse and
modify existing objects.
OOP is event driven
Event is an action to which the program
responds
TOOLS FOR INTERACTIVITY AND ACTIVE CONTENT

CGI ( COMMON GATEWAY INTERFACE )


CGI is a set of standards for communication between a browser and a program
running on a server that allows for interaction between the user and the server

ASP ( ACTIVE SERVER PAGES )


A proprietary software development tool that enables programmers using
Microsofts IIS package to build dynamic pages

JAVA
JAVA is a programming language that allows programmers to create interactivity
and active content on the client computer, thereby saving considerable load on
the server
JAVA SERVER PAGES(JSP)
JSP is like CGI and ASP, a Web page coding standard that allows developers to
dynamically generate Web pages in response to user requests

JAVASCRIPT
JavaScript is a programming language invented by Netscape that is used to
control the objects on an HTML page and handle interactions with the browser

ACTIVEX AND VBSCRIPT


ActiveX is a programming language created by Microsoft to compete with Java
VBScript is a programming language invented by Microsoft to compete with
JavaScript

COLDFUSION
ColdFusion is an integrated server-side environment for developing interactive
Web applications. Originally developed by Macromedia and now offered by
Adobe, ColdFusion combines an intuitive tag-based scripting language and a
tag-based server scripting language (CFML) that lowers the cost of creating
interactive features. ColdFusion offers a powerful set of visual design,
programming, debugging, and deployment tools

You might also like