Implemented Bezier curve with class