it question java

Question is in the file and I can attach the first portion of it that i have done. I am using Netbeans.