As It's your design process, It's kind of hard to comment, but I'd recommend you go with a more object oriented approach, by splitting the logic into multiple classes, such as 1 that defines a...