Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

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: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions