Full Java Code needed

Can I please get the fully solved java code to this problem?