You need to implement a functionality that provides basic mathematical operations in a class called Calculator. The Calculator class should have methods for addition, subtraction, multiplication, and division. Each operation should be able to handle both integer and float inputs.
Requirements:
Create a class named Calculator in the file /app/solution.py.
Implement the following methods within the Calculator class:
add(a: float, b: float) -> float: Returns the sum of a and b.
subtract(a: float, b: float) -> float: Returns the difference when b is subtracted from a.
multiply(a: float, b: float) -> float: Returns the product of a and b.
divide(a: float, b: float) -> float: Returns the quotient of a divided by b. If b is zero, raise a ValueError with the message "Cannot divide by zero".
Ensure that the methods correctly handle both integer and float types for inputs and return the results as floats.
When these methods are implemented correctly in the specified file, the accompanying test code will pass successfully.