Programming Homework Help

CSC 420 American University Algorithms and Data Structures Question

 

I’m working on a Java exercise and need support.

Please help me complete the algorithm of the first question and the coding of the second question. Thank you!