Date post: | 04-Apr-2018 |
Category: |
Documents |
Upload: | blackspearman |
View: | 225 times |
Download: | 0 times |
of 20
7/29/2019 Programming_Languages Finals
1/20
PROGRAMMING LANGUAGESGeneration and Levels1
7/29/2019 Programming_Languages Finals
2/20
WHATISAPROGRAMMINGLANGUAGE?
A programming language is used to write computerprograms such as
Applications
Utilities
Syntax in which computer programs are written
Allows a programmer or end user to develop thesets of instructions that constitute a computerprogram or software
2
http://cplus.about.com/od/introductiontoprogramming/g/program.htmhttp://cplus.about.com/od/glossar1/g/applicationdefn.htmhttp://cplus.about.com/od/glossar1/g/utilitydefn.htmhttp://cplus.about.com/od/glossar1/g/utilitydefn.htmhttp://cplus.about.com/od/glossar1/g/applicationdefn.htmhttp://cplus.about.com/od/introductiontoprogramming/g/program.htm7/29/2019 Programming_Languages Finals
3/20
PROGRAMMING LANGUAGES
3
7/29/2019 Programming_Languages Finals
4/20
COMMON PROGRAMMING LANGUAGES
MachineLanguage
AssemblyLanguage
SQL
High levelLanguages
WebDevelopment
4
7/29/2019 Programming_Languages Finals
5/20
GENERATIONSOF PROGRAMMINGLANGUAGES
1GL or first-generation language was (and still is)machine languageor the level of instructions anddata that the processor is actually given to work on(which in conventional computers is a string of 0s
and 1s).
5
7/29/2019 Programming_Languages Finals
6/20
DISADVANTAGES
Programs had to be written using binary codesunique to each computer
Programmers had to have detailed knowledge ofthe internal operations of the specific type of CPU
Programming was difficult and error-prone
6
7/29/2019 Programming_Languages Finals
7/20
2GL or second-generation language is assembler(sometimes called "assembly") language. A typical2GL instruction looks like this:
ADD 12,8
An assembler converts the assembler language statementsinto machine language.
7
7/29/2019 Programming_Languages Finals
8/20
CONT
Uses symbolic coded instructions which are easierto remember
Programming is simplified - not necessary to knowthe exact storage location of data and instructions
Disadvantage:Unique to specific make of computer
8
7/29/2019 Programming_Languages Finals
9/20
3GL or third-generation language is a "high-level"programming language, such as PL/I, C, or Java. Javalanguage 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-levelprogramming language into machine language. (In the case of Java,the output is called bytecode, which is converted into appropriatemachine language by a Java virtual machine that runs as part of anoperating system platform.) A 3GL language requires a considerableamount of programming knowledge.
9
7/29/2019 Programming_Languages Finals
10/20
HIGH LEVEL LANGUAGE
Third generation of programming languages
COBOL - business applications
BASIC - microcomputers
FORTRAN - scientific and engineering
10
7/29/2019 Programming_Languages Finals
11/20
ADVANTAGES
Easier to learn and understand
Statements resemble human language or standardmath notations
Less rigid rules, forms and syntax, so potential forerror is reduced
Machine-independent programs
11
7/29/2019 Programming_Languages Finals
12/20
DISADVANTAGES
Less efficient than assembler language programs
Require a greater amount of computer time fortranslation into machine instructions
12
7/29/2019 Programming_Languages Finals
13/20
4GL or fourth-generation language is designed tobe closer to natural language than a 3GL language.
Less procedural and more conversational than priorlanguages
Languages for accessing databases are oftendescribed as 4GLs. A 4GL language statementmight look like this:
EXTRACT ALL CUSTOMERS WHERE "PREVIOUS
PURCHASES" TOTAL MORE THAN $1000
13
7/29/2019 Programming_Languages Finals
14/20
ADVANTAGES
Simplify the programming process
Encourage users and programmers to specifydesired results
Computers determine the sequence of instructionsthat will accomplish those results
Use natural languages that impose no rigidgrammatical rules
14
7/29/2019 Programming_Languages Finals
15/20
DISADVANTAGES
Less flexible than other languages
Less efficient in terms of processing speeds andamount of storage capacity required
15
7/29/2019 Programming_Languages Finals
16/20
5GL or fifth-generation language is programming thatuses a visual or graphical development interface tocreate source language that is usually compiled with a
3GL or 4GL language compiler.
Microsoft, Borland, IBM, and other companies make 5GL visualprogramming products for developing applications in Java, forexample. Visual programming allows you to easily envision object-
oriented programming class hierarchies and drag icons to assembleprogram components.
16
7/29/2019 Programming_Languages Finals
17/20
OBJECT ORIENTED LANGUAGES
Tie data elements and the procedures, or actionsthat will be performed on them, together intoobjects
C++
Java
Visual C#
17
7/29/2019 Programming_Languages Finals
18/20
ADVANTAGESOF OOP
Easier to use and more efficient for programminggraphics-oriented user interfaces
Programmed objects are reusable
18
7/29/2019 Programming_Languages Finals
19/20
TRANSLATORS
Assembler-Translates the symbolic instructioncodes of programs written in an assemblerlanguage into machine language instructions
Compiler - Translates (compiles) high-levellanguage statements (source code) to machine
language programs (object code)
Interpreter-Translates and executes eachprogram statement one line at a time, instead of
first producing a complete machine languageprogram, like compilers and assemblers do
19
7/29/2019 Programming_Languages Finals
20/20
LEVELSOF PROGRAMMING LANGUAGES
High Level
Middle Level
Low Level
20