Create a class called geometrycalculator.

Assignment Help C/C++ Programming
Reference no: EM13939853

Write static methods

- public static double sphereVolume(double r)
- public static double sphereSurface(double r)
- public static double cylinderVolume(double r, double h)
- public static double cylinderSurface(double r, double h)
- public static double coneVolume(double r, double h)
- public static double coneSurface(double r, double h)

that compute the volume and surface area of a sphere with radius r, a cylinder with circular base with radius r and height h, and a cone with circular base with radius r and height h. Place them into a class Geometry. Then write a program that prompts the user for the values of r and h, calls the six methods, and prints the results.

Here is a sample program run:
Please enter the radius: 5
Please enter the height: 10
The volume of the sphere is: 523.5987755982989
The surface area of the sphere is: 314.1592653589793
The volume of the cylinder is: 785.3981633974483
The surface area of the cylinder is: 471.23889803846896
The volume of the cone is: 261.79938779914943
The surface area of the cone is: 254.160184615763

Your main class should be called GeometryCalculator.

You need to supply the following class in your solution: Geometry

Reference no: EM13939853

Questions Cloud

Mainstream ir theories of realism and liberalism : Mainstream IR theories of realism, liberalism and constructivism. Which one do you think has the LEAST explanatory power and why
Discuss how the internet is changing the way : Question: The internet is a part of our daily lives. Discuss how the internet is changing the way we think today and in the future. -Please remember that you will need to have at least Four (4) varying references. For example: Journals, WebPages, ..
What is amount of initial cash flow for expansion project : High Breeze currently produces boat sails and is considering expanding into awnings for homes and travel trailers. The company owns land that could be used for the expansion. This land was purchased five at a cost of $319,000 and is valued today at $..
Compute tax payable and wages that will be paid to employee : Compute the taxes payable and wages that will be paid to employees. Then prepare the journal entries to record the wages earned and the payroll taxes.
Create a class called geometrycalculator. : compute the volume and surface area of a sphere with radius r, a cylinder with circular base with radius r and height h, and a cone with circular base with radius r and height h.
Experience working in a technical analyst role : Demonstrated experience working in a Technical Analyst role; Ability to perform under pressure and to tight deadlines; Demonstrated experience working within a Security conscious environment; Demonstrated experience working in a Defence environmen..
Evaluating my own experience performance asclinical educator : Evaluating my own experience performance as a clinical educator by reflecting on the experience and referring to current relevant educational literature.
Projects that may be adjusted if a recession is on horizon : Pick any industry that you would like to know more about (automobile industry). What are some examples of short term versus long term projects that may be adjusted if a recession is on the horizon? Write in detail with descriptive examples.
Dividends are expected to grow at rate : Synovec Co. is growing quickly. Dividends are expected to grow at a rate of 25 percent for the next three years, with the growth rate falling off to a constant 4 percent thereafter. If the required return is 10 percent, and the company just paid a di..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd