Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For C++, please. For this lab, your objective is to create the header file Circle.h. Define the class Circle that has components o Private double

image text in transcribedFor C++, please.

For this lab, your objective is to create the header file "Circle.h". Define the class Circle that has components o Private double field named radius. Public static constant double field named PI which is initialized to 3.141592. Public default constructor. It assigns 1 to radius. O Public overloaded constructor that takes a double parameter. If the parameter is positive, it assigns the param- eter to radius; otherwise, it assigns 1 to radius. Public copy constructor. O Public assignment operator. O Public empty destructor. | Public get method for radius. Public constant get method for radius. O Public set method for radius. O Public double constant method named Diameter() that takes no parameters. It returns the diameter of the circle. O Public double constant method named Circumference() that takes no parameters. It returns the circumference of the circle. O Public double constant method named Area () that takes no parameters. It returns the area of the circle. Public constant string method named ToString() that takes no parameters. It returns radius with one decimal point as a string. o Overloaded ostream operator. It returns the same as ToString()

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

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions