SimplePart.java

package ProductConfig;
import java.util.Vector;
public class SimplePart extends BasicPart
{
SimplePart(String name, String description, double price)
{
    super(name, description, price);
}

public void addPart(Part part) throws NotACompositeException
{
    throw new NotACompositeException();
}

public void removePart(Part part) throws NotACompositeException
{
    throw new NotACompositeException();
}

}

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.