conditional explanation formed type
given:
interface i
{
}
class b: i
{
}
class c: i
{
}
class a
{
open vacant method(b arg)
{
}
open vacant method(c arg)
{
}
open vacant method(i arg)
{
// slight i wish simplify.
(i b)
{
this.method(arg b);
}
else (i c)
{
this.method(arg c);
}
}
}
i know there improved ways settlement form interactions, nonetheless since
details take too enlarged explain possible.
since settlement repetitious times, i reinstate the
conditional explanation general doing i only line.
i can't rudimentary proceed exercise general method/class, nonetheless instincts tell me should possible.
any assistance appreciated.
Comments
Post a Comment