Inheritance Reading Assignment

Read through the blog post linked in the lecture, then answer the following questions. Post your answers in this forum thread.

  1. What is the base contract?
  2. Which functions are available for derived contracts?
  3. What is hierarchical inheritance?
  1. What is the base contract?: the parent contract.
  2. Which functions are available for derived contracts?: Polymorphism
  3. What is hierarchical inheritance?: It is similar to simple inheritance
1 Like
  1. The contract that is inherited is the parent contrat=base contract
    2.All public and internal scoped functions (as well as state variables) are available for derived contracts.
    3.In hierarchical inheritance, single contract acts as a base contract for multiple derived contracts.
1 Like
  1. What is the base contract?

The contract that is inherited is the parent contract

  1. Which functions are available for derived contracts?

.All public and internal functions and state variables are available for derived contracts.

  1. What is hierarchical inheritance?

Hierarchical inheritance is again similar to simple inheritance. Here, however, a single contract acts as a base contract for multiple derived contracts.

1 Like
  1. What is the base contract?
    parent contract or base contract
  2. Which functions are available for derived contracts?
    available are all public and internal functions, also all state variables
  3. What is hierarchical inheritance?
    single contract act as a base contract for multiple derived (child) contracts
1 Like
  1. The base contract is the parent contract. Also known as the contract from which the child contracts, or derived contracts, derive public and internal functions, state variables, modifiers, and events.

  2. Functions defined using the public or internal scope.

  3. It’s a type of inheritance where instead of one parent contract and one child contract, there is one parent contract and multiple child contracts deriving from it.

1 Like