Camera has the feature called takePhoto. Mobile has implemented camera and has given its own definition for takePhoto. Laptop has also implemented Camera and has given its own implementation of Camera. What is the Object Oriented concept between Camera and Mobile and Camera and Laptop?
Answers
Answered by
36
Here we will used interface.
Answered by
0
Answer:
Interface
Explanation:
As interface has abstract methods without definition. And these methods are defined in the classes which will implements the interface
here, camera is an interface..which has takePhoto as an abstract method
whereas, Mobile and Laptop are the classes implementing camera interface and giving their own definition for the method takePhoto
Similar questions
Math,
5 months ago
Math,
9 months ago
Chemistry,
9 months ago
Social Sciences,
1 year ago
Math,
1 year ago