Functionality to Implement:
Create a simple calculator that can perform basic arithmetic operations: addition, subtraction, multiplication, and division. The calculator will take two numbers and an operator as input and return the result of the operation.
Specific Requirements:
Create a class named Calculator in a new file located at /app/calculator.py.
The class should have the following methods:
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 when a is divided by b. If b is zero, it should raise a ValueError with the message "Cannot divide by zero".
Ensure that all methods handle floating-point numbers and type checking for the inputs so that only numeric values (integers or floats) are accepted.
Include basic error handling to provide appropriate messages when invalid input types are provided.
Once the above functionality is implemented, the provided test code for the calculator should pass successfully.