Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

C++ program help:

Make a class named Cylinder with a field for the radius and a field for the height. Be sure to include the following:

  • a default constructor that sets the radius to 3 and height to 8
  • a setter function to set the value of the radius
  • a setter function to set the value of the height
  • a getter function to return the value of the radius
  • a getter function to return the value of the height
  • a function to compute and return the cylinder's surface area

Be aware that the surface area of a cylinder is 2 * pi * radius * radius + 2 * pi * radius * height. Feel free to use the value of 3.14 for pi.

Next, provide an appropriate main function (driver code) to test this class. Create an object with a radius of 10. make a second Cylinder object that uses the radius set by the default constructor. Once the objects have been created, add code to change the values of the first Cylinder object and display the surface area of both cylinders in an attractive fashion.

Sample Session:

Please enter the radius: 5

Please enter the height: 8

The cylinder with a radius of 3 and height of 8 has a surface area of:  207.24

The cylinder with a radius of 5 and height of 8 has a surface area of:  408.20

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92792843
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

After reading this weeks materials please respond to two 2

After reading this week's materials, please respond to TWO (2) of the following questions. PROVIDE CITATION IN APA 1. Describe the controls contained within the three Access Control categories that can be integrated with ...

Can someone please help me with this examthis is consists

can someone please help me with this exam This is consists of four questions. The questions are designed to test your understanding of certain concepts that were studied over the course of the semester. Please answer all ...

student who is taking quizzes public class student

/** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n) { name = n; totalScore = 0; quizCount = 0; } public String g ...

Please pick a health care phenomenaproblem and use philip

Please pick a health care phenomena/problem and use Philip Jacobs's descriptive, explanatory and evaluative model (in studying Economics) to analyze it. (Please use the real statistics that you search online and cite the ...

The mean household income in a country in a recent year was

The mean household income in a country in a recent year was about ?$69,762 and the standard deviation was about ?$85,000. ?(The median income was ?$55,148?.) ?a) If a Normal model was used for these? incomes, what would ...

Discuss the criteria necessary to establish a factor as a

Discuss the criteria necessary to establish a factor as a confounder and provide an example applying these criteria?

Question do a research on the internet and discuss about

Question : Do a research on the Internet and discuss about the history of development of the networking field. Also discuss some of the recent trends in the networking area, (approx 200 words)

Theeyeshaveitcomnbspbook exchange is a type of e-business

TheEyesHaveIt.com Book Exchange is a type of e-business exchange that does business entirely on the Internet. The company acts as a clearing exchange for both buyers and sellers of used books. For a person to offer books ...

Technology certainly does play a large role in our lives

Technology certainly does play a large role in our lives and this has happened in a very short period of time. It has impacted the way we activities professionally, personally, and academically. For example, online educa ...

Questions -question 1 a digital computer has a memory unit

Questions - Question 1: A digital computer has a memory unit with 16 bits per word. The instruction set consists of 122 different operations. All instructions have an operation code part (opcode) and an address part (all ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As