I have overridden
file in my custom plugin using di.xml using below code:
<preference for="Magento\Checkout\CustomerData\Cart" type="Vendor\Package\CustomerData\Cart" />
It's working too. I can get SectionData defined in my custom Cart.php file in Minicart successfully.
but this removes Total from my Minicart which was working fine with default Cart.php.
Please suggest if i am doing something wrong in overriding file.