Q3 code
Completion requirements
Click Main.java link to view the file.