Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Format and output Sample is attached below please follow that! Sample CSE 112-Lab #6 Circle Class-Classes and Objects (page 811-#8) and UML Diagram Create a

Format and output Sample is attached below please follow that!

image text in transcribedimage text in transcribed

Sample

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

CSE 112-Lab #6 Circle Class-Classes and Objects (page 811-#8) and UML Diagram Create a circle class that has the following private member variables 1. Radius: a double 2. Pi: a double initialized to 3.14159 The class will have the following member functions 1. Default Constructor that sets the radius to 0.0 2. A Constructor that accepts the radius of the circle as an argument 3. setRadius- a mutator function for the radius variable 4. getRadius- an accessor function for the radius variable 5. getArea - returns that area of the circle (area pi radius * radius) 6. getDiameter-returns the diameter of the circle (diameter radius* 2) 7. getCircumference returns the circumference of the circle (circ 2*pi * radius) Requirements: Write a program that demonstrates the circle class by prompting the user for the circle's radius (with input validation), create a circle object, and then report the area, diameter, and circumference with the output precision set to (2) two decimal places. Use a separate header file for the class. Add a UML Diagram for the class as a comment below main The program will . Use a separate *.h file for the class and a .cpp file for main. Use 3.14159 as the value for pi Include #ifnder, and #endif directives as required Have a commented UML diagram with Access Specifiers in the program below main (ref pg 793) . . II CLASS NAME II MEMBER VARIABLES II MEMBER FUNCTIONS

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

gpt 3 1 9 .

Answered: 1 week ago

Question

What is computer neworking ?

Answered: 1 week ago