Due 11.55pm (23:55:00) Sydney Time, Sunday 6th November, 2022. Objectives
The purpose of this assignment is to test your ability to use customized Linked lists as recursive data structures and use customized Lists of Linked Lists. Hence you are strictly limited in your design and implementation: pay particular attention to the rules (at the bottom, as well as Rules applicable to all assignment and weekly submissions on iLearn).
Background
A Blockchain consists of a growing list of records, called blocks. Each block is a type of accounting ledger used to store bookkeeping entries for balance-sheet and income-statement transactions. While real blockchains use complex distributed technology, data structures and cryptography, we are only interested in the (customized) Linked List concepts here.
For this assignment, you will be filling in the three classes: Payment , Ledger and Blockchain . A Payment represents the record of a financial transaction between two individuals at a time. A Ledger represents a block (i.e., a Linked List) of Payment with an id. A Blockchain represents a Linked List of Ledger . Hence you will be building and manipulating Linked Lists of
Linked lists. The specifications and basic constructors of each class are provided in the code. Other classes, including Timestamp, are provided and should not be changed.
Grading
This assignment is will be automarked out of 100 points. P questions are worth 5 points, CR questions are worth 8 points and D/HD questions are worth 13 points. Blockchain(b1,b2) and Blockchain(blocks) both have 2 unit tests. The first one (8 points), checks that the logic of the method is correct while the second test (7 and 8 points) ensures that the solution is efficiently written.
The questions sorted by classes (and not difficulty) are:
Payment
isValid – 5 points
Ledger
size – 5 points addPayment – 5 points isValid – 5 points contains – 5 points balance – 8 points
reversePayment – 5 points remove – 5 points
Blockchain
size – 5 points addLedger – 5 points balance – 8 points
transactionCount – 8 points
Blockchain(b1,b2) – 8 points + 7 points for efficiency Blockchain(blocks) – 8 points + 8 points for efficiency
Rules
Any use of new Arrays (ie. in addition of String[] persons and Blockchain[] blocks which aprovided), ArrayList, Java LinkedList or other java built data structures will result in an automatic 0. You need to solely rely on recursive data structures for this assignment.
Other standard rules listed on iLearn apply. Some common problems: any use of any function from outside the classes provided will get you an automatic zero. Any infinite loop will get you an automatic zero. Any compilation error (including, one caused by incorrect filename) will get you an automatic zero.
Ledger.java Submission
Blockchain.java , |
Submit only three java files submission policy.
Student Declaration
and Payment.java . Please see the unit guide for our late
Make sure you put an x inside the square brackets for student declaration at the top of Blockchain.java , Ledger.java and
Payment.java .
Failure to do so will incur a 10% (1.5 mark) penalty.
Tips to get started
- try to work the classes in their natural order: Payment , Ledger and Blockchain .
- Helper methods are not particularly necessary here.
Get expert help for COMP1010 – Assignment 3 and many more. 24X7 help, plag-free solution. Order online now!