First of all, you don't need ready solutions, you need general knowlege. At your level textbooks are going to be a great help. Second, you need practice. Judging from your code you haven't had much. Third, you should accept criticism. For example, here's a bit refactored version of your...