There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
The biggest gamble will be to ask a question whose answer you know in that it will challenge your theory | www.TechAspire.blogspot.in
You mean it is only necessary to make one Sun object and that is instantiated before our life application is executed. And does that mean we have to get rid of all the stars at night? I think it is more a case that the Sun is a singleton object, rather than its attributes being static to the Sun class.Rajdeep Biswas wrote: . . . People needed only one Sun, so making objects of Sun is not required. . . .
"An object represents a real world 'thing'"
Ulf Dittmer wrote:
"An object represents a real world 'thing'"
Right off the bat, that seems a bad guideline. Many class have no corresponding object in the physical world, and trying to model a process in the physical world by keeping a "1 physical object = 1 Java class" correspondence frequently results in bad design.
James Denver wrote:I do not understand why so many texts try to teach OO programming by relating to real world objects (a dog is-a ...wouldnt it make more sense to teach it by real world applicable example ?
If you had to give a definition of what an object is or a rule as to when you should create an object what would that be?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
It is one of the simpler forms of OO analysis, however. I was taiught that as a beginner, but yo uhave to realise that you can only model simple situations like that.Winston Gutkowski wrote: . . . Indeed, one technique used in OO analysis is to search requirements descriptions for precisely those kinds of words. . . .
Campbell Ritchie wrote:It is one of the simpler forms of OO analysis, however. I was taiught that as a beginner, but yo uhave to realise that you can only model simple situations like that.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
That is probably what I meant to write, and didn’t.Winston Gutkowski wrote: . . . it only serves as a rough cut. . . .
Jayesh A Lalwani wrote:SO, when I have to design a system, I think of little gnomes doing my bidding...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|