[go: up one dir, main page]

0% found this document useful (0 votes)
16 views2 pages

Assignment7 (B.Tech.)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Assignment7 (B.Tech.)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

School of Computer Science Engineering and Technology

Course- B.Tech. Type- Specialized Core


Course Code- CSET212 Course Name- Blockchain Fundamentals

Year- 2024 Semester- Odd


Date- 14/10/2024 Batch- 2023-2027

CO-Mapping
CO1 CO2 CO3
Q1 √
Q2 √
Q3 √
Q4 √

Objectives
1. Students will be able to learn arrays used in solidity programming language.
2. Students will be able to learn the function overloading used in the solidity programming language.
3. Students will be able to learn the structure used in the solidity programming language.
4. Students will be able to learn the inheritance used in the solidity programing language.
5. Students will be able to learn the modifiers used in the solidity programing language.

Assignment 7
1. Implementation of advance smart contracts using solidity, compile and deploy smart contracts
using Remix IDE.

Questions:
1. Implement and deploy the following smart contract on the Remix IDE.
a. Declare a variable size array and push 5 elements in it using a function.
b. Declare a function that evaluate the length of same array (Hint, use length as inbuilt function).
c. Declare a function that pop the elements from the same array. (Hint, use pop as inbuilt
function).
2. Implement and deploy the following smart contract on the Remix IDE.
a. Declare two overloading function that add two numbers and three numbers, respectively.
Further return an output.
b. Declare two overloading function that multiply two numbers and three numbers, respectively.
Further return an output.
c. Declare two overloading function that divide two numbers and three numbers, respectively.
Further return an output. (Hint give a =40, b = 20, c = 5, output = 10).
3. Implement and deploy the following smart contract on the Remix IDE.
a. Define a struct (person), with two variable name and age.
b. Declare an array of person struct.
School of Computer Science Engineering and Technology

c. Declare a function to add a new person to the array.


d. Declare a function to get the name and age of a person by index.
4. Implement and deploy the following smart contract on the Remix IDE.
a. Declare a base contract with one unit state variable and initialize its value using constructor.
b. Declare a getter function for the base contract and return its value.
c. Declare a derived contract with one uint state variable.
d. Declare a constructor that initialize value of derived contract variable and fetch the value of
base class variable.

Suggested Platform: Remix IDE.

Marking: Marking is based on both performance during the lab hours as well as complete
submission on Camu.

Upload Assignment on the given link: Lab7

You might also like