Here are the steps requires to add interface methods:
- The first step is to add
GetPhoneRec
to interface IReadPhBook
. Right-click on IReadPhBook
in the ClassView pane of the Workspace window.
- Click Add Method ... to bring up the Add Method to Interface dialog.
- In the Add Method to Interface dialog, type
GetPhoneRec
for the method name. Type [in] PhRec *pPhRec, [out] BOOL *pOK
as parameters. Normally, the implementation is displayed in the Implementation window as you type. When you are done, click OK.
- We have expanded
IReadPhBook
in Class View to show GetPhoneRec
as a member of IReadPhBook
. The next step is to add AddPhoneRec
to IManagePhoneRec
. Right-click on IManagePhBook
.
- Click Add Method ... to bring up the Add Method to Interface dialog.
-
In the Add Method to Interface dialog, type
AddPhoneRec
for the method name. Type [in] PhRec *pPhRec, [out] BOOL *pOK
as parameters. Normally, the implementation is displayed in the Implementation window as you type. When you are done, click OK.
- We have expanded
IManagePhBook
in Class View to show that AddPhoneRec
has been added. The last step is to add DeletePhoneRec
to IManagePhBook
. Right-click on IManagePhBook
.
- Click Add Method ... to bring up the Add Method to Interface dialog.
- In the Add Method to Interface dialog, type
DeletePhoneRec
for the method name. Type [out] BOOL *pOK
as parameters. Normally, the implementation is displayed in the Implementation window as you type. When you are done, click OK.
- Class View displays
DeletePhoneRec
under IManagePhBook
. This is the end of the simulation.