Sunday, September 9, 2012

Programming 10/9


Pizza choice this process is in a method because the same function is needed in two places; to record the pizza choice 
Add one to pizza number this will keep track of how many pizzas have been entered
Start looking for exceptions
Declare integer pizza code and set it to content of pizza choice converted to a number this is used to check the input is a number; if it isn’t there will be a format exception local
If pizza code; bigger than “total” or smaller than “default”. Then run invalid input
Wasn’t sure if the next two lines are part of the if statement above
 Use array main write method; send pizza number +”four”& pizza code converted to string
Declare constant inerter “max Pizzas” local  I left this as a variable because I haven’t said a value to give it

Use array write send “counter variable” and “default”, end of loop.
Show message box asking “Is the order delivery” with yes and no buttons did remember syntax need to find my example code
If the user clicks yes; array write send; “default” and “phone” the name phone is because the constant value of 3 is also used as the index for the address; this will add the delivery cost and keep track of the order type

No comments:

Post a Comment