Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Steve Keystone

Greenhorn
+ Follow
since Aug 08, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
6
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Keystone

Knute, once again thanks for the help, I'l definitely look into HackerRank. I'm the type that learns by multiple examples.

Junilu, I appreciate you revisiting your post. I will take those suggestions on board and move forward.
4 years ago
Junilu,

Thanks for the input and yes, I have heard the term CRC cards, but more in terms of design (the bigger picture), not problem solving. I know just enough about java to get myself into trouble. 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. 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. When I then encounter anything beyond those 2 very generic examples, I get confused. We all spent ages learning our ABC's and practiced writing letters thousands of times, yet objects/classes receive less than 2 days in any class (that I've taken). Don’t even get me started on Main and method.  

At this point I have found that Dave Toll's and Knute's answers have been the most helpful. We've all heard of the Dummies series of how-to guides, well, I need something simpler.  

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. 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?
4 years ago
Thank you very very much Knute!I'll have to look more into ENUM as I've not seen that one before.
4 years ago
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?
4 years ago
I apologize for double posting, but couldn't find where to edit my post. I'm sorry if it seems I'm being difficult, its just that I have difficulty with comprehension these days (TBI & PTSD). I have read through the Java for Kids book and find it confusing as well. You may think you're being condescending, but I'd actually prefer if you could explain things so that an 8 year old could understand.
4 years ago
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?
4 years ago
Henry, thanks for the reply, but i'm still learning to crawl here. Most of what you have said went right over my head, as is the case with most java books I've looked at.

My brain is my biggest obstacle here. I hate to use a Seat Reservation example, but its the best and one of the few examples that would fit my question. I cant quite wrap my head around what makes something an object. My limited understanding says "Seats" are a class. But what do I do when each seat has different attributes? Do I make a subclass of seats? The example that really wracks my brain is the one with 1st class/2nd class seats, of which some face front, some face rear. Some have tables, some don't. Some are aisle, some are window. They are not laid out in any logical format to where you can say "every forward facing 1st class seat has a table". At this point I cannot fathom how to even begin sketching out a plan.
4 years ago
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?
4 years ago
I've read some of the prior posting on this subject, but I'm still confused (and didn't want to dredge up old posts). I have a simple question, but for the life of me, every answer I get confuses me even more. Explain Classes vs Objects. I'm referencing this off of page 31-35 Head First Java 2nd Ed.

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? If I took the dog analogy one step further and replaced Dogs with Seats, it brings me to the next bit.

I'm looking at practice programs and the one that comes to mind is the "seat reservation" one. Everything makes sense when considering 1st class/2nd class, aisle/window seats. But, the minute you throw something random in like "seat that just had a drink spilled in it" throws my whole thinking and train of thought out the window.
4 years ago
Hi everyone. Java is my first language and some of the thinking/planning/logic just baffles me. I also find many of the books outright confusing (I own Head First and a few others). I am hoping that by having a living/breathing person on the other side of the screen it can help me understand some of the concepts.  Having a TBI and PTSD doesn't help matters much either.

Thanks,
Steve
4 years ago