Quantcast

A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

appleduardo

  • 2 years ago

what is an "object" in OOP?

  • This Question is Closed
  1. eSpeX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    An object is just what it sounds like. A car is an object in the real world, it has variables of tires, engine, color, body type, etc.. In OOP you have an object, known as a class, for example, a class "car" that has instance variables of engine, tires, color, body type, etc.. In one case you have a physical object that you can touch, in the other you have a defined object that you can manipulate.

  2. appleduardo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    :O wow, thank you so! but how can i differentiate an object and a class?

  3. eSpeX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    A class IS an object.

  4. diomit
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    I thought that a class defines an object but it's not the object itself. "The map isn't the territory", no ?

  5. slotema
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    diomit is right. There is a big difference between a class and an object. Take the example of a car. A specific type of car (let's say a Fiat Punto) has some basic functionality. That is comparable to a class. A class is a set of variables and functions that provide functionality to the user. Suppose that there are two brand new Fiat Puntos standing in front of you. Both are of the class 'Fiat Punto', since they have the same functionality. But the two cars are different objects. If the class 'Fiat Punto' defines e.g. a variable 'speed', both cars have a speed, but their speed can be different.

  6. KonradZuse
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    A car is an object... Everything is an object.

  7. appleduardo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you all very much ! :D

  8. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.