This is the code for home work.
Includes Parameter Test Cases
Exception valid test case