The Customer Class

Your first goal is to create a new customer registration page and customer login functionality. To do this, you're going to need some underlying beans to hold on to the user's information. Looking back at your class diagram, you know that the Customer, AddressBook, and CreditCard objects will have to be implemented. Start with the simplest of the beans, the Customer bean. As with all beans, you should begin with the local storage and accessor methods for the properties of the class, as shown in Listing 8.1.

Listing 8.1. Customer.java
 package com.bfg.customer; import java.util.Vector; public class Customer { private String last_name; private String first_name; private String email; private String password; private Vector addresses ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.