Question: Objectives: The objectives of this programming project include 1 ) design the structure of a blockchain; 2 ) demonstrate the structure in each node of

Objectives: The objectives of this programming project include 1) design the structure of
a blockchain; 2) demonstrate the structure in each node of a blockchain; 3) illustrate the
usage of hashed pointer in a blockchain; 4) describe how blockchain works; 5)
understand digital signature; 6) explore the reason that a blockchain can be self-verified.
Description: In this project, you are required to make a java code to build a blockchain
including multiple blocks. In each block, it contains a list of transactions, previous hash
the digital signature of the previous block, and the hash of the current block which is
based on the list of transactions and the previous hash. If anyone would change anything
with the previous block, the digital signature of the current block will change. When this
changes, the digital signature of the next block will change.
Detailed Requirements:
1. Define your block class which contains three private members and four public
methods.
a. Members: previousHash (int), transactions (String[]), and blockHash (int);
b. Methods:
i. Block( int previousHash, String[] transactions){}
ii. getPreviousHash(){}
iii. getTransaction(){}
iv. getBlockHash(){}
2. Using ArrayList to design your Blockchain.
3. Your blockchain must contain genesis block and make it to be the first block.
4. You can add a block to the end of the blockchain. When a new block is added, it first
must point to the last block in your blockchain, and can allow a user to add any
number of transactions until the user click done
5. In each transaction, please use the following format Santoshi (sender) pays x
(number) BTC to Ivan (receiver). Put each transaction in a string.
6. You can display the transactions, previous hash, and the current hash of any selected
block. Please use 1,2,3,... to select a block. 1 indicates the genesis block. If a
selected block does not exist, please display the block does not exist in this
Blockchain.
7. Edit the transactions in a selected block, but you must verify and show it will break
the consistency with the previousHash in the block after this block.
8. Display the whole blockchain with the contents in each block.
Submission through D2L Dropbox (zip the following into one file for submission):
1. Two screenshots to show the running results. (5 points)
2. Read me with name readme.txt to show how to run/operate your code. (5 points)
3. Java source code. (90 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!