Can i take these 3 bunches of code below

Aha, well maybe because it's a demo program, not a finished application.