Example:
Car with functions (methods seemed outside) as Stop, Run forward, Run reverse. This is what is needed for the driver to interact with the car. Cars can have an object, but the engine driver does not need to be concerned. All you need to care about is the functionality to be able to operate the vehicle. Therefore, when replacing a different motors, drivers still use the old function to operate the car how long these functions (methods) make outside (Interface) are not changed.
đang được dịch, vui lòng đợi..