Any idea as to how to tackle this using NSLog?
"
7:
Write a method for the Rectangle class called draw that draws a rectangle using dashes and vertical bar characters. The following code sequence
Rectangle *myRect = [[Rectangle alloc] init];
[myRect setWidth: 10 andHeight: 3];
[myRect draw];
[myRect free];
"
Would look something like this.
----------
| |
| |
| |
----------
(Cannot get the formatting correct, but I think you get the idea)
Version 1.0 used printf, but in keeping with the Authors guidelines, printf is not used. NSLog prints each character on a new line.....I think
"
7:
Write a method for the Rectangle class called draw that draws a rectangle using dashes and vertical bar characters. The following code sequence
Rectangle *myRect = [[Rectangle alloc] init];
[myRect setWidth: 10 andHeight: 3];
[myRect draw];
[myRect free];
"
Would look something like this.
----------
| |
| |
| |
----------
(Cannot get the formatting correct, but I think you get the idea)
Version 1.0 used printf, but in keeping with the Authors guidelines, printf is not used. NSLog prints each character on a new line.....I think