QUESTION IMAGE
Question
which of the following is not a benefit of using oop?
code reusability
modularity
increased code complexity
maintainability
question 10
1 pts
what is the purpose of a getter method in encapsulation?
to modify a private attribute.
to access the value of a private attribute.
to delete a private attribute.
to create a new private attribute.
question 11
1 pts
what is the purpose of a setter method in encapsulation?
to access the value of a private attribute.
to modify a private attribute.
to delete a private attribute.
to create a new private attribute.
- For the first question: OOP benefits include code reusability, modularity, and maintainability. Increased code complexity is a potential drawback, not a benefit.
- For Question 10: Getter methods in encapsulation allow controlled access to the value of private attributes without modifying them.
- For Question 11: Setter methods in encapsulation enable controlled modification of private attributes while maintaining data integrity.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
First question: Increased code complexity
Question 10: To access the value of a private attribute.
Question 11: To modify a private attribute.