Ejemplo n.º 1
0
 public void updateOptionSetBasePrice(String modelName, String optionSetName, int price) {
   boolean makeTheRightChoice = false;
   while (makeTheRightChoice == false) {
     try {
       GasAutomobile auto = (GasAutomobile) modelSet.getAutomobile(modelName);
       auto.updateOptionSetBasePrice(optionSetName, price);
       makeTheRightChoice = true;
     } catch (CustomerExcpetion e) {
       if (e.getErrorNum() == 3) {
         optionSetName = e.newEnterForFix("OptionSet");
       }
       if (e.getErrorNum() == 2) {
         modelName = e.newEnterForFix("Automobile");
       }
     }
   }
   makeTheRightChoice = false;
 }
Ejemplo n.º 2
0
 public void listModels() {
   System.out.println(modelSet.toString());
 }