Inheritance Reading Assignment

  1. What is the base contract?
    In inheritance, the base contract is a parent contract in which the parent is also known as the derived class. It is the contract from which other contracts inherit characteristics.

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

  3. What is hierarchical inheritance?
    In hierarchical inheritance, a single contract acts as a base contract for several derived contracts.

1 Like
  1. The base contract is the parent contract.

  2. All public and internal scoped functions along with state variables are available for derived contracts.

  3. Hierarchial inheritance: One singel contract act as the base contract for multiple derived contracts.

1 Like
  1. What is the base contract? Parent contract
  2. Which functions are available for derived contracts? polymorphism
  3. What is hierarchical inheritance? A single contract acts as a base contract for multiple derived contracts.

1.It is the parent contract where child contract is derived
2.Functions available for derived contracts are public internal scope
3.It is inheritance where a single parent can have multiple children

  1. What is the base contract?
  • The contract which is inherited is considered the base contract.
  1. Which functions are available for derived contracts?
  • Every internal or public functions and, also, state variables, are available for the derived contracts.
  1. What is hierarchical inheritance?
  • It’s the type of inheritance that happens when a single contract is the parent contract for two or more child contracts.
1 Like
  1. In Solidity, a base contract is a contract that is inherited by another contract. The purpose of a base contract is to provide a set of common functionalities or properties that can be shared by multiple child contracts.

  2. In Solidity, when a contract inherits from a base contract, the derived contract gains access to all of the functions and variables that are defined in the base contract. This means that the derived contract can use and call all of the functions and variables that are available in the base contract as if they were defined in the derived contract itself.

  3. In Solidity, hierarchical inheritance is a type of inheritance where a single derived contract inherits from multiple base contracts that are arranged in a hierarchical manner. This means that each base contract can itself be a derived contract that inherits from other base contracts, forming a hierarchy of inheritance.

  1. What is the base contract?
    It is the parent contract, the one from which other contracts inherit.
  2. Which functions are available for derived contracts?
    Public and internal.
  3. What is hierarchical inheritance?
    When one contract acts as a base for multiple derived contracts.
1 Like
  1. What is the base contract?
    It’s the parent contract.
  2. Which functions are available for derived contracts?
    All public and internal functions.
  3. What is hierarchical inheritance?
    It’s similar to simple inheritance
1 Like
  1. The base contract is the parent contract which child contracts inherit from. The contract that is the highest in the hierarchy.

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

  3. Hierarchical inheritance is when one base contract acts as parent to multiple derived contracts.

1 Like
  1. What is the base contract?
  • Similar to inheritance in other languages inheritance, the base contract acts as the parent by which all classes are derived from or similarly child classes
  1. Which functions are available for derived contracts?
  • All the public and internal functions of the base contract or parent contract
  1. What is hierarchical inheritance?
  • In this context there are multiple contracts that derive from on contract thus a sequence of hierarchies are developed where where many contacts are consecutively derived from one.
  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?
    A base contract is the parent contract.

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

  3. What is hierarchical inheritance?
    This is a situation where a single contract acts as a base contract for multiple derived contracts.