A1 for CS4620 (I'm publishing it here just because I'm working from a public computer and need to save my work. If you're taking CS 4620, don't look at my code, as per Academy Integrity policies).