aspose file tools*
The moose likes Java in General and the fly likes Inheritance error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Inheritance error?" Watch "Inheritance error?" New topic
Author

Inheritance error?

Kevin Tansey
Ranch Hand

Joined: Dec 11, 2005
Posts: 44
I'm trying to call a method to get a value...

but I'm not sure exactly how to do it!

This is a small part of a large project, I'm just plugging away at trying to do each portion one at a time.

I have several files, and here's how they stand right now, I will describe where my problem is right now at the end:

Student.java

Course.java

Grade.java (I'm done with this one, yay

Name.java (dont think I need to touch this one at all)

Transcript.java (this is the fun one...)



The problem I'm working on right now is the getGPA() method of Transcript.java - where I am supposed to get the sum by multiplying the course quality points by the number of credits.

I have:


And the error I am getting on this is:
"Cannot make a static reference to the non-static method getQualityPoints() from the type Course"

Does this mean I need to make a call to Course.getQualityPoints() and assign that to a new variable?
[ December 11, 2005: Message edited by: Kevin Tansey ]

BSIT student @ CSUCI
Kevin Tansey
Ranch Hand

Joined: Dec 11, 2005
Posts: 44
I just tried that and it gives the same error about static reference...

Kevin Tansey
Ranch Hand

Joined: Dec 11, 2005
Posts: 44
alright, I think I got it...


feel free to delete this post unless you'd like to give me pointers on any of the other stages I need to complete
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inheritance error?