Ashley Kin wrote:Hi, I'm trying to get rid of redundance in this program by factoring?
Well, the usual way is to put repeated code into a method and call it instead. And it seems like you have 2 big blocks of repeated code. You might want to think about parameter(s) for that method as well, so that it's self-contained.
Winston