Question: THIS IS HOW FAR I HAVE GOTTEN BUT NEED HELP. THE QUESTION IS: You need to create a Circle class that draws a circle on

THIS IS HOW FAR I HAVE GOTTEN BUT NEED HELP. THE QUESTION IS: You need to create a Circle class that draws a circle on the screen as location x/y. 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

IF IT IS POSSIBLE I WOULD LIKE HELP WITH WHAT I HAVE NOW AND FOR THE PERSON WHO HELP TO USE WHAT I HAVE AND BUILD OFF IT! PLEASE AND THANK YOU!

#include

#include

#include

#include

using namespace std;

void gotoxy(int column, int line)

{

COORD coord;

coord.X = column;

coord.Y = line;

SetConsoleCursorPosition(

GetStdHandle(STD_OUTPUT_HANDLE),

coord

);

}

int main() {

float n, j, i, p;

HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hStdOut, 13);

int x = 20;

int y = 20;

cout << "enter n ";

cin >> n; n = n + 3;

p = floor((4 * n - 2.5) / 5.8);

for (j = p; j >= -p; j--)

{

gotoxy(x, y);

for (i = -n; i <= n; i++)

{

if (p * p * i * i + n * n * j * j <= n * n * p * p)

cout << "*";

else

{

cout << " ";

}

}

//cout << endl;

y++;

}

return 0;

}

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!