#include "duz.h" #include #include using namespace std; Duz::Duz():Poligon(2) {} Duz::Duz(double x1,double y1,double x2,double y2):Poligon(2) { t[0].setX(x1); t[0].setY(y1); t[1].setX(x2); t[1].setY(y2); } void Duz::print() { cout << " Duz AB: "; cout << "A(" << t[0].getX() << "," << t[0].getY() << ")-"; cout << "B(" << t[1].getX() << "," << t[1].getY() << ")"; } double Duz::obim() { return 0;} double Duz::povrsina() { return 0;} double Duz::duzinaDuzi() { double d; d=sqrt( pow( ( t[0].getX()-t[1].getX() ) , 2 ) + pow( ( t[0].getY()-t[1].getY() ) , 2 ) ); return d; } Poligon* Duz::operator--() { return 0; }