package com.hithomelabs.clients.module7;

import com.hithomelabs.princeton1.common.Apple;
import com.hithomelabs.princeton1.module7.Quick;
import com.hithomelabs.princeton1.module7.ThreeWayQuick;

import java.util.Random;

public class ThreeWayQuickSortClient {

    public static void main(String[] args) {
        int size = 100;
        Apple[] apples = new Apple[size];
        ThreeWayQuick<Apple> quick = new ThreeWayQuick<>();

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