need help to modify this push button code

i know. it maybe sound like that. but, this is not a homework actually. i'm juz graduated. i'm juz want to see the pattern. how the programming. perhaps, later maybe with the example, i can modify it to change the program from dual menu to triple menu. that's the way i learn the program. i only learned one semester subject programming. only the basic. and it is not enough. i'm not hoping u guys to do it. perhaps juz give a few hints how to modify the coding. that's all.