编写test类,包含属性方法length,width

编写test类,包括属性length,width,普通方法getcir求矩形周长和getarea求矩形面积,main中输入长和宽,调用两个方法,最终显示结果

using System;
 
namespace Unit_3._3
{
    public class rect
    {
        private double h, w;
        
        public rect(double h, double w)
        {
            this.h = h;
            this.w = w;
        }
        public double getarea()
        {           
            return h * w;
        }
        public double getcir()
        {                     
            return (h + w) * 2;
        }
    }
    class Program
    {
        static void Main()
        {
            double x, y;                                             
            x = Convert.ToDouble(Console.ReadLine());           
            y = Convert.ToDouble(Console.ReadLine());
            rect R = new rect(x, y);
            Console.WriteLine("矩形周长为{0},矩形面积为{1}。", R.getcir(), R.getarea());
            Console.ReadLine();
 
        }
    }  
}