Replace the Vector class by the Point class. Use a dynamic parameter list instead of an array.