2. How people are communicating with each other?
2ENNAM POL UYARVU
3. How communication between
User & Computer
Or
Computer & Computer
takes place?
Computer languages are the languages through which
the user can communicate with the computer by
writing program instructions.
3ENNAM POL UYARVU
6. Programming Paradigms
The programming paradigm
is the way of writing
computer programs
• Monolithic/Imperative
programming paradigm Assembly
language
• Structured-oriented programming
paradigm ALGOL, Pascal, PL/I and
Ada
• Procedural-oriented
programming paradigm C,
visual basic, FORTRAN, etc.
• Object-oriented programming
paradigm C++, Java, C#,
Python, etc.
6ENNAM POL UYARVU
7. Steps to create and execute C programs in the
Windows Operating System
Execution Process of a C Program
7ENNAM POL UYARVU
9. Procedural Programming
• It can be defined as a
programming model which is
derived from structured
programming, based upon
the concept of calling
procedure.
• Procedures, also known as
routines, subroutines or
functions, simply consist of a
series of computational steps
to be carried out.
• During a program’s execution,
any given procedure might be
called at any point, including
by other procedures or itself.
9ENNAM POL UYARVU
10. Object Oriented Programming
• It can be defined as a programming
model which is based upon the
concept of objects.
• Objects contain data in the form of
attributes and code in the form of
methods.
• In object oriented programming,
computer programs are designed
using the concept of objects that
interact with real world.
• Object oriented programming
languages are various but the most
popular ones are class-based,
meaning that objects are instances of
classes, which also determine their
types.
10ENNAM POL UYARVU
11. POP structure of C++ program
Structure
/*documentation*/
pre-processing statements
global declaration;
void main()
{
Local declaration;
Executable statements;
. . .
}
User defined functions
{
function body
. .
}
Example Program
/*Program to perform addition of two numbers*/
#include<iostream.h>
int a, b;
void main()
{
int c;
void get_data();
int sum(int, int);
get_data();
c = sum(a, b);
cout << "Sum = " << endl;
}
void get_data()
{
cout << "Enter any two numbers: ";
cin >> a >> b;
}
int sum(int a, int b)
{ return a + b; }
11ENNAM POL UYARVU
12. OOP structure of C++ program
Structure
/*documentation*/
pre processing statements
class ClassName
{
member variable declaration;
. . .
member functions()
{
function body
. .
}
};
void main ()
{
ClassName object;
object.member;
}
Example Program
/*Program to perform addition of two numbers*/
#include<iostream.h>
class Addition
{
int a, b;
public: get_data()
{
cout << "Enter any two numbers: ";
cin >> a >> b;
}
int sum()
{
get_data();
return a + b;
}
};
void main()
{
Addition obj;
cout << "Sum = " << sum() << endl;
}
12ENNAM POL UYARVU
13. Procedure-oriented Object-oriented
It is often known as POP (procedure-oriented
programming).
It is often known as OOP (object-oriented programming).
It follows the top-bottom flow of execution. It follows the bottom-top flow of execution.
Larger programs have divided into smaller modules
called as functions.
The larger program has divided into objects.
The main focus is on solving the problem. The main focus is on data security.
It doesn’t support data abstraction. It supports data abstraction using access specifiers that
are public, protected, and private.
It doesn’t support inheritance. It supports the inheritance of four types.
Overloading is not supported. It supports the overloading of function and also the
operator.
There is no concept of friend function and virtual
functions.
It has the concept of friend function and virtual
functions.
Examples - C, FORTRAN Examples - C++ , Java , C#.net, Python, R Programming,
etc.
13ENNAM POL UYARVU
14. References
• Larry L. Peterson, Bruce S. Davie, “Computer Networks: A systems approach”, Fifth Edition,
Morgan Kaufmann Publishers, 2011.
• Behrouz A. Forouzan, “Data communication and Networking”, Fourth Edition, Tata McGraw
– Hill, 2011.
• James F. Kurose, Keith W. Ross, “Computer Networking - A Top-Down Approach Featuring
the Internet”, Fifth Edition, Pearson Education, 2009
• Nader. F. Mir, “Computer and Communication Networks”, Pearson Prentice Hall Publishers,
2010.
14ENNAM POL UYARVU