Completed assignment with modularized code to check input fields for integer values