程序代写代做代考 Sample Assignment Design

Sample Assignment Design

Node
+ draw() : virtual void
+ ~Node() : virtual
Abstract Class
isa isa isa isa
Circle
+ draw() : void
+ ~Circle()
Translate
+ draw() : void
+ ~Translate()
Scale
+ draw() : void
+ ~Scale()
Polygon
+ draw() : void
+ ~Polygon()

Node
+ draw() : virtual void
+ ~Node() : virtual
Abstract Class
Circle
+ draw() : void
+ ~Circle()
Translate
+ draw() : void
+ ~Translate()
Scale
+ draw() : void
+ ~Scale()
Polygon
+ draw() : void
+ ~Polygon()

Node
+ draw() : virtual void
+ ~Node() : virtual
Abstract Class
Circle
+ draw() : void
+ ~Circle()
Translate
+ draw() : void
+ ~Translate()
Scale
+ draw() : void
+ ~Scale()
Polygon
+ draw() : void
+ ~Polygon()
Circle
+ ~Circle()

Node
+ draw() : virtual void
+ ~Node() : virtual
Abstract Class
isa isa isa
Translate
+ draw() : void
+ ~Translate()
Scale
+ draw() : void
+ ~Scale()
Polygon
+ draw() : void
+ ~Polygon()
isa
Circle
+ ~Circle()

Node
+ draw() : virtual void + ~Node() : virtual
Abstract Class
Polygon
-vertNum: int
-r,g,b : float
-x, y, z: float *
+Polygon +~Polygon
+draw() : void +Polygon(const Polygon&) +operator=(const Polygon&) + operator>>: friend
Scale
– x,y,z : float
+Scale +~Scale +draw() : void
+ operator>>: friend
Translate
– x,y,z : float
+Translate +~Translate +draw() : void
+ operator>>: friend
SceneGraph
– graph: std::list
+SceneGraph +~SceneGraph +draw() : void
+ operator>>: friend
Possible singleton class
Circle
+ Circle
+ ~Circle
+ operator>>: friend

Node
+ draw() : virtual void + ~Node() : virtual
Abstract Class
aggregation
Polygon
-vertNum: int
-r,g,b : float
-x, y, z: float *
+Polygon +~Polygon
+draw() : void +Polygon(const Polygon&) +operator=(const Polygon&) + operator>>: friend
isa isa isa
Scale
– x,y,z : float
+Scale +~Scale +draw() : void
+ operator>>: friend
Translate
– x,y,z : float
+Translate +~Translate +draw() : void
+ operator>>: friend
}
SceneGraph s;
void draw() {
s.draw(); }
int main(int argc, char* argv[]) {
ifstream in(argv[1]); in >> s;
in.close();

SceneGraph
– graph: std::list
+SceneGraph +~SceneGraph +draw() : void
+ operator>>: friend
Possible singleton class
isa
Circle
+ Circle
+ ~Circle
+ operator>>: friend

isa
vector3D
+vector3D
+~vector3D
std::vector
Node
+ draw() : virtual void + ~Node() : virtual
Abstract Class
aggregation
hasa
Polygon
-colour : vector3D -verticies: std::vector
+Polygon +~Polygon
+draw() : void +Polygon(const Polygon&) +operator=(const Polygon&) + operator>>: friend
isa isa isa
Scale
– scale : vector3D
+Scale +~Scale +draw() : void
+ operator>>: friend
Translate
– trans : vector3D
+Translate +~Translate +draw() : void
+ operator>>: friend
}
SceneGraph s;
void draw() {
s.draw(); }
int main(int argc, char* argv[]) {
ifstream in(argv[1]); in >> s;
in.close();

SceneGraph
– graph: std::list
+SceneGraph +~SceneGraph +draw() : void
+ operator>>: friend
Possible singleton class
isa
Circle
+ Circle
+ ~Circle
+ operator>>: friend