1
1. ++ .
2. .
, , ( graphics.h conio.h).
.
1. "" . . : . .
2. : class Point {int x,y;
public:
Point (int a, int b) {x=a; y=b; };
..
};
class Rect {Point lt, rb;
public:
Rect (Point a, Point b):lt(a), rb(b){ };
void draw(void);
};
- , , main- Rect, draw() . .
conio.h: gotoxy(x,y) putch(ch).
.
. .
.
UML.
1. , . . , , .
2. , . . , . , , .
3. , . 10 . : ( ), . - ( ), , . .
4. , . 100 . : ( ), . - ( ), , . .
|
|
5. . : double . - ( ), , .
6. , . : , , . - : , , , .
7. , . : , , . - : , , , .
8. , . : , , . - : , , , , .
9. , . : , , . - : , , , , , .
10. , . : , , . - : , , , , , .
.
1. . - :
;
;
, .
. .
2. . : ; - , , . .
3. , (, 5 + 3i (5, 3)). - , , , . .
4. , (, 10 * (cos(p/6) + i * sin(p/6)) (10, p/6)). - , , , . .
|
|
5. 1024 . . - , , . .
6. . - , , . .
7. . - , , . .
8. . - , , . .
9. . - , , . .
10. ( ). :
;
, ;
, , .
.
- ( )
- ( , )
- UML-
- (6 - 10 ) ( )
:
" "
. , . !
, . , :
Ø ;
Ø , ;
Ø ( ).
:
Ø ;
Ø ;
Ø ;
Ø .
( UML)
- | String | - |
: str : x, y : attr | : SetStr() : SetCoord() : SetAttr() : PrintStr() |
#include <conio.h>
#include <string.h>
class String {