posted 13 years ago
Okay, I am developing an app for school. I have an abstract super entitled Student, and three concrete public subs called Undergraduate, Graduate, and PartTime. All of these are in separate files, but are in the same package. In the super, I have multiple abstract methods such as add();. In the subs, I implement them with public void add() {...method body...}. Then I am using a GUI as a driver app, also a separate file. I am trying to call the method add(sID, fName, lName, sGpa, sStatus, sMentor, cHours, sLevel) {..}, but the system won't recognize the symbol because the constructor in the super and subs have no params: add() {}. If I put params in the sub method, it won't override the method from the super. Each sub adds one or two params to the super, and that is why I cannot use the same for all. The subs are supposed to implement, and the GUI calls upon an actionperformed. I could use only Undergraduate.add() in the actionperformed, but then I get the "cannot call non-static from static" error. Any ideas?