Lab 4:
(Solution)
Take a look at the full solution.
Solution:
primlab4.java
Your solution may differ slightly.