I am doing an assignment and following is part of the question:
A program is to be devised for a university to work out whether or not, a student or a professor, is outstanding. The criterion for a professor to be outstanding is to have over 120 publications. The criterion for a student to be outstanding is to have a Grade Point Average of 3.3. For a professor, the three class data embers would be name, number of publications and the method is Outstanding().
I have done the following code
I am being given an error in this line of code
public boolean outstanding()
Can please some1 help me to solve this problem?
Thank you very much
A program is to be devised for a university to work out whether or not, a student or a professor, is outstanding. The criterion for a professor to be outstanding is to have over 120 publications. The criterion for a student to be outstanding is to have a Grade Point Average of 3.3. For a professor, the three class data embers would be name, number of publications and the method is Outstanding().
I have done the following code
public abstract class SchoolMember {
//These are the attributes for a SchoolMember class
String name;
String surname;
String address;
String contactNumber;
public abstract boolean outstanding();
//These are the attributes for a SchoolMember class
String name;
String surname;
String address;
String contactNumber;
public abstract boolean outstanding();
public class Professor extends SchoolMember {
Integer numberOfPublica tions;
public boolean outstanding() {
if (numberOfPublic ations > 120)
return true;
}
}
Integer numberOfPublica tions;
public boolean outstanding() {
if (numberOfPublic ations > 120)
return true;
}
}
public boolean outstanding()
Can please some1 help me to solve this problem?
Thank you very much
Comment