-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathM28GRec.CPP
More file actions
41 lines (41 loc) · 855 Bytes
/
M28GRec.CPP
File metadata and controls
41 lines (41 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
class House
{
private:
int ll_x1,ll_y1,ll_x2,ll_y2,
l2_x1,l2_y1,l2_x2,l2_y2,
l3_x1,l3_y1,l3_x2,l3_y2,
l4_x1,l4_y1,l4_x2,l4_y2,
l5_x1,l5_y1,l5_x2,l5_y2;
public:
House();
void drawHouse();
};
House::House()
{
ll_x1=100,ll_y1=100,ll_x2=150,ll_y2=200,
l2_x1=150,l2_y1=200,l2_x2=150,l2_y2=350,
l3_x1=150,l3_y1=350,l3_x2=50,l3_y2=350,
l4_x1=50,l4_y1=350,l4_x2=50,l4_y2=200,
l5_x1=50,l5_y1=200,l5_x2=100,l5_y2=100;
}
void House::drawHouse()
{
line(ll_x1,ll_y1,ll_x2,ll_y2);
line(l2_x1,l2_y1,l2_x2,l2_y2);
line(l3_x1,l3_y1,l3_x2,l3_y2);
line(l4_x1,l4_y1,l4_x2,l4_y2);
line(l5_x1,l5_y1,l5_x2,l5_y2);
}
void main()
{
int gd=DETECT,gm;
clrscr();
initgraph(&gd,&gm,"c:\\TurboC3\\bgi");
House h;
h.drawHouse();
getch();
closegraph();
}