Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I see what's confusing about it. For me it's at least a bit weird to say an object contains all the procedures or operations, because the methods in memory are just referenced, not replicated for every class instance.
-
Nawap13976y@lucaspar
Object contains methods, how it contains, is thru memory reference!
Since, as far I learnt, I heard object contains data and function! -
Wack63116yMy first thought was it's an class. As it actually holds data, it's an instantiation of a class, which yields an object. Thus IMO (3) should be the correct answer.
You could also answer (5) and say it's (a region of) memory, wouldn't be wrong if you'd ask me. -
nnee4696y3) an object, instance of a class, a specific instance of a class in memory.
While it can hold some static data defined during class creation it can also load it dynamically from other sources, otherwise it would be pretty useless. -
devios157706yIt’s definitely 3. That’s the definition of an object. It means conceptually contains, not physically contains (i.e. in memory).
-
hashit11306yif its from an Indian Uni , I would choose encapsulation.. I know how my teachers think.. -_-
-
3. Object.
And funnily enough classes aren't necessary for OOP, you can do OOP just fine without them. -
@Nawap The others already answered it, but my first thought was a class. Because methods (or procedures) are related to a class, even if they're accessible through an object.
Ultimately, what makes this a terrible question is the last alternative. One could say it's an object, a class, or even a memory region as @Wack pointed out.
Anyway, after finding where this question came from and seeing every one had the same "None of these" alternative, I think it was not thought thoroughly.
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
Cyborg15A guy and a girl are in a Java seminar. Afterward, the guy approaches the girl and asks, "Hey gurrl, can I ge...
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
Basic OOPS Question -
A unit of computer information that contains data as well as all the procedures or operations is called:
(1) A method.
(2) Encapsulation.
(3) An object.
(4) An OOP
(5) None of these
This question is a bit confusing to me.. what do you guys think? 🙄
question
class
object
java
mcq
oops
c++
object oriented