Main differences between c and object orientation?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shivapadma
    New Member
    • Mar 2007
    • 40

    Main differences between c and object orientation?

    c:
    1.It focuses on methods rather than data.

    oops:
    1.It focuses on data and methods.
    2.inheritance
    3.polymerizatio n.
    4.Abstraction.
    5.encapsulation .


    Besides these what are the diffrences.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by shivapadma
    c:
    1.It focuses on methods rather than data.

    oops:
    1.It focuses on data and methods.
    2.inheritance
    3.polymerizatio n.
    4.Abstraction.
    5.encapsulation .


    Besides these what are the diffrences.
    Make number three: polymorphism; polymerization had something to do with
    glueing strings of carbon together to make plastics etc.

    You've got about all of them; if you understand all of them you're in business.

    kind regards,

    Jos

    Comment

    • Silent1Mezzo
      New Member
      • Feb 2007
      • 208

      #3
      Originally posted by shivapadma
      c:
      1.It focuses on methods rather than data.

      oops:
      1.It focuses on data and methods.
      2.inheritance
      3.polymerizatio n.
      4.Abstraction.
      5.encapsulation .


      Besides these what are the diffrences.
      Technically the topic should be Procedural Programming vs. Object Oriented Programming (or it would be C vs Java)

      Procedural
      *
      - Procedural Approach Data Structures can be represented as a network of associated structures, referring to one another.
      - Procedures can be represented as a network of routines which call one another, i.e., "call tree"

      OOP*
      - Object Oriented Approach Collection of discrete objects that incorporate data structures and behavior.
      - Each data structure has, combined with it, the procedures which apply to that data structure.
      - Contrasts with conventional programming in which data structures and behavior are only loosely connected
      - These entities, called objects, can be associated to one another in one network, rather than two.

      *Taken from here

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        Actually, there's no difference between C and object-orientation because they are two completely different things.

        C is a programming language.

        Object-orientation is a programming technique.

        That means you can have an object-oriented C program. Heck, the compiler generates machine instructions so you really are executing object-oriented binary code.

        All C++ does is have the compiler generate the object-oriented code rather than in C where you would have to write it all yourself.

        Comment

        Working...