Uploaded by sivaniss murugaiah

1.0 Programming

advertisement
Definition of Programme
Programming
• refers to the act of instructing the
computer to do something for us with the
help of programming language.
• A computer program is a series of
instructions that directs a computer to
perform tasks.
Definition of
Programming language
Programming Language
• a set of words, abbreviations, and
symbols that enables a programmer to
communicate instructions to a computer
Role of a
Computer Programmer
A Computer Programmer / Developer
• Creates and modifies computer programs.
• To create a program, programmers need to
write/code a program’s instructions
using a programming language.
• Other times, they use a program
development tool to create a program.
Programming languages
• Several hundred programming languages exist
today.
• Each language has its own rules for writing
the instructions.
• Languages are designed for specific
purposes, such as scientific applications,
business solution, or Web page development.
• Programmers use more than one language to
solve a problem; which is they integrate the
languages.
Level of Programming Language
1)
• Known as the first
programming language
generation
• Consists of binary numbers (0 and 1)
• In computer electrical state : 0  “OFF”
 1  “ON”
of
Continue..
1)
• All other languages must be translated into
machine language before executing
instructions.
• Coding in machine language is too long, slow
and time-consuming.
Continue..
The combination of bits (0s
and 1s) is unique for each
character in the ASCII coding
schemes.
1)
Decimal Value
Binary Value
Decimal Value
Binary Value
0
0000
7
0111
1
0001
8
1000
2
0010
9
1001
3
0011
10
1010
4
0100
11
1011
5
0101
12
1100
6
0110
13
1101
Level of Programming Language
2)
• considered as very low level language, the
second generation of programming languages
• use mnemonic / operand codes,
abbreviations as an instruction codes
eg :
 A for add,
 C for compare,
 MP for multiply
Continue..
2)
• Difficult to learn
• Must convert an assembly language program
into machine language before the computer
run the program
• Today, this languages primarily are used to
increase the performance of critical tasks or
to control hardware.
Continue..
2)
Continue..
2)
Level of Programming Language
3)
• Known as procedural language, often called
as a third – generation language (3GL)
• Programmers uses a series of English-like
words to write instructions to tell the
computer what to accomplish and how to do it.
• Programmers no need to remember the
machine language to produce a program
Continue..
3)
• Closer to human language
• Easy to understand and detect the errors
• Programmers use either a compiler or an
interpreter to perform the translation
• A compiler is a separate program that
converts the entire source program into
machine language before executing it.
Continue..
3)
• Process of interpreting a program
Level of Programming Language
4)
• Often known as fourth generation language
(4 GLs)
• This programming language is an
improvement of high-level language
• A non-procedural language that enables
programmers to access data in a database.
4)
• Programmers
writes
English-like
instructions or interact with a graphical
environment to retrieve data from files / a
database.
• Non-procedural language are easier to use
than procedural language.
• One popular 4GLs is SQL, is a query
language that allows users to manage, update
and retrieve data in a relational DBMS.
Level of Programming Language
5)
• called the fifth generation language
• This language is similar to the “natural”
spoken or written English Language
• The natural language translates human
instructions into code that the computer can
understand and execute
5)
• Programmers use an object-oriented
programming
(OOP) language to
implement an object-oriented design
• an object is an item that contains both data
and the procedures that read / manipulate the
data
• Major benefit of OOP is the ability to reuse
and modify existing objects.
• Programmers create applications faster
because the design programs using existing
objects.
jvg
•
•
•
•
•
•
C
C++
JAVA
FORTRAN
PYTHON
HTML
/* Hello World program */
#include <stdio.h>
main()
{
printf ("Hello World");
}
/* Hello World program */
#include <iostream.h>
int main()
{
cout << "Hello World!";
return 0;
}
/* Hello World program */
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
/* Hello World program */
Program Hello
Print *, "Hello World!"
End Program Hello
/* Hello World program */
print('Hello, world!')
<HTML>
<HEAD>
<TITLE>Hello World in HTML</TITLE>
</HEAD>
<BODY>
<CENTER><H1>Hello World!</H1></CENTER>
</BODY>
</HTML>
ONLINE QUIZ
Download