Posted By:
Anonymous
Posted On:
Tuesday, October 30, 2001 06:34 PM
please email: p--m--s@home.com thank you. ok. i am using the book "jsp weekend crash course" and its a very long weekend. as for chapter 11-13... i am getting an error on "quantity" as a parameter and an object/property of type "fruit". question is: just how much have i managed to bollix, and how much is askew with the book? here is the source, so far: (fruitorder.html) Fruit Order Form Fruit: Mango Color: Orange Price Per Pound: $5.95 Number of pounds: ================== now Fruit.java (Fruit.class) public class Fruit { private String fruitName; private int quantity;
More>>
please email: p--m--s@home.com thank you.
ok. i am using the book "jsp weekend crash course" and its a very long weekend. as for chapter 11-13... i am getting an error on "quantity" as a parameter and an object/property of type "fruit". question is: just how much have i managed to bollix, and how much is askew with the book?
here is the source, so far: (fruitorder.html)
Fruit Order Form
Fruit: Mango
Color: Orange
Price Per Pound: $5.95
==================
now Fruit.java (Fruit.class)
public class Fruit {
private String fruitName;
private int quantity;
private String color;
private boolean isCitrus;
private float price;
public String getFruitName(){
return this.fruitName; }
public void setFruitName(String name){
this.fruitName=name; }
public int getQuantityInPounds(){
return this.quantity; }
public void setQuantityInPounds(int quantity){ this.quantity=quantity; }
public String getColor(){
return this.color; }
public void setColor(String color){
this.color=color; }
public float getPrice(){
return this.price; }
public void setPrice(float price){
this.price=price; }
public boolean isCitrus(){
return this.isCitrus; }
public void setCitrus(boolean isCitrus){ this.isCitrus=isCitrus; }
}
==============
and finally, confirm.jsp
Your Fruit Order
Fruit:
Color:
Price: $
Quantity:
Total:
<%=orderedFruit.getPrice()*orderedFruit.getQuantityInPounds() %>
Return to order form to adjust quantity