Skip to content

AmirAdarGit/matala1.0

Repository files navigation

Polynom-Project the tasks written by: Amir Adar - 302308168 myMath we have 2 class in our projact:

Monom - shape a*x^b, where a real number and a is an integer(summed a none negative) polynom- shape arrays of monoms.

MONOM CLASS: monoms class have some functions:

1.add monoms with the same power(new one and exist one).

2.calculate specific x (int and double x).

3.derivative.

4.multiply two monoms.

5.check if two monoms are equals.

6.check if the monom is the zero monom.

7.substract between two monoms with the same power.

7.getCoef - help functions that get string that represent monom and find his coefficient.

8.getPower - help functions that get string that represent monom and find his power.

9.to string - return a string of the monom.

the class have 3 constructor:

1.defult constractor.

2.copy constractor.

3.string constractor- get string of monom and make it to new monom.

we also have getteres and setters:

1.power getter and setter.

2.coefficient getter and setter.

POLYNOM CLASS: the class have 3 constructor:

1.defult constractor.

2.string constractor- get string of polynom and make it to new polynom.

3.copy constractor.

polynom class have some functions:

1.add monom to our polynom.

2.add polynom to our polynom.

3.substract between two polynoms.

4.substract monom from our polynom.

5.multiply two polynoms.

6.check if two polynoms are equals.

7.check if the polynom is the zero monom.

8.root-finds a root value of a polynom while given 2 values that 1 is positive and the other negative and eps which will make sure that we are eps close to the 0.

9.create a deep copy of this Polynum.

10.derivative of the polynom.

11.area - Compute Riemann's Integral over this Polynom starting from x0, till x1 using eps size steps.

12.Iterator (of Monoms) over this Polynom.

13.calculate specific x to the polynom (int and double).

14.to string - return a string of the Polynom.

15.Gui- func that get a poly and draw it in a new window.

16.extremaPoints - help function that calculate the extreme points for the Gui and show than in red.

About

Polynom-Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published