UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Please tell me what Object Oriented Programming and Object Based Programming with reallife example..what is the difference between them.?

Asked by Last Modified  

18 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Java Expert

Hi Ritesh, In order to be a true object oriented programming language, following 4 need to be present… 1) Abstraction - Hiding the implementation details from the user, only the functionality will be provided to the user. 2) Encapsulation - Wrapping the data/variables and code acting on the data/methods...
read more
Hi Ritesh, In order to be a true object oriented programming language, following 4 need to be present… 1) Abstraction - Hiding the implementation details from the user, only the functionality will be provided to the user. 2) Encapsulation - Wrapping the data/variables and code acting on the data/methods together as a single unit. 3) Modularity - A program as a number of unique modules, rather than as a single one. 4) Hierarchy - Hierarchy of classes in Java has one root class which is called 'Object’. Object means a real word entity such as pen, chair, table etc. However, we can call a Language Object based if that supports the first three elements. If a programming language supports the concept of Object (4th one), inherently it supports the first three elements also as they are inherent feature of an Object thus considered as object oriented. ?Java is an Object Oriented Languages because it supports all the concepts of Oops like Data Encapsulation, Polymorphism, Inheritance, Data Abstraction, Dynamic Binding etc. Visual Basic is an Object based programming Language because you can use class and Object here but cannot inherit one class from another class i.e. it does not support Inheritance. For real world example : Local burger represents object based programming feature while a McDonald burger is true object oriented programming as in every McDonald it inherits same taste :) read less
Comments

Tutor

JavaScript is a prototype-oriented language. It can build actual objects from a constructor function and it has almost any feature that any object could have: Constructor. Methods (i.e. functions in JavaScript). Properties (since ECMA-Script 5, "getters/setters"). Instances. In JavaScript,...
read more
JavaScript is a prototype-oriented language. It can build actual objects from a constructor function and it has almost any feature that any object could have: Constructor. Methods (i.e. functions in JavaScript). Properties (since ECMA-Script 5, "getters/setters"). Instances. In JavaScript, any object has a prototype, including functions. The prototype itself is a rudimentary way of adding object members to any newly created instance of the whole object. var constructor = function() { }; constructor.prototype.text = "hello world"; alert(new constructor().text); // This alerts hello world Why JavaScript isn't an object-oriented programming (scripting) language? Because it has no feature that fits the requirements of the definition of object-oriented programming: Polymorphism: No. You can change the behavior of a prototype member, but this is just reusing the identifier. You aren't able to access the previous implementation of the member in a pseudo-derived object. Inheritance: Not at all. Maybe prototype chain might be comparable to inheritance but JavaScript (ECMA-Script 5.x or earlier versions) has no syntax-based inheritance like other OOP-based languages (i.e. Java, C#, Ruby, Python, VisualBasic.NET, ...). Encapsulation. Yes, of course, but there's no way to create actual private or internal object members. Perhaps I forgot to mention some other detail, but I honestly believe that this is a good summary. Update and summary The core difference is an object-oriented programming language has the features that an object-oriented paradigm must have in order to be considered an object-oriented programming language. Thus, JavaScript, for now, isn't an actual object-oriented programming language because it lacks actual polymorphism and inheritance. read less
Comments

Consider college as class, students as objects. To identify a student in a college we use his name or roll number that is called as attribute or data members. Each semester is considered as a function. Object based programming language is nothing but the program that uses object concept but that does...
read more
Consider college as class, students as objects. To identify a student in a college we use his name or roll number that is called as attribute or data members. Each semester is considered as a function. Object based programming language is nothing but the program that uses object concept but that does not support inheritance and polymorphism . read less
Comments

online or home based computer teaching

Object Oriented Programming support all features like Data abstraction, Inheritancy, Polymorphism, Encapsulation, Modularity. But Object BAsed Programming language not support Inheritancy. So it not able to represent real world relationship.
Comments

Java trainer

object oriented programming is a methodology where we design our program using class and objects like java c++ where as Object based programming language follows all the features of OOPs except Inheritance. JavaScript and VBScript are examples of object based programming languages.you can take an example...
read more
object oriented programming is a methodology where we design our program using class and objects like java c++ where as Object based programming language follows all the features of OOPs except Inheritance. JavaScript and VBScript are examples of object based programming languages.you can take an example of mobile phone When we take a mobile as an object, its basic functionality for which it was invented were Calling & Receiving a call & Messaging. But now a days thousands of new features & models were added & the count is still increasing. read less
Comments

