Q:

What is the difference between procedural and object-oriented programming?

A:

Quick Answer

In procedural programming, a program is divided into portions called functions, while in object oriented programming, the program is divided into portions called objects. Another key difference is that object-oriented programming follows the "bottom-up" approach, while procedural programming follows the "top-down" approach.

Continue Reading

Full Answer

Procedural programming commands the computer step by step via a list of instructions. It relies on subroutines or routines. A routine can have a series of computational steps. Procedural programming is sometimes referred to as imperative programming. Object-oriented programming, as its name implies, relies on objects. Objects are components of a program that know how to execute certain tasks and interact with the other elements of the program.

Because objects are more versatile, object-oriented programming can be used to develop complex programs with less code. The use of objects also facilitates code reuse. In procedural programming, the focus is placed on the functions and sequence of actions to be performed and not on data. In object-oriented programming, however, the focus is placed on the data and not the procedures or functions.

The main purpose or aim of the two programming methods is to make programming more efficient. They make the process of writing complicated programs simpler, modifiable, expandable, easily understandable and bug-free.

Learn more about Computer Programming

Related Questions

  • Q:

    What is event-driven programming?

    A:

    Event-driven programming is a paradigm used to structure a program around various events. These events include user input events in graphical user interfaces and networking requests from websites and other online properties.

    Full Answer >
    Filed Under:
  • Q:

    What is Perl?

    A:

    Perl is a general-purpose computer programming language developed by Larry Wall in 1987. It borrows heavily from other programming languages, such as C, Lisp, Unix shell, PHP, Python, Ruby, Pascal and Microsoft Windows PowerShell. Perl is used in graphics and network programming, system administration and Internet coding.

    Full Answer >
    Filed Under:
  • Q:

    What are some advantages of the procedural programming approach?

    A:

    The procedural programming approach allows for general purpose programming, has many points of reference, offers good level control and has portable source code. Procedural programming simply involves following laid down steps to achieve the desired outcome.

    Full Answer >
    Filed Under:
  • Q:

    What are some pseudocode examples?

    A:

    Pseudocode explains a computer programming algorithm in logical, rational terms in the format of computer programming lines without creating an actual programming code. Pseudocode helps programmers visualize the steps needed to write programs with mathematical functions, Boolean logic and parameters that produce various outputs.

    Full Answer >
    Filed Under:

Explore