File tree Expand file tree Collapse file tree 8 files changed +79
-0
lines changed Expand file tree Collapse file tree 8 files changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ var ChicagoStyleClamPizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'Chicago Style Deep Dish Cheese Pizza' ;
4
+ this . sDough = 'Extra Thin Crust Dough' ;
5
+ this . sSauce = 'Plum Tomato Sauce' ;
6
+ this . aToppings = [ "Shredded Mozzarella Cheese" ] ;
7
+ } ;
8
+ ChicagoStyleClamPizza . prototype = new Pizza ( ) ;
9
+ ChicagoStyleClamPizza . prototype . cut = function ( ) {
10
+ console . log ( "Cutting the pizza into square slices." ) ;
11
+ } ;
Original file line number Diff line number Diff line change
1
+ var ChicagoStylePepperoniPizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'Chicago Style Deep Dish Cheese Pizza' ;
4
+ this . sDough = 'Extra Thin Crust Dough' ;
5
+ this . sSauce = 'Plum Tomato Sauce' ;
6
+ this . aToppings = [ "Shredded Mozzarella Cheese" ] ;
7
+ } ;
8
+ ChicagoStylePepperoniPizza . prototype = new Pizza ( ) ;
9
+ ChicagoStylePepperoniPizza . prototype . cut = function ( ) {
10
+ console . log ( "Cutting the pizza into square slices." ) ;
11
+ } ;
Original file line number Diff line number Diff line change
1
+ var ChicagoStyleVeggiePizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'Chicago Style Deep Dish Cheese Pizza' ;
4
+ this . sDough = 'Extra Thin Crust Dough' ;
5
+ this . sSauce = 'Plum Tomato Sauce' ;
6
+ this . aToppings = [ "Shredded Mozzarella Cheese" ] ;
7
+ } ;
8
+ ChicagoStyleVeggiePizza . prototype = new Pizza ( ) ;
9
+ ChicagoStyleVeggiePizza . prototype . cut = function ( ) {
10
+ console . log ( "Cutting the pizza into square slices." ) ;
11
+ } ;
Original file line number Diff line number Diff line change
1
+ var NyStyleClamPizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'NY Style Sauce and Cheese Pizza' ;
4
+ this . sDough = 'Thin Crust Dough' ;
5
+ this . sSauce = 'Marinara sauce' ;
6
+ this . aToppings = [ "Grated Reggiano Cheese" ] ;
7
+ } ;
8
+ NyStyleClamPizza . prototype = new Pizza ( ) ;
Original file line number Diff line number Diff line change
1
+ var NyStylePepperoniPizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'NY Style Sauce and Cheese Pizza' ;
4
+ this . sDough = 'Thin Crust Dough' ;
5
+ this . sSauce = 'Marinara sauce' ;
6
+ this . aToppings = [ "Grated Reggiano Cheese" ] ;
7
+ } ;
8
+ NyStylePepperoniPizza . prototype = new Pizza ( ) ;
Original file line number Diff line number Diff line change
1
+ var NyStyleVeggiePizza = function ( ) {
2
+ Pizza . apply ( this ) ;
3
+ this . sName = 'NY Style Sauce and Cheese Pizza' ;
4
+ this . sDough = 'Thin Crust Dough' ;
5
+ this . sSauce = 'Marinara sauce' ;
6
+ this . aToppings = [ "Grated Reggiano Cheese" ] ;
7
+ } ;
8
+ NyStyleVeggiePizza . prototype = new Pizza ( ) ;
Original file line number Diff line number Diff line change
1
+ var PepperoniPizza = function ( oIngredientFactory ) {
2
+ Pizza . apply ( this ) ;
3
+ this . oIngredientFactory = oIngredientFactory ;
4
+ } ;
5
+ PepperoniPizza . prototype = new Pizza ( ) ;
6
+ PepperoniPizza . prototype . prepare = function ( ) {
7
+ console . log ( "Preparing " + this . sName ) ;
8
+ this . oDough = this . oIngredientFactory . createDough ( ) ;
9
+ this . oSauce = this . oIngredientFactory . createSauce ( ) ;
10
+ this . oCheese = this . oIngredientFactory . createCheese ( ) ;
11
+ } ;
Original file line number Diff line number Diff line change
1
+ var VeggiePizza = function ( oIngredientFactory ) {
2
+ Pizza . apply ( this ) ;
3
+ this . oIngredientFactory = oIngredientFactory ;
4
+ } ;
5
+ VeggiePizza . prototype = new Pizza ( ) ;
6
+ VeggiePizza . prototype . prepare = function ( ) {
7
+ console . log ( "Preparing " + this . sName ) ;
8
+ this . oDough = this . oIngredientFactory . createDough ( ) ;
9
+ this . oSauce = this . oIngredientFactory . createSauce ( ) ;
10
+ this . oCheese = this . oIngredientFactory . createCheese ( ) ;
11
+ } ;
You can’t perform that action at this time.
0 commit comments