package Model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Scanner;

public class GO implements Serializable
{
	private static final long serialVersionUID = -768452067159877546L;
	
	private ArrayList<Double> duree;

	public GO() 
	{
		duree = new ArrayList<Double>();
		Scanner sc = new Scanner(System.in);
		System.out.println("Combien d'opération pour produire votre article?");
		int nb = sc.nextInt();
		for(int i = 0; i < nb; i++)
		{
			System.out.println("Combien de temps ( en heure) dure l'operation numero " + (i+1) + "?");
			duree.add(sc.nextDouble());
		}
	}
	
	public double tempstot(PDC pdc)
	{
		double tot = 0;
		for(int i = 0; i < duree.size(); i++)
		{
			tot += duree.get(i);
		}
		return tot;
	}
}
