O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required