Computer Science, asked by egitelalochanchowdar, 11 months ago

Question 17
Identify the OOP principles that have been implemented in the below code:
elass Phone:
det init (self, imei number, brand):
self. imei number=imei number
self. brand=brand
KWA
def calling feature(self):
print("Voice calls can be made using Phone")
class Smart Phone (Phone):
def calling feature (self):
print("voice calls as well as video calls can be made using Smart Phone")
O
Only Inheritance and Encapsulation​

Answers

Answered by muttinenikalpana316
2

Answer:

only inheritance and encapsulation

Answered by shreya457sl
0

Answer:

The OOPs principles used in the code are encapsulation and inheritance

Explanation:

In the Object-Oriented Computer Programming Language (OOP), the term encapsulation (or OOP encapsulation) refers to bundling data with methods that manipulate the data into a single entity. Many programming languages ​​often use encapsulation in the form of classes.

If a class is derived from another class. The child class inherits all public and protected properties and methods from the parent class. In addition, you can have your own properties and methods. The inherited class is defined with the extended keyword.

Similar questions