You are not logged in.
Pages: 1
Topic closed
I was in my first class of OO programming (4th year of computer engineering in Valencia) and the professor gave us homework.
The homework was a simple question about OO programming (it is not about a specific language, though we are going to use Java in the practice sessions), we shall find an answer to it and discuss it in class the next day.
The question was:
"May classes also be objects?"
which can be said as:
"May classes be instances of an(other) classes?"
I hope that you, archers, can enlighten me in this question
Offline
I believe an object is an instance of a class.
Last edited by tvale (2010-09-28 17:53:35)
Offline
Agreed.
Offline
I believe an object is an instance of a class.
Yup, that's true. Let's see... An object is an instance of a class, so we can have a lot of objects coming from one class.
We can say an object is not a class because it has a state (think about a light, it has a state: on or off, but a class light is not on/off, because in a class we just describe the behavior that class should have.
But what we're asking here is if a class can have a state. I think it may refer to static properties about the objects.
Offline
Baha, don't ask other people to do your homework. See the forum etiquette.
Closing.
ᶘ ᵒᴥᵒᶅ
Offline
Pages: 1
Topic closed