Inheritance Reading Assignment

  1. The contract that is inherited

  2. Public and internal scoped functions plus state variables

  3. A single base contract for multiple derived contracts

1 Like
  1. What is the base contract?
    The base contract or parent contract is the contract that we inherit from.
  2. Which functions are available for derived contracts?
    Internal functions and public functions.
  3. What is hierarchical inheritance?
    It is when two or more child contracts have the same parent contract.
2 Likes
  1. Base contact is a parent contract from which a children contract inherits,
  2. All functions in base contact mith internal or public viability can be accessed in child contracts.
  3. In the herarchical inheritancea, a single contract acts as a base contract for multiple derived contracts.
2 Likes

The parent contract. It is the contract that is inherited

Those with public and internal visibility

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

2 Likes
  1. A parent contract is known as the base contract. The child contract from this parent is known as the derived class.

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

  3. 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. A base contract is a parent contract.

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

  3. A single contract acting 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 also known as a base contract.
  2. Which functions are available for derived contracts?
    All public and internal scoped
    functions are available to derived contracts.
  3. What is hierarchical inheritance?
    A single contract acts as a base contract for multiple derived contracts.
1 Like

1.What is the base contract?
The parent contract is known as the base contract.
2.Which functions are available for derived contracts?
All public and internal functions and state variables
3.What is hierarchical inheritance?
A single contract acts as s base contract for multiple derived contracts.

1 Like
  1. Parent contract.
  2. All public and internal scoped functions.
  3. It´s similar to simple inheritance
1 Like

1

The contract that child contracts inherit from

2

Variables, functions, modifiers, and events of base contracts into the derived class.

3

Same as simple inheritance. Single contract acts as base contract for multiple derived contracts

1 Like
  1. What is the base contract?
    It is the parent contract, the contract that is being inherited.

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

  3. What is hierarchical inheritance?
    In hierarchical inheritance, a single base contract (parent) acts as base for multiple derived contracts.

1 Like

1… What is the base contract?
The base contract also known as the parent contract in which classes are derived from.

  1. Which functions are available for derived contracts?
    Functions like Single Inheritance, Multi-level inheritance, Multiple inheritance, and Hierarchical Inheritance would be available for derived contracts.

  2. What is hierarchical inheritance?
    Hierarchical inheritance when a single base contract act as a parent contract to more than one derived contracts.

1 Like

1.What is the base contract?
Тhe parent contract ,known as a base contract .Тhe contract that inherits with base contract is called the child contract ( derived contracts).

2.Which functions are available for derived contracts?
All public and internal scoped functions and state variables are available to derived contracts.
A single address is generated that is shared between contracts in a parent- child relationship.

3.What is hierarchical inheritance?
Hierarchical inheritance is similar to simple inheritance. A single contract acts as a base contract for multiple derived contracts.
Encapsulation refers to the process of hiding or allowing access to state variables directly for changing their state.

1 Like

i.What is the base contract? The parent contract is known as the base contract. The parent has a derived class which its child contracts inherit.

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

iii.What is hierarchical inheritance? Hierarchical inheritance is where a single contract as a base contract for two or more derived contracts. This is opposed to multi-level inheritance where one child contract is a parent to another contract. Multiple inheritance is a mixture of both types.

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

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

  3. What is hierarchical inheritance?
    A single contract acts as a base contract for multiple child contracts deriving from it.

1 Like
  1. Base contract is the same as the parent contract.

  2. All public and internal function and state variables.

  3. When one contract is the parent of several different contracts.

1 Like
  1. parent contract, the contract where others inherit from in inheritance
  2. all of the public and internal functions of any of the contracts the contract inherits from
  3. when a contract has multiple child contracts that inherit from it
1 Like

1. What is the base contract?

Inheritance is one of the pillars of object orientation and Solidity supports inheritance between smart contracts. Inheritance is the process of defining multiple contracts that are related to each other through parent-child relationships.

The contract that is inherited is called the parent contract and the contract that inherits is called the child contract .

Similarly, the contract has a parent known as the derived class and 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?

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

1 Like
  1. child contract inherits from parent contract
    the parent contract is teh base contract
    solidity allow multiple inheritance -> solitity copies the base contracts into the derived contract -> result is a single contract

  2. There is a is-a relationship between base and derived contracts and all public and internal scoped functions and state variables are available to derived contracts.

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

1 Like

1 A base contract is the original contract which others linked contracts derive from

2 The function available for a derived contract come from the base contract or contact which it point to, these take information already processed and use this contract

3 Hierarchical inheritance means that functions are taken from a flow chart of contracts, they are inherited functions

2 Likes