package com.hithomelabs.clients.module8;

import com.hithomelabs.princeton1.common.Apple;
import com.hithomelabs.princeton1.module8.HeapSort;

import java.util.Random;

public class HeapSortClient {

    public static void main(String[] args) {
        int size = 10;
        Apple[] apples = new Apple[size];
        HeapSort<Apple> heap = new HeapSort<Apple>();

        for (int i = 0; i < apples.length; i++) {
            apples[i] = new Apple(new Random().nextInt(10));
        }
        heap.sort(apples);
        for (int i = 0; i < apples.length; i++)
            System.out.println(apples[i]);
    }

}
