Inheritance Reading Assignment

  1. A base contract is a parent contract that child inherits information from it.
  2. All public, internal and state functions are available in Derived contracts, or child contracts.
  3. Hierarchical inheritance means multiple contracts are derived from one base contract.
1 Like
  1. What is the base contract?

The base contract is the contract that exists in the parent. It is the contract from which child contracts can be inherited from.

  1. Which functions are available for derived contracts?

All of the public and internally scoped functions as well as state variables.

  1. What is hierarchical inheritance?

This is where a single base contract can be inherited by multiple derived contracts

1 Like
  • What is the base contract?

Is a parent contract.

  • Which functions are available for derived contracts?

All public and internal scoped functions.
State variables.

  • What is hierarchical inheritance?

Is a type of inheritance where single contract act as a base contract for multiple derived contracts.

1 Like
  1. The contract that has the parent known is the base contract.
  2. All public and internal scoped
    functions and state variables are available to derived contracts.
  3. Similar to simple inheritance, however, a single contract acts as a base contract for multiple derived contracts.
1 Like

Inheritance Reading Assignment

  1. What is the base contract?

The base contract is the parent contract that other derived (child) contracts inherit from.

  1. Which functions are available for derived contracts?

All public or internal functions in the base contract will be inherited by the derived contracts.

  1. What is hierarchical inheritance?

Hierarchical inheritance is when one base contract is inherited by multiple derived contracts.

1 Like

1) What is the base contract? The base contract is the contract that is inherited and also called the parent 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? This is when a single contract acts as a base contract for multiple derived contracts.

1 Like
  1. What is the base contract?
    It is the parent contract where the child (level we are at) derives from

  2. Which functions are available for derived contracts?
    All functions declared as “internal” or “public”

  3. What is hierarchical inheritance?
    In hierarchical inheritance multiple child contracts derive form a single parent contract.

1 Like

What is the base contract?
the parent contract is known as a base contract.
Which functions are available for derived contracts?
All public and internal scoped functions are available in a derived contract
What is hierarchical inheritance?
When a single contract acts as a base contract for multiple derived contracts.

1 Like

What is the base contract?
The root of the contract inheritance hierarchy.

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

What is hierarchical inheritance?
Different contracts inherit from the same parent contract.

1 Like
  • What is the base contract?
  • The base contract is also known as the base contract that other contracts are derived from.

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

  • What is hierarchical inheritance?
  • Hierarchical inheritance is similar to simple inheritance, but the difference is that here only 1 contract acts as a base contract for multiple derived contracts. :slight_smile:
1 Like

The very top class of the hierarchy structure that all deriving children and even siblings will inherit from.

All public and internal functions.
All state variables.

As opposed to multiple inheritances where a child may have many parents at the same level and will inherit from those parents, hierarchical inheritance defines that a child will only inherit from its parent, and its parent parents all the way to the top of the hierarchy.

1 Like
  1. A base contract is a contract that is inherited.
  2. Functions, variables, events and modifiers are inherited
  3. Hierarchical inheritance is when there are multiple children contacts for a parent contract
1 Like

1. What is the base contract? – The original parent contract, which is inherited.
2. Which functions are available for derived contracts? – any function scoped as Public or Internal
3. What is hierarchical inheritance? – When multiple contracts inherit a single parent contract.

1 Like
  1. A base contract, or parent contract, is the contract from which inheritance takes place; reusing ‘variables, functions, modifiers and events’.

  2. Derived contracts, whether they are parent-child or hierarchically inherited, have public and internal ( protected ) functions available to them.

  3. Hierarchal inheritance refers to a parent contract having multiple child/derived contracts.

1 Like
  1. What is the base contract? “ The parent contract 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 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?
    The base contract is the contract that is inherited by a child 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 when 2 contracts inherit the same parent contract.

1 Like
  1. What is the base contract?

The top level contract that inherits from no contract, and other contract will inherit from.

  1. Which functions are available for derived contracts?

public and internal scoped functions

  1. What is hierarchical inheritance?

It is when more than one contract inherits from a same contract.

1 Like
  1. The base contract is the parent contract, all children or derived contracts of the parent inherit core functionality from the base contract.
  2. All public and internal scoped functions are available to derived contracts.
  3. In hierarachical inheritance a single contract acts as a base contract for multiple derived contracts.
1 Like

1. What is the base contract?

The parent contract that the child contract inherits from.

2. Which functions are available for derived contracts?

All functions that are declared as public and internal functions

3. What is hierarchical inheritance?

Hierarchical inheritance is when more than one child contract inherits from the same base/parent contract

1 Like

What is the base contract?
A contract from which you derive a child contract.

Which functions are available for derived contracts?
All functions of the base contract.

What is hierarchical inheritance?
Any number of different contracts can be derived from the same base contract.

1 Like