1. class Point{
    2. constrcutor(x, y){
    3. this.x = x;
    4. this.y = y;
    5. }
    6. static newCartesianPoint(x, y){
    7. return new Point(x, y);
    8. }
    9. static newPolarPoint(rho, theta){
    10. return new Point(rho * Math.cos(theta), ro * Math.sin(theta);
    11. }
    12. }