4.40. Solution: Example using graphics