Setting a Session Attribute

I got this assignment where I need to set a session attribute. Although I'm having problems since I cant set attribute that is of type double? I got these hints but since I've worked with doubleValue() or downcasting, the hints didn't help me much..

Hints:
-Recall that session attributes are stored as objects and must be downcast.
-Because a Double object cannot be modified, use the Double method, doubleValue(),to return an intrinsic double value.

The error says that you are trying to invoke the method setAttribute with parameters (String, double) whereas the expected types are (String, Object). Simply put, the compiler expects the second parameter to be of any reference type but definitely not a primitive. Convert the `double` primitive value to `Double` and it should work out fine. Look into the Javadoc of the `Double` class.