using System;
namespace RectangleApplication {
class Rectangle {
//member variables
private double length;
private double width;
public void Acceptdetails() {
Console.WriteLine(Enter Length: );
length = Convert.Todouble(Console.ReadLine());
Console.WriteLine(Enter Width: );
width = Convert.Todouble(Console.ReadLine());
}
public double GetArea() {
return length * width;
}
public void display() {
Console.WriteLine(Length: {0}, length);
Console.WriteLine(Width: {0}, width);
Console.WriteLine(Area: {0}, GetArea());
}
}//end class Rectangle
class ExecuteRectangle {
static void Main(string[] args) {
Rectangle r = new Rectangle();
r.Acceptdetails();
r.display();
Console.ReadLine();
}
}
}