0% found this document useful (0 votes)
2 views3 pages

Introduction

The document compares procedure-oriented programming languages like COBOL, FORTRAN, and C with object-oriented programming languages such as C++ and Java. It highlights differences in syntax, data handling, and programming approaches, including top-down versus bottom-up methodologies. Additionally, it illustrates how certain functions and structures are replaced or modified when transitioning from procedure-oriented to object-oriented programming.

Uploaded by

192650sowmiya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Introduction

The document compares procedure-oriented programming languages like COBOL, FORTRAN, and C with object-oriented programming languages such as C++ and Java. It highlights differences in syntax, data handling, and programming approaches, including top-down versus bottom-up methodologies. Additionally, it illustrates how certain functions and structures are replaced or modified when transitioning from procedure-oriented to object-oriented programming.

Uploaded by

192650sowmiya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PROCEDURE-ORIENTED

BASIC -

COBOL -

FORTRAN -

PASCAL -

C - FUNCTIONS / STRUCTURED

ALGOL

OO

C++

JAVA

DOTNET

#INCLUDE<STDIO.H>

SCANF(), PRINTF()

REPLACED WITH

#INCLUDE<IOSTREAM.H>

CIN (SCANF)

COUT (PRINTF)

int age; int age;


cout<<”enter age”; printf(“enter age”);

cin>>age; scanf(“%d”,&age);

#INCLUDE<STRING.H>

STRLEN(), STRREV(), STRUPR(), STRCPY(), STRCMP(), STRCAT()

TOP DOWN APPROACH BOTTOM UP APPROACH

STRUCT STUDENT

};

VOID MAIN() CLASS SUB

{ {

I/O STATEMENTS I/O STATEMENTS

VOID SUB()

{ }

} };

VOID SUB() VOID MAIN()

{ {

} }

In C LANGUAGE

MAIN()

{
PRINTF(“HELLO”);

WARNING

void main() void main()

{ {

int i; for(int i=1;i<=10;i++)

for(i=1;i<=10;i++) cout<<”\n hello”;

printf(“\n hello”); }

}
BY DEFAULT PUBLIC BY DEFAULT PRIVATE (DATA HIDING)

STRUCT STUDENT CLASS STUDENT

{ {

INT EMPID; // MEMBERS INT EMPID; // DATA MEMBERS

}; };

VOID MAIN() VOID MAIN()

{ {

STRUCT STUDENT S1={11}; STUDENT S1; // HERE S1 IS OBJECT

PRINTF(“%D”, [Link]); [Link]=11; // CANNOT BE ACCESED

} }

You might also like