Here are the steps through the process of adding both
MaxRecs
and
NumRecs
:
- We add read-only properties the same way we added
CurRec
. Right-click IReadPhBook
in the ClassView pane of the Workspace window.
- Select Add Property ... and click OK. This will bring up the Add Property to Interface dialog.
- In the Add Property to Interface dialog, open the Property Type drop-down menu.
- Choose long as the property type.
- Once you've chosen long as the property type, type
MaxRecs
as the property name. Because this is to be a read-only property, uncheck the Put
function under Function Type. When you're done, click OK to finish.
- The property
MaxRecs
has been added to IReadPhBook
. Next we want to add NumRecs
as a read-only property. Right-click IReadPhBook
in the ClassView pane of the Workspace window.
- Select Add Property ... and click OK. This will bring up the Add Property to Interface dialog.
- In the Add Property to Interface dialog, open the Property Type drop-down menu.
- Choose long as the property type.
- Once you chose long as the property type, type
NumRecs
as the property name. Because this is a read-only property, uncheck Put
function. When you are done, click OK.
- The property
NumRecs
is added to IReadPhBook
. This is the end of the simulation.