first commit
This commit is contained in:
107
Lab6/rectngle.cpp
Normal file
107
Lab6/rectngle.cpp
Normal file
@@ -0,0 +1,107 @@
|
||||
//## begin module.cm preserve=no
|
||||
|
||||
// %X% %Q% %Z% %W%
|
||||
|
||||
//## end module.cm
|
||||
|
||||
|
||||
|
||||
//## begin module.cp preserve=no
|
||||
|
||||
//## end module.cp
|
||||
|
||||
|
||||
|
||||
//## Module: Rectangle; Pseudo Package body
|
||||
|
||||
//## Subsystem: Figures
|
||||
|
||||
//## Source file: Rectngle.cpp
|
||||
|
||||
|
||||
|
||||
//## begin module.additionalIncludes preserve=no
|
||||
|
||||
//## end module.additionalIncludes
|
||||
|
||||
|
||||
|
||||
//## begin module.includes preserve=yes
|
||||
|
||||
//## end module.includes
|
||||
|
||||
|
||||
|
||||
// Rectangle
|
||||
|
||||
#include "Rectngle.h"
|
||||
|
||||
//## begin module.additionalDeclarations preserve=yes
|
||||
|
||||
#include <iostream.h>
|
||||
|
||||
//## end module.additionalDeclarations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Class Rectangle
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Rectangle::Rectangle()
|
||||
|
||||
//## begin Rectangle::Rectangle%.hasinit preserve=no
|
||||
|
||||
//## end Rectangle::Rectangle%.hasinit
|
||||
|
||||
//## begin Rectangle::Rectangle%.initialization preserve=yes
|
||||
|
||||
//## end Rectangle::Rectangle%.initialization
|
||||
|
||||
{
|
||||
|
||||
//## begin Rectangle::Rectangle%.body preserve=yes
|
||||
|
||||
//## end Rectangle::Rectangle%.body
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Rectangle::Rectangle (int x1, int y1, int x2, int y2, Color color)
|
||||
|
||||
//## begin Rectangle::Rectangle%939623932.hasinit preserve=no
|
||||
|
||||
//## end Rectangle::Rectangle%939623932.hasinit
|
||||
|
||||
//## begin Rectangle::Rectangle%939623932.initialization preserve=yes
|
||||
|
||||
//## end Rectangle::Rectangle%939623932.initialization
|
||||
|
||||
{
|
||||
|
||||
//## begin Rectangle::Rectangle%939623932.body preserve=yes
|
||||
|
||||
setColor(color);
|
||||
|
||||
leftTop.setx(x1);
|
||||
|
||||
leftTop.sety(y1);
|
||||
|
||||
rightBottom.setx(x2);
|
||||
|
||||
rightBottom.sety(y2);
|
||||
|
||||
//## end Rectangle::Rectangle%939623932.body
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user