tailieunhanh - Java Server Pages: A Code-Intensive Premium Reference- P13

Java Server Pages: A Code-Intensive Premium Reference- P13:Before you begin reading Pure JSP Java Server Pages, you might want to take a look at its basic structure. This should help you outline your reading plan if you choose not to read the text from cover to cover. This introduction gives you an overview of what each chapter covers. | public ShoppingCart Add a new item to the shopping cart. attributes itemId - the unique key associated with the item desc - a text description of the item price - the unit price for this item quantity - number of this item to insert into the shopping cart public void addItem String itemId String desc float price int quantity String item itemId desc price quantity if itemId String tmpItem String itemId int tmpQuant tmpItem 3 quantity tmpQuant tmpItem 3 quantity else - 121 - itemId item Remove an item from the shopping cart. attributes itemId - the unique key associated with the item to be removed public void removeItem String itemId if itemId itemId Change the quantity of a specific item in the shopping cart. The item must have previously been added to perform this function. attributes itemId - unique key for the item to be updated quantity - the new quantity to be stored in the shopping cart public void updateQuantity String itemId int quantity - 122 - if itemld String tmpltem String itemld tmpltem 3 quantity Get an Enumeration to the list of items in the shopping cart. public Enumeration getEnumeration return Get the total cost of all of the items currently in the shopping cart. public float getCost Enumeration enum String tmpltem float totalCost while tmpltem String totalCost tmpltem 3 tmpltem 2 - 123

TỪ KHÓA LIÊN QUAN