Esempio n. 1
0
 private double getOutstanding(double initalValue) {
   double result = initalValue;
   Enumeration<Order> e = _orders.elements();
   while (e.hasMoreElements()) {
     Order each = (Order) e.nextElement();
     result += each.getAmount();
   }
   return result;
 }
Esempio n. 2
0
  public void printOwing(double previousAmount) {
    //
    Enumeration<Order> e = _orders.elements();
    double outstanding = previousAmount * 2.2;

    this.printBanner();

    //
    while (e.hasMoreElements()) {
      Order each = (Order) e.nextElement();
      outstanding += each.getAmount();
    }

    this.printDetails(outstanding);
  }