Question: This code needs to be written in C++ Assignment In this week's assignment. You need to create a Circle class that draws a circle on
This code needs to be written in C++


Assignment In this week's assignment. You need to create a Circle class that draws a circle on the screen as location x/y. The code to create the circle is provided in Helpful Resources. Your class needs to read input from a file, the file contains may rows, each row represents the attributes of a circle. The first two values is the X/Y location of the center point of the circle. The next value is the radius, the forth value is the color of the circle. So the input 10 10 15 14 means create a circle that has its center at point 10.10, the radius is 15 and the color is 14 (yellow). An example of input file would be: 10 10 15 14 50 20 5 15 The output would be as follows: 1 My main function that I will use will be like this: void main circle c1("c:\\temp\\input.txt"); C1.DrawCircles The code to draw a circle is given below. Feel free to use it in your class: #include #include using namespace std; int main() { float n, j, i, P; cout > n; n = n + 3; p = floor((4 n - 2.5) / 5.8); for (j = p; ; > -P) --) { for (i = -n; i = n; i++) { if ( ppoi'i+nonjojcn.n.pop) cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
