Você está na página 1de 20

PROGRAMMING LANGUAGES

Generation and Levels

WHAT IS A PROGRAMMING LANGUAGE?

A programming language is used to write computer programs such as


Applications Utilities

Syntax in which computer programs are written Allows a programmer or end user to develop the sets of instructions that constitute a computer program or software

PROGRAMMING LANGUAGES

COMMON PROGRAMMING LANGUAGES


Machine Language Assembly Language SQL High level Languages Web Development

GENERATIONS OF PROGRAMMING LANGUAGES

1GL or first-generation language was (and still is) machine language or the level of instructions and data that the processor is actually given to work on (which in conventional computers is a string of 0s and 1s).

DISADVANTAGES
Programs had to be written using binary codes unique to each computer Programmers had to have detailed knowledge of the internal operations of the specific type of CPU Programming was difficult and error-prone

2GL or second-generation language is assembler (sometimes called "assembly") language. A typical 2GL instruction looks like this:

ADD 12,8

An assembler converts the assembler language statements into machine language.

CONT
Uses symbolic coded instructions which are easier to remember Programming is simplified - not necessary to know the exact storage location of data and instructions Disadvantage: Unique to specific make of computer

3GL or third-generation language is a "high-level" programming language, such as PL/I, C, or Java. Java language statements look like this:
public boolean handleEvent (Event evt) { switch (evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {

A compiler converts the statements of a specific high-level programming language into machine language. (In the case of Java, the output is called bytecode, which is converted into appropriate machine language by a Java virtual machine that runs as part of an operating system platform.) A 3GL language requires a considerable amount of programming knowledge.

HIGH LEVEL LANGUAGE


Third generation of programming languages COBOL - business applications BASIC - microcomputers FORTRAN - scientific and engineering

10

ADVANTAGES
Easier to learn and understand Statements resemble human language or standard math notations Less rigid rules, forms and syntax, so potential for error is reduced Machine-independent programs

11

DISADVANTAGES
Less efficient than assembler language programs Require a greater amount of computer time for translation into machine instructions

12

4GL or fourth-generation language is designed to be closer to natural language than a 3GL language. Less procedural and more conversational than prior languages Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this:

EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

13

ADVANTAGES
Simplify the programming process Encourage users and programmers to specify desired results Computers determine the sequence of instructions that will accomplish those results Use natural languages that impose no rigid grammatical rules

14

DISADVANTAGES
Less flexible than other languages Less efficient in terms of processing speeds and amount of storage capacity required

15

5GL or fifth-generation language is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler.

Microsoft, Borland, IBM, and other companies make 5GL visual programming products for developing applications in Java, for example. Visual programming allows you to easily envision objectoriented programming class hierarchies and drag icons to assemble program components.

16

OBJECT ORIENTED LANGUAGES

Tie data elements and the procedures, or actions that will be performed on them, together into objects
C++ Java Visual C#

17

ADVANTAGES OF OOP
Easier to use and more efficient for programming graphics-oriented user interfaces Programmed objects are reusable

18

TRANSLATORS
Assembler - Translates the symbolic instruction codes of programs written in an assembler language into machine language instructions Compiler - Translates (compiles) high-level language statements (source code) to machine language programs (object code) Interpreter - Translates and executes each program statement one line at a time, instead of first producing a complete machine language program, like compilers and assemblers do

19

LEVELS OF PROGRAMMING LANGUAGES


High Level Middle Level Low Level

20

Você também pode gostar