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

BasicPart.java

 package ProductConfig; import java.io.PrintStream; public abstract class BasicPart extends Part { BasicPart(String name, String description, double price) { m_name = name; m_description = description; m_price = price; m_resourceList = new ResourceList(); } public void setName(String name) { m_name = name; } public void setDescription(String description) { m_description = description; } public String getName() { return m_name; } public String getDescription() { return m_description; } public double getPrice() { return m_price; } public void setPrice(double price) { price = m_price; } public void displayInvoice(PrintStream str, int level) { for (int i = 0; i < level; ++i) { str.print(" "); } str.println(this.toString()); } public ...

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