Project:PizzaPrinter: Difference between revisions

From London Hackspace Wiki

Line 138: Line 138:
  int iPizzaID = pz.id();
  int iPizzaID = pz.id();


==== toppings ====
==== layers ====


Returns string array with canonical pizza toppings.
Returns string array with canonical pizza layers.


  Pizza pz = new Pizza();
  Pizza pz = new Pizza();
  string arr[] = pz.toppings();
  string arr[] = pz.layers();
  for(int i=0; i<arr.size(); i++)
  for(int i=0; i<arr.size(); i++)
  print "Pizza topping " + i + " = " + arr[i] + "\n";
  print "Pizza layer " + i + " = " + arr[i] + "\n";


==== add_layer ====
==== add_layer ====
Anonymous user