Move value method with a String parameter from sub-class to parent class