Here are the problems to work out for the final. New problems: a) design a class of objects of type Point. A Point has two coordinates (x, y) and is able to calculate its distance to any other point. (The distance is the square root of the squared differences between the corresponding coordinates). b) design a class of objects of type Line. A Line has two endpoints (a, b) that are of type Point. A Line is supposed to be able to determine and report its length. c) design a class of objects of type Triangle. A Triangle is created by specifying three Point objects, which are the vertices of the Triangle. Each Triangle is supposed to be able to calculate and report its area. A Triangle should use Heron's formula to calculate its area: http://en.wikipedia.org/wiki/Heron%27s_formula d) write a program that reads a file and summarizes its content as described below. The file looks like this: +------------------- | ... | Spongebob 3 | Spongebob 5 | Squidward 8 | Squidward 7 | Spongebob 1 | Mr.Krabs 12 | ... +------------------- In other words let's assume that the citizens of some fictitious place vote for the mayor in that place and each voter can choose a candidate (and only one) and give that candidate a number between -15 and 15 indicating how much (s)he wants that candidate to be (or not to be) the mayor in that place. So in the example above we see votes for Spongebob, Patrick Star, Mr. Krabs, Squidward and Plankton in the fictitious place of ... wherever they live. Your program should read the file and then report: a) the candidates, sorted by votes, from the candidate with the biggest total number of votes to the one with the smallest number of votes, and b) the candidates, sorted in descending order (like above) by the average number of votes received. In the example above the program would produce, first by absolute number of votes: >>> Squidward --> 15 ( 2 ) Mr.Krabs --> 12 ( 1 ) Spongebob --> 9 ( 3 ) >>> And by averages: >>> Mr.Krabs --> 12.0 Squidward --> 7.5 Spongebob --> 3.0 So by average and by absolute number of votes we don't necessarily always get the same order.