Beispiel #1
0
 public static void Main()
 {
     Sphere s = new Sphere(5, 6, 7, 9);
     Console.WriteLine("Sphere Class Test:");
     Console.WriteLine("X: " + s.X + ", Y: " + s.Y + ", Z: " + s.Z + ", Radius: " + s.R);
     Console.WriteLine("Area: " + s.Area() + ", Volume: " + s.Vol());
     Console.WriteLine("Now changing X, Y, Z, and Radius to 1, 2, 3, and 5:");
     s.X = 1;
     s.Y = 2;
     s.Z = 3;
     s.R = 5;
     Console.WriteLine("X: " + s.X + ", Y: " + s.Y + ", Z: " + s.Z + ", Radius: " + s.R);
     Console.WriteLine("Area: " + s.Area() + ", Volume: " + s.Vol());
     Console.WriteLine("w00t! it works!");
     Console.ReadKey();
 }
Beispiel #2
0
 public SphereTester()
 {
     Sphere = new Sphere(5, 6, 7, 9);
 }