Implement a class named Calculator in the /app/ directory that provides basic arithmetic operations: addition, subtraction, multiplication, and division. The class must fulfill the following requirements to ensure that all provided test cases pass:
Class Structure:
The class should be named Calculator.
Methods:
Implement the following 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."
Type Annotations:
Ensure all methods use proper type annotations as specified.
Error Handling:
In the divide method, ensure that dividing by zero raises a ValueError.
Test Coverage:
Confirm that the implementation of Calculator passes all corresponding test cases related to the arithmetic operations.
Once implemented correctly, the test cases provided in the project will pass, confirming that the functionality meets the specified requirements.