Help me to understand with this Java Ethereum Blocks A blockchain is a database of transactions that
Fantastic news! We've Found the answer you've been seeking!
Question:
Help me to understand with this Java
Transcribed Image Text:
Ethereum Blocks A blockchain is a database of transactions that is updated and shared across many computers in a network. Every time a new set of transactions is added, it's called a "block" - hence the name blockchain. Most blockchains are public, and you can only add data, not remove. If someone wanted to alter any of the information or cheat the system, they'd need to do so on the majority of computers on the network. For this project, we will be using a dataset of 100 blocks in the Ethereum blockchain. You will be updating your Blocks.java class to accomplish the tasks laid out by the Project 2 pdf and Driver.java. Updated Blocks UML Blocks -number: int -miner: String -timestamp: long -transactions: int -blocks: ArrayList<Blocks> +Blocks() +Blocks(number: int) +Blocks(number: int, miner: String) +Blocks(number: int, miner: String, timestamp: long, transactions: int) +getNumber(): int +getMiner(): String +getTransactions(): int +getDate(): String +getBlocks(): ArrayList<Blocks> +calUniqMiners(): void +blockDiff(A: Blocks, B: Blocks): int +getBlockByNumber(num: int): Blocks +toString(): String +readFile(filename: String): void +sortBlocksByNumber(): void +timeDiff(first: Blocks, second: Blocks): void +transactionDiff(first: Blocks, second: Blocks): int Feel free to add your own helper methods as needed. Methods Read File You will need to update your readFile() method to read in the two new fields, timestamp and transaction_count. They are columns 17 and 18 respectively in the data file. Ethereum Blocks A blockchain is a database of transactions that is updated and shared across many computers in a network. Every time a new set of transactions is added, it's called a "block" - hence the name blockchain. Most blockchains are public, and you can only add data, not remove. If someone wanted to alter any of the information or cheat the system, they'd need to do so on the majority of computers on the network. For this project, we will be using a dataset of 100 blocks in the Ethereum blockchain. You will be updating your Blocks.java class to accomplish the tasks laid out by the Project 2 pdf and Driver.java. Updated Blocks UML Blocks -number: int -miner: String -timestamp: long -transactions: int -blocks: ArrayList<Blocks> +Blocks() +Blocks(number: int) +Blocks(number: int, miner: String) +Blocks(number: int, miner: String, timestamp: long, transactions: int) +getNumber(): int +getMiner(): String +getTransactions(): int +getDate(): String +getBlocks(): ArrayList<Blocks> +calUniqMiners(): void +blockDiff(A: Blocks, B: Blocks): int +getBlockByNumber(num: int): Blocks +toString(): String +readFile(filename: String): void +sortBlocksByNumber(): void +timeDiff(first: Blocks, second: Blocks): void +transactionDiff(first: Blocks, second: Blocks): int Feel free to add your own helper methods as needed. Methods Read File You will need to update your readFile() method to read in the two new fields, timestamp and transaction_count. They are columns 17 and 18 respectively in the data file.
Expert Answer:
Answer rating: 100% (QA)
Heres the updated Blocks class implementing the changes as described import javautilArrayList public ... View the full answer
Related Book For
Intermediate Accounting
ISBN: 978-0470161012
9th Canadian Edition, Volume 2
Authors: Donald E. Kieso, Jerry J. Weygandt, Terry D. Warfield.
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Determine a house of quality for a ballpoint pen. In the house of quality, fill in three customer requirements. Determine one technical requirement for each customer requirement and fill it in....
-
Assuming beginning work in process is zero, the equivalent units of production computed using FIFO versus weighted average will have the following relationship: 1. FIFO equivalent units will be...
-
The formula derived in Exercise 5, expresses the curvature k(x) of a twice-differentiable plane curve y = (x) as a function of x. Find the curvature function of each of the curves. Then graph (x)...
-
Refer to the information in Exercise 17-4. Required 1. Compute a departmental overhead rate for the molding department based on machine hours and a department overhead rate for the trimming...
-
Maria Gonzalez opened a veterinary business in Nashville, Tennessee, on August 1. On August 31, the balance sheet showed Cash $9,000, Accounts Receivable $1,700, Supplies $600, Office Equipment...
-
1. A thin film is laid over a glass pane as shown. White light is incident on the film, coming straight in. At a point where the light is incident on the film, it appears green ( = 525 nm). Find (a)...
-
The click throughs obtained for Eltronix Inc during an eight-week period are provided in the table below. Eltronix ran a branded keyword search campaign in the first four weeks at a CPC of $0.15....
-
Describe the process of mechanical reverse engineering a as it relates to Reverse Software engineering. Describe the process of reverse engineering an electrical Key entry system. (Any System You...
-
One of the accepted "traditions" of Rock music is that both performers and audiences consider Rock music to be about rebellion - in varying degrees. As the Jack Black character exclaims in the movie...
-
How does the cultivation of emotional intelligence in educational curricula promote socio-emotional learning, resilience, and empathy among students, preparing them for the demands of the...
-
Tamim is domiciled in Australia and has invested in some shares of Oz Minerals Ltd as he believes that the mining boom would continue. He is expecting to receive a fully franked cash dividend of $700...
-
Bob, Mike, and Property Managers LLP contribute property to Real Estate Development, Inc. in exchange for all the outstanding stock on January 1, 20X1. Real Estate Development is a calendar year...
-
What are you learn in the course Small Group Communication write a reflection paper discussion, skill you have acquired and impact the have made or will make on your personal, academic, social,...
-
Fill-in the blank. Given: sin xcosxdx. | sin xcos xdx cosx+ (_ _)+ C A cos*x B. -cos*x c. cos'x D. - cos?x
-
5. Convert the following ERD to a relational model. SEATING RTABLE Seating ID Nbr of Guests Start TimeDate End TimeDate RTable Nbr RTable Nbr of Seats RTable Rating Uses EMPLOYEE Employee ID Emp...
-
Bailey Corp. changed depreciation methods in 2011 from straight-line to double-declining-balance because management argued that the change would improve the relevance of the information to financial...
-
You have been asked by a client to review the records of Inteq Corporation, a small manufacturer of precision tools and machines that follows ASPE. Your client is interested in buying the business,...
-
Wing Corporation enters into a lease with Sharda Inc, a lessor, on August 15, 2011, that does not transfer ownership or contain a bargain purchase option. Both Wing and Sharda use IFRS. The lease...
-
Brennan Corporation began 2015 with a $90,000 balance in the Deferred Tax Liability account. At the end of 2015, the related cumulative temporary difference amounts to $350,000, and it will reverse...
-
Starfleet Corporation has one temporary difference at the end of 2014 that will reverse and cause taxable amounts of $55,000 in 2015, $60,000 in 2016, and $75,000 in 2017. Starfleets pretax financial...
-
The following information is available for McKee Corporation for 2015. 1. Excess of tax depreciation over book depreciation, 40,000. This 40,000 difference will reverse equally over the years...
Study smarter with the SolutionInn App