Exemple #1
0
        public double totalPackages(ArrayList List)
        {
            double total = 0;

            for (int i = 0; i < List.Count; i++)
            {
                CarOption carPack = (CarOption)List[i];
                total += carPack.price;
            }
            return(total);
        }
Exemple #2
0
 //methods
 //adds a selected option to car option list
 public void addCarOption(CarOption myOption)
 {
     optionList.Add(myOption);
 }
Exemple #3
0
 public void removePackage(CarOption carOption)
 {
     packages.Remove(carOption);
 }
Exemple #4
0
 public void addPackage(CarOption carOption)
 {
     packages.Add(carOption);
 }