Single inheritance helps in inheriting the variables, functions, modifiers, and events of base contracts into the derived class. Take a look at the following diagram:
The next code snippets help to explain single inheritance. You will observe that there are two contracts, ParentContract and ChildContract. The ChildContract contract inherits from ParentContract. ChildContract will inherit all public and internal variables and functions. Anybody using ChildContract, as seen in the client contract, can invoke both GetInteger and SetInteger functions as if they were defined in ChildContract, as shown in the following screenshot: ...