---
id: 67e91453fe48d46c2881267a
title: Task 34
challengeType: 19
dashedName: task-34
lang: en-US
---

<!-- (Audio) Sophie: Not exactly. "Inheritance" is when one class inherits properties and methods from another class, allowing for code reuse and extending functionality within a project. -->

# --instructions--

Listen to the audio and answer the question below.

# --questions--

## --text--

What does Sophie explain about inheritance?

## --answers--

It's when two classes use the same name but do different things.

### --feedback--

This describes a different concept, not inheritance.

---

It's when each class contains completely separate code.

### --feedback--

Sophie talks about reusing code, not keeping classes separate.

---

It's when one class receives properties and methods from another class.

---

It's when you move methods from one project into another by copy-pasting.

### --feedback--

This sounds like duplicating code, but inheritance is about structured reuse, not copying code manually.

## --video-solution--

3

# --explanation--

Sophie explains inheritance as a programming concept where one class (a child or subclass) can access the properties and methods of another class (the parent or superclass).

This allows developers to reuse code and extend functionality without rewriting everything. It's a key part of object-oriented programming that promotes efficiency and cleaner design.

# --scene--

```json
{
  "setup": {
    "background": "company2-center.png",
    "characters": [
      {
        "character": "Sophie",
        "position": {
          "x": 50,
          "y": 0,
          "z": 1.4
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "B1_16-1.mp3",
      "startTime": 1,
      "startTimestamp": 52.88,
      "finishTimestamp": 62.38
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 10.5,
      "dialogue": {
        "text": "Not exactly. Inheritance is when one class inherits properties and methods from another class, allowing for code reuse and extending functionality within a project.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 11
    }
  ]
}
```
