Rewrite the Shape hierarchy to store the area as a data member and have it computed by the Shape constructor. The constructors in the derived classes should compute an area and pass the result to the super method. Make area a final method that returns only the value of this data member.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here