Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

What is the concept of abstraction in OOP?

View

Which Python module provides support for abstraction?

View

What is an abstract class?

View

Which keyword is used to define an abstract method?

View

Can an abstract class contain concrete methods?

View

What is the purpose of abstraction?

View

Can you create an object of an abstract class?

View

What happens if a subclass does not override all abstract methods?

View

Which method must be overridden in every subclass of an abstract class?

View

Can you declare an abstract class without any methods?

View

What is the concept of abstraction in OOP?

Hiding the internal implementation details
Using all data members as public
Overloading methods in a class
Encapsulating functions without data

Which Python module provides support for abstraction?

os
abc
math
collections

What is an abstract class?

A class that contains only private methods
A class that cannot be instantiated
A class with only public variables
A class without any methods

Which keyword is used to define an abstract method?

abstract
@abstractmethod
super()
virtual

Can an abstract class contain concrete methods?

Yes
No
Only with the @super decorator
Only in child classes

What is the purpose of abstraction?

To make code run faster
To provide a template for other classes
To reduce memory usage
To prevent access to all methods

Can you create an object of an abstract class?

Yes, using super()
No, it raises an error
Only with decorators
Only with inheritance

What happens if a subclass does not override all abstract methods?

The program executes with warnings
Python raises a TypeError
The subclass becomes abstract
The method is treated as private

Which method must be overridden in every subclass of an abstract class?

All public methods
All abstract methods
Only __init__()
Only static methods

Can you declare an abstract class without any methods?

Yes
No
Only in Python 2.x
Only with multiple inheritance