2009. március 5., csütörtök

2nd. Lab Assignment

So, as I mentioned before, tomorrow we'll cover the Singleton, Abstract Factory and Builder patterns. The sample code that you'll have to modify can be downloaded form here.

Your task will be the following:
  1. Modify the Factories to be Singletons.
  2. Modify the Pizza class and the CookingRobots so, that Dough, Sauce and Topping are objects themselves.
    • They should have a List of Strings representing the ingredients.
    • The buildDough, buildSauce and buildTopping methods should really create those instances of Dough, Sauce and Topping.
    • These methods should also take some parameter - preferably a String that is tokenized into a List of Strings, or a List of Strings - that defines some aspect of the built object.
  3. Produce several robots and let the Cooks make pizzas using them.
  4. For extra credit: The robots should be produced and run by Threads.
This assignment is due noon next wednesday, 11th March. Please include the following string in the subject of your e-mail: "[Patterns Assignment]"!

Nincsenek megjegyzések:

Megjegyzés küldése