Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can I please get help using Visual Studio or C++ Write a Circle class that has the following member variables: radius: a double pi: a
Can I please get help using Visual Studio or C++
Write a Circle class that has the following member variables: radius: a double pi: a double initialized with the value 3.14 .name: a string Define three files, Circle.h, Circle.cpp, and Lab5.cpp The class should have the following member functions: .setName: A mutator function for the name attribute. getName: A accessor function for the name attribute. .setRadius: A mutator function for the radius attribute. getRadius: An accessor function for the radius attribute. .getArea: Returns the area of the circle, which is calculated as area = pi * radius * radius .getCircumference: Returns the circumference of the circle, which is calculated as circumference = 2 * pi * radius Define three files, Circle.h, Circle.cpp, and Lab5.cpp for class declaration, methods implementation, and application program. Write a program that demonstrates the Circle class Declare a circle object cl. Ask users to input radius and name. Use set functions to set cl's radius and name. Display name, radius, area, and circumference of the circle. Sample run: Circle's name: baseball Radius (in.): 1.5 baseball size: Radius: 1.5 Circumference: 9.42 Area: 7.07 Write a Circle class that has the following member variables: radius: a double pi: a double initialized with the value 3.14 .name: a string Define three files, Circle.h, Circle.cpp, and Lab5.cpp The class should have the following member functions: .setName: A mutator function for the name attribute. getName: A accessor function for the name attribute. .setRadius: A mutator function for the radius attribute. getRadius: An accessor function for the radius attribute. .getArea: Returns the area of the circle, which is calculated as area = pi * radius * radius .getCircumference: Returns the circumference of the circle, which is calculated as circumference = 2 * pi * radius Define three files, Circle.h, Circle.cpp, and Lab5.cpp for class declaration, methods implementation, and application program. Write a program that demonstrates the Circle class Declare a circle object cl. Ask users to input radius and name. Use set functions to set cl's radius and name. Display name, radius, area, and circumference of the circle. Sample run: Circle's name: baseball Radius (in.): 1.5 baseball size: Radius: 1.5 Circumference: 9.42 Area: 7.07Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started