I am a novice to Java and just learning OOP concepts. Please review my code. I am getting the following error.- Implicit Super Constructor is undefined.
class BoxSuper
{
int height;
int length;
int width;
BoxSuper(BoxSuper obj)
{
height=obj.height;
length=obj.length;
width=obj.width;
}
BoxSuper(int a,int b,int c)
{
height=a;
length=b;
width=c;
}
BoxSuper(int val)
{
height=length=width=val;
}
int volume()
{
return height*length*width;
}
}
class BoxSub extends BoxSuper
{
int weight;
BoxSub(int a,int b,int c,int d)
{
height=a;
length=b;
width=c;
weight=d;
}
}
editbelow your question and cut-and-paste the code. Highlight the code and pressctrl-Kto format it properly.?when you edit.