Implement a Python class Calculator in the file /app/solution.py that provides basic arithmetic operations. The class should have the following functionality:
Addition: Implement a method add(a: float, b: float) -> float that returns the sum of two numbers a and b.
Subtraction: Implement a method subtract(a: float, b: float) -> float that returns the difference of two numbers a and b.
Multiplication: Implement a method multiply(a: float, b: float) -> float that returns the product of two numbers a and b.
Division: Implement a method divide(a: float, b: float) -> float that 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."
History: Implement a property history that returns a list of strings. Each string should represent a previous calculation in the format ": ", where <operation> is in the form of "a operator b" (e.g., "5 + 3") and <result> is the result of that operation.
Ensure that all methods and properties adhere to their specified functionality, and include appropriate error handling where necessary. The class should maintain a history of all calculations performed through its methods.
Example usage:
python
calc = Calculator()
result1 = calc.add(5, 3) # should return 8
result2 = calc.subtract(10, 4) # should return 6
result3 = calc.multiply(6, 7) # should return 42
result4 = calc.divide(8, 2) # should return 4
calc.divide(5, 0) # should raise ValueError
print(calc.history) # should show previous calculations
The implementation should pass the provided test cases when executed.