public class GuestBean
1: // Fig. 27.20: GuestBean.java
2: // JavaBean to store data for a guest in the guest book.
3: package com.deitel.jhtp6.jsp.beans;
4:
5: public class GuestBean
6: {
7: private String firstName;
8: private String lastName;
9: private String email;
10:
11: // set the guest's first name
12: public void setFirstName( String name )
13: {
14: firstName = name;
15: } // end method setFirstName
16:
17: // get the guest's first name
18: public String getFirstName()
19: {
20: return firstName;
21: } // end method getFirstName
22:
23: // set the guest's last name
24: public void setLastName( String name )
25: {
26: lastName = name;
27: } // end method setLastName
28:
29: // get the guest's last name
30: public String getLastName()
31: {
32: return lastName;
33: } // end method getLastName
34:
35: // set the guest's email address
36: public void setEmail( String address )
37: {
38: email = address;
39: } // end method setEmail
40:
41: // get the guest's email address
42: public String getEmail()
43: {
44: return email;
45: } // end method getEmail
46: } // end class GuestBean
47:
48:
49: /**************************************************************************
50: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
51: * Pearson Education, Inc. All Rights Reserved. *
52: * *
53: * DISCLAIMER: The authors and publisher of this book have used their *
54: * best efforts in preparing the book. These efforts include the *
55: * development, research, and testing of the theories and programs *
56: * to determine their effectiveness. The authors and publisher make *
57: * no warranty of any kind, expressed or implied, with regard to these *
58: * programs or to the documentation contained in these books. The authors *
59: * and publisher shall not be liable in any event for incidental or *
60: * consequential damages in connection with, or arising out of, the *
61: * furnishing, performance, or use of these programs. *
62: *************************************************************************/