The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Only if the only thing you are going to do with fruit is classify them. If fruits have behavior, then banana is a derived class of fruit, and color is an attribute of banana. Your solution isn't very object oriented.
If you have a property, you will have to pay a tribute
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
Within .Net, my understanding is that a property will have a getter and/or a setter with possibly some logic in them. And an attribute would just be a public variable, for example, where there is no logic in the get and set.
But that is just from my experience, nothing official. Could be totally wrong.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
In the English language "property" and "attribute" are exactly the same meaning in the case where "property" is a property of an object such as "a banana is yellow". In this case, "yellow" is an attribute or property of the banana.
If you are buying a house then the house can be referred to as a "property" but this is a different meaning and has nothing to do with "attribute".
You can also "attribute" a quotation to a given person but this is a different meaning and has nothing to do with "property".
Additionally, you can say, "That is my property" when referring to an object that belongs to you. Again, nothing to do with "attribute".
- I would love to change the world, but they won’t give me the source code.