Design build and test a class hierarchy to represent


Problem:

Class Hierarchy

Design, build and test a class hierarchy to represent geometric figures including circles, triangles, squares, rectangles, polygons, and hexagons. Implement just minimum number of methods per each class to reflect a distinctive characteristic of a particular geometric figure. In particular, each of the class must implement a toString method. Every class corresponding to a geometric figure must provide a constructor that takes a Scanner object as a parameter. For example:

public Square(Scanner keyboard)

Your program must first store the geometric figures in a list, and then display every figure with its attributes. In the output you should indicate the hierarchy of the classes.

Additional Information:

This question is from Computer Science and it explains about designing, building and testing a class hierarchy to represent geometric figures which include circles, triangles, squares, rectangles, polygons, etc.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Design build and test a class hierarchy to represent
Reference No:- TGS01109874

Now Priced at $65 (50% Discount)

Recommended (92%)

Rated (4.4/5)