Using your preferred text editor, open a stub file and locate the interfaces. For example, the CTeacher class implements two interfaces: IEmployee and ITeacher.
C++
When you open the CTeacher.cpp file, you see code similar to the following. Note the line that reads "Stub method bodies for interface". Within this interface block are the method stubs you must fill out.
// Stub method bodies for interface: ITeacher
HRESULT
CTeacher::GetClassSize(
/* [out] */ int *pClassSize)
{
HRESULT hr=GXE_SUCCESS;
//***
//*** Provide your implementation here
//*** and remove the GXASSERT below
//***
GXASSERT(FALSE, GXASSERT_WARNING, "No implementation for
CTeacher::GetClassSize");
return hr;
}
HRESULT
CTeacher::SetClassSize(
/* [in] */ int classSize)
{
HRESULT hr=GXE_SUCCESS;
//***
//*** Provide your implementation here
//*** and remove the GXASSERT below
//***
GXASSERT(FALSE, GXASSERT_WARNING, "No implementation for
CTeacher::SetClassSize");
return hr;
}
// Stub method bodies for interface: IEmployee
HRESULT
CTeacher::GetName(
/* [out] */ LPSTR pName,
/* [in] */ int _sizepName)
{
HRESULT hr=GXE_SUCCESS;
//***
//*** Provide your implementation here
//*** and remove the GXASSERT below
//***
GXASSERT(FALSE, GXASSERT_WARNING, "No implementation for
CTeacher::GetName");
return hr;
}
Java
When you open the CTeacher.java file, you see code similar to the following. Note the line that reads "Method bodies for interface". Within this interface block are the method stubs you must fill out.
public class CTeacher
implements com.schooldistrict.ITeacher,
com.schooldistrict.IEmployee, com.kivasoft.ITemplateData
{
public com.schooldistrict.EmployeeServices.CEmployeeMgr m_Module;
public CTeacher(com.schooldistrict.EmployeeServices.CEmployeeMgr
module)
{
m_Module=module;
}
public void finalize()
{
}
// Method bodies for interface: ITeacher
public int getClassSize()
{
// ****
// **** Provide your implementation here
// ****
System.out.println(
"No implementation for CTeacher::getClassSize");
return 0;
}
public int setClassSize(
int classSize)
{
// ****
// **** Provide your implementation here
// ****
System.out.println(
"No implementation for CTeacher::setClassSize");
return 0;
}
// Method bodies for interface: IEmployee
public java.lang.String getName()
{
// ****
// **** Provide your implementation here
// ****
System.out.println(
"No implementation for CTeacher::getName");
return null;
}