Analysis of Continuous and Discontinuous Cases of a Contact Problem Using Analytical Method and FEM