Package database

Examples of database.BookDetails


    public double getTotal() {
        double amount = 0.0;

        for(Iterator i = getItems().iterator(); i.hasNext(); ) {
            ShoppingCartItem item = (ShoppingCartItem) i.next();
            BookDetails bookDetails = (BookDetails) item.getItem();

            amount += item.getQuantity() * bookDetails.getPrice();
        }
        return roundOff(amount);
    }
View Full Code Here


    public double getTotal() {
        double amount = 0.0;

        for(Iterator i = getItems().iterator(); i.hasNext(); ) {
            ShoppingCartItem item = (ShoppingCartItem) i.next();
            BookDetails bookDetails = (BookDetails) item.getItem();

            amount += item.getQuantity() * bookDetails.getPrice();
        }
        return roundOff(amount);
    }
View Full Code Here

            int num = cart.getNumberOfItems();
      if (num > 0) {
            Iterator i = cart.getItems().iterator();
            while (i.hasNext()) {
                  ShoppingCartItem item = (ShoppingCartItem) i.next();
                  BookDetails bookDetails = (BookDetails) item.getItem();
                  writer.print("ISBN: "  + bookDetails.getBookId());
                  writer.print("   Title: "  + bookDetails.getTitle());
                  writer.print("   Quantity: " + item.getQuantity());
                  writer.println();     
            }
      }
View Full Code Here

    public synchronized double getTotal() {
        double amount = 0.0;

        for(Iterator i = getItems().iterator(); i.hasNext(); ) {
            ShoppingCartItem item = (ShoppingCartItem) i.next();
            BookDetails bookDetails = (BookDetails) item.getItem();

            amount += item.getQuantity() * bookDetails.getPrice();
        }
        return roundOff(amount);
    }
View Full Code Here

            int num = cart.getNumberOfItems();
      if (num > 0) {
            Iterator i = cart.getItems().iterator();
            while (i.hasNext()) {
                  ShoppingCartItem item = (ShoppingCartItem) i.next();
                  BookDetails bookDetails = (BookDetails) item.getItem();
                  writer.print("ISBN: "  + bookDetails.getBookId());
                  writer.print("   Title: "  + bookDetails.getTitle());
                  writer.print("   Quantity: " + item.getQuantity());
                  writer.println();      
            }
      }
View Full Code Here

TOP

Related Classes of database.BookDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.