1 37 38 package com.sun.j2ee.blueprints.consumerwebsite; 39 40 import java.io.Serializable ; 41 import java.util.Calendar ; 42 43 46 public class CartBean implements Serializable { 47 48 private double adventureTotal = 0; 49 private double lodgingTotal = 0; 50 private double activityTotal = 0; 51 private double transportationTotal = 0; 52 private Calendar departureDate = null; 53 54 private int lodgingDays = 0; 55 private int adventureDays = 0; 56 57 61 public CartBean(double adventureTotal, 62 double lodgingTotal, 63 double activityTotal, 64 double transportationTotal, 65 int lodgingDays, 66 int adventureDays, 67 Calendar departureDate) { 68 69 this.adventureTotal = adventureTotal; 70 this.lodgingTotal = lodgingTotal; 71 this.activityTotal = activityTotal; 72 this.transportationTotal = transportationTotal; 73 this.lodgingDays = lodgingDays; 74 this.adventureDays = adventureDays; 75 this.departureDate = departureDate; 76 } 77 78 public double getGrandTotal() { 79 return adventureTotal + lodgingTotal + activityTotal; 80 } 81 82 public double getTotal() { 83 return adventureTotal; 84 } 85 86 public double getLodgingTotal() { 87 return lodgingTotal; 88 } 89 90 public double getActivityTotal() { 91 return activityTotal; 92 } 93 94 public int getLodgingDays() { 95 return lodgingDays; 96 } 97 98 public double getTransportationTotal() { 99 return transportationTotal; 100 } 101 102 public int getAdventureDays() { 103 return adventureDays; 104 } 105 106 public Calendar getDepartureDate() { 107 return departureDate; 108 } 109 } 110 | Popular Tags |