"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
Steve Keystone wrote:Explain Classes vs Objects.
Steve Keystone wrote:In the case of the Dog class, how do I define/explain things about different breeds? As I understand it, Dog is the class and the different breeds are objects. So, if one of my breeds is Pug, how would I pick out a blind pug? Do I make a separate object for BlindPugs even though they're not a breed, but a variation on one?
Steve Keystone wrote:Maybe "dirty seat" would have been a better choice of words. I see that many of these programs use 1st class/2nd class or aisle/window or something similar. But what of non-standard choices? I don't want a seat that faces backwards or is soiled or who's in-flight entertainment doesn't work. The standard choices are too black and white. Based on that, how does class/object affect those instances?
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Steve Keystone wrote:Ok, I think we're going somewhere here ;) Seat is the class, yes?
And the attributes identify the variables (for lack of a better word)?
So there would be no need for subclasses for First, Second, etc?
All things are lawful, but not all things are profitable.
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
Steve Keystone wrote:Head First Java uses the Example Shape (p.32). Subclasses are Square, Circle, Triangle and Amoeba. That, I understand, as well as the dog examples Fred has given. But what about when there is something that doesnt quite fit, like an obtuse triangle, whose sides aren't equal and wouldnt fit within the Triangle subclass?
Do you make a sub-subclass or do you make a new class?
If I jump back to Dave Toll's example, could I put loads of attributes in the Seat class and just answer yes/no to them? I mean if i'm looking for a rear facing 1st class seat with a table, but is not a window seat. Boolean?
All things are lawful, but not all things are profitable.
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
Steve Keystone wrote:what about when there is something that doesnt quite fit, like an obtuse triangle, whose sides aren't equal and wouldnt fit within the Triangle subclass? Do you make a sub-subclass or do you make a new class?
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
Junilu Lacar wrote:How did we get to the decision of making Seat a full-on object rather than just a field on some other object, say a Reservation object?
That's just picking up the attributes of a Seat that you posted, presumably because you consider them an important part of the model.
Steve Keystone wrote:When I was younger I struggled in math. My teachers always said "don’t worry, it will come to you as time progresses", well, it didn’t and I ended up failing most classes above basic math. The same has started happening with Java.
Steve Keystone wrote:We've all heard of the Dummies series of how-to guides, well, I need something simpler.
Steve Keystone wrote:What is the point in moving forward if I only "sort of get it"? I wouldnt accept it in my kid's learning, so why should I?
Steve Keystone wrote:In regards to lacking context. Context is exactly what I'm seeking. If I have to find 1000 examples of objects/classes (and possible scenarios) to fully comprehend things, then thats what I will do.
I've done Code Academy, Tech Rocket, countless mobile "Learn Java" apps and even a few basic Java courses. The most common failure is that they give one or two examples and then move on.
All things are lawful, but not all things are profitable.
I wrote:
Steve Keystone wrote:We've all heard of the Dummies series of how-to guides, well, I need something simpler.
Well, then you'd better get used to disappointment. Software development is complex and complicated because any non-trivial problem you try to solve with software is going to be complex and complicated. There's just no way around that.
"Rock bottom is good solid ground, and a dead end street is just a place to turn around."
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|