Back to Freecodecamp

Task 31

curriculum/challenges/english/blocks/learn-how-to-clarify-misunderstandings/67e8ce6f8c053c600e2ad20e.md

latest2.8 KB
Original Source
<!-- (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 complete the sentence below.

--fillInTheBlank--

--sentence--

BLANK. "BLANK" is when one class inherits properties and methods from another class, allowing for code reuse and extending functionality within a project.

--blanks--

Not exactly

--feedback--

This two-word phrase is used to gently correct someone. It means their understanding is close, but not completely accurate. The first letter of the first word is capitalized.


Inheritance

--feedback--

This is a programming concept where one class can take on the properties and methods of another, supporting reuse and extension. The first letter is capitalized.

--explanation--

Not exactly is a polite way to say that someone's idea or guess is close but not entirely correct. It's often used before giving a clearer or more accurate explanation. For example:

  • Person 1: Is encapsulation just about hiding code?

  • Person 2: Not exactly, it's also about organizing and protecting it. - This shows how not exactly is used to correct a statement gently while adding more detail.

Inheritance is a key concept in object-oriented programming. It allows one class (the child or subclass) to receive the properties and methods of another class (the parent or superclass). This supports code reuse, meaning you don't have to rewrite the same logic in multiple places, and it also makes it easier to extend or build upon existing functionality. For example:

Inheritance allows the "Employee" class to reuse code from the "Person" class, like name and email methods. - This shows how inheritance helps one class gain properties and behavior from another, avoiding code duplication.

--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
    }
  ]
}