Results 1 to 2 of 2
  1. #1
    jurka is offline Member
    Join Date
    Jul 2008
    Rep Power

    Default Question about OO in other languages

    How would you implement the concept of class and method in a
    non-object-oriented programming language such as COBOL, Pascal or C?

    This is taken from one book but i cant find answer for that? Book name is OO programming and Java:confused:

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    Technically, you can't. At least if you consider some basic OO ideas, like overloading and message passing.

    However, in reality, OO is just syntactic sugar. Its a coding convention to force specific ideas, specifically encapsulation and dynamic dispatching. And you can implement them in any language, or at least any language based on Von Neumann designs.

    I once wrote a recursive descent parser in Cobol, and Cobol doesn't have recursion.

    If you want a C-like language with OO, look at Objective C, C++, C#, or Java.

    Pascal is dead. It was designed as a limited language for teaching CS 101.

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. question
    By ayoood in forum Java Software
    Replies: 6
    Last Post: 07-07-2008, 01:32 PM
  3. Menues in english and spanish languages
    By aleplgr in forum AWT / Swing
    Replies: 0
    Last Post: 08-06-2007, 10:12 AM
  4. question about rmi
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:19 AM
  5. Calendar with multiple languages
    By Marcus in forum Web Frameworks
    Replies: 1
    Last Post: 06-27-2007, 04:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts