Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write the code in c++ Generate five circles with center (0,0) and radius 1, 2, 3

ID: 647508 • Letter: W

Question

write the code in c++

Generate five circles with center (0,0) and radius 1, 2, 3, 4, and 5. Use the move() method of the Circle class to draw the circles all tangent at a common point, like this:

write the code in c++ Generate five circles with center (0,0) and radius 1, 2, 3, 4, and 5. Use the move() method of the Circle class to draw the circles all tangent at a common point, like this: P3. Zooming out Modify the problem to display the points in a zoomed-out coordinate system ?? so that the circles look smaller as though viewing from a greater distance, but still be centered, as shown. (Hint: just add one line of code)

Explanation / Answer

import java.awt.*; import java.applet.*; publicclass LineRect extends Applet { publicvoid paint(Graphics g) { g.drawLine(10,10,50,50); g.drawRect(10,60,40,30); g.setColor(Color.blue); g.fillRect(60,10,30,80); g.setColor(Color.green); g.drawRoundRect(10,100,80,50,10,10); g.setColor(Color.yellow); g.fillRoundRect(20,110,60,30,5,5); g.setColor(Color.red); g.drawLine(100,10,230,140); g.drawLine(100,140,230,10); g.drawString("Line Rectangles Demo",65,180); g.drawOval(230,10,200,150); g.setColor(Color.blue); g.fillOval(245,25,100,100); } };