Inheritance Reading Assignment

  1. A base contract is the parent contract from which child contracts inherit from.
  2. Public and internal functions are available for derived contracts.
  3. A hierarchical inheritance is a situation where a single contracts acts as a parent to multiple derived contracts.
1 Like
  1. A contract that is inherited by other contracts.

  2. Public & internal (as well as state variables)

  3. When multiple child classes inherit from the same parent class

  1. What is the base contract?
    The contract that is inherited is called the parent contract and is known as a 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?
    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. The base contract is the parent contract for a given child contract

  2. All public and internal scoped functions from the parent contract

  3. Hierarchical inheritance is where a contract is parent to multiple child contracts

  1. What is the base contract?

The base contract is the contract the other contracts derive from.

  1. Which functions are available for derived contracts?

Public, internal and external

  1. What is hierarchical inheritance?

It is when a contract inherits from another contract and then that contract inherits from that contracts etc. Basically, a contract could inherit from multiple contracts in a hierarchical order starting from the first contract.

1.) A base contract is Aka the parent contract
2.) Both public and internal functions and state variables
3.) its similar to a single inheritance but works also with multiple derived contracts.
  1. The base contract is the contract that other contracts inherited/derived from, also known as the parent contract.

  2. All internal and public functions are available for the derived contract.

  3. Hierarchical inheritance is when one base contract is used as a base by multiple derived contracts, in other words one parent contract with multiple child contracts.

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

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

  3. What is hierarchical inheritance?
    A single parent or base contract is used for multiple derived or child contracts.

1 The first and main contract that everyone inherits from.
2 Every function that is not private.
3 Contract B is A, Contract C is B
this way A=>B=>C
C inherits both from A and B

  1. The parent contract is know as an base contract.
  2. All public and internal scoped functions and state variables are available to derived contracts.
  3. Hierarchial inheritance is a single contract that acts as a base contract for muliple derived contracts.
  1. What is the base contract?

The base contract is also known as the parent contract and is the one that is inherited.

  1. Which functions are available for derived contracts?

The functions available for derived contracts are all public and internal scoped functions, as well as state variables.

  1. What is hierarchical inheritance?

Hierarchical inheritance is similar to simple inheritance but differentiates itself by a single contract acting as a base contract for multiple derived contracts.

Two or more contracts (eg. Contract B & Contract C) can be derived form base contract A.

  1. What is the base contract?

The parent contract from which child contracts derive from.

  1. Which functions are available for derived contracts?

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

  1. What is hierarchical inheritance?

Hierarchal Inheritance is when a single contract acts as a base contract from which multiple other contracts are derived.

  1. Base contract = parent contract, the one child contracts (derived from it) inherits from.

2.Derived contracts can access functions and state variables that are set to public or internal visibility levels.

  1. Hierarchical inheritance occurs when a contract acts as parent to multiple child contracts (or, in reverse, when 2 or more child contracts are derived from the same parent contract):
    image
1 Like

1.The base contract is the “parent” contract that the “child” contracts inherit functions and other data from.

  1. All functions that asre public or internal are available for derived contracts to use.

  2. Hierachical inheritance is the concept which multiple contracts can be derived from a single parent contract

  1. What is the base contract?
    Is the inherited contract known as Parent contract
  2. Which functions are available for derived contracts?
    State variables, public and internal scoped functions, code-reusability.
  3. What is hierarchical inheritance?
    Hierarchical inheritance is similar to simple inheritance, here, a single contract acts as base contract for multiple derived contracts.
1 Like
  1. Base contract is a parent contract that can be inherited by the child contract.

  2. All public and internal scoped functions can be inherited by derived contracts from the base contract.

  3. We can call the inheritance hierarchical when the single contract acts as a base contract for multiple derived contracts.

2 Likes
  1. The Base contract, is the parent contract. (Our foundational contract for future derived contracts).
  2. All public and Internal scoped functions and state variables are available to derived contracts.
  3. A single contract acts as the base contract for multiple derived contracts.
    Contract A is the parent of contract of contract C and B for example.
1 Like

As a child contract is seen as connected to the parent contract, the external functions would not be able to be called by the child contract, along with private functions

  1. The base contract is the parent contract.
  2. All public and internal functions, also all state variables
    3.The base or parent contract serves as a base contract to multiple contracts.
1 Like
  1. The base contract is the contract that another contract inherits from. Also known as a parent.

  2. “all public and internal scoped
    functions and state variables are available to derived contracts.”

  3. When a single contract is base contract for multiple derived contracts.

1 Like