Question: b) Describe any three differences between an abstract Class and an Interface in JAVA. 6 marks) c) Show with the aid of a simple example

b) Describe any three differences between an abstract Class and an Interface in JAVA. 6 marks) c) Show with the aid of a simple example how a Class can implement any number of interfaces at a time 6 marks) d) Explain what is meant by a static method in java and show with an example how such a method is called (10 marks) e) Define a Class which represents a Car. The Car Class is to have three fields representing Car model, Number of miles driven and the number of Gallons of Petrol used. The Car Class also has Set, Get and Display methods. It also has an equals method which checks if two cars are the same in every respect. (12 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
