Coding Problem

These links are the two assignments you can do, if they don’t work for what ever reason, please do any other two assignments that are level 8 on the website.
https://www.codewars.com/kata/57e92e91b63b6cbac20001e5/train/java
https://www.codewars.com/kata/55ca77fa094a2af31f00002a/train/java
Complete the code and include comments with //’s on how it was done, please and thank you.