| point/point-representation-independence/version2b/Point.cs - A version of class Point modified to use polar coordinates - NOT Recommended. | Lecture 3 - slide 10 : 29 Program 3 |
// A very simple class point with public data representation.
// An incomplete sketch.
// This version uses polar representation.
// NOT RECOMMENDED because of public data representation.
using System;
public class Point {
public double radius, angle;
public Point(double x, double y){
radius = ...
angle = ...
}
public void Move(double dx, double dy){
radius = ...
angle = ...
}
public void Rotate(double angle){
this.angle += angle;
}
public override string ToString(){
...
}
}