First and foremost, every time you become or are conscious of your posture, correct it by pulling your shoulders back a bit and making them more erect. Not to a point of over doing it, but just head up, chest out, some low back arch and your shoulders will go where they should really. Think of your body/skeleton as a complete unit, and if you straighten one area, it all follows suit.
Something else, is to walk around, like you own a huge sports car dealership or whatever. You get my drift. Now I don't mean to walk around looking like an over pompous jerk or ass. Just walk around like you own a little piece of greatness and be proud of who you are and what you are doing here. Slumping can be a body image or security thing.
As far as exercises, any drawing back work as the last poster mentioned and or upper back work, from band pull aparts to OHP's, pullups high pulls etc. etc.
Eventually, the longer muscles in the back will strengthen and tighten up and the tight shorter front chest and shoulders will relax and loosen up.
Once those things gets ingrained and are made habits, you won't look back.