O'Reilly logo

Joy of Patterns: Using Patterns for Enterprise Development, The by Brandon Goldfedder

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

Driver.java

 package ProductConfig; public class Driver { // Put some stuff in the part list public static void fillPartList(PartList list) { Part newPart = new SimplePart("Aplo2", "Apollo 2 Motherboard",109); // provides PCI slots+ newPart.getResourceList().addResource("PCI Slots",5); newPart.getResourceList().addResource("DIMM",3); newPart.getResourceList().addResource("AGP Port",1); newPart.getResourceList().addResource("Slot 1",1); // consumes a motherboard newPart.getResourceList().removeResource("Motherboard",1); list.addPart(newPart); newPart = new SimplePart("Sota24", "Sota 24",115); // provides PCI slots+ newPart.getResourceList().addResource("PCI Slots",5); newPart.getResourceList().addResource("DIMM",3); newPart.getResourceList().addResource("Slot ...

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