i have the following problem.
i hava a java class
public class A {
login()
getRights()
methodA()
methodB()
methodC()
}
now i have the following scenario. I create an instance of class A. and now i want to check with the login function wheter i'm logged in. If not, the object don't have the rights to call method a, b and c. After that i want to check with the getRights() function wheter the object have the rights to call the method b and c. Is there a smart implementation? otherwise i have to inherit from class a and overwrite the blocked functions ?
If not the object don't have the rights to call method a, b and c. Exactly