//File: index.jsp
Using a JavaBean
Using a JavaBean
I have a
Now I have a
//////////////////////////////////////////////////////////////
//Java Bean
package beans;
import java.io.Serializable;
public class CarBean implements Serializable
{
private String make = "Company";
private double cost = 100.00;
private double taxRate = 17.5;
public CarBean() {}
public String getMake()
{
return make;
}
public void setMake(String make)
{
this.make = make;
}
public double getPrice()
{
double price = (cost + (cost * (taxRate/100)));
return price;
}
}
GetSetPropertiesJSTL.zip( 89 k)