I am new to JAVA and this is my first attempt with inheritance. When I try to debug the below codes, I get the error: Source not found. I have no idea how to fix this. I created all of them under the same package.
If you guys need me to post more of my codes, please do let me know.
public class Agents { // The class has constructors and few variables } public class User extends Agents { public User (){ } public string name_user; public string assign_name_user(int j){ name_user = "xr" + String.valueOf(j); } } public class Comp extends Agents { public Comp (){ } public string name_comp; public string assign_name_comp(int j){ name_comp = "xr" + String.valueOf(j); } } } public class Comp_Behaviour extends Comp { // Variables and methods } public class User_Behaviour extends User { // Variables and methods } public class User_Solution extends User_Behaviour { // Variables and methods } public class Process { public process (){} public static void main(String[] args){ User_Solution solve = new User_Solution(); int j = 1; solve.name_user = solve.assign_name_user( j); // ERROR: SOURCE NOT FOUND Comp_Behaviour behave = new Comp_Behaviour(); behave.name_comp = behave.assign_name_comp(j);// ERROR: SOURCE NOT FOUND } }