#include <iostream.h>
#include "circle.h"
#include "rect.h"
#include "chain.h"
int main()
{
Point p1(10,8), p2(1,2);
Circle c1(5, 5, 10), c2, c3(p1,3);
OrtRect r1(3,9), r2(Point(2),p1);
Chain ch1(c1, c2), ch2(p2, c3, 4);
cout << "Point1 :" << p1 << endl;
cout << "p1.dist(p2) :" << p1.distance(p2) << endl;
cout << "c1.dist(c2) :" << c1.distance(c2) << endl;
cout << "c1.dist(p1) :" << c1.distance(p1) << endl;
cout << "c1.intersect(c2) :" << c1.intersects(c2) << endl;
cout << "NumOfPoints :" << Point::number << endl;
cout << "NumOfCircles :" << Circle::number << endl;
cout << "c1 :" << c1 << endl;
cout << "r1 :" << r1 << endl;
cout << "r2 :" << r2 << endl;
cout << "area(r2) :" << r2.area() << endl;
cout << "ch1 :" << ch1 << endl;
cout << "ch2 :" << ch2 << endl;
cout << "done." << endl;
return 0;
}
© 1997 Gottfried Rudorfer, C++-AG, Lehrveranstaltungen, Abteilung für Angewandte Informatik, Wirtschaftsuniversität Wien, 12/16/1998 |