1. Encapsulation is seen as the bundling of data with the methods that operate on that data. Information hiding on the other hand is the principle that ______________________
2. Data encapsulation via methods doesn't necessarily mean that the data is hidden. You might be capable of accessing and seeing the data anyway, but using the methods is recommended
3. Encapsulation is often accomplished by providing two kinds of methods for attributes: The methods for retrieving or accessing the values of attributes are called _______
4. Getter methods do not change the values of attributes, they just ___________________
5. The methods used for changing the values of attributes are called ___________
6. Analyse the following code that uses getters and setters and predict the output
7. In Python, encapsulation is not enforced by the language, but the convention we use to indicate that a property is intended to be private is:
8. It is also customary to set and get simple attribute values directly, and only write setter and getter methods for values which require some kind of calculation
9. What is the output of the following code?
10. The purpose of getters and setters is to get(return) and set(assign) private instance variables of a class.
11. These attributes can be freely used inside or outside of a class definition.
12. These attributes should not be used outside of the class definition, unless inside of a subclass definition.
13. This kind of attribute is inaccessible and invisible. It's neither possible to read nor write to those attributes, except inside of the class definition itself.
14. Encapsulation can also be defined as the process of combining data and functions into a single unit called class
15. In this Java scode a hacker tries to deposit an invalid amount (-100) to your account. What happens?