Well I figured it out. I had to call super to get the name and age from the super class. Then since boolean perryComoFan is private, I couldn't refer to it directly.
Public Oldie(String n, int...
Type: Posts; User: EDale
Well I figured it out. I had to call super to get the name and age from the super class. Then since boolean perryComoFan is private, I couldn't refer to it directly.
Public Oldie(String n, int...
The compiler we use for our class is called OWL, it is a part of our online textbook created by UMass Amherst I believe. If I enter the correct code, it marks my question correct and I can move on....
That was my fault, I typed it here with a capital P but in my code it is lowercase.
So I changed the code to :
public Person(String n, int a, boolean p) {
this.name=n;
this.age=a;
perryComoFan=p;
}
Here is the error message:
compilation error (line 2, column 42) cannot find symbol
symbol : constructor Person()
compilation error (line 3, column 7) name has private access in...
Here is the question:
The Person class has two attributes, name and age. We want to create a subclass of Person, called Oldie, that represents someone who is getting on in age, say about thirty...