Question: 1 . Create an abstract class named Vehicle with an abstract method start ( ) , and a non - abstract method fuelCapacity ( )
Create an abstract class named Vehicle with an abstract method start and a nonabstract method fuelCapacity Create an interface named Electric Vehicle with a method charge Implement two classes Car and Electric Car that inherit from Vehicle and demonstrate the use of the interface Electric Vehicle. Create instances of these classes and use polymorphism to callthemethods
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
