Guest User

Untitled

a guest
Feb 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace DAF1
  7. {
  8.     public class Circle
  9.     {
  10.     private  int radius;
  11.     private Point center;
  12.     public Circle(int radius,int x,int y)
  13.     {
  14.        this.radius = radius ;
  15.        this.center = new Point(x,y);
  16.     }
  17.     public void SetCenter(int newX, int newY)
  18.     {
  19.         this.center.SetX(newX);
  20.         this.center.SetY(newY);
  21.     }
  22.  
  23.     public void Display()
  24.     {
  25.  
  26.         return "Center Point: " + Point.ToString() + "Radius: " + this.radius;
  27.     }
  28.     }
  29.  
  30.     }
Add Comment
Please, Sign In to add comment