1) Which of the following statement is true for object-oriented programming language? (i) It uses object as its fundamental building block. (ii) Similar objects are classified using a concept of class (iii) Abstraction, encapsulation, polymorphism, and inheritance is its basic properties, (A) only (i) and (ii) (B) only (ii) and (iii) (C) only (i) and (iii) (D) (i), (ii) and (iii) Answer...
1) Which of the following is provided using encapsulation? (A) Data protection (B) Data sharing (C) Separation of data and methods (D) All of the above Answer: (A) Data protection Explanation: Encapsulation in object-oriented programming provides: - Data protection: Encapsulation allows the hiding of the implementation details of a class and only exposing the necessary functionalities. This helps in protecting the data from unauthorized access and modification. 2) With which of the following options polymorphism cannot be achieved? (A) Method Overloading (B) Operator Overloading (C) Data hiding (D) All of the above Answer: (C) Data hiding Explanation: Polymorphism can be achieved through method overloading and operator overloading. These concepts allow multiple methods or operators to have the same name but different implementations, providing a way to achieve polymorphism. - Method Overloading: In method overloading, multiple methods in the same class ...