Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is 'identity' an optional characteristic for real world objects?

Tags:

oop

Somewhere I've read

  1. An object has three characteristics:
    • state (e.g. name)
    • behavior (e.g. reading)
    • identity(unique id number of student)

As per this information, every object will have unique identification, so that all objects of a class will be different from each other.

but,

  1. In many other places I've read that objects have two characteristics:
    • state
    • behavior

Question:

which one is true? objects have 2 characteristics or 3 characteristics?

suppose there are two erasers of the same brand, look, shape, size and color.

So, these two objects should be treated as 'equal objects' as there is nothing to uniquely identify them?

like image 464
java_beginner Avatar asked Oct 22 '14 16:10

java_beginner


People also ask

Do objects have identity?

Accordingly, an object a is specifically self-identical if and only if it instantiates the property of being identical to a fixed object. Notice that while there is only one general self-identity, there are as many specific self-identities as there are objects.

What attributes do all real world objects have?

Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail).

What is the physical meaning of identity?

Physical identity (PhI) represents the individual's image about his/her own body and the represantion of the body in relation to the environment (social and natural environment).

What is personal identity in philosophy?

Psychologists use it to refer to a person's self-image—to one's beliefs about the sort of person one is and how one differs from others. In philosophy the term normally refers to philosophical questions about ourselves that arise by virtue of our being people, questions that may otherwise have little in common.

What do all real world objects have in common?

Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). 2)... An object is an entity that has state, behavior, and identity. The structure and behavior of similar objects are defined in their common class. ...

What are the two characteristics that an object always has?

The two characteristics that an object always has are state and behavior. Consider a person object. Its state might include hair color, sex, height, and weight, but also feelings of anger, frustration or love. Its behavior could include walking, sleeping, cooking, working, or anything else that a person might do.

How do you represent real-world entities in code?

Representing real-world entities in code is BS. The only time you represent real-world entities is when you do physics/electronics/chemistry modeling. For that people use packages like Wolfram SystemModeler, Modellica, etc. They have almost nothing to do with OOP at least not in the common sense of OOP.

What is the primary identity?

the primary identity is the natural property of the body-mind to locate itself in space and time and doing so, drawing lines of separation in those two coordinates between itself and other identities.


1 Answers

Explicit identity is optional.

However, the culmination of an object's states and behaviors is an implicit identity; thus,

Implicit identity is required.

Two objects can have the exact same intrinsic characteristics (eg. color, size, shape), but differ in their extrinsic characteristics (eg. location, owner).

In this way, two objects may be considered equivalent when compared by a selection of their properties, but would be considered distinct in terms of the culmination of all intrisic or extrinsic states and behaviors.

like image 87
Luke Willis Avatar answered Jan 02 '23 17:01

Luke Willis