1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#include <stdio.h>
#include <string.h>
#include<iomanip>
#include <iostream>
#include <cstdlib>
using namespace std;
void getData(string &namez, char& ticketType, int& row, int& column);
int main()
{
//your main routine here if not allready define elsewhere
}
class line
{
public:
line(double X0, double Y0, double X1, double Y1);
void rotate_line(double radians);
void translate_line(double xT, double yT);
void print_line();
void rect_output(int condition);
friend class rectangle;
private:
double X0;
double Y0;
double X1;
double Y1;
};
line::line(double X0, double Y0, double X1, double Y1) : X0(X0), Y0(Y0), X1(X1), Y1(Y1)
{/*Body intentionally left empty*/
}
class rectangle
{
public:
rectangle(double xR, double yR, double wR, double hR);
~rectangle();
void print_rectangle();
private:
line *line1;
};
rectangle::rectangle(double xR, double yR, double wR, double hR) : line1(0)
{
xR;
yR;
wR = xR + wR;
hR = yR;
line1 = new line(xR, yR, wR, hR );
// line1(xR, yR, wR, hR);
}
rectangle::~rectangle()
{
if( line1 !=0)
{
delete line1 ;
}
}
|