POINT
|
Absis
Ordinat
|
Move
|
LINE
|
Point A
Point B
|
Get Panjang
|
Rectangel
|
Point A
Point B
|
Get Luas
|
KARTU ADT
·
POINT
Type
Point : < X : integer { absis }
Y : integer { ordinat } >
ü Konstruktor
function MakePoint
( output P : Point, input X, Y : integer )
ü Destruktor
function
DesPoint (output X : integer, Y : integer, input P : Point)
ü Selektor
function GetAbsis (P : Point) è integer
function GetOrdinat (P : Point) è integer
ü
Aksesor
procedure SetAbsis (input/output P : Point, input newX : integer)
procedure SetOrdinat (input/output P : Point, input newY : integer)
·
LINE
USE POINT
Type
Line : < Paw :
Point {Titik Awal}
Pakh : Point {Titik Akhir} >
ü Konstruktor
procedure MakeLine
( input P1, P2 : Point, output L : Line )
ü Destruktor
procedure DesLine
(output P1, P2 : Point, input L : Line)
ü Selektor
function GetPAw (L : Line) è Point
function GetPAkh (L : Line) è Point
ü
Aksesor
procedure SetPAw (input/output L : Line, input newPAw : Point)
procedure SetPAkh (input/output L : Line, input newPAkh : Point)
·
RECTANGEL
Type
Rect : < PA :
Point
PB :
Point >
ü Konstruktor
procedure MakeRectangle
( input P1, P2 : Point, output R : Rect )
ü Destruktor
procedure DesRectangle
(output P1, P2 : Point, input R : Rect)
ü Selektor
function GetPA (R :
Rectangle) è Point
function GetPB (R :
Rectangle) è Point
ü
Aksesor
procedure SetPA (input/output R : Rectangle, input newPA : Point)
procedure
SetPB (input/output R : Rectangle, input newPB : Point)
No comments:
Post a Comment