3GL   4GL   5GL   .

- ++

: Point.Show() Point.Hide(). , Circle.Show() Circle.Hide(). Circle.MoveTo() Point.MoveTo().

?

, , , . , ?

, , , . , . , , . , .

, , . , , , .. . . Point.MoveTo(), Point.Show() Point.Hide(). - Point.MoveTo() Circle.MoveTo().

, , . , . , . , .

, , . , . . .

. , .

++ .

, , . : , , , .

. () . , , , .

, . , . , , . , , , , . , X Y, . . , , , . Show .

, . , , , : " , . ". , , , : " , . ".

MoveTo(). Circle.MoveTo() : MoveTo() . Point.MoveTo(), . . MoveTo() Show(), . Show(), , Show() MoveTo(), , MoveTo().

, Show() MoveTo() : MoveTo() , Show() . , , MoveTo().

, , .

, .

, , , .

, , "" "", ? .

- , , , , , , . . , . , , .

? , , .

.

, , : , , .. , "".

. : , .

, , , switch .

, , , ( ).

switch ' case, , ( case). , , .

, , , . .

, , . ?

, , . , , , (, ), ( ).

virtual . , , . , . , (.. ).

.

class Point
{
 ...
public:
 ...
 virtual void Show ();
 virtual void Hide ();
 void MoveTo (int newX, int newY);
};
 ...
  Point
 ...
class Circle: public Point
{
 ...
public:
 ... // MoveTo()
 virtual void Show ();
 virtual void Hide ();
};
 ...
  Circle
 ...

, , Circle MoveTo(), Point.

MoveTo() Circle, .

, . . ++ , , , , , . , ,

Point pointObj (100,20); //
Circle circleObj (20,30,10); //
Point *pointPtr; //
pointPtr = & pointObj; //
pointPtr = & circleObj; //

, .

pointPtr = & pointObj;
pointPtr->MoveTo(10,10);

.

pointPtr = & circleObj;
pointPtr -> Expand(12);

, .

pointPtr = & pointObj;
pointPtr->Show(10,10); // Show() pointObj Point
pointPtr = & circleObj;
pointPtr->Show(10,10); // Show() circleObj Circle

, .

JumpFigure(), "" h.

void JumpFigure (Point* AnyFigure, int h)
{
int oldX = AnyFigure->GetX();
int oldY = AnyFigure->GetY();
delay(100);  // 0.1
AnyFigure->MoveTo (oldX, oldY-h); // ""
delay(100);  // 0.1
AnyFigure->MoveTo (oldX, oldY); //
}

JumpFigure() Point, , Point.

JumpFigure() , ? . JumpFigure() . JumpFigure() , Point. , Point.

GetX(), GetY(), Show() MoveTo() Circle, Point, , Point, Circle.

GetX(), GetY() MoveTo() . , JumpFigure() .

, Show() . Show() Point Circle, JumpFigure() , .

, JumpFigure() , Show() , AnyFigure. Point, Point.Show(), Circle, Circle.Show(). .

, . JumpFigure() , Point, , JumpFigure() .

, , . , , , , . , (Point) , , , , , , , , , , . , Point, , Point . .. , Point , .

, , , Point, Show() Hide() , . ++ .

. , .

virtual _ ( ) = 0;

.

- , . , .. . , . , .

Point.

class Point
{
protected:
 int X;
 int Y;
 Boolean Visible;
public:
 int GetX(void) { return X; }
 int GetY(void) { return Y; }
 Boolean isVisible (){ return Visible;}
 Point (int newX =0, int new Y =0);
 virtual void Show() = 0; //
 virtual void Hide() = 0; //
 void MoveTo (int newX, int newY)
 {
  Hide();
  X = newX; Y = newY;
  Show();
 }
};

Point , , , , Point, .

, , - X, Y Visible .

: , , , .

        3GL   4GL   5GL   .

, (. snippet , ) , . , . , , . (IDE) . , Microsoft Visual Studio, Borland Developer Studio, . IDE Geany snippets.conf ( : /home/user/.config/geany) . , Macromedia Dreamweaver Zend Studio, -.




 21.01.2021 - 17:54: - Economy and Finances -> - _.
21.01.2021 - 08:17: , , - Upbringing, Inlightening, Education -> - _.
21.01.2021 - 07:59: , , - Upbringing, Inlightening, Education -> - _.
20.01.2021 - 17:39: , , - Upbringing, Inlightening, Education -> - _.
19.01.2021 - 12:55: - Conscience -> . ? - _.
18.01.2021 - 11:33: - Personalias -> WHO IS WHO - - _.
18.01.2021 - 09:05: , - War, Politics and Science -> . - _.
18.01.2021 - 08:21: , , - Upbringing, Inlightening, Education -> - _.
17.01.2021 - 17:59: , - War, Politics and Science -> - _.
17.01.2021 - 16:46: , , - Upbringing, Inlightening, Education -> - _.
17.01.2021 - 16:00: - Ecology -> - _.
15.01.2021 - 09:03: , - War, Politics and Science -> - _.
Bourabai Research -  XXI Bourabai Research Institution