# I am new to Java

• 11-05-2010, 05:31 AM
blutao
I am new to Java
Took a 5 week crash course in summer, now I have this project due by Tuesday, and stuck. In great need. PL help me as I am lost. I got some help from others but not enough. the project is to implement a ADT using doubly link list to add, subtract, multiply, divide and square 2 big numbers. I have the add and subtract working, but need multiply and divide. PL let me know if I can be helped. Here is the code that is working for add and subtract. Need mult and divide methods.

Code:

``` public class Run {         public static void main(String[] args) {                 LongInt l1 = new LongInt();                 (integer.substring(currStart, currEnd));                         Node insert = new Node(getDigits, null, curr);                         insertRight(curr, insert);                         curr = insert;                         currStart += 4;                         currEnd += 4;                 }                 tail = curr;         }                                         }```
• 11-05-2010, 07:41 AM
So where is your attempt at multiply and divide that we can help you correct?
• 11-05-2010, 10:10 AM
Tolls
"I am new to Java"

Then why post this in the Advanced Java section??
• 11-06-2010, 01:08 AM
blutao
Quote:

Originally Posted by masijade
So where is your attempt at multiply and divide that we can help you correct?

Code:

``` public LongInt multiply(LongInt other) {                 Node r1, r2;                 //Node resetPos;  // Each time you finish, one multiplication, go back to here + 1 node.                 LongInt c = new LongInt();                 LongInt d = new LongInt();                                 r1 = this.firstRight();                 r2 = other.firstRight();                 //resetPos = other.firstLeft();                 int carry = 0;                 int result;                                 // Multiply the right node of the second number by the entire first number                                         c.sign = '+';                 return c;```
• 11-06-2010, 01:09 AM
blutao
well. I thought the topic is advanced, so assuming that needs advanced attention!
• 11-06-2010, 01:10 AM
Fubarable
I've added code tags to your first post and will let you add them to your latest post. To see how to do this, please read the forum FAQ or the link in my signature.
• 11-06-2010, 01:20 AM
blutao
and I did not attempt to do any divide. quite honestly, this level of code and programming is advanced. My level is not near, I am just learning. Is it possible to get help for divide? Not sure where to start and divide is supposed to be very difficult.