Java Annotations

  • + 2 comments

    Although, I read tutorials and implemented the code, I dont know how it works. I mean, the family by default doesn't have senior or junior user. Which means, the familymember class don't know which method to invoke, when two parameters are passed.

    I dont see any line that sets the userRole in the class as SENIOR or JUNIOR. I see the below line.

    String userRole = family.userRole();
    int budgetLimit = family.budgetLimit();
    

    This is infact, setting userRole from family. the default in family is guest, so it should set userRole as Guest which will never be equal to the inputs passed.

    Am I understanding something different?