For some reason when I run this code it comes back with class must have setter for age and name. I do have those methods in my class, but I'm unsure as why this isn't passing. Thank you for the help.
package com.codegym.task.task05.task0503;
/*
Getters and setters for the Dog class
*/
public class Dog {
//write your code here
String name;
int age;
public String getName(){
return name;
}
public String setName(String name){
this.name = name;
return this.name;
}
public int getAge(){
return age;
}
public int setAge(int age){
this.age = age;
return this.age;
}
public static void main(String[] args) {
Dog frankie = new Dog();
frankie.setName("Rex");
frankie.setAge(3);
}
}