Computer Science, asked by anushkagaur3627, 10 months ago

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 BAJAJAKRATI99
36

Here we will used interface.

Answered by shreyacc7
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