Task Description: Implement a Simple Calculator Class
You are required to implement a simple calculator class in Python. This class should perform basic arithmetic operations, specifically addition, subtraction, multiplication, and division. The functionality must be encapsulated within a class named Calculator.
Requirements:
Class Definition:
Create a class named Calculator in the file /app/calculator.py.
Methods:
Implement the following methods in the Calculator class:
add(a: float, b: float) -> float: Returns the sum of a and b.
subtract(a: float, b: float) -> float: Returns the result of subtracting b from a.
multiply(a: float, b: float) -> float: Returns the product of a and b.
divide(a: float, b: float) -> float: Returns the result of dividing a by b. If b is zero, the method should raise a ValueError with the message "Cannot divide by zero".
Input Types:
The methods should accept floating-point numbers and return results as floating-point numbers.
Testing:
Ensure that all operations handle negative numbers and zero appropriately.
Implement unit tests to verify that each arithmetic operation works correctly, including edge cases (e.g., division by zero, operations with negative numbers).
Once the implementation is complete, ensure to run the tests to confirm that the functionality is working as expected and passes all scenarios outlined in your test cases.