I assume you stay in the Schengen area for your German summer school and your Hungary event.
If so, you should explain the Hungary event when applying for your Germany visa. A single entry visa will cover you for this kind of trip.
If your trip to Hungary is minor compared to the time you spend in Germany, it might even be acceptable not to mention it on applying for your visa, but as it is quite a distance I would tell them.
If on the other hand, you have to leave the Schengen area before or after your Hungary trip, you will need a two entry or multiple entry visa (for three or more entries.) Then again you need to explain the whole set of travels when applying for the German visa, if the visa officials do what is the most expected you will get the visa for the whole trip.
But you are not guarantied to get a multiple visa, so if you can organize your trip such that you do not need the Schengen area.
If applying for just one visa for the whole period would get you over 90 days, applying for two or more visa in one go or separately, will not help you, as you will still only get 90 days out of 180 days on a tourist visa. It may mean that you have to apply for a different kind of visa, like a study visa. The only way around that maximum of 90 days is to have a break out of the Schengen area so your maximum time is 90 days or less. Hungary is within Schengen, so going there will not stop your days counter.