Question 4: You have an interface ICar, with a method drive(); a. You have classes BMW, and Mercedes which will inherit from the above interface. Write the remaining code for inheritance. (No need to...


answer quickly as soon as possible


Question 4: You have an interface ICar, with a method drive();<br>a. You have classes BMW, and Mercedes which will inherit from the above interface. Write the<br>remaining code for inheritance. (No need to implement the drive() method).<br>b. Now you have an interface ElectricCar which will inherit from ICar interface. Write the<br>code for this situation.<br>interface ICar{<br>public void drive();<br>}<br>

Extracted text: Question 4: You have an interface ICar, with a method drive(); a. You have classes BMW, and Mercedes which will inherit from the above interface. Write the remaining code for inheritance. (No need to implement the drive() method). b. Now you have an interface ElectricCar which will inherit from ICar interface. Write the code for this situation. interface ICar{ public void drive(); }

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here