Task Description: Implement a Simple Calculator Functionality
You are required to implement a simple calculator that can perform basic arithmetic operations: addition, subtraction, multiplication, and division. The functionalities should be encapsulated in a class called Calculator located in the /app/ directory.
Specific Requirements:
Class Definition:
Create a class named Calculator.
Method Implementations:
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, raise a ValueError with the message "Cannot divide by zero".
Error Handling:
Ensure that the divide method handles division by zero appropriately by raising the specified exception.
Return Types:
All methods should return a float, even if the result is a whole number (e.g., add(2, 3) should return 5.0).
Additional Information:
Make sure to include any necessary import statements if required.
Ensure that the code is properly formatted and includes docstrings for each method explaining their functionality.
The implementation should be testable through the provided test code.
Place your implementation in a file named calculator.py within the /app/ directory.