point/2d3d/Point3D.cs - The class Point3D which extends class Point3d. | Lecture 7 - slide 11 : 40 Program 2 |
using System; public class Point3D: Point2D { private double z; public Point3D(double x, double y, double z): base(x,y){ this.z = z; } public double Z{ get {return z;} } public void Move(double dx, double dy, double dz){ base.Move(dx, dy); z += dz; } public override string ToString(){ return "Point3D: " + "(" + X + ", " + Y + ", " + Z + ")" + "."; } }