Java - Spoken Tutorials - Assignments Funded by the National Mission on Education through ICT ------------------------------------------------------------------------------------- Java Interfaces (a) Create an interface Vehicle which contains the methods brake() and run() (b) Create another interface Fuel which contains the following methods: - fill(String type, int quantity) - pay(int quantity, int price) (c) Create a subclass Car which implements both the interfaces Vehicle and Fuel - Here brake() method should print "Car Applies Power brake" - run() method should print "Car is running on 4 wheels" (d) Similarly fill() method can print the the type and quantity of the fuel filled - For example: 10 Litres of Petrol (e) pay() method can be used to print the price to be paid - For example: Pay Rs.640 (f) Create another subclass Bike which again implements both the interfaces Vehicle and Fuel - Here brake() method should print "Bike Applies hand brake" - run() method should print "Bike is running on 2 wheels" (g) Next, implement the fill() and pay() methods as explained earlier (h) Finally create a Demo class containing the main() method to verify the results