Object Oriented Programming means you think programming components as real life objects. Here Object means any existing entity eg Car, bus, tree etc. Each Object has its own properties and functions/method. eg if PEN is an object - its fuction is writing and its properties are its color, size, shape...
read more
Object Oriented Programming means you think programming components as real life objects. Here Object means any existing entity eg Car, bus, tree etc. Each Object has its own properties and functions/method. eg if PEN is an object - its fuction is writing and its properties are its color, size, shape etc. Objects are members of classes. eg if bus, car sctoor are object then vehical is tis class. so classes are blue print of objects. read less
Comments

Software Developer and Trainer with 10 years of experience

Object Oriented Programming is all approaching computing problems in the same way we do in our real life. For Example, Say you are going to solve a problem involve matrices. In this case, you will consider a Matrix as a Matrix, Not as a collection of/Group of numbers. But when comes to programming,...
read more
Object Oriented Programming is all approaching computing problems in the same way we do in our real life. For Example, Say you are going to solve a problem involve matrices. In this case, you will consider a Matrix as a Matrix, Not as a collection of/Group of numbers. But when comes to programming, if you have done in some procedural language like 'C', you have consider a matrix as an Array i.e. a collection of integers. Therefore, the solving methodology is going to be difficult because you have to find a new way to get the solution. Matrix is a collection of numbers. Yes, but it have been abstracted(hided) as a single entity. Object Oriented Programming leads you to do this. Through Object Oriented Programming, you can approach a problem in the same way you approach it in a real way. This is the Principle behind OOP. Class - The core concept of OOP helps you to do achieve this. Through classes, you can create new data types. Also you can set behavior to them. For the above case, just create a Matrix class and save it. In future, whenever you want to store and manipulate a matrix just create an object for the class. Matrix mat; Now, Matrix is a User-Defined Data type and the (mat) object you create will be variable of that type. Now you no need to create an array to store a matrix. You need to just create a Matrix as you do in real life. The implementation of Matrix class obviously involves Arrays. But for a user who is going to use the class, these stuff will be abstracted(hided). That's it. This is what OOP is. Same for Complex Number - Don't approach it as two separate integers. Vectors,..... Simple Example is Button in java. If you want to create a button, create a button object and place it. Don't draw or do complex tasks to do so. I hope you have understood.(Sorry for a long reply). If you have any query on this, feel free to message me. read less
Comments

In Object based programming language there are some of the oops concepts are not included like inheritance, polymorphism . it has only encapsulation & object identity features. Ada language is one of the object based programming language
Comments

Tutor

Object Oriented Programming allows you to create a Objects and class and implement the relationships between them , like Inheritance, Polymorphism. Object Based languages allows you to create Objects and classes but do not allows to implement relationships between them.
Comments

Java Technical Leader

Object oriented programming is in one words mapping physical entity to logical one. Say in Physics what is matter? Matter is something which takes some places in world, they have their own properties and nature, You can feel it ot touch it... Same in Object oriented Architecture you have world called...
read more
Object oriented programming is in one words mapping physical entity to logical one. Say in Physics what is matter? Matter is something which takes some places in world, they have their own properties and nature, You can feel it ot touch it... Same in Object oriented Architecture you have world called Container and matter is Object which has properties their own nature you can see it ,take action on it , You can differentiate them from others object/matters. So whole physical structure is replaced in logical one. read less
Comments

View 16 more Answers

Related Questions

Does Java support pointers?
Yes and no. . The pointer model is of course supported by Java. But it has become much easier to the developer to handle it. Because Java exposes the concept of pointer in terms of reference variables...
Santosh
0 0
7
What is a constructor in Java?
In Java, a constructor is a special method that is called when an object is created using the new keyword. It has the same name as the class and is used to initialize the object's state. Constructors play...
Rishu
0 0
5
What is the difference between string, stringbuffer, stringbuilder?
String is immutable, whereas StringBuffer and StringBuilder are mutable
Neha
What is the use of deployment descriptor?
A deployment descriptor describes how a component, module or application should be deployed. A web application’s deployment descriptor describes the classes, resources and configuration of the application...
Monisha
Why we are using this keyword in Java?
to access current object
Kiran
0 0
9

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Internet of Things, Social Media Becoming Part of E-Discovery Landscape
The days when e-discovery consisted of handing over copies of e-mails to address Freedom of Information Act (FOIA) requests, compliance regulations or other legal obligations are over. Now, it's just as...

Method Overloading vs Method Overriding
1. Method Overloading: Method overloading means a same method with same name can have different implementations/body by changing one of the follwing thing: 1) Number of Parameters 2) Order of Parameters 3)...

Puzzle Game coding
import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.FontMetrics;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.RenderingHints;import...

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Migration from other languages to Salesforce
Anyone can easily migrate from other language to Salesforce. People must have skills to understand business logic.

Recommended Articles

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more