Question
Which of the following best describes Abstraction in
Object-Oriented Programming (OOP)?Solution
Abstraction is a core concept of OOP that focuses on hiding unnecessary implementation details while exposing only the essential features of an object. This is achieved through abstract classes and interfaces. For instance, a Car class might expose methods like start() or drive() without detailing how the engine works internally. Abstraction simplifies the development process by allowing programmers to focus on high-level logic rather than low-level complexities. It also enhances security by preventing direct access to sensitive parts of an application. Why Other Options Are Incorrect : 2. Restricting access to certain parts of an object to protect data : This describes Encapsulation , not Abstraction. Encapsulation involves bundling data and methods together and using access modifiers to control visibility. 3. Combining different objects into a single unit to represent a relationship : This describes Aggregation , where objects are linked to represent "has-a" relationships, like a Library having Books. 4. Allowing multiple classes to share the same method name but with different implementations : This defines Polymorphism , specifically method overriding or overloading, and is unrelated to abstraction. 5. Establishing a parent-child relationship between classes : This is Inheritance , where one class derives from another, enabling code reuse and hierarchy building.
3/7 of 686 + 133(1/3)% of 33 β 69 =?
What will come in the place of question mark (?) in the given expression?
(12.09)2 Γ 5.98 Γ· 26.95 = ? + 25Β
648 ÷ 36 × 49 – 1012 + 847 = ?
β324 + β576 = ?/ β9
(122 - 82 ) X ? = 90% of 500 - (90 - 25) X 2
520% of 360 β 12% of 400 = ? x 4
15 Γ 18 + 25 Γ 12 + 30 Γ 24 = ?% of 1720
(6 Γ β361) Γ 2.5 = ? + 125
- What will come in the place of question mark (?) in the given expression?
(165 Γ 12) Γ· 45 + 110 = ? Γ 2