Problem three solved using classes.
Problem 4 solved.

There is some verification of the input values using do-while loop.