0% found this document useful (0 votes)
12 views

3 COMPUTER PROGRAMMING LANGUAGES

The document provides an overview of computer programming languages, defining programming as the process of instructing computers through artificial languages governed by syntactic and semantic rules. It categorizes programming languages into four types: functional, declarative, imperative, and object-oriented, and discusses various web and software languages, as well as the generations of programming languages from machine language to natural language. Additionally, it covers key programming concepts such as algorithms, variables, and object-oriented programming principles.

Uploaded by

Fin Ley
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

3 COMPUTER PROGRAMMING LANGUAGES

The document provides an overview of computer programming languages, defining programming as the process of instructing computers through artificial languages governed by syntactic and semantic rules. It categorizes programming languages into four types: functional, declarative, imperative, and object-oriented, and discusses various web and software languages, as well as the generations of programming languages from machine language to natural language. Additionally, it covers key programming concepts such as algorithms, variables, and object-oriented programming principles.

Uploaded by

Fin Ley
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

COMPUTER PROGRAMMING

LANGUAGES

Date : 2/2/2024
Topic : Programming Languages
Faculty : Loila Sanoria Empimo
EVSU-OCC
E mail: [email protected]
[email protected]
What is computer
programming?

• Is defined as telling a computer what to do


through a special set of instructions which are
then interpreted by the computer to perform
some tasks.
⚫ A programming language is an artificial language
that can be used to control the behavior of a
machine, particularly a computer

⚫ Programming languages, like human languages,


are defined through the use of syntactic and
semantic rules, to determine structure and
meaning respectively.
⚫ Programming languages are used to facilitate
communication about the task of organizing and
manipulating information, and to express
algorithms precisely.

⚫ For 50 years, computer programmers have been


writing code. New technologies continue to
emerge, develop, and mature at a rapid pace.
Now there are more than 2,500 documented
programming languages!
History of Programming Languages
Integrated Development
Environments

⚫ Source-code editor
⚫ Source-code management
⚫ Compiler
⚫ Interactive debugger
Visual Basic IDE
Visual C++ IDE
Computer Programming Concepts
ALGORITHM
⚫ Used extensively to arrive at a solution for a
problem
SOURCE
⚫ The actual text used to write the instructions for
a computer program
COMPILER
⚫ Translates source code into data that the
computer can understand
DATA
⚫The classification of pieces of information in a
program
VARIABLE
⚫Can store different types of data including numeric
values, single characters, and text strings
⚫The value of variable can change all throughout a
program
CONSTANT
⚫The value of a constant does not change
CONDITIONAL
⚫A set of code that will execute only if a certain
condition is true
⚫Used to test expressions and perform certain
operations accordingly
ARRAY
⚫A special type of variable used in many
programming and web languages that contains a
list of related values
LOOP
⚫A segment of code that executes repeatedly based
on a certain condition
FUNCTION
⚫A function can take parameters which will effect its
output as well as return values
⚫Prevent unnecessary redundancy because you use
them as much as needed instead of retyping some
code over and over
CLASS
⚫A template for a real world object to used in a
program
⚫Used in object-oriented programming
Four types of programming languages

⚫ Functional
◦ Lisp, ML, Scheme
◦ Good for evaluating expressions.
⚫ Declarative
◦ Prolog
◦ Good for making logical inferences.
⚫ Imperative
◦ C, Pascal, Fortran, COBOL
◦ Good at performing calculations, implementing algorithms.
⚫ Object-oriented
◦ C++, Java, C#, Visual Basic
◦ Much like imperative languages, but have support for
“communication” among objects.
The different types of languages

• Web languages
• Software languages
• The different generations of languages
• Procedure oriented programming
• Object oriented programming
Web languages

• Used for creating and editing pages on the


web

• Can do anything from putting a plain text on a


webpage, to accessing and retrieving data
from a database
Example:
HTML
⚫Hyper Text Markup Language
⚫Used to define the structure and layout of web
pages by using various tags and attributes
⚫Is static – content created with it does not change
⚫Used to specify the content a webpage will
contain, not how the page functions
XML
⚫Extensible Markup Language
⚫A language developed by the W3C which works
like HTML, but unlike HTML, allows for custom
tags that are defined by programmers
⚫Allows for the transmission of data between
applications and organizations through the use of
its customs tags
Javascript
⚫A language developed by Netscape used to
provide dynamic and interactive content on
webpages
⚫It is possible to communicate with HTML, create
animations, create calculators, validate forms, and
more
⚫Is often confused with Java, but they are two
different languages
VBScript
⚫Visual Basic Scripting Edition
⚫A language developed by Microsoft that works
only in Microsoft’s Internet Explorer web browser
⚫Used to print dates, make calculations, interact
with the user, and more
⚫Is based on Visual Basic, but it is much simpler
PHP
⚫Hypertext Preprocessor (it’s a recursive acronym)
⚫Used for many tasks such as data encryption,
database access, and form validation
⚫Was originally created in 1994 by Rasmus Lerdorf
Java
⚫A powerful and flexible language created by Sun
MicroSystems
⚫Used to create applets (a program that is executed
from within another program) that run inside
webpages as well as software applications
⚫Include interacting with the user, creating
graphical programs, reading from files, and more
Software languages

• Used for creating executable programs

• Can create anything from simple console


programs that print some text to the screen
to entire operating systems

• Vary greatly in terms of power and


complexity
C
⚫Used for software application development
⚫Originally developed by Dennis Ritchie at Bell labs
in the 1970’s and designed to be a systems
programming language
⚫Used for various software applications such as
business programs, engineering programs , and
even games
⚫The UNIX operating system is written in C
C++
⚫Descendant of the C language
⚫The difference between the two language is that
C++ is object-oriented
⚫Developed by Bjarne Stroustrup at Bell Labs
⚫Very popular language for graphical applications
Visual Basic
⚫Developed by Microsoft based on the BASIC
language
⚫Used for creating Windows applications
⚫The VBScript language (also developed by
Microsoft) is based on Visual Basic
Java
⚫A powerful and flexible language created by Sun
MicroSystems
⚫Used to create applets (a program that is executed
from within another program) that run inside
webpages as well as software applications
⚫Include interacting with the user, creating
graphical programs, reading from files, and more
Generations of Programming
Languages
First generation languages (abbreviated as 1GL)

⚫Machine language
⚫Represent the very early, primitive computer
languages that consisted of 1’s and 0’s – the actual
language that the computer understand
Second generation languages (2GL)

⚫Assembly language
⚫Represent a step up from the first generation
languages
⚫Code written in an assembly language is converted
into machine language (1GL)
Third generation languages (3GL)

⚫High-level languages such as Pascal, C, C++, COBOL,


Fortran, Java and JavaScript, among others
⚫Words and commands (instead of just symbols and
numbers) were being used
⚫Had syntax that was much easier to understand
Fourth generation languages (4GL)

⚫Scripting languages such as SQL, Applescript,


VBScript
⚫The syntax used in 4GL is very close to human
language
⚫Used to access database and include SQL and
ColdFusion, among other
Fifth generation languages (5GL)

⚫Natural language
⚫Used for neural networks
⚫A neural network is a form of artificial intelligence
that attempts to imitate how the human mind
works
Procedure-oriented
Programming
• A type of programming where a structured
method of creating programs is used
• A problem is broken up into parts and each
part is then broken up into further parts.
• All these parts are known as procedures
• They are separate but work together when
needed
• A main program centrally controls them all
Object-oriented Programming

• A type of programming where data types


representing data structures are defined by
the programmer as well as their properties
and the things that can be done with them
• Programmers can also create relationships
between data structures and create new data
types based on existing ones by having one
data type inherit characteristics from another
one
• In object-oriented programming, data types
defined by the programmer are called classes
(templates for a real world object to be used
in a program)
• For example, a programmer can create a data
type that represents a car – a car class. This
class can contain the properties of a car
(color, model, year, etc.) and functions that
specify what the car does (drive, reverse,
stop, etc.)
• Some object oriented languages include C++,
Java, and PHP
“Generations” of Programming
Languages
⚫ First Generation
◦ Machine language
⚫ Second Generation
◦ Assembly language
⚫ Third Generation
◦ “High-level” languages such as Pascal, C, COBOL, Fortran
⚫ Fourth Generation
◦ Scripting languages such as SQL, Applescript, VBScript
⚫ Fifth Generation?
◦ Natural language? Automatic code generation?
Object-oriented languages?

You might also like