public static void main(String[] args)
    {
        
        long SEED = 287848937;
        int NumberOfPackets = 10 ;
        //*************************
        double mean = 10;//2.9;
        //*************************
        
        System.out.println("Packets arrival distributions: ");
            //for packet times delivery, seed to keep the same number
            Random rnd = new Random(SEED);
            //defaults to 1 unless packet count > 1
            int NumberOfTimesPacketsAreDeliverd = 1;
            //or else the random will be 0
            if(NumberOfPackets > 1)
            {
                do{
                     
                    NumberOfTimesPacketsAreDeliverd = rnd.nextInt(NumberOfPackets+1);
                }
                while(NumberOfTimesPacketsAreDeliverd == 0);
            }
            System.out.println("NumberOfTimesPacketsAreDeliverd: "+NumberOfTimesPacketsAreDeliverd);
            
            //based on the number of packets, a random number is chosen for the 
            //number of times packet delivery happens
            ExponentialDistribution arrivalAmounts= new ExponentialDistribution(NumberOfTimesPacketsAreDeliverd,SEED);
            
            //**********************************
            arrivalAmounts.SetMean(mean);
            //**********************************
            arrivalAmounts.SetNumebrOfPackets(NumberOfPackets);
            arrivalAmounts.getDistribution();
            
/*            
        System.out.println("Arrival Patterns");
            ExponentialDistribution arrivalPattern= new ExponentialDistribution(NumberOfTimesPacketsAreDeliverd);  
            int packetAmt;
            while((packetAmt = arrivalAmounts.getNumber()) != -1)
            {
                arrivalPattern.SetNumebrOfPackets(packetAmt);
                arrivalPattern.SetMean(mean);
                arrivalPattern.getDistribution();
                arrivalPattern.remove();
            }
*/
    }