Java help again.... (in Off-topic)


smallpau1 - Go Blues [Lower My Fees] April 28 2006 11:55 AM EDT

Ok, i have a homework problem i need help with, he's gone over abstract methods just yesterday and already expects us to have it ingrained in our heads. So i was wondering if any of you could really help me out with it, and if you write code, put in comments what you did so i can learn from it. Thank you.

It doesnt help that the writer of the book is soo vague with what he wants you to show...

#6

Create a base class with an abstract print() method that is overridden in a derived class. The overridden version of the method prints the value of an int variable defined in the derived class. At the point of definition of this variable, give it a nonzero value. In the base-class constructor, call this method. In main(), create an object of the derived type, and then call its print() method. Explain the results.

bartjan April 28 2006 11:58 AM EDT

google://java+abstract

AdminJonathan April 28 2006 12:08 PM EDT

"he's gone over abstract methods just yesterday and already expects us to have it ingrained in our heads."

Sounds like now he wants you to practice what he taught you. That's normal pedagogical technique, dude. You practice things right after you learn them; you don't wait until you've "learned" a whole bunch of stuff and then try to practice all of them at once.

smallpau1 - Go Blues [Lower My Fees] April 28 2006 2:44 PM EDT

no, no, no, he hasn't even explained it all the way through, and the book doesnt explain anything at all, it just compares java to c++ basically.

AdminQBVerifex April 28 2006 2:47 PM EDT

Sounds like they want you to learn the long and short of classes. Good luck. I think the teacher should have described the concept to you well enough, but maybe you don't "get it"?

Here and here are links on the java class/object stuff. Thats all we can do really without DOING the assignment for you. Duh. Besides I don't know java anyways. ;)

AdminQBVerifex April 28 2006 2:49 PM EDT

Oh, here is another interesting resource as well.

smallpau1 - Go Blues [Lower My Fees] April 28 2006 2:55 PM EDT

thanks for the links, ill look at them when i get home later today, but yea, this teacher is brand new and really does not explain stuff very well, and right when im about to possibly understand something he says, "Oh, wait lets go back and do it this way." So, right when I'm about to get something he goes backwards and does something totally different and then i lose what i was learning.
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001n45">Java help again....</a>