Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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.07

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

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago