Write a java program

The details are in the following file

Please write the code at the developer level om No.2

Please include algorithm by comments