Actually disregard that, i'm an idiot.
been programming for a straight 6 hours now; my head is throbbing...
Type: Posts; User: clydefrog
Actually disregard that, i'm an idiot.
been programming for a straight 6 hours now; my head is throbbing...
lol thats true.
at the risk of sounding annoying, i do have one other question.
i've implemented the ability to add polynomials, and thats working perfectly. Now i need to subtract polynomials....
OMG THANKS JONLANE!
it is all working perfectly now! it is printing and ordering the terms in canonical form! I cant tell you how much i appreciate your help. Same with you Norm.
Now, the hard...
okay guys, so i did what you suggested (adding a bunch of println's) and VOILA! the null error was found. THANK YOU SO MUCH!
the problem was the for loop in my prep class. it would send each part...
i really do think it has something to do with my linked lists. I have several printlns in my program and it shows that my regex is able to extract coef/exp out of the input but for some reason its...
no :(
i'm trying to trace through process but i cannot see why that variable would be null.
EDIT:
if change:
p.setNext(temp); to p = temp;
thank you all for the quick replies. :)
I'm not too sure what you mean. you mean something like this?
public Polynomial prep(String s)
Hi guys.
I'm having this weird problem with my linked list. basically i'm making a linked list implementation of a polynomial; my nodes contain 2 elements (coefficient,powers). It works somewhat...