Java Reference
In-Depth Information
19 @return
the description
20 */
21
public
String getDescription()
22 {
23
return
description;
24 }
25
26 /**
27
Gets the product price.
28 @return
the unit price
29 */
30
public double
getPrice()
31 {
32
return
price;
33 }
34
35
private
String description;
36
private double
price;
37 }
ch12/invoice/Address.java
1 /**
2
Describes a mailing address.
3 */
4
public class
Address
5 {
6 /**
7
Constructs a mailing address.
8 @param aName
the recipient name
9 @param aStreet
the street
10 @param aCity
the city
11 @param aState
the two-letter state code
12 @param aZip
the ZIP postal code
13 */
14
public
Address(String aName, String
aStreet,
15 String aCity, String aState,
String aZip)
16 {
17 name = aName;