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 ...

Get Joy of Patterns: Using Patterns for Enterprise Development, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.