Inheritance Reading Assignment

  1. What is the base contract?
    It is a parent contract. If B inherits or derives from A, then A is the base contract.

  2. Which functions are available for derived contracts?
    All public and internal scoped functions and state variables are available to derived contracts

  3. What is hierarchical inheritance?
    It’s when a single contract acts as a base contract for multiple derived contracts. For example, if A is the base (parent) contract and both B and C derive from A.

  1. What is the base contract?
    Parent contract is known as Base contract

  2. Which functions are available for derived contracts?
    All public and internal scoped functions.

  3. What is hierarchical inheritance?
    Base contract as a base for multiple derived contract.

1 Like
  1. What is the base contract?
    parent contract

  2. Which functions are available for derived contracts?
    all public and internal functin

  3. What is hierarchical inheritance?
    base contract as a base for multiple derived contract

1 Like
  1. The base contract is the parent contract in an inheritance.
  2. All the functions of the base contract are available in its derived ones.
  3. Hierarchical inheritance takes place when there are multiple derived contracts from a single base contract.
1 Like
  1. The parent contract
  2. All public and internal functions
  3. A single contract serves as parent for multiple derived contracts
1 Like
  1. What is the base contract?
    The parent contract

  2. Which functions are available for derived contracts?
    All public and internally scoped functions, and state variables

  3. What is hierarchical inheritance?
    When multiple contracts have the same base parent, that parent becomes the top of the hierarchy

1 Like

1.) The parent contract is the base contract.
2.) The “is-a” relationship between base and derived contracts means all public and internal scoped
functions and state variables are available to derived contracts
3.) Hierarchal inheritance means that a single contract acts as a base contract for multiple derived contracts.

1 Like
  1. It is a root contract it has no parents
  2. public and internal functions of ancestors
  3. It means one contract can have more than one deriving/child contract.
1 Like
  1. The base contract is the parent contract.

  2. Public and internal functions are available for derived contracts.

  3. Hierarchical inheritance is where a parent contract or base contract has multiple derived contracts.

1 Like
  1. What is the base contract?

A parent contract children can derive from. In Java they are the super.

  1. Which functions are available for derived contracts?
    Whatever is in the parent + whatever is in the children. (public and internal in parent)

  2. What is hierarchical inheritance?
    Multiple children can inherit from the same parent contract.

1 Like

Answers to “Inheritance reading assignment” questions:

  1. Parent contract
  2. All public and internal scoped functions and state variables
  3. A single contract that acts as a base for multiple derived contracts
1 Like
  1. Base contract is in other words the parent contract from which other contracts are derived from.
  2. All functions defined in parent contracts using the public or internal scope.
  3. A contract inherits functions depending on its position in the hierarchy and derives functions from all parent, grand-parent, grand-grand parent contacts.
1 Like
  1. What is the base contract?

The base contract is the parent contract in an inherited contract relationship.

  1. Which functions are available for derived contracts?

Any functions that are scoped with internal or public visibility

  1. What is hierarchical inheritance?

Hierarchical inheritance refers to the capability of multiple contracts deriving from the same base contract, producing multiple layers of inheritance…

1 Like
  1. What is the base contract?
    Base Contract is the Parent Contract or the inherited contract.

  2. Which functions are available for derived contracts?
    There is a relationship between the Parent and the child Contract therefore all public and internal scoped functions and state variables are available to derived contracts.

  3. What is hierarchical inheritance?
    Hierarchical inheritance is similar to simple inheritance, except with hierarchical inheritance We have one base contract for multiple derived contracts. In other words one parent contract with multiple children contracts.

1 Like
  1. What is the base contract? — the parent contract inherited from
  2. Which functions are available for derived contracts? — public and internal
  3. What is hierarchical inheritance? – base contract provides inheritance for multiple derived contracts
1 Like
  1. The base contract is the parent contract similar to a base class in other object-oriented programming languages.

  2. All functions in the base contract that are marked public or internal.

  3. A single contract acts as a base contract for multiple derived contracts.

1 Like

1 - Base contracts are ealso known as the parent contracts. These contracts are where the child contracts derive from.
2 - Public and internal functions are all available to derived contracts.
3 - Hierarchical inheritance is where single contracts acting as the base for multiple derived contracts.

1 Like
  1. The base contract is the parent that the children (derived contracts) can inherit from.
  2. All public and internal function that is in the base contract is available to derived contracts.
  3. It means that two or more different children can inherit from the same parent contract.
1 Like
  1. By “base contract” we mean the “original” parent contract.
  2. All public and internal functions.
  3. Once contract acts as a base for multiple derived contracts with the same parent.
1 Like
  1. What is the base contract?
  • Is the parent contract
  1. Which functions are available for derived contracts?
  • All public and internal scoped functions and state variables
  1. What is hierarchical inheritance?
  • A single contract acts as a base contract for multiple derived contracts.
1 Like