Inheritance design problem
Hi,
The objective is : There are 2 users of a system, one normal and other privileged. Normal users can use some parts of the system(say,can invoke methods 1-4) and privileged users can use all of the normal users methods(can invoke methods 1-4) and also some other important methods( say,can invoke methods 5-10) also.
To do this, I made 2 interfaces and 2 classes. Following is the details:
interfcae Normal {
public void method1();
public void method2();
public void method3();
public void method4();
}
interface Privileged extends Normal {
public void method5();
public void method6();
public void method7();
public void method8();
public void method9();
public void method10();
}
class NormalImpl implements Normal{
// implements all Normal
}
class PrivilegedImpl extends NormalImpl implements Privileged{
// implements only Privileged
}
Please tell if this hierarchy is correct and posesses good Object design for both the Normal users and Privileged users for now and future.
Thanks in advance
Rajesh

