Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started