Figure createChain Figure figureA Figure alloc init Figure figureB Fig

 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
Figure* createChain() { //6
Figure *figureA = [[Figure alloc] init];
Figure *figureB = [[Figure alloc] init];
figureA->next = figureB;
figureA->_height = 3;
figureA->_width = 4;
Figure *figureC = [[Figure alloc] init];
figureB->next = figureC;
figureB->_height = 5;
figureB->_width = 6;
Figure *figureD = [[Figure alloc] init];
figureC->next = figureD;
figureC->_height = 7;
figureC->_width = 8;
Figure *figureE = [[Figure alloc] init];
figureD->next = figureE;
figureD->_height = 9;
figureD->_width = 10;
return figureA;
}