class polynomial

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2004
Posts: 7
Reputation: lida1984 is an unknown quantity at this point 
Solved Threads: 0
lida1984 lida1984 is offline Offline
Newbie Poster

class polynomial

 
0
  #1
Dec 12th, 2004
Hi i'd be glad if u help me with write this program.
i want to write a polynomial program which it has a class that create 2 obj like this with useing linked list: (Ax^2y^3+Bx^4y^8+....)AND(ax^5y^1+....)
and after that multiply these 2 obj to each other and put the answer in the new linklist.(a is float and exponents are int )
i should overdoal << , >> , = , * ,(i,j)
HELP:this >> should be overloaded like this:for example we should inter
(Ax2y3+Bx4y8+...) AND (ax5y1+...)
(and wen we overload this we read first and ignore (1),again read again ignore with for loop up to finished all off them ...maybe when we push the inter key or when we see the null )

this * should overloaded like :{a1=(A*a) ,,, exp1=2+5 ,,, exp2=3+1 }and so on whith for loop....and also we should compare these new linklist exponents if some of them are the same ,then add their float part of them.

this = should overloaded like :after create the new linklist by * the 2 obj we should put them in new plase with this operator.

this (i,j) should overloaded like : after all we send i and j to the new linklist and after that x=i,,,y=j ,then we get the answer .

this << should overloaded like : again after create the new link list we shout cout it .... for example {(A*a)x7y4+...}

ok , thanks 4 reading this message and plz help me with this program.

lida
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: class polynomial

 
0
  #2
Dec 13th, 2004
Have you written anything yourself? Please read the Announcement regarding homework.
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: class polynomial

 
0
  #3
Dec 13th, 2004
write a basic class and post it up with some comments as im a bit unsure as to exactly what you want to do with it, and i dont understand the polynomial of
(Ax^2y^3+Bx^4y^8+....)
you ideally want a basic list of a polynomial like this

Ax + Bx^2 + Cx^3.... which can be combined to form pretty much anything (check out "Maclaurin's Series" -> it is EXTREMEMLY USEFUL for polynomial workings)

As a hint you want a "member/term" class for each term (x, x^2) with a co-eff and a power and then make a list of them, with the power being equal to the index in the list
ie.

class term
{
float co_efficient;
float power; (or int)
};

then the list would be like:

term x0 (power = 0) -> term x1 (power = 1) -> term x2 (power = 2) ect....

good luck with it!
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 7
Reputation: lida1984 is an unknown quantity at this point 
Solved Threads: 0
lida1984 lida1984 is offline Offline
Newbie Poster

Re: class polynomial

 
0
  #4
Dec 17th, 2004
hi plzzzzz help me!!!!!!
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,377
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 242
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: class polynomial

 
0
  #5
Dec 17th, 2004
Originally Posted by lida1984
hi plzzzzz help me!!!!!!
Posting more than 0 lines of code will definitely help.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: class polynomial

 
0
  #6
Dec 17th, 2004
dont you have ANY idea where to start?!?!?!? i have given some hints....
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC