In this program, we have created a class namedSample, which contains apublicvariableageand apublicfunctiondisplayAge(). Inmain(), we have created an object of theSampleclass namedobj1. We then access thepublice