General programming question

I have a project that I am working on.

I’m learning at the moment. I completed a very easy calculator tutorial then I applied that tutorial to a personal calculator that add’s up specific parts used to build a portable building. All I done was assigned each button on the calculator to a specific amount and arranged the buttons so that they are organized in a manner that will be useful to me.

Now… I would love to have a “box” on this application that will store each number and show a break down of which buttons (numbers) where clicked on; then allow me to save that break down into a text file under a customers name.

If you were doing this project what way would you accomplish this task? Any help would be GREATLY appreciated. Thanks in advanced for those willing to dump their time into replies.