// point.cpp

#include <iostream>
using namespace std;
#include "point.h"

// Sort the array a with n elements on basis of length of pointers
void sort(Point *a[], int n)
{
	for (int limit = n-1; limit > 0; --limit) {
	   int largest = 0;
	   for (int k = 1; k <= limit; ++k)
		if ((*a[largest]) < (*a[k]))
		   largest = k;
	   Point *temp = a[largest];
	   a[largest] = a[limit];
	   a[limit] = temp;
	}
}

// Print content of an array a with n elements
void printPointArray(const Point * const a[], int n)
{
	for (int k = 0; k < n; ++k)
	    cout << *a[k] << endl;
}
