Implement a Calculator class in Python located in the /app/ directory. The class should provide basic arithmetic operations: addition, subtraction, multiplication, and division.
Requirements:
Class Definition:
Create a class named Calculator with the following methods:
Methods:
add(a: float, b: float) -> float: Returns the sum of a and b.
subtract(a: float, b: float) -> float: Returns the result of a minus b.
multiply(a: float, b: float) -> float: Returns the product of a and b.
divide(a: float, b: float) -> float: Returns the result of a divided by b. If b is zero, raise a ValueError with the message "Cannot divide by zero".
Input and Output:
All methods should accept two floating-point numbers as arguments and return a floating-point number as the result.
Error Handling:
Ensure that division by zero raises a ValueError.
No Additional Dependencies:
Use only built-in Python functionality; do not import any external libraries.
Outcome:
Once the Calculator class is implemented as described, all provided tests should pass successfully, confirming that the functionality is correct.