コード例 #1
0
 public float getTotalPrice() {
   float total = this.basePrice;
   for (Option ch : this.choice) {
     total += ch.getOptPrice();
   }
   return total;
 }
コード例 #2
0
 public void printChoice() {
   for (Option ch : this.choice) {
     System.out.println("Option: " + ch.getOptName() + "-> Price: " + ch.getOptPrice());
   }
 }