non-static method cannot be referenced from a static context
hi, i've basically been doin my assignement, we have to create a very simple student registeration thing for a college, i've just implemented basic stuff to get the functionality goin, i created my Student Class, which has two sub-classes FullTimeStudent and PartTimeStudent.
now i'm creating a register class, this class should be able to store "Student" objects in an array, and have methods to access the array and manipulate the contents.
from this class we have been guided to have ATLEAST the following:
- add a new student of either FullTimeStudent or PartTimeStudent
- remove a student with a given student id number...
- request fees due for a given student...
and stuff on similar terms to that.
my problem lies with the first one.
from what i gathered, the lecturer was hinting at creating a single method from which i can create a student object and make either a FullTime or PartTime student.
i didn't know exactly how to do this, as i will be implenting a simple interface later, i decided that i will create two seperate methods so i can jut call the appropriate method, one to create a FullTimeStudent and for PartTime (using the appropriate classes constructor. When i tried this, and i tried to test if it worked, i got the static method error thingy in the subject line!
please find attached my java code files zipped!
any help and soon will be very well appreaciated!!!
Bookmarks