package factoryPattern;

public class CookieFactory {

	public Cookie createCookie(String type) {
		Cookie cookie = null;
		if (type == "choc") {
			cookie = new Choc();
		}
		if (type == "hazlenut") {
			cookie = new Hazlenut();
		}
		if (type == "double-choc") {
			cookie = new DoubleChoc();
		}
		return cookie;
	}
}

@@ -17,16 +17,324 @@
 attern;%0A
+/*%0A%7C===========================================================%0A%7C%0A%7C-----------------------------------------------------------%0A%7C%09The CookieFactory is the 'Factory' in this pattern%0A%7C-----------------------------------------------------------%0A%7C%0A%7C===========================================================%0A%7C%0A*/
 %0Apublic 

Update CookieFactory.java