Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: Provide a copy of the code and screen shot for the output in the solutions with your name and ID. 3. Write a C#

image text in transcribed

image text in transcribed

Note: Provide a copy of the code and screen shot for the output in the solutions with your name and ID. 3. Write a C# application that implements a class 'shapes" with the following members. a. Five data members 'p', 'h' of integer data type and 'ar', 'cir', and 'vol' of double data type. b. Five public methods, readValues(), areal), circumference(), volume() and dispResult() i. readValues () - to accept the values of 'r' and 'h' from the keyboard. ii. area () - to calculate the area of the circle. iii. circumference() to calculate the circumference of a circle. iv. volume() - to calculate the volume of a cylinder. v. disResult()- to display the area and circumference of the circle and volume of the cylinder. In the Main method, create an object "obj" of the 'shapes class, and calculate the area, circumference and volume using the above methods. Explain the program. [15 Marks] (Area of circle = rr^2, circumference of circle = 2tr, Volume of cylinder = rr^2h) Sample 1/0 Enter radius: 5 Enter height: 7 Area of circle=78.5 Circumference of circle= 31.4 Volume of cylinder= 549.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

=+ Should the MNE belong (why, why not)?

Answered: 1 week ago

Question

=+ What is the role of government in bargaining?

Answered: 1 week ago