package factory.static1; import factory.BMW; import factory.BMW730; import factory.BMW840; /** * Copyright (c) 2023, ustchcs and its affiliates. All rights reserved. More info see www.ustchcs.com * * @author cch * @package java-test factory.static1 * @node */ public class BMWFactory { public static BMW productBMW(String type) { if ("730".equals(type)) { return new BMW730(); } else if ("840".equals(type)) { return new BMW840(); } return null; } }