M
Marco
Hi all,
I have the following situation:
class A
method m () { (// do A.m job }
}
class B extends A
method m() { super.m(); // do B.m job }
}
class C extends B
method m() { // DON'T do B.m job BUT DO A.m job, i.e.: call A.m()
only; // do C.m job }
}
I wonder if there is a best practice to obtain that, without changing
A or B. "C extends A" is not a good answer, since C has a much else in
common with B, rather than A only.
Thanks in advance.
Marco.
I have the following situation:
class A
method m () { (// do A.m job }
}
class B extends A
method m() { super.m(); // do B.m job }
}
class C extends B
method m() { // DON'T do B.m job BUT DO A.m job, i.e.: call A.m()
only; // do C.m job }
}
I wonder if there is a best practice to obtain that, without changing
A or B. "C extends A" is not a good answer, since C has a much else in
common with B, rather than A only.
Thanks in advance.
Marco.