Introduction Programming

As we human beings communicate with each other in different languages such as Urdu, French, Punjabi, and Arabic, etc. Similarly to communicate with the computers we have to use specific languages and for this purpose, hundreds of languages have been developing in which few of them have gained an international reputation. C++ language is one of them. Language can be categorized broadly into three categories.

 

 

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 Language

An advanced programming language used for software application development. Originally developed by Dennis Ritchie at Bell Labs in the 1970s and designed to be a systems programming language but since then has proven itself to be able to be used for various software applications such as business programs, engineering programs, and even games. The UNIX operating system is written in C.

C++ Language

A descendant of the C language. The difference between the two languages is that C++ is object-oriented. C++ was developed by Bjarne Stroustrup at Bell Labs and is a very popular language for graphical applications.

Procedure-oriented programming

A type of programming where a structured method of creating programs is used. With procedure-oriented programming, 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. The main program centrally controls them all. Some procedure-oriented languages are COBOL, FORTRAN, and C.

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. With object-oriented programming, 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 are C++, Java, and PHP.

 

Differences between Procedural-Oriented Programming & Object-Oriented Programming

Procedure Oriented Programming

Object-Oriented Programming

The prime focus is on functions and procedures that operate on data Here more emphasis is laid on the data that is being operated and not the functions or procedures
Large programs are divided into smaller program units called functions Programs are divided into what are called objects
Data and the functions that act up to it are treated as separate entities Both data and functions are treated together as an integral entity
Data move freely around the systems from one function to another Data is hidden and cannot be accessed by external functions
Program design follows “Top-Down Approach Program design follows “Bottom UP Approach”