01: /*
02: @COPYRIGHT@
03: */
04: package demo.townsend.service;
05:
06: import java.util.ArrayList;
07:
08: public class ProductCatalog {
09:
10: private ArrayList catalog;
11:
12: public ProductCatalog() {
13: catalog = new ArrayList();
14: if (!catalog.isEmpty()) {
15: return;
16: }
17: catalog.add(new Product("0001", 10, "Canon PowerShot A620",
18: "7.1 Megapixel Digital"));
19: catalog
20: .add(new Product("0002", 24, "Olympus EVOLT E-500",
21: "8.0 Megapixel Digital SLR Camera w/2.5\" LCD & Two Lenses"));
22: catalog.add(new Product("0003", 150, "Canon PowerShot SD450",
23: "5.0 Megapixel Digital Camera w/3x Zoom & 2.5\" LCD"));
24: catalog.add(new Product("0004", 165, "Fuji FinePix A345",
25: "4.1 Megapixel Digital Camera"));
26: catalog.add(new Product("0005", 205, "Olympus SP-310",
27: "7.1 Megapixel Digital Camera"));
28: catalog.add(new Product("0006", 90, "Canon PowerShot A520",
29: "4.0 Megapixel Digital Camera w/4X Zoom"));
30: catalog.add(new Product("0007", 4, "Canon PowerShot SD500",
31: "7.1 Megapixel Digital Camera w/3x Optical Zoom"));
32: catalog
33: .add(new Product("0008", 14, "Casio EX-Z850",
34: "8.0 MegaPixel Camera with 3x Optical Zoom and Super Bright 2.5\" LCD"));
35: }
36:
37: public ArrayList getCatalog() {
38: return catalog;
39: }
40: }
|