Both destinations are scenically beautiful. I just returned from the Azores,
see here for my trip report. I had no issues with safety in Cape Town, but that's not to say it's a perfectly safe city as statistically it is not. I walked around with my DSLR (in Cape Town, hiking, etc) and felt perfectly fine. Just avoid the less affluent areas and maintain common street smarts and you should be fine.
Joburg, same deal. Though not as safe as Cape Town, I'd still feel alright walking around most parts of the city. I drove all over South Africa last year by myself (at age 23 at that).