Question: Console application design (30 points) Please design a class under the inheritance mechanism of the hierarchical structure of the program. In this program, the base

Console application design (30 points)

Please design a class under the inheritance mechanism of the hierarchical structure of the program. In this program, the base class is Circle, which is an abstract class. In the class Circle, the data member radius rand class Point are defined. Class Point contains the coordinate of the center position of the circle p(x,y). The abstract methods area() and volume()are also defined in class Circle. Besides, class Sphere, classCylinder and class Cone are derived from the class Circle. In the derived class, two abstract methods of area calculation method area() and volume calculation method volume() are respectively rewritten, while method show() is use to show the result.

Test the program to accomplish the following requirements by generating objects. Requirement:

by generating a derived class object, the constructor of the class is called to complete the initialization of the object. The specific data can be given by the designer. Call method area() and methodvolume() to calculate the area and volume of each derived class object, and call method show()to display the output volume and coordinate position information in turn after sorting the volume.

Further thoughts:

What important grammar knowledge points in C# programming language are contained in the designed program? Please explain them in the document and briefly discuss the grammar characteristics of the knowledge points.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!