write the programs in C++ header files: ccc_shap.cpp P1. Lines Write a program t
ID: 649816 • Letter: W
Question
write the programs in C++
header files:
ccc_shap.cpp
P1. Lines Write a program that uses five Line objects to draw a pentagon. like this. P2. Moving graphical objects Generate five circles with center (0,0) and radius 1, 2, 3, 4, and 5. Use the move0 method of the Circle class to draw the circles all tangent at a common point, like this: P3. Zooming out Modify the 5-circles program of the previous 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) write the programs in C++ header files: ccc_win.h ccc_msw.cpp ccc_shap.cppExplanation / Answer
#include #include main() { int gd = DETECT,gm,left=100,top=100,right=200,bottom=200,x= 300,y=150,radius=50; initgraph(&gd, &gm, "C:\TC\BGI"); rectangle(left, top, right, bottom); circle(x, y, radius); bar(left + 300, top, right + 300, bottom); line(left - 10, top + 150, left + 410, top + 150); ellipse(x, y + 200, 0, 360, 100, 50); outtextxy(left + 100, top + 325, "My First C Graphics Program"); getch(); closegraph(); return 0; }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.