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
-
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 fixed pulley carries a weightless thread with masses m1 and m2 at its ends. There is friction between the thread and the pulley. It is such that the thread starts slipping when the ratio m2/ml =o....
-
A research specialist for a large seafood company plans to investigate bacterial growth on oysters and mussels subjected to three different storage temperatures. Nine cold-storage units are...
-
Bernardino Santos-Rodiguez was piloting a boat owned by his friend, Raul Viera-Torres, in waters near Guayama, Puerto Rico. The boat was equipped with a hydraulic steering system manufactured by...
-
Top Corporation produces a line of beverage lids. The production process has been automated, so the product can now be produced in one operation rather than in the three operations that were needed...
-
Discuss why people often resist new ideas such as the Relational Model in Business Logic ?
-
The Batley Print Shop, which is not registered for VAT, rents a photocopying machine. It makes a quarterly payment as follows: (a) Three months rental in advance (b) A charge of 2 pence per copy made...
-
for a manufacturing company product costs include all of the following except direct material overhead costs research and development costs direct labor costs
-
Write a C program to Create a linked list of size at least 50 nodes where each node is structured with two fields: an integer and a pointer to the next node. Adding a node in the middle, at the end...
-
Adacan Industries located in Saskatchewan has a workers' compensation premium rate of $1.76 per $100.00 of assessable payroll. The actual assessable payroll for the previous year consisted of:...
-
A random variable x has the probability density = {Ae-xx 0 p(x) = (0 x 00) (x < 0). a. Determine the normalization constant A in terms of . b. Determine the mean value of x and its most probable...
-
What is the most important factor that determines how much of a product individuals will buy or sell in the marketplace?
-
Need help with these google slides - https://docs.google.com/presentation/d/1kgLS1qBc0V886zSxeitWT_4EiP1V8NiGELsnC1ZQtao/edit#slide=id.ge4615323c0_0_58
-
The RN notices that Mrs. Schmidt is wearing oxygen at 2L NC and breathing comfortably at 16 breaths/minute. She is being treated with IV antibiotics for a RML pneumonia. Alert and oriented X 3. She...
-
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...
-
Determine which approach to determine the asset allocation is most appropriate for lfheah. Justify your response. The following year, Ng and the IC review the portfolios performance. The IC has...
-
Determine the investment vehicle that would be most appropriate for lfheahs proposed alternative asset class. Justify your response. The lfheah Group is a US-based company with a relatively small...
-
Calculate the expected NAV of the fund at the end of the current year. Mbalenhle Calixto is a global institutional portfolio manager who prepares for an annual meeting with the investment committee...
Study smarter with the SolutionInn App