设计模式学习(二)abstract factory
package com.codeyangjun.partern.abstractFactory;public class Client {public static void main(String[] args) {CarFactory audiFactory = new AudiCarFactory();CarLight audiCarLight = audiFactory.createCarLight();Wheel audiWheel = audiFactory.createWheel();System.out.println("--------------");CarFactory BMWFactory = new BMWCarFactory();CarLight BMWCarLight = BMWFactory.createCarLight();Wheel BMWWheel = BMWFactory.createWheel();}}?
?