using System; namespace Lapid1{ class Lapp{ private int x; private int y; private string toon; public Lapp(int ux, int uy, string utoon){ x=ux; y=uy; toon=utoon; } public override string ToString(){ return toon +" lapp "+x+"x"+y+" cm."; } public void Tryki(){ Console.WriteLine(this); } public int GetX(){ return x; } public int GetY(){ return y; } public int Pindala(){ return x*y; } public double KaugusNullist(){ return Math.Sqrt(x*x+y*y); } } class Punktiproov{ public static void Main(string[] arg){ Lapp esimene=new Lapp(3, 4, "roheline"); esimene.Tryki(); Console.WriteLine("Pindala: "+esimene.Pindala()); } } }