static void Main(string[] args) { CarpetCalculator berber = new CarpetCalculator (17.95); double roomWidth; double roomLength; DisplayInstructions( ); // Call getDimension( ) to get the length roomLength = GetDimension("Length"); // Call getDimension( ) again to get the width roomWidth = GetDimension("Width"); berber.SetNoOfSqYards(roomLength, roomWidth); berber.PricePerSqYard = 25.99; Console.Clear(); Console.Write(berber); Console.ReadLine(); }
static void Main( ) { CarpetCalculator berber = new CarpetCalculator(17.95); double roomWidth; double roomLength; DisplayInstructions(); // Call getDimension( ) to get the length roomLength = GetDimension("Length"); // Call getDimension( ) again to get the width roomWidth = GetDimension("Width"); berber.PricePerSqYard = 25.99; berber.SetNoOfSqYards(roomLength, roomWidth); Clear(); Write(berber); ReadKey(); }