System.out.println("First Camera: " + camera1.getName()+ " " + camera1.getResolution());
This is the println statement that should read:
First Camera: Nikon 800 Resolution
The method getResolution is only giving 0 and not the number i set it to in the child class.
public void setResolution()
{
this.Resolution = 0;
}
public int getResolution()
{
return Resolution;
}
These are the setters and getters.
What needs to be changed for it to update properly?
Your setter always sets Resolution to 0. You should have: