I
interec
I have some code in Java that I need to translate into C++. My Java
code defines a class hierarchy as follows:
// interface IA
public interface IA
{
public abstract void doA();
}
// interface IB
public interface IB extends interface IA
{
public abstract void doB();
}
// concrete class JA conforming to interface IA
public class JA implements IA
{
public void doA() { ... }
}
// concrete class JB extending from JA (so that JB knows about method
doA() ) and
// conforms to interface IB (which is derived from interface IA)
public class JB extends JB implements IB
{
public void doB() { ...}
}
How do I translate these classes into C++ (specially class JB),
without duplicating code in C++ equivalent classes of JA and JB and
while making sure that JA and JB conform to their respecting
interfaces IA and IB.
Thanks
-- Albert
Webmaster, InterEC.NET
code defines a class hierarchy as follows:
// interface IA
public interface IA
{
public abstract void doA();
}
// interface IB
public interface IB extends interface IA
{
public abstract void doB();
}
// concrete class JA conforming to interface IA
public class JA implements IA
{
public void doA() { ... }
}
// concrete class JB extending from JA (so that JB knows about method
doA() ) and
// conforms to interface IB (which is derived from interface IA)
public class JB extends JB implements IB
{
public void doB() { ...}
}
How do I translate these classes into C++ (specially class JB),
without duplicating code in C++ equivalent classes of JA and JB and
while making sure that JA and JB conform to their respecting
interfaces IA and IB.
Thanks
-- Albert
Webmaster, InterEC.NET