[Solved] Fatal error: Uncaught TypeError: Argument 1 passed

jhon jhon doe Asks: Fatal error: Uncaught TypeError: Argument 1 passed
Please anyone see my code and resolve this issue

Fatal error: Uncaught TypeError: Argument 1 passed to MyClass::__construct() must implement interface MagentoFrameworkSessionSessionManagerInterface, none given, called in /home/dukaania/public_html/testing2/vendor/magento/module-checkout/view/frontend/templates/cart/shipping.phtml on line 132 and defined in /home/dukaania/public_html/testing2/vendor/magento/module-checkout/view/frontend/templates/cart/shipping.phtml:109 Stack trace: #0

Code:
    use MagentoFrameworkSessionSessionManagerInterface as CoreSession;

    class MyClass
    {

        protected $_coreSession;

        public function __construct(CoreSession $coreSession) 
        {
            $this->_coreSession = $coreSession;

        }

      public function setValue($total_cost){
        $this->_coreSession->start();
        $this->_coreSession->setMessage($total_cost);


    }

    public function getValue(){
        $this->_coreSession->start();
        return $this->_coreSession->getMessage();


    }


}

$myclas = new MyClass();

 $myclas.setValue($total_cost);     
 echo $myclas.getValue();

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.