public static Soup MakeSoupOfTheDay(AbstractSoupFactory concreteSoupFactory) { Soup s; /* * Calendar todayCalendar = Calendar.getInstance(); * //int dayOfWeek = todayCalendar.get(Calendar.DAY_OF_WEEK); * * int dayOfWeek = Calendar.TUESDAY; * * switch( dayOfWeek ) * { * case Calendar.MONDAY: * s = concreteSoupFactory.makeChickenSoup(); * break; * case Calendar.TUESDAY: * s = concreteSoupFactory.makeClamChowder(); * break; * case Calendar.WEDNESDAY : * s = concreteSoupFactory.makeFishChowder(); * break; * case Calendar.THURSDAY : * s = concreteSoupFactory.makeMinnestrone(); * break; * case Calendar.FRIDAY : * s = concreteSoupFactory.makePastaFazul(); * break; * case Calendar.SATURDAY : */ s = concreteSoupFactory.makeTofuSoup(); /* * break; * case Calendar.SUNDAY : * s = concreteSoupFactory.makeVegetableSoup(); * break; * } */ return(s); }
public static Soup MakeSoupOfTheDay(AbstractSoupFactory concreteSoupFactory) { Soup s ; /* Calendar todayCalendar = Calendar.getInstance(); //int dayOfWeek = todayCalendar.get(Calendar.DAY_OF_WEEK); int dayOfWeek = Calendar.TUESDAY; switch( dayOfWeek ) { case Calendar.MONDAY: s = concreteSoupFactory.makeChickenSoup(); break; case Calendar.TUESDAY: s = concreteSoupFactory.makeClamChowder(); break; case Calendar.WEDNESDAY : s = concreteSoupFactory.makeFishChowder(); break; case Calendar.THURSDAY : s = concreteSoupFactory.makeMinnestrone(); break; case Calendar.FRIDAY : s = concreteSoupFactory.makePastaFazul(); break; case Calendar.SATURDAY : */ s = concreteSoupFactory.makeTofuSoup(); /* break; case Calendar.SUNDAY : s = concreteSoupFactory.makeVegetableSoup(); break; } */ return s; }