NEED HELP to Program a Batching System

  if (key != NO_KEY && (key=='1'||key=='2'||key=='3'||key=='4'||key=='5'||key=='6'||key=='7'||key=='8'||key=='9'||key=='0')){
    if (valOnePresent != true){
      num1 = num1 + key;

Ok, you've got a text representation of a number in the String variable "num1".

How do you know when you've finished entering your value?

When you've figured that out, you need to convert that String value into a number.
Have a look at the String class's "toInt" or "toFloat" methods.
Don't forget to clear "num1" when you've finished with it.
It's all in the reference section