• Post Reply Bookmark Topic Watch Topic
  • New Topic

Subclass implementing Abstract method  RSS feed

 
Lique Reads
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/** G'night all,
I get this error: DisInterestedStudent is not abstract and does not ooverride abstract method ShowName() in Student.
Much thanks
*/



public class DisInterestedStudent extends Student
{
public DisInterestedStudent(String SName, int wRate, int fUnits)
{
super(Sname, wRate, fUnits);
}
public String SName(String n)
{
ShowName = n;
}
}
 
Daesung Park
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DisInterestedStudent should override all abstract methods of Student.
You have to implement ShowName() in DisInterestedStudent. If you don't want implement it, just declare it as an abstract class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!