(20/20) Added performOperation method and test cases to test the entire method