The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Homework help plz!!!

I'm doing an assignment that has multiple classes that inherit from one another. That part I get, and the majority of my code is correct as I spoke to my prof and went over what I had at the time. The problem I'm having now is making sure the code I'm adding to is correct according to what she's asking for.

Re: Homework help plz!!!

The IDEA of the code is to override totalCredits so that only credits from classes the student passed are counted...I think I need an if statement since it's a conditional right? I already have my instance var for all the other stuff from the other Classes needed

Re: Homework help plz!!!

I think that's what we need to figure out lol...I have the all the other classes since the basis of the lesson is inheritance and how they work and what not. I have my passed method in another class but it's not the one that's inherited to this class...because those are the instructions she stipulated am I making sense? Because if you really need me to, than I'll of course POST all the classes and ALL the code that I have for the assignment

Re: Homework help plz!!!

If you are working on the totalCredits() method now, there probably isn't any need to post the other code.
What is the method supposed to return? How does it find/compute that value?
Where are the values that are to be summed? Are all of the values to be added to the sum or only some of them?