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.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here