Java Reference
In-Depth Information
In this example, the clearFields() method is coded at the end of the BillPayer
class, although the placement of this method could be anywhere in the program.
Testing the BillPayer Program
The next step is to test the BillPayer program using the three records in
Table 8-12. It is good practice to attempt to enter one of the records several
times, leaving one of the text boxes blank each time until all the text boxes have
been tested.
Table 8-12
Sample Data for the BillPayer Program
FIELD
RECORD 1
RECORD 2
RECORD 3
Account Number
1Z37F54504
2X98G12345
3Y76H13579
Payment Amount
79.52
64.28
93.15
First Name
Fred
Joseph
Emilio
Last Name
Starks
Jacobson
Castalia
Address
8006 Howard Ave.
1718 Neely Dr.
5258 Minnesota St.
City
Brownsburg
Avon
Plainfield
State
IN
IN
IN
Zip
46112
46213
46168
The following steps test the BillPayer program by entering the data in
Table 8-12.
To Test the Program
1. Click Tools on the menu bar and then click Compile Java. If errors exist,
fix them in the BillPayer.java window and compile again until the
program is error free. Click Tools on the menu bar and then click Run
Java Application.
(continued)
 
Search WWH ::




Custom Search