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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!