Java programing | Computer Science homework help

see uploaded file. you will solve the problem in 2 type (1.solving by finding contract+purpos+example+algorith/ then 2.solving that problem using java program) 1- you will find the problem to be solved in file named (problem to be solved) 2- there is a sample for solving program, but the sample is without java program just for how to find the (contract+purpus+example+algorithm) the first part of solving program .