In my class I have an assignment to create a Number class, which has operations for arithmetic. (Add/subtract/multiply/etc.)
There is one part I am confused about - the doubly-linked lists. The only part of the spec that discusses it I find a little confusing. I don't know what I'm supposed to be storing - all numbers entered? It says high points to the high-order digit's node...I don't know what that means. Also, I'm not sure exactly how I would implement the doubly-linked list...just have a reference to the next 'high-order digit'?
ALSO - What is Node? The assignment only says I am to create the class Number...but Node in the Java API says it is something to do with HTML tags? Shouldn't I use Number low, high???
Here is the part of the spec detailing the doubly-linked list part:
Numbers will be stored in doubly-linked lists (do not use generics here). Each node will have an int value field which will hold one digit (0 through 9) and two pointer fields, prev and next.
The Number class will have five fields: private Node low, high; private int digitCount = 0; private int decimalPlaces = 0; private boolean negative = false;high points to the high-order digit's node, low points to the low-order digit's node, digitCount is the number of digits stored in the list, decimalPlaces is the number of digits (nodes) after the decimal place and negative gives the sign.
I am not asking for an exact solution, just some guidance and understanding. I truly appreciate any help given.