Create a class named Square that contains fi elds for area and the length of a side and whose constructor requires a parameter for the length of one side of a Square. Th e constructor assigns its parameter to the length of the Square’s side fi eld and calls a private method that computes the area fi eld. Also include read-only properties to get a Square’s side and area. Create a class named DemoSquares that instantiates an array of ten Square objects with sides that have values of 1 through 10. Display the values for each Square. Save the class as DemoSquares.cs .
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here