Question: For this project you will write two files, Circle.h and Circle.cpp that will be used to define and implement a circle class. The circle class

For this project you will write two files, Circle.h and Circle.cpp that will be used to define and implement a circle class. The circle class will have the following members one constructor with one double and two int parameters, three mutator functions, one that will allow the user to set an int x value, one that will allow the user to set an int y value, and one that will allow the user to set a double radius value. The class will also have accessor functions for the following values, the radius, the values of x and y, and the values for diameter, area, and circumference. The circle class will have data fields for radius, x, and y. The circle class will have exactly these members, no more, no less. The access modifiers Public and Private will be use appropriately. Be careful about referencing the circle class code in your textbook. Some of it is not suitable for this project. Once you get this modified circle class programmed, you will write a CircleTest.cpp file to test your circle class code. This file will instantiate two circles with user input for the values of x, y, and radius. When you have two circles in a cartesian plane there are three possibilities. They may be completely separate.They may overlap.Or one circle may be completely inside the other. After your CircleTest.cpp application has instantiated two circle objects using user supplied values for x, y, and radius, it will report to cout one of three statements. (name of the first circle) and (name of the second circle) do not touch. (name of the first circle) and (name of the second circle) overlap. (name of one of the circles) is completely within (name of the other circle). How can we tell if the circle objects are separate, overlapping, or within? I hear you ask. Heres a really big hint. It has to do with lengths of lines. In this case you have three lines to work with, the radius of circle one, the radius of circle two, and the distance between the center points of the two circles. If you think about it a bit, you will realize that with a bit of basic math you can determine which of the three relationships between the two circles is correct. If you have trouble working this out, get a cheap 3 compass, a ruler, some paper, and start drawing pairs of circles and measuring radii and the distances between the center points.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!