I have this code generated UML. Now, I like him because of you want to check. Did the idea that he does not quite right ... Because this is my first time I'm going with polymorphism.
UML: Attachment 12640
Code:
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
class DrawObject{}
class Rectangle : public DrawObject{
private:
Point leftBottom;
private:
int length, width;
public:
Rectangle( int length, int width)
: length(length), width(width){
};
void draw() const;
}
class Triangle : public DrawObject{
private:
Point pA, pB, pC;
public:
{
};
void draw() const;
}
class Circle : public DrawObject{
private:
Point center;
private:
int radius;
public:
Circle( int radius)
: radius(radius){
};
void draw() const;
}
class Oval : public DrawObject{
private:
Point center;
private:
int xRadius, yRadius;
public:
{
};
void draw() const;
}
typedef struct {
int xPos;
int yPos;
} Point;
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}