Arduino - "expected primary-expression before '.' token" Error
Ultrasonic is a class name. Why are you trying to use it before a . in an expression?

Judging by the declaration, you need ultrasonic. That is your object name. ultrasonic, not Ultrasonic.