PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Amazon

Explain inheritance, polymorphism, constructors, destructors

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of object-oriented programming concepts—specifically inheritance, polymorphism, constructors, and destructors—and competency in explaining class relationships, method overriding, and object lifecycle semantics.

  • easy
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Explain inheritance, polymorphism, constructors, destructors

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

## OOP fundamentals Answer the following concept questions and provide a small example where requested: 1. **Inheritance vs. polymorphism** - Explain what *inheritance* is and what *polymorphism* is. - Give an example showing a child class **overriding** a parent class method. 2. **Constructor vs. destructor** - Explain the purpose of constructors and destructors and when they are executed. - Follow-up: **Does Python have a destructor?** If so, what is it, and what caveats exist?

Quick Answer: This question evaluates understanding of object-oriented programming concepts—specifically inheritance, polymorphism, constructors, and destructors—and competency in explaining class relationships, method overriding, and object lifecycle semantics.

Related Interview Questions

  • Validate AI-Generated Code Safely - Amazon (medium)
  • Fix the Password Reset Workflow - Amazon (medium)
  • Design an In-Memory Pub-Sub Model - Amazon (medium)
  • Explain Aurora-style internals: WAL, MVCC, replication, recovery - Amazon (hard)
  • Build a responsive grid of fixed boxes - Amazon (medium)
Amazon logo
Amazon
Jan 22, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
4
0
Loading...

OOP fundamentals

Answer the following concept questions and provide a small example where requested:

  1. Inheritance vs. polymorphism
    • Explain what inheritance is and what polymorphism is.
    • Give an example showing a child class overriding a parent class method.
  2. Constructor vs. destructor
    • Explain the purpose of constructors and destructors and when they are executed.
    • Follow-up: Does Python have a destructor? If so, what is it, and what caveats exist?

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.