Define a class called Circle with data members radius, area, and circumference. The class has the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a class called Circle with data members radius, area, and circumference. The class has the following member functions void set(double); void get(double&, double&, double&) const; void calculate Circumference(); The function print prints the values of the components. The function calculate Area calculates the area of the circle using the formula p/ where r is the radius. The function calculateCircumference calculates the circumference of the circle using the formula 2 pr. ;void print() const :(void calculate Area Hint: To find the value of p use the formula 4* atan(1.0). The following driver produces the given sample of input/output: int main() Circle u; double r; cout << "Enter the radius of the circle: "; cin >> r; u.set(r); u.print(); return 0; Sample Input/Output: Enter the radius of the circle: 3.5 The radius of the circle is: 3.5 The area of the circle is: 38.4845 The circumference of the circle is: 21.9911 Define a class called Circle with data members radius, area, and circumference. The class has the following member functions void set(double); void get(double&, double&, double&) const; void calculate Circumference(); The function print prints the values of the components. The function calculate Area calculates the area of the circle using the formula p/ where r is the radius. The function calculateCircumference calculates the circumference of the circle using the formula 2 pr. ;void print() const :(void calculate Area Hint: To find the value of p use the formula 4* atan(1.0). The following driver produces the given sample of input/output: int main() Circle u; double r; cout << "Enter the radius of the circle: "; cin >> r; u.set(r); u.print(); return 0; Sample Input/Output: Enter the radius of the circle: 3.5 The radius of the circle is: 3.5 The area of the circle is: 38.4845 The circumference of the circle is: 21.9911
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Healthcare organizations of all sizes require human resource specialists to manage and support their workforce. With legislation like the Affordable Care Act (ACA), employers have seen an increasing...
-
Here are the transaction from Si Puedo Inc. that have to do with Fees Earned for 2022. They started to do business in October of 2022 10/15/22 Si Puedo Inc. earned $20,000 CASH from doing write...
-
1) Define a class called student that has the following data members: - int student number - string student name - double student average The following member functions: - Constructor that initialize...
-
How would one do the following in excel? PROJECT STEPS Donnie Cruz is a finance assistant for Oval Lake Hospital in south Florida. His current project is to format departmental data for the years...
-
A collar of mass m is attached to a spring and slides without friction along a circular rod in a vertical plane. The spring has an un-deformed length of 5 in. and a constant k. Knowing that the...
-
Relate the locations of earthquakes and volcanoes to plate tectonics.
-
The 2014 financial statements of LVMH Moet Hennessey-Louis Vuitton S.A.LVMH is a Paris-based holding company and one of the worlds largest and best-known luxury goods companies. As a member-nation of...
-
Finley Motor Company sells an automobile to Sara and retains a security interest in it. The automobile is insured, and Finley is named beneficiary. Three days after the automobile is totally...
-
What are the upper and lower bounds for an American call option? Explain what would happen in each case if the bound was violated. Make numerical examples.
-
Denise Lopez, age 40, is single and has no dependents. She is employed as a legal secretary by Legal Services, Inc. She owns and operates Typing Services located near the campus of Florida Atlantic...
-
The present value at j12 of a $10,000 payment today, followed by 32 monthly payments of $5000 is $136,335.69. What is the present value of 33 monthly payments of $2000, first payment made today. If...
-
A 42 kg teenager is at the bottom of his jump on a pogostick so that the spring has been compressed 0.20 m. a. Find the elastic potential energy of the spring. (41 J) b. Determine the maximum height...
-
5 . Consider a firm in an imaginary country Compland producing computers, using computer engineers ( E ) and production workers ( P ) . Computer engineers are engaged in designing computer software,...
-
Test scores of eight students are shown below. What can you say about the strength of the correlation between these set of scores in Biology and Chemistry? Biology Chemistry 33 31 40 37 25 23 40 23...
-
Answer the following questions about Delivering Bad News Messages: a. What is the goal when delivering bad news? b. Why is it some important to use the inductive approach when delivering bad news?...
-
The following data is provided for Garcon Company and Pepper Company for the year ended December 31. Garcon Pepper Company Company Finished goods inventory, $ $ beginning 13,800 16,600 Work in...
-
Consider the same information cascade game. Remember the prior belief is 0.5, the payoff of correct choice = 1, and the payoff of wrong choice = 0; flip a coin when indifferent. The signal accuracy...
-
The roof of a refrigerated truck compartment is of composite construction, consisting of a layer of foamed urethane insulation (t2 = 50 mm, ki = 0.026 W/m K sandwiched between aluminum alloy panels...
-
Why didnt the STL designers simply define a base iterator class, use inheritance to derive classes for the other iterator types, and express the algorithms in terms of those iterator classes?
-
Write a program that reads up to 10 donation values into an array of double. (Or, if you prefer, use an array template object.) The program should terminate input on non-numeric input. It should...
-
Write a program that asks the user to enter his or her first name and then last name, and that then constructs, stores, and displays a third string consisting of the users last name followed by a...
-
What is the formula for calculating the factory overhead applied rate?
-
Why are unit costs kept separate on the finished goods ledger card?
-
What is the name of the form used to authorize a seller to deliver goods with payment to be made later?
Study smarter with the SolutionInn App