Jump to content
deserty

rugaminte

Recommended Posts

Sa se defineasca o clasa Polinom

Atentie dradul polinomului

-coeficenti polinomului;

ex f=3x la a3 +2x la a 2 +1

gradu=3

... coeficenti=[3,2,0,1]

Se cere independenta pt:

constructor implicit/explicit/copiere;

destuctor

get/set

supraincarcarea operantilor: +,-,<<,si,>>/

Promit ca nu raman dator celui care ma ajuta.

Am nev acum.

Link to comment
Share on other sites

Simple Polynomial class | DaniWeb

http://www.programmersheaven.com/mb/CandCPP/418372/418372/polynomial-class-with-rational-coefficients/?S=B20000

Unde ai minus, plus, etc, inlocuiesti cu operator{semn}(...), iar pentru << si >> supraincarci cu ceva asemanator

friend ostream& operator<<(ostream &output, Polinom obj);
friend istream& operator>>(istream &input, Polinom& obj);

Nu cred ca se apuca nimeni sa scrie si sa-ti dea mura in gura mai ales ca sunt tone de exemple pe net.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...