Hi @Bhushan_Pawar,
Your Ownable contract and close() function are well coded 
The deployed contract is successfully destroyed when terminate() is called because you have added the correct code so that Call_Destruction inherits the functionality of Ownable, including the close() function which contains selfdestruct()
However, because close() is available to the derived contract via inheritance, there is no need to also write a function (terminate) in the derived contract to be able to call close() once the derived contract has been deployed. By changing the visibility of close() from internal
to public
, if you remove terminate(), you will see that close() is still available to call from Remix. This highlights an important advantage of inheritance: it helps to avoid code duplication, while maintaining modularity.
I think this also explains why you were getting a bit confused when describing how inheritance works in the previous Reading assignment.
Now, once weâve removed the function terminate() from your derived contract, you will see that, as it is at moment, there is actually no need to have this contract in the first place, because it doesnât contain any true functionality of its own. There is also no need to destroy a contract that doesnât store any data or perform any other useful operations.
The aim of this assignment is for our Bank contract (or similar, if youâve been developing your own variation) to inherit the selfdestruct() and Ownable functionality, so that we can:
- destroy a contract which has already performed some transactions and stored some data in its contract state (otherwise you canât actually see if the destruction was successful or not); and
- demonstrate a key feature of selfdestruct() :âthe transfer of the ether balance remaining in the contract being destroyed, to the caller of the selfdestruct function (here, the contract owner).
You can also develop the inheritance structure one stage further, in order to keep the contract ownership and contract destruction functionality separate â each within its own contract e.g. Ownable and Destroyable. You would then need to decide how to change your exisiting code for this inheritance structure, because you would now have three contracts instead of just two.
Let us know if anything is unclear, or if you have any questions about how to implement any of the above 