Why isn't it העוגה?
(This is my understanding about this.)
The definite article comes only to the the latter noun.
עוגת שוקולד (indefinite) עוגת השוקולד (definite)
עוגת is in the constructed mode and that's why it's not עוגה. Please, correct me if I'm wrong.
Why the ת at the end of מושלם?
The noun עוגה is feminine
ani mekhapes et ugat ha-shokolad ha-mushlemet
and btw... gam ani